mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-07-25 00:13:09 +00:00
sing-box 域名嗅探相关优化
This commit is contained in:
@@ -218,7 +218,8 @@ EOF
|
||||
generate_route_and_inbounds_jsons() {
|
||||
#生成add_route.json
|
||||
#域名嗅探配置
|
||||
[ "$sniffer" != OFF ] && sniffer_set='{ "domain_suffix": [ "push.apple.com" ], "rule_set": [ "telegramip" ], "domain": [ "Mijia Cloud" ], "invert": true, "action": "sniff", "timeout": "500ms" },'
|
||||
grep -q 'telegramip' "$TMPDIR"/jsons/route.json && telegramip_set=' "rule_set": [ "telegramip" ],'
|
||||
[ "$sniffer" != OFF ] && sniffer_set='{ "domain_suffix": [ "push.apple.com" ],'"$telegramip_set"' "domain": [ "Mijia Cloud" ], "invert": true, "action": "sniff", "timeout": "500ms" },'
|
||||
[ "$ts_service" = ON ] && tailscale_set='{ "inbound": [ "ts-ep" ], "port": 53, "action": "hijack-dns" },'
|
||||
cat >"$TMPDIR"/jsons/add_route.json <<EOF
|
||||
{
|
||||
@@ -226,9 +227,9 @@ generate_route_and_inbounds_jsons() {
|
||||
"default_domain_resolver": "dns_resolver",
|
||||
"default_mark": $routing_mark,
|
||||
"rules": [
|
||||
{ "inbound": [ "dns-in" ], "action": "hijack-dns" },
|
||||
$tailscale_set
|
||||
$sniffer_set
|
||||
{ "inbound": [ "dns-in" ], "action": "hijack-dns" },
|
||||
{ "clash_mode": "Direct" , "outbound": "DIRECT" },
|
||||
{ "clash_mode": "Global" , "outbound": "GLOBAL" }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user