update:format

This commit is contained in:
Dich
2025-05-25 18:55:05 +08:00
parent e14e533551
commit 9c39c13f4c
10 changed files with 424 additions and 643 deletions

View File

@ -1,50 +1,35 @@
{ {
"dns": { "dns":
{
"independent_cache": true, "independent_cache": true,
"rules": [ "rules":
{ [
"outbound": "any", { "outbound": "any", "server": "dns-direct" },
"server": "dns-direct" { "query_type": [32, 33], "server": "dns-block" },
}, { "domain_suffix": ".lan", "server": "dns-block" },
{
"query_type": [
32,
33
], ],
"server": "dns-block" "servers":
}, [
{
"domain_suffix": ".lan",
"server": "dns-block"
}
],
"servers": [
{ {
"address": "https://8.8.8.8/dns-query", "address": "https://8.8.8.8/dns-query",
"address_resolver": "dns-local", "address_resolver": "dns-local",
"detour": "proxy", "detour": "proxy",
"strategy": "", "strategy": "",
"tag": "dns-remote" "tag": "dns-remote",
}, },
{ {
"address": "local", "address": "local",
"address_resolver": "dns-local", "address_resolver": "dns-local",
"detour": "direct", "detour": "direct",
"strategy": "", "strategy": "",
"tag": "dns-direct" "tag": "dns-direct",
}, },
{ { "address": "rcode://success", "tag": "dns-block" },
"address": "rcode://success", { "address": "local", "detour": "direct", "tag": "dns-local" },
"tag": "dns-block" ],
}, },
{ "inbounds":
"address": "local", [
"detour": "direct",
"tag": "dns-local"
}
]
},
"inbounds": [
{ {
"domain_strategy": "", "domain_strategy": "",
"listen": "127.0.0.1", "listen": "127.0.0.1",
@ -52,13 +37,12 @@
"sniff": true, "sniff": true,
"sniff_override_destination": false, "sniff_override_destination": false,
"tag": "mixed-in", "tag": "mixed-in",
"type": "mixed" "type": "mixed",
}
],
"log": {
"level": "info"
}, },
"outbounds": [ ],
"log": { "level": "info" },
"outbounds":
[
{ {
"domain_strategy": "", "domain_strategy": "",
"flow": "xtls-rprx-vision", "flow": "xtls-rprx-vision",
@ -66,111 +50,59 @@
"server": "服务器IP", "server": "服务器IP",
"server_port": 443, "server_port": 443,
"tag": "proxy", "tag": "proxy",
"tls": { "tls":
{
"enabled": true, "enabled": true,
"reality": { "reality":
{
"enabled": true, "enabled": true,
"public_key": "singbox生成公钥", "public_key": "singbox生成公钥",
"short_id": "singbox生成ID" "short_id": "singbox生成ID",
}, },
"server_name": "yahoo.com", "server_name": "yahoo.com",
"utls": { "utls": { "enabled": true, "fingerprint": "chrome" },
"enabled": true,
"fingerprint": "chrome"
}
}, },
"type": "vless", "type": "vless",
"uuid": "singbox生成UUID" "uuid": "singbox生成UUID",
}, },
{ { "tag": "direct", "type": "direct" },
"tag": "direct", { "tag": "bypass", "type": "direct" },
"type": "direct" { "tag": "block", "type": "block" },
}, { "tag": "dns-out", "type": "dns" },
{
"tag": "bypass",
"type": "direct"
},
{
"tag": "block",
"type": "block"
},
{
"tag": "dns-out",
"type": "dns"
}
], ],
"route": { "route":
{
"final": "proxy", "final": "proxy",
"rules": [ "rules":
[
{ "outbound": "dns-out", "protocol": "dns" },
{ {
"outbound": "dns-out", "domain": [],
"protocol": "dns" "domain_keyword": [],
"domain_regex": [],
"domain_suffix": ["appcenter.ms", "firebase.io", "crashlytics.com"],
"geosite": ["category-ads-all"],
"outbound": "block",
}, },
{ {
"domain": [ "domain": [],
], "domain_keyword": [],
"domain_keyword": [ "domain_regex": [],
], "domain_suffix": [],
"domain_regex": [ "geosite": ["cn"],
], "outbound": "bypass",
"domain_suffix": [
"appcenter.ms",
"firebase.io",
"crashlytics.com"
],
"geosite": [
"category-ads-all"
],
"outbound": "block"
},
{
"domain": [
],
"domain_keyword": [
],
"domain_regex": [
],
"domain_suffix": [
],
"geosite": [
"cn"
],
"outbound": "bypass"
},
{
"geoip": [
"cn",
"private"
],
"ip_cidr": [
],
"outbound": "bypass"
}, },
{ "geoip": ["cn", "private"], "ip_cidr": [], "outbound": "bypass" },
{ {
"network": "udp", "network": "udp",
"outbound": "block", "outbound": "block",
"port": [ "port": [135, 137, 138, 139, 5353],
135,
137,
138,
139,
5353
]
},
{
"ip_cidr": [
"224.0.0.0/3",
"ff00::/8"
],
"outbound": "block"
}, },
{ "ip_cidr": ["224.0.0.0/3", "ff00::/8"], "outbound": "block" },
{ {
"outbound": "block", "outbound": "block",
"source_ip_cidr": [ "source_ip_cidr": ["224.0.0.0/3", "ff00::/8"],
"224.0.0.0/3", },
"ff00::/8" ],
] },
}
]
}
} }

