1
0
mirror of https://github.com/nitezs/sub2sing-box.git synced 2024-12-23 21:14:43 -05:00

📝 Modify templates

This commit is contained in:
Nite07 2024-10-20 01:04:56 +08:00
parent 095c855259
commit 66e807ec16
2 changed files with 99 additions and 144 deletions

View File

@ -1,17 +1,30 @@
{ {
"log": { "log": {
"level": "info", "level": "trace",
"timestamp": true "timestamp": true
}, },
"dns": { "dns": {
"independent_cache": true, "servers": [
"fakeip": { {
"enabled": true, "tag": "google",
"inet4_range": "198.18.0.0/15", "address": "tls://8.8.8.8",
"inet6_range": "fc00::/18" "detour": "default"
}, },
"strategy": "prefer_ipv4", {
"tag": "local",
"address": "https://223.5.5.5/dns-query",
"detour": "direct"
},
{
"tag": "refused",
"address": "rcode://refused"
}
],
"rules": [ "rules": [
{
"rule_set": "geosite-category-ads-all",
"server": "refused"
},
{ {
"outbound": "any", "outbound": "any",
"server": "local" "server": "local"
@ -42,56 +55,45 @@
], ],
"server": "google", "server": "google",
"client_subnet": "114.114.114.114/24" "client_subnet": "114.114.114.114/24"
},
{
"query_type": ["A", "AAAA"],
"server": "fakeip"
} }
], ],
"servers": [ "final": "local"
{
"address": "tls://8.8.8.8",
"tag": "google"
},
{
"address": "https://223.5.5.5/dns-query",
"detour": "direct",
"tag": "local"
},
{
"tag": "fakeip",
"address": "fakeip"
}
]
}, },
"inbounds": [ "inbounds": [
{ {
"type": "tun", "type": "tun",
"address": [
"172.16.0.1/30",
"fdfe:dcba:9876::1/126"
],
"auto_route": true, "auto_route": true,
"auto_redirect": true, "auto_redirect": true,
"strict_route": true, "strict_route": true,
"exclude_interface": "tailscale0",
"sniff": true, "sniff": true,
"sniff_override_destination": true, "sniff_override_destination": true
"address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"]
} }
], ],
"outbounds": [ "outbounds": [
{ {
"outbounds": ["<all-proxy-tags>", "direct"], "type": "selector",
"tag": "default", "tag": "default",
"type": "selector" "outbounds": [
"\u003call-proxy-tags\u003e",
"direct"
]
}, },
{ {
"tag": "direct", "type": "direct",
"type": "direct" "tag": "direct"
}, },
{ {
"tag": "block", "type": "block",
"type": "block" "tag": "block"
}, },
{ {
"tag": "dns", "type": "dns",
"type": "dns" "tag": "dns"
} }
], ],
"route": { "route": {
@ -122,24 +124,7 @@
"outbound": "default" "outbound": "default"
}, },
{ {
"type": "logical", "rule_set": "geosite-google",
"mode": "or",
"rules": [
{
"port": 853
},
{
"network": "udp",
"port": 443
},
{
"protocol": "stun"
}
],
"outbound": "block"
},
{
"rule_set": ["geosite-google"],
"outbound": "default" "outbound": "default"
}, },
{ {
@ -160,6 +145,13 @@
} }
], ],
"rule_set": [ "rule_set": [
{
"type": "remote",
"tag": "geosite-category-ads-all",
"format": "binary",
"url": "https://ghp.ci/https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs",
"download_detour": "default"
},
{ {
"type": "remote", "type": "remote",
"tag": "geosite-geolocation-cn", "tag": "geosite-geolocation-cn",
@ -188,20 +180,6 @@
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-games@cn.srs", "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-games@cn.srs",
"download_detour": "default" "download_detour": "default"
}, },
{
"type": "remote",
"tag": "geosite-google@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google@cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-google-play@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google-play@cn.srs",
"download_detour": "default"
},
{ {
"type": "remote", "type": "remote",
"tag": "geosite-steam@cn", "tag": "geosite-steam@cn",
@ -232,10 +210,10 @@
"enabled": true "enabled": true
}, },
"clash_api": { "clash_api": {
"default_mode": "Enhanced",
"external_controller": "127.0.0.1:9090", "external_controller": "127.0.0.1:9090",
"external_ui": "./ui", "external_ui": "./ui",
"external_ui_download_detour": "default" "external_ui_download_detour": "default",
"default_mode": "Enhanced"
} }
} }
} }

