Merge pull request #233 from SeyedHashtag/original

improved config for singbox 1.12
This commit is contained in:
Whispering Wind
2025-08-04 23:53:23 +03:30
committed by GitHub

View File

@ -1,154 +1,158 @@
{ {
"log": {
"level": "info",
"timestamp": true
},
"dns": { "dns": {
"servers": [ "final": "local-dns",
{
"tag": "proxyDns",
"address": "tls://8.8.8.8",
"detour": "Proxy"
},
{
"tag": "localDns",
"address": "8.8.8.8",
"detour": "direct"
}
],
"rules": [ "rules": [
{ {
"outbound": "any", "action": "route",
"server": "localDns" "clash_mode": "Global",
"server": "proxy-dns",
"source_ip_cidr": [
"172.19.0.0/30",
"fdfe:dcba:9876::1/126"
]
}, },
{ {
"rule_set": "geosite-ir", "action": "route",
"server": "proxyDns" "server": "proxy-dns",
}, "source_ip_cidr": [
{ "172.19.0.0/30",
"clash_mode": "direct", "fdfe:dcba:9876::1/126"
"server": "localDns" ]
},
{
"clash_mode": "global",
"server": "proxyDns"
} }
], ],
"final": "localDns", "servers": [
"strategy": "ipv4_only" {
"type": "https",
"server": "1.1.1.1",
"detour": "proxy",
"tag": "proxy-dns"
},
{
"type": "local",
"detour": "direct",
"tag": "local-dns"
}
],
"strategy": "prefer_ipv4"
}, },
"inbounds": [ "inbounds": [
{ {
"type": "tun", "address": [
"tag": "tun-in", "172.19.0.1/30",
"address": "172.19.0.1/30", "fdfe:dcba:9876::1/126"
],
"auto_route": true, "auto_route": true,
"strict_route": true "endpoint_independent_nat": false,
"mtu": 9000,
"platform": {
"http_proxy": {
"enabled": true,
"server": "127.0.0.1",
"server_port": 2080
}
},
"stack": "system",
"strict_route": false,
"type": "tun"
},
{
"listen": "127.0.0.1",
"listen_port": 2080,
"type": "mixed",
"users": []
} }
], ],
"log": {
"level": "warn",
"timestamp": true
},
"outbounds": [ "outbounds": [
{ {
"tag": "Proxy",
"type": "selector",
"outbounds": [ "outbounds": [
"auto", "auto",
"direct" "direct"
]
},
{
"tag": "Global",
"type": "selector",
"outbounds": [
"direct"
]
},
{
"tag": "auto",
"type": "urltest",
"outbounds": [
"Proxy"
], ],
"url": "http://www.gstatic.com/generate_204", "tag": "proxy",
"type": "selector"
},
{
"interval": "10m", "interval": "10m",
"tolerance": 50 "outbounds": [],
"tag": "auto",
"tolerance": 50,
"type": "urltest",
"url": "http://www.gstatic.com/generate_204"
}, },
{ {
"type": "direct", "tag": "direct",
"tag": "direct" "type": "direct"
},
{
"type": "direct",
"tag": "local"
} }
], ],
"route": { "route": {
"auto_detect_interface": true, "auto_detect_interface": true,
"final": "Proxy", "final": "proxy",
"rule_set": [
{
"download_detour": "direct",
"format": "binary",
"tag": "geosite-ads",
"type": "remote",
"url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-category-ads-all.srs"
},
{
"download_detour": "direct",
"format": "binary",
"tag": "geoip-private",
"type": "remote",
"url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-private.srs"
},
{
"download_detour": "direct",
"format": "binary",
"tag": "geosite-ir",
"type": "remote",
"url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs"
},
{
"download_detour": "direct",
"format": "binary",
"tag": "geoip-ir",
"type": "remote",
"url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-ir.srs"
}
],
"rules": [ "rules": [
{ {
"inbound": [
"tun-in",
"mixed-in"
],
"action": "sniff" "action": "sniff"
}, },
{ {
"type": "logical", "action": "route",
"mode": "or", "clash_mode": "Direct",
"rules": [ "outbound": "direct"
{
"port": 53
}, },
{ {
"action": "route",
"clash_mode": "Global",
"outbound": "proxy"
},
{
"action": "hijack-dns",
"protocol": "dns" "protocol": "dns"
}
],
"action": "hijack-dns"
},
{
"rule_set": "geosite-category-ads-all",
"action": "reject"
},
{
"rule_set": "geosite-category-ads-all",
"outbound": "Proxy"
},
{
"ip_is_private": true,
"outbound": "direct"
}, },
{ {
"action": "route", "action": "route",
"rule_set": "geosite-ir", "outbound": "direct",
"outbound": "direct"
},
{
"action": "route",
"rule_set": "geoip-ir",
"outbound": "direct"
}
],
"rule_set": [ "rule_set": [
{ "geosite-ir",
"tag": "geosite-category-ads-all", "geoip-ir",
"type": "remote", "geoip-private"
"format": "binary", ]
"url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-category-ads-all.srs",
"download_detour": "direct"
}, },
{ {
"type": "remote", "action": "reject",
"tag": "geoip-ir", "rule_set": [
"format": "binary", "geosite-ads"
"url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-ir.srs", ]
"update_interval": "120h0m0s"
},
{
"type": "remote",
"tag": "geosite-ir",
"format": "binary",
"url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs",
"update_interval": "120h0m0s"
} }
] ]
} }