Merge pull request #97 from wnlen/codex/identify-project-shortcomings-s8w8du

Warn about legacy profile script and migrate to /etc/profile.d/clash-for-linux.sh
This commit is contained in:
wnlen
2026-01-13 22:57:16 +08:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,8 @@
- 运行前请手动更改`.env`文件中的`CLASH_URL`变量值,否则无法正常运行。 - 运行前请手动更改`.env`文件中的`CLASH_URL`变量值,否则无法正常运行。
- 默认将管理面板仅绑定到本机(`127.0.0.1:9090`),如需对外访问请在`.env`中自行配置并确保`CLASH_SECRET`足够复杂。 - 默认将管理面板仅绑定到本机(`127.0.0.1:9090`),如需对外访问请在`.env`中自行配置并确保`CLASH_SECRET`足够复杂。
- 默认开启 TLS 证书校验,若确需跳过校验请在`.env`中设置`ALLOW_INSECURE_TLS=true`(不推荐)。 - 默认开启 TLS 证书校验,若确需跳过校验请在`.env`中设置`ALLOW_INSECURE_TLS=true`(不推荐)。
- 如从旧版本升级,若存在 `/etc/profile.d/clash.sh` 请按需清理或改用新的 `/etc/profile.d/clash-for-linux.sh`
- 当前在RHEL系列和Debian系列Linux系统中测试过其他系列可能需要适当修改脚本。 - 当前在RHEL系列和Debian系列Linux系统中测试过其他系列可能需要适当修改脚本。
- 支持 x86_64/aarch64 平台 - 支持 x86_64/aarch64 平台

View File

@ -248,6 +248,9 @@ fi
echo '' echo ''
# 添加环境变量(root权限) - 使用配置的端口 # 添加环境变量(root权限) - 使用配置的端口
if [ -f /etc/profile.d/clash.sh ]; then
echo -e "\033[33m[WARN] 检测到旧版环境变量文件 /etc/profile.d/clash.sh建议确认是否需要清理\033[0m"
fi
cat>/etc/profile.d/clash-for-linux.sh<<EOF cat>/etc/profile.d/clash-for-linux.sh<<EOF
# 开启系统代理 # 开启系统代理
function proxy_on() { function proxy_on() {