fix: overall tun/tproxy improvements

This commit is contained in:
fufsob committed 2026-09-16 14:18:16 +00:00
1 parent ff04debf90
commit 32341ba323
29 files changed
+445 -149

No files matched your search

+2 -1
View File
@@ -186,7 +186,8 @@ def portable_xray(cfg, only=None):
balanced = bool(routing.get("balancers"))
rules = []
for rule in routing.get("rules") or []:
if set(rule.get("inboundTag") or []) - {"mixed-in"}:
# "local" and "remote" are DNS servers' own queries: a proxy's name resolves direct.
if set(rule.get("inboundTag") or []) - {"mixed-in", "local", "remote"}:
continue
if rule.get("outboundTag") in dropped:
if balanced:
+2
View File
@@ -77,6 +77,7 @@ def xray_config():
"routing": {
"rules": [
{"type": "field", "inboundTag": ["tproxy-in"], "outboundTag": "direct"},
{"type": "field", "inboundTag": ["local"], "outboundTag": "direct"},
{"type": "field", "domain": ["geosite:google"], "outboundTag": "proxy-suite-ob-warp"},
{"type": "field", "network": "tcp,udp", "balancerTag": "proxy"},
],
@@ -188,6 +189,7 @@ class XrayTest(unittest.TestCase):
self.assertEqual(
cfg["routing"]["rules"],
[
{"type": "field", "inboundTag": ["local"], "outboundTag": "direct"},
{"type": "field", "domain": ["geosite:google"], "balancerTag": "proxy"},
{"type": "field", "network": "tcp,udp", "balancerTag": "proxy"},
],