View File

@ -1,17 +1,30 @@
{ {
"log": { "log": {
"level": "info", "level": "trace",
"timestamp": true "timestamp": true
}, },
"dns": { "dns": {
"independent_cache": true, "servers": [
"fakeip": { {
"enabled": true, "tag": "google",
"inet4_range": "198.18.0.0/15", "address": "tls://8.8.8.8",
"inet6_range": "fc00::/18" "detour": "default"
}, },
"strategy": "prefer_ipv4", {
"tag": "local",
"address": "https://223.5.5.5/dns-query",
"detour": "direct"
},
{
"tag": "refused",
"address": "rcode://refused"
}
],
"rules": [ "rules": [
{
"rule_set": "geosite-category-ads-all",
"server": "refused"
},
{ {
"outbound": "any", "outbound": "any",
"server": "local" "server": "local"
@ -42,55 +55,44 @@
], ],
"server": "google", "server": "google",
"client_subnet": "114.114.114.114/24" "client_subnet": "114.114.114.114/24"
},
{
"query_type": ["A", "AAAA"],
"server": "fakeip"
} }
], ],
"servers": [ "final": "local"
{
"address": "tls://8.8.8.8",
"tag": "google"
},
{
"address": "https://223.5.5.5/dns-query",
"detour": "direct",
"tag": "local"
},
{
"tag": "fakeip",
"address": "fakeip"
}
]
}, },
"inbounds": [ "inbounds": [
{ {
"type": "tun", "type": "tun",
"address": [
"172.16.0.1/30",
"fdfe:dcba:9876::1/126"
],
"auto_route": true, "auto_route": true,
"strict_route": true, "strict_route": true,
"exclude_interface": "tailscale0",
"sniff": true, "sniff": true,
"sniff_override_destination": true, "sniff_override_destination": true
"address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"]
} }
], ],
"outbounds": [ "outbounds": [
{ {
"outbounds": ["<all-proxy-tags>", "direct"], "type": "selector",
"tag": "default", "tag": "default",
"type": "selector" "outbounds": [
"\u003call-proxy-tags\u003e",
"direct"
]
}, },
{ {
"tag": "direct", "type": "direct",
"type": "direct" "tag": "direct"
}, },
{ {
"tag": "block", "type": "block",
"type": "block" "tag": "block"
}, },
{ {
"tag": "dns", "type": "dns",
"type": "dns" "tag": "dns"
} }
], ],
"route": { "route": {
@ -121,24 +123,7 @@
"outbound": "default" "outbound": "default"
}, },
{ {
"type": "logical", "rule_set": "geosite-google",
"mode": "or",
"rules": [
{
"port": 853
},
{
"network": "udp",
"port": 443
},
{
"protocol": "stun"
}
],
"outbound": "block"
},
{
"rule_set": ["geosite-google"],
"outbound": "default" "outbound": "default"
}, },
{ {
@ -153,13 +138,19 @@
"geosite-category-games@cn", "geosite-category-games@cn",
"geosite-steam@cn" "geosite-steam@cn"
] ]
}, }
{ "process_path_regex": ["^.+steamapps\\\\common.+"] }
], ],
"outbound": "direct" "outbound": "direct"
} }
], ],
"rule_set": [ "rule_set": [
{
"type": "remote",
"tag": "geosite-category-ads-all",
"format": "binary",
"url": "https://ghp.ci/https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs",
"download_detour": "default"
},
{ {
"type": "remote", "type": "remote",
"tag": "geosite-geolocation-cn", "tag": "geosite-geolocation-cn",
@ -188,20 +179,6 @@
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-games@cn.srs", "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-games@cn.srs",
"download_detour": "default" "download_detour": "default"
}, },
{
"type": "remote",
"tag": "geosite-google@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google@cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-google-play@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google-play@cn.srs",
"download_detour": "default"
},
{ {
"type": "remote", "type": "remote",
"tag": "geosite-steam@cn", "tag": "geosite-steam@cn",
@ -232,10 +209,10 @@
"enabled": true "enabled": true
}, },
"clash_api": { "clash_api": {
"default_mode": "Enhanced",
"external_controller": "127.0.0.1:9090", "external_controller": "127.0.0.1:9090",
"external_ui": "./ui", "external_ui": "./ui",
"external_ui_download_detour": "default" "external_ui_download_detour": "default",
"default_mode": "Enhanced"
} }
} }
} }