Update README with clearer public access instructions

Clarify instructions for public access and key retrieval
This commit is contained in:
Arvin
2026-03-03 22:10:23 +08:00
committed by GitHub
parent 6725ff5555
commit a8014e6759

View File

@ -118,7 +118,7 @@ http://127.0.0.1:9090/ui
> 不建议直接将管理端口暴露到公网。
如果想要**公网访问**
编辑 `.env` 文件,设置公网访问并修改对外端口(建议范围2000060000)
编辑 `.env` 文件,设置公网访问并修改对外端口:
```
sudo bash -c 'echo "EXTERNAL_CONTROLLER=0.0.0.0:9099" > /opt/clash-for-linux/.env'
@ -130,6 +130,13 @@ sudo bash -c 'echo "EXTERNAL_CONTROLLER=0.0.0.0:9099" > /opt/clash-for-linux/.en
sudo systemctl restart clash-for-linux.service
```
密钥留空时:脚本可自动生成随机值
获取密钥命令:
```
sudo sed -nE 's/^[[:space:]]*secret:[[:space:]]*//p' "/opt/clash-for-linux/conf/config.yaml" | head -n 1
```
------
## ▶️ 开启 / 关闭系统代理