问题描述
想要在一台国内服务器搭建一个 socks5 代理,想到 clash 可以自定义规则,这里就用 clash 建一个简单的 socks5 代理。
解决方案
更新git仓库 kaminodalao/QuickProxy (github.com)
下载 clash Releases · Dreamacro/clash (github.com) 或 Release Premium 2022.03.19 · Dreamacro/clash (github.com) 速度慢可以使用 https://ghproxy.com/
wget https://github.com/Dreamacro/clash/releases/download/v1.10.0/clash-linux-amd64-v3-v1.10.0.gz
# wget https://ghproxy.com/https://github.com/Dreamacro/clash/releases/download/v1.10.0/clash-linux-amd64-v3-v1.10.0.gz
解压 .gz 压缩包
gzip -d clash-linux-amd64-v3-v1.10.0.gz
添加执行权限
sudo chmod +x clash-linux-amd64-v3-v1.10.0
运行 clash 创建配置文件
./clash-linux-amd64-v3-v1.10.0
如果长时间下载或下载失败 Country.mmdb ,按 Ctrl + C 结束进程,在 Loyalsoldier/geoip: 🌚 🌍 🌝 GeoIP 规则文件加强版,同时支持定制 V2Ray dat 格式路由规则文件 geoip.dat 和 MaxMind mmdb 格式文件 Country.mmdb。Enhanced edition of GeoIP files for V2Ray, Xray-core, Trojan-Go, Clash and Leaf, with replaced CN IPv4 CIDR available from ipip.net, appended CIDR lists and more. (github.com) 手动下载 Country.mmdb 放在 ~/.config/clash/ 目录内。
wget https://cdn.jsdelivr.net/gh/Loyalsoldier/[email protected]/Country.mmdb -N -P ~/.config/clash/
创建 clash 配置文件
nano ~/.config/clash/config.yaml
mixed-port: 7890
allow-lan: true
log-level: debug
rules:
- MATCH,DIRECT
启动 clash
./clash-linux-amd64-v3-v1.10.0
测试
文章评论