🚀 Linux 服务器运行 Clash 简易教程


📥 步骤 1:上传 Clash 到服务器

你可以直接拖动上传,或使用 scp

1
scp clash-linux-amd64 root@your_server_ip:~/

📂 步骤 2:上传配置文件

同样可以直接拖动上传,或执行以下命令:

1
2
mkdir -p ~/.config/clash
scp config.yaml root@your_server_ip:~/.config/clash/

🔑 步骤 3:赋予执行权限

1
chmod u+x ~/clash

▶️ 步骤 4:运行 Clash

1
~/clash

输出示例:

1
2
INFO[0000] Mixed(http+socks5) proxy listening at: :7890
INFO[0000] RESTful API listening at: 127.0.0.1:9090

🌐 步骤 5:新开终端,设置代理并执行脚本

1
2
3
4
5
6
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890

bash your_download_script.sh
# 或者
python your_script.py

✨ 至此,Clash 已经在你的 Linux 服务器上成功运行,可以配合代理正常使用啦!


https://chengz23.github.io/2025/09/28/Linux服务器挂载梯子/
作者
chengz23
发布于
2025年9月28日
许可协议