Clash软件支持Linux,这里以Ubuntu系统为例作为参考。
安装必要软件
#CentOS系统
yum install gunzip wget -y
#Ubuntu、Debian系统
apt-get install gunzip wget -y
在当前用户目录下创建 clash 文件夹。
cd ~ && mkdir clash && cd clash
下载Clash
wget --no-check-certificate https://github.com/Dreamacro/clash/releases/download/v1.2.0/clash-linux-amd64-v1.2.0.gz && gunzip clash-linux-amd64-v1.2.0.gz && mv clash-linux-amd64-v1.2.0 clash
默认安装的是v1.2.0版本,需要安装其他Clash软件版本请至官网下载
github.com/Dreamacro/clash/releases
配置订阅
先运行Clash,Clash会自动下载config.yaml和Country.mmdb这两个文件,Country.mmdb为ip库文件,Clash依靠它才能完成规则配置。国内下载Country.mmdb可能异常缓慢,可以去其他安装了clash的系统里复制Country.mmdb然后放进去。config.yaml为示例订阅文件,没什么用。
chmod + clash && ./clash -d .
下载订阅
rm -rf config.yaml && wget -O config.yaml --no-check-certificate "订阅链接"
米白云用户可登录网站并打开此页:Linux 使用使用教程。定位到第3步,获取完整命令以下载订阅。
重新启动clash并在后台允许
nohup ./clash -d . > /dev/null 2>&1 &
浏览器访问:clash.razord.top
进入网页版Clash设置页面,可以进行节点切换、规则更改等操作。
设置系统代理
以 Ubuntu 为例,打开系统设置,选择网络,点击网络代理右边的 ⚙ 按钮,选择手动,填写 HTTP 和 HTTPS 代理为 127.0.0.1:7890,填写 Socks 主机为 127.0.0.1:7891,即可启用系统代理。打开谷歌上网。
不想用了只需要把手动改成禁用即可。