安装go,配置go镜像代理
brew install go
go env -w GO111MODULE=on
go env -w GOPROXY="https://goproxy.io,direct"
镜像配置参考
GOPATH环境变量配置(根据自己需求调整)
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
安装clash
go get -u -v http://github.com/Dreamacro/clash
配置clash
参考
https://github.com/Dreamacro/clash/wiki/configuration
mixed-port: 7890
allow-lan: false
bind-address: '*'
mode: rule
log-level: info
proxies:
- name: "myal"
type: ss
server: xxxxxxxx
port: "xxxx"
cipher: xxxxxxx
password: xxxxxxx
- name: "mydo"
type: ss
server: xxxxxxxx
port: "xxxx"
cipher: xxxxxxxx
password: xxxxxxxxx
proxy-groups:
- name: Proxy
type: url-test
proxies:
- myal
- mydo
url: 'https://www.google.com'
interval: 300
rules:
- DOMAIN-SUFFIX,google.com,Proxy
- DOMAIN-KEYWORD,google,Proxy
- DOMAIN-KEYWORD,google-analytics.com,Proxy
- DOMAIN-KEYWORD,gtatic.com,Proxy
- DOMAIN-KEYWORD,tensorflow.org,Proxy
- DOMAIN-KEYWORD,github.io,Proxy
- DOMAIN-KEYWORD,github.com,Proxy
- DOMAIN-KEYWORD,quora.com,Proxy
- DOMAIN-KEYWORD,twitter,Proxy
- IP-CIDR,127.0.0.0/8,DIRECT
- GEOIP,CN,DIRECT
- MATCH,Proxy
启动clash
