Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

下载clash

下载linux-amd64的版本

https://github.com/Dreamacro/clash/releases

解压运行

1
2
3
mkdir tmp && cp clash-linux-amd64-v1.9.0.gz tmp/ && cd tmp/
gunzip clash-linux-amd64-v1.9.0.gz
/clash-linux-amd64-v1.9.0

此时会提示:

1
2
INFO[0000] Can't find config, create a initial config file 
INFO[0000] Can't find MMDB, start download

‎clash会自动在~/.config/下创建clash文件夹,里面有config.yaml 与Country.mmdb 2个文件,config.yaml 为空文件,Country.mmdb为正在下载的文件,等待Country.mmdb下载完成之后关闭clash程序,将config.yaml 替换为自己的托管文件。 这个文件一般的商家会提供,

Trojan/V2ray订阅
手动导入 – 复制订阅链接

第一个/第二个在浏览器中打开,获取下载文件:

1
cp Downloads/Paoluz_Cat4Tj .config/clash/config.yaml -vi

系统配置

打开config.yaml文件,开头如下

1
2
3
4
5
6
7
---
port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: silent
external-controller: 0.0.0.0:9090

再点开系统设置->网络->网络代理,配置如下

手动

1
2
3
4
http代理    127.0.0.1        7890
https代理 127.0.0.1 7890
Socks主机 7891
忽略主机 localhost, 127.0.0.0/8, ::1

运行测试

运行clash:

1
./clash***

打开网页http://clash.razord.top/ ,选择一条代理路线(设置为自动可忽略

恢复正常上网

关闭Clash程序,这时无法正常上网,需要把网络代理设置为禁用,才可以正常上网。

而运行Clash上网,则需要再次开启网络代理。

参考文献:https://www.codenong.com/cs106423935/

评论