1.安装go,配置go镜像代理
brew install go go env -w GO111MODULE=on go env -w GOPROXY=""镜像配置参考
GOPROXY.IO - A Global Proxy for Go Modules
GOPATH环境变量配置(根据自己需求调整)
export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin2.安装clash
go get -u -v github.com/Dreamacro/clash3.配置clash
参考 Dreamacro/clash
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: 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,Proxy4.启动clash
clash