View File

@ -5,20 +5,20 @@
"server": "服务器IP", "server": "服务器IP",
"server_port": 443, "server_port": 443,
"uuid": "singbox生成UUID", "uuid": "singbox生成UUID",
"tls": { "tls":
{
"enabled": true, "enabled": true,
"server_name": "icloud.com", "server_name": "icloud.com",
"insecure": false, "insecure": false,
"reality": { "reality":
{
"enabled": true, "enabled": true,
"public_key": "singbox生成公钥", "public_key": "singbox生成公钥",
"short_id": "singbox生成ID" "short_id": "singbox生成ID",
}, },
"utls": { "utls": { "enabled": true, "fingerprint": "chrome" },
"enabled": true,
"fingerprint": "chrome"
}
}, },
"flow": "xtls-rprx-vision" "flow": "xtls-rprx-vision",
} },
] ]

View File

@ -1,82 +1,62 @@
{ {
"dns": { "dns":
"servers": [
{ {
"tag": "google", "servers":
"address": "tls://8.8.8.8" [
}, { "tag": "google", "address": "tls://8.8.8.8" },
{ {
"tag": "local", "tag": "local",
"address": "https://223.5.5.5/dns-query", "address": "https://223.5.5.5/dns-query",
"detour": "direct" "detour": "direct",
} },
], ],
"rules": [ "rules":
{ [
"outbound": "any", { "outbound": "any", "server": "local" },
"server": "local" { "clash_mode": "Direct", "server": "local" },
}, { "clash_mode": "Global", "server": "google" },
{ { "rule_set": "geosite-geolocation-cn", "server": "local" },
"clash_mode": "Direct", { "clash_mode": "Default", "server": "google" },
"server": "local"
},
{
"clash_mode": "Global",
"server": "google"
},
{
"rule_set": "geosite-geolocation-cn",
"server": "local"
},
{
"clash_mode": "Default",
"server": "google"
},
{ {
"type": "logical", "type": "logical",
"mode": "and", "mode": "and",
"rules": [ "rules":
{ [
"rule_set": "geosite-geolocation-!cn", { "rule_set": "geosite-geolocation-!cn", "invert": true },
"invert": true { "rule_set": "geoip-cn" },
},
{
"rule_set": "geoip-cn"
}
], ],
"server": "local" "server": "local",
}
]
}, },
"route": { ],
"rule_set": [ },
"route":
{
"rule_set":
[
{ {
"type": "remote", "type": "remote",
"tag": "geosite-geolocation-cn", "tag": "geosite-geolocation-cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
}, },
{ {
"type": "remote", "type": "remote",
"tag": "geosite-geolocation-!cn", "tag": "geosite-geolocation-!cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
}, },
{ {
"type": "remote", "type": "remote",
"tag": "geoip-cn", "tag": "geoip-cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
}
]
}, },
"experimental": { ],
"cache_file": { },
"enabled": true, "experimental":
"store_rdrc": true {
"cache_file": { "enabled": true, "store_rdrc": true },
"clash_api": { "default_mode": "Enhanced" },
}, },
"clash_api": {
"default_mode": "Enhanced"
}
}
} }

