目录

多 Clash 分流配置

实现多地区 Clash 进行分流,更加灵活应对网络策略

配置规划

  • 文件夹
    • 顶级:proxy
    • 配置:clash
  • 文件名
    • uk-config
    • uk-clash
  • 端口分配
    • 7890 - CN
    • 7891 - HK
    • 7892 - UK
    • 7893 - TW

服务端

配置文件

clash/uk-config.yaml

socks-port: 7890

allow-lan: true
bind-address: "*"

mode: rule

proxy-providers:
  config:
	type: http
	path: ./config.yaml
	url: https://wishrd.cn/uk-clash.yaml
	interval: 7200
	health-check:
	  enable: true
	  url: http://www.gstatic.com/generate_204
	  interval: 300

proxy-groups:
  - name: "Proxy"
	type: url-test
	use:
	  - config

rules:
  - MATCH,Proxy

启动文件

docker-compose.uk-clash.yaml

version: "3.7"

services:
  clash:
	image: dreamacro/clash:latest
	ports:
	  - "9910:7890/tcp"
	  - "9910:7890/udp"
	volumes:
	  - ./clash/uk-config.yaml:/root/.config/clash/config.yaml

客户端

Windows

  • Proxifier

规则(仅供参考)

  • SbProxy - 可选
    • Applications - chrome.exe
    • Target hosts
      • *.google.com
  • SwProxy - 全局
    • Applications
      • chrome.exe; git.exe; scp.exe; mstsc.exe; node.exe; curl.exe; Termius.exe; ngrok.exe; ssh.exe; putty.exe; Xshell.exe; Xshell6Portable.exe; XshellCore.exe; MobaXterm_Personal_12.4.exe; XWin_MobaX.exe; MoTTY.exe; VNC-Viewer.exe; Postman.exe; 17monipdb.exe; TRACERT.EXE; kubectl.exe; gcloud.exe; putty.exe; python.exe; sh.exe; cloud_sql_proxy_x64.exe;