From a8014e6759e1ddacc804fbfd4dde8d1cb1f0ab99 Mon Sep 17 00:00:00 2001 From: Arvin <62139570+wnlen@users.noreply.github.com> Date: Tue, 3 Mar 2026 22:10:23 +0800 Subject: [PATCH] Update README with clearer public access instructions Clarify instructions for public access and key retrieval --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 393a3fc..0fa5908 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ http://127.0.0.1:9090/ui > 不建议直接将管理端口暴露到公网。 如果想要**公网访问** -编辑 `.env` 文件,设置公网访问并修改对外端口(建议范围20000–60000): +编辑 `.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 +``` + + ------ ## ▶️ 开启 / 关闭系统代理