View File

@ -1,79 +1,61 @@
{ {
"dns": { "dns":
"servers": [
{ {
"tag": "google", "servers":
"address": "tls://8.8.8.8" [
}, { "tag": "google", "address": "tls://8.8.8.8" },
{ {
"tag": "local", "tag": "local",
"address": "https://223.5.5.5/dns-query", "address": "https://223.5.5.5/dns-query",
"detour": "direct" "detour": "direct",
} },
], ],
"rules": [ "rules": [
{ { "outbound": "any", "server": "local" },
"outbound": "any", { "clash_mode": "Direct", "server": "local" },
"server": "local" { "clash_mode": "Global", "server": "google" },
}, { "rule_set": "geosite-geolocation-cn", "server": "local" },
{
"clash_mode": "Direct",
"server": "local"
},
{
"clash_mode": "Global",
"server": "google"
},
{
"rule_set": "geosite-geolocation-cn",
"server": "local"
},
{ {
"type": "logical", "type": "logical",
"mode": "and", "mode": "and",
"rules": [ "rules":
{ [
"rule_set": "geosite-geolocation-!cn", { "rule_set": "geosite-geolocation-!cn", "invert": true },
"invert": true { "rule_set": "geoip-cn" },
},
{
"rule_set": "geoip-cn"
}
], ],
"server": "google", "server": "google",
"client_subnet": "114.114.114.114/24" // Any China client IP address "client_subnet": "114.114.114.114/24", #Any China client IP address
}
]
}, },
"route": { ],
"rule_set": [ },
"route":
{
"rule_set":
[
{ {
"type": "remote", "type": "remote",
"tag": "geosite-geolocation-cn", "tag": "geosite-geolocation-cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
}, },
{ {
"type": "remote", "type": "remote",
"tag": "geosite-geolocation-!cn", "tag": "geosite-geolocation-!cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
}, },
{ {
"type": "remote", "type": "remote",
"tag": "geoip-cn", "tag": "geoip-cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
}
]
}, },
"experimental": { ],
"cache_file": { },
"enabled": true, "experimental":
"store_rdrc": true {
"cache_file": { "enabled": true, "store_rdrc": true },
"clash_api": { "default_mode": "Enhanced" },
}, },
"clash_api": {
"default_mode": "Enhanced"
}
}
} }

View File

