📝 版本描述更新

This commit is contained in:
chaos-zhu 2024-08-20 10:50:37 +08:00
parent 124f3b32ec
commit b3a6f19ddd
2 changed files with 5 additions and 3 deletions

View File

@ -36,7 +36,7 @@ docker run -d --net=host --restart=always -v /root/easynode/db:/easynode/app/db
```
环境变量:
- `DEBUG`: 启动debug日志 0关闭 1开启, 默认关闭
- `ALLOWED_IPS`: 运行访问服务的IP, 多个使用逗号分隔, 例如: -e ALLOWED_IPS=127.0.0.1,127.0.0.2
- `ALLOWED_IPS`: 运行访问服务的IP, 多个使用逗号分隔, 例如: `-e ALLOWED_IPS=127.0.0.1,127.0.0.2`
### 手动部署
@ -102,7 +102,7 @@ curl -o- https://mirror.ghproxy.com/https://raw.githubusercontent.com/chaos-zhu/
首先声明任何系统无法保障没有bug的存在EasyNode也一样。
建议使用 **iptables** 限制IP访问或者不将面板服务暴露到公网能使得安全性大大提升
面板提供了IP访问白名单配置, 可配合**iptables** 限制IP访问, 安全性将得到保障。如果需要更高级别的安全性,建议面板服务不要暴露到公网
webssh与监控服务都将以`该服务器作为中转`。中国大陆用户建议使用香港、新加坡、日本、韩国等地区的低延迟服务器来安装服务端面板

View File

@ -235,7 +235,9 @@ let allowedIPs = process.env.ALLOWED_IPS ? process.env.ALLOWED_IPS.split(',') :
if (allowedIPs) consola.warn('allowedIPs:', allowedIPs)
const isAllowedIp = (requestIP) => {
if (allowedIPs.length === 0) return true
return allowedIPs.some(item => item.includes(requestIP))
let flag = allowedIPs.some(item => requestIP.includes(item))
if (!flag) consola.warn('requestIP:', requestIP, '不在允许的IP列表中')
return flag
}
module.exports = {