167 字
1 分钟
warp代理模式 + sing-box
使用的软件
warp本体
sing-box
warp的配置
我是连接自己的Zero Trust,省心
核心点:
在设备配置文件处,修改设备隧道协议为MASQUE
服务模式选择代理模式
自动连接打开
sing-box的配置
sing-box的配置我并没有完全搞懂,但是核心点是:
代理本身的所有流量,但是排除warp,我这里贴一个我自己使用的配置文件(虽然里面是抄的别人的改的):
{ "log": { "level": "info", "timestamp": true }, "dns": { "rules": [ { "clash_mode": "Proxy", "server": "remote" }, { "clash_mode": "Direct", "server": "remote" }, { "rule_set": [ "geosite-cn", "geoip-cn" ], "server": "remote" } ], "servers": [ { "type": "https", "server": "1.1.1.1", "detour": "warp-local", "tag": "remote" }, { "type": "https", "server": "223.5.5.5", "tag": "local" }, { "type": "hosts", "path": [], "predefined": {}, "tag": "block" }, { "type": "local" } ], "strategy": "prefer_ipv4" }, "inbounds": [ { "interface_name": "sing-box-tun", "address": [ "172.18.0.1/30", "fdfe:dcba:9876::1/126" ], "route_address": [ "0.0.0.0/1", "128.0.0.0/1", "::/1", "8000::/1" ], "route_exclude_address": [ "192.168.0.0/16", "10.0.0.0/8", "172.16.0.0/12", "172.19.0.0/12", "fc00::/7", "172.18.0.1/30" ], "auto_route": true, "auto_redirect": true, "strict_route": true, "type": "tun" } ], "outbounds": [ { "type": "socks", "tag": "warp-local", "server": "127.0.0.1", "server_port": 40000 }, { "type": "direct", "tag": "direct" } ], "route": { "final": "warp-local", "auto_detect_interface": true, "default_domain_resolver": "local", "rules": [ { "action": "sniff" }, { "protocol": "dns", "action": "hijack-dns" }, { "clash_mode": "Direct", "outbound": "direct" }, { "clash_mode": "Proxy", "outbound": "warp-local" }, { "domain": [ "my.dnshe.com", "fonts.googleapis.com" ], "outbound": "direct" }, { "rule_set": [ "geosite-cn", "geoip-cn" ], "outbound": "direct" }, { "ip_is_private": true, "outbound": "direct" }, { "process_path": [ "/usr/bin/warp-svc" ], "outbound": "direct" } ], "rule_set": [ { "tag": "geoip-cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs", "download_detour": "warp-local" }, { "tag": "geosite-cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs", "download_detour": "warp-local" } ] }, "experimental": { "cache_file": { "enabled": true } }}开机自动开启两个服务
systemctl enable --now warp-svcsystemctl enable --now sing-boxwarp的连接方式和上个文档的一致:
warp-cli registration new <你的Zero Trust组织名>warp-cli registration token "com.cloudflare.warp://<你的组织名>.cloudflareaccess.com/auth?token=<token>" --------可选warp-cli connect --------可选用warp-cli status 查看连接状态
warp代理模式 + sing-box
https://blog.hongchenduzhe.qzz.io/posts/warp_2/ 部分信息可能已经过时