@ -1,73 +1,48 @@
{ {
"dns": { "dns":
"servers": [
{ {
"tag": "google", "servers":
"address": "tls://8.8.8.8" [
}, { "tag": "google", "address": "tls://8.8.8.8" },
{ { "tag": "local", "address": "223.5.5.5", "detour": "direct" },
"tag": "local", { "tag": "remote", "address": "fakeip" },
"address": "223.5.5.5",
"detour": "direct"
},
{
"tag": "remote",
"address": "fakeip"
}
], ],
"rules": [ "rules":
{ [
"outbound": "any", { "outbound": "any", "server": "local" },
"server": "local" { "query_type": ["A", "AAAA"], "server": "remote" },
},
{
"query_type": [
"A",
"AAAA"
], ],
"server": "remote" "fakeip":
} {
],
"fakeip": {
"enabled": true, "enabled": true,
"inet4_range": "198.18.0.0/15", "inet4_range": "198.18.0.0/15",
"inet6_range": "fc00::/18" "inet6_range": "fc00::/18",
}, },
"independent_cache": true "independent_cache": true,
}, },
"inbounds": [ "inbounds":
[
{ {
"type": "tun", "type": "tun",
"inet4_address": "172.19.0.1/30", "inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/126", "inet6_address": "fdfe:dcba:9876::1/126",
"auto_route": true, "auto_route": true,
"strict_route": true "strict_route": true,
} },
], ],
"outbounds": [ "outbounds": [
// ... # ...
{ "type": "direct", "tag": "direct" },
{ "type": "dns", "tag": "dns-out" },
],
"route":
{ {
"type": "direct", "rules":
"tag": "direct" [
{ "protocol": "dns", "outbound": "dns-out" },
{ "geoip": ["private"], "outbound": "direct" },
],
"auto_detect_interface": true,
}, },
{ } #
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geoip": [
"private"
],
"outbound": "direct"
}
],
"auto_detect_interface": true
}
}

View File

@ -1,79 +1,53 @@
{ {
"outbounds": [ "outbounds":
{ [
"type": "direct", { "type": "direct", "tag": "direct" },
"tag": "direct" { "type": "block", "tag": "block" },
},
{
"type": "block",
"tag": "block"
}
], ],
"route": { "route":
"rules": [ {
"rules":
[
{ {
"type": "logical", "type": "logical",
"mode": "or", "mode": "or",
"rules": [ "rules": [{ "protocol": "dns" }, { "port": 53 }],
{ "outbound": "dns",
"protocol": "dns"
},
{
"port": 53
}
],
"outbound": "dns"
},
{
"ip_is_private": true,
"outbound": "direct"
},
{
"clash_mode": "Direct",
"outbound": "direct"
},
{
"clash_mode": "Global",
"outbound": "default"
}, },
{ "ip_is_private": true, "outbound": "direct" },
{ "clash_mode": "Direct", "outbound": "direct" },
{ "clash_mode": "Global", "outbound": "default" },
{ {
"type": "logical", "type": "logical",
"mode": "or", "mode": "or",
"rules": [ "rules":
{ [
"port": 853 { "port": 853 },
{ "network": "udp", "port": 443 },
{ "protocol": "stun" },
],
"outbound": "block",
}, },
{ {
"network": "udp", "rule_set": ["geoip-cn", "geosite-geolocation-cn"],
"port": 443 "outbound": "direct",
}, },
{
"protocol": "stun"
}
], ],
"outbound": "block" "rule_set":
}, [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn"
],
"outbound": "direct"
}
],
"rule_set": [
{ {
"type": "remote", "type": "remote",
"tag": "geoip-cn", "tag": "geoip-cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
}, },
{ {
"type": "remote", "type": "remote",
"tag": "geosite-geolocation-cn", "tag": "geosite-geolocation-cn",
"format": "binary", "format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs" "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
} },
] ],
} },
} }

View File

@ -1,56 +1,36 @@
{ {
"dns": { "dns":
"servers": [
{ {
"tag": "google", "servers":
"address": "tls://8.8.8.8" [
}, { "tag": "google", "address": "tls://8.8.8.8" },
{ { "tag": "local", "address": "223.5.5.5", "detour": "direct" },
"tag": "local",
"address": "223.5.5.5",
"detour": "direct"
}
], ],
"rules": [ "rules": [{ "outbound": "any", "server": "local" }],
{
"outbound": "any",
"server": "local"
}
]
}, },
"inbounds": [ "inbounds":
[
{ {
"type": "tun", "type": "tun",
"inet4_address": "172.19.0.1/30", "inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/126", "inet6_address": "fdfe:dcba:9876::1/126",
"auto_route": true, "auto_route": true,
"strict_route": false "strict_route": false,
} },
], ],
"outbounds": [ "outbounds": [
// ... # // ...
{ "type": "direct", "tag": "direct" },
{ "type": "dns", "tag": "dns-out" },
],
"route":
{ {
"type": "direct", "rules":
"tag": "direct" [
{ "protocol": "dns", "outbound": "dns-out" },
{ "geoip": ["private"], "outbound": "direct" },
],
"auto_detect_interface": true,
}, },
{ } #
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geoip": [
"private"
],
"outbound": "direct"
}
],
"auto_detect_interface": true
}
}

