diff --git a/app/bot.php b/app/bot.php index 5a6d891..6cf583c 100644 --- a/app/bot.php +++ b/app/bot.php @@ -6499,7 +6499,7 @@ DNS-over-HTTPS with IP: $c['route'] = $this->createRuleSet($c['route'], $uid, $domain); if (!empty($c['route']['rules'])) { foreach ($c['route']['rules'] as $k => $v) { - if (count($v) < 2) { + if (count($v) == 1 && array_key_exists('outbound', $v)) { unset($c['route']['rules'][$k]); } } diff --git a/config/sing.json b/config/sing.json index e5faae1..610ff6d 100644 --- a/config/sing.json +++ b/config/sing.json @@ -9,12 +9,12 @@ "tag": "tun-in", "domain_strategy": "prefer_ipv4", "interface_name": "sing-tun", - "address": ["172.19.0.1\/30"], + "address": [ + "172.19.0.1\/30" + ], "mtu": 1400, - "gso": true, "auto_route": true, "strict_route": true, - "sniff": true, "endpoint_independent_nat": false, "stack": "mixed", "platform": { @@ -27,14 +27,7 @@ }, { "type": "mixed", - "tag": "mixed-in", - "domain_strategy": "prefer_ipv4", - "listen": "127.0.0.1", - "listen_port": 2080, - "tcp_fast_open": true, - "sniff": true, - "sniff_override_destination": false, - "users": [] + "tag": "in" } ], "dns": { @@ -92,23 +85,28 @@ { "type": "direct", "tag": "direct" - }, - { - "type": "block", - "tag": "block" - }, - { - "type": "dns", - "tag": "dns-out" } ], "route": { "auto_detect_interface": true, "override_android_vpn": true, "rules": [ + { + "action": "sniff" + }, { "protocol": "dns", - "outbound": "dns-out" + "action": "hijack-dns" + }, + { + "inbound": "in", + "action": "resolve", + "strategy": "prefer_ipv4" + }, + { + "inbound": "in", + "action": "sniff", + "timeout": "1s" }, { "addruleset": true, @@ -187,7 +185,7 @@ ] } ], - "outbound": "block" + "action": "reject" }, { "addruleset": true, @@ -207,4 +205,4 @@ ], "final": "direct" } -} +} \ No newline at end of file