{ "log": { "level": "info", "timestamp": true }, "dns": { "servers": [ { "tag": "cn-dns", "detour": "proxy", "address": "223.5.5.5", "strategy": "ipv4_only" } ], "rules": [ ], "final": "cn-dns", "independent_cache": true, "strategy": "ipv4_only" }, "inbounds": [ { "type": "tun", "tag": "tun-in", "address": [ "172.19.0.1/30", "fdfe:dcba:9876::1/126" ], "auto_route": true, "strict_route": true // Linux 可以加上:"auto_redirect": true } ], "outbounds": [ { "type": "hysteria2", "tag": "proxy", "server": "23.27.28.64", // VPS ip "server_port": 50001, "up_mbps": 20, //上传速率,实际填写,过大会导致流量浪费 "down_mbps": 150, //下载速率,实际填写,过大会导致流量浪费 "password": "LER1SPLqYBFp3UUv7JQBe+6b", //hysteria2 服务密码 "tls": { "enabled": true, "server_name": "bing.com", //若域名搭建,请填写域名,若IP搭建,请填写 bing.com "insecure": true //若域名搭建,请填写 false,若IP搭建,请填写 true } }, { "type": "direct", "tag": "direct" } ], "route": { "final": "proxy", "auto_detect_interface": true, "rules": [ { "action": "sniff" }, { // 劫持所有 DNS(协议/53端口),不让它直接从本机出去 "type": "logical", "mode": "or", "rules": [ { "protocol": "dns" }, { "port": 53 } ], "action": "hijack-dns" }, { // 内网直连(访问路由器/局域网设备) "ip_is_private": true, "outbound": "direct" }, { // 拦截常见绕过系统 DNS 的方式:DoT / QUIC / STUN "type": "logical", "mode": "or", "rules": [ { "port": 853 }, { "network": "udp", "port": 443 }, { "protocol": "stun" } ], "action": "reject" } // 其他全部走 final = proxy(即回国节点) ] }, "experimental": { "cache_file": { "enabled": true, "store_rdrc": true } } }