View File

@ -1,56 +1,36 @@
{ {
"dns": { "dns":
"servers": [
{ {
"tag": "google", "servers":
"address": "tls://8.8.8.8" [
}, { "tag": "google", "address": "tls://8.8.8.8" },
{ { "tag": "local", "address": "223.5.5.5", "detour": "direct" },
"tag": "local",
"address": "223.5.5.5",
"detour": "direct"
}
], ],
"rules": [ "rules": [{ "outbound": "any", "server": "local" }],
{ "strategy": "ipv4_only",
"outbound": "any",
"server": "local"
}
],
"strategy": "ipv4_only"
}, },
"inbounds": [ "inbounds":
[
{ {
"type": "tun", "type": "tun",
"inet4_address": "172.19.0.1/30", "inet4_address": "172.19.0.1/30",
"auto_route": true, "auto_route": true,
"strict_route": false "strict_route": false,
} },
], ],
"outbounds": [ "outbounds": [
// ... #// ...
{ "type": "direct", "tag": "direct" },
{ "type": "dns", "tag": "dns-out" },
],
"route":
{ {
"type": "direct", "rules":
"tag": "direct" [
{ "protocol": "dns", "outbound": "dns-out" },
{ "geoip": ["private"], "outbound": "direct" },
],
"auto_detect_interface": true,
}, },
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geoip": [
"private"
],
"outbound": "direct"
}
],
"auto_detect_interface": true
}
} }

View File

@ -1,59 +1,37 @@
{ {
"log": { "log": { "level": "info" },
"level": "info" "dns": { "servers": [{ "address": "tls://8.8.8.8" }] },
}, "inbounds":
"dns": { [
"servers": [
{
"address": "tls://8.8.8.8"
}
]
},
"inbounds": [
{ {
"type": "vless", "type": "vless",
"tag": "VLESSReality", "tag": "VLESSReality",
"listen": "::", "listen": "::",
"listen_port": 443, "listen_port": 443,
"users": [ "users":
[
{ {
"name": "AK-JP-100G", "name": "AK-JP-100G",
"uuid": "singbox生成", "uuid": "singbox生成",
"flow": "xtls-rprx-vision" "flow": "xtls-rprx-vision",
} },
], ],
"tls": { "tls":
{
"enabled": true, "enabled": true,
"server_name": "s0.awsstatic.com", "server_name": "s0.awsstatic.com",
"reality": { "reality":
{
"enabled": true, "enabled": true,
"handshake": { "handshake":
"server": "s0.awsstatic.com", { "server": "s0.awsstatic.com", "server_port": 443 },
"server_port": 443
},
"private_key": "singbox生成", "private_key": "singbox生成",
"short_id": [ "short_id": ["singbox生成"],
"singbox生成" },
] },
}
}
}
],
"outbounds": [
{
"type": "direct"
}, },
{
"type": "dns",
"tag": "dns-out"
}
], ],
"route": { "outbounds": [{ "type": "direct" }, { "type": "dns", "tag": "dns-out" }],
"rules": [ "route": { "rules": [{ "protocol": "dns", "outbound": "dns-out" }] },
{
"protocol": "dns",
"outbound": "dns-out"
}
]
}
} }