clash命令行
1. 下载
使用clash-for-linux:
1 | git clone git@github.com:wnlen/clash-for-linux.git |
2. 修改配置
取消下载config:修改start.sh,注释掉以下几行:
1 | curl -o /dev/null -s -m 10 --connect-timeout 10 -w %{http_code} $URL | grep '[23][0-9][0-9]' &>/dev/null |
3. 加入clash.yaml文件
路径是temp/clash.yaml。然后要注意把RULE_SET注释掉
4. 修改密码
修改.env文件中以下:
1 | export CLASH_SECRET='123456' |
5. 启动
1 | sudo bash start.sh |
注意要记住生成的secret
6. 修改
前端将会在9090端口可用。在界面上修改GLobal为对应配置即可。
参考
Linux中安装Clash并且实现全局代理(纯命令行) – Mr.浮熙的blog
wnlen/clash-for-linux: clash-for-linux
上传了规则,但为啥还会报error: unsupported rule type RULE-SET” · Issue #681 · vernesong/OpenClash
在 Linux 终端下通过 CLI 使用 Clash 应用 | Clash for Windows 代理工具使用说明
nelvko/clash-for-linux-install: 😼 优雅地部署基于 clash/mihomo 的代理环境
- Title: clash命令行
- Author: Ethereal
- Created at: 2025-06-02 00:52:18
- Updated at: 2025-06-02 01:04:50
- Link: https://ethereal-o.github.io/2025/06/02/clash命令行/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments