Skip to content

Instantly share code, notes, and snippets.

@celeron633
Created April 27, 2024 02:12
Show Gist options
  • Save celeron633/fd45405144bee98ae1dc65ac9e940a37 to your computer and use it in GitHub Desktop.
Save celeron633/fd45405144bee98ae1dc65ac9e940a37 to your computer and use it in GitHub Desktop.
singbox tproxy config
{
"log": {
"level": "warn",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "dns_proxy",
"address": "tcp://1.1.1.1",
"address_resolver": "dns_resolver",
"strategy": "ipv4_only",
"detour": "proxy"
},
{
"tag": "dns_direct",
"address": "https://dns.alidns.com/dns-query",
"address_resolver": "dns_resolver",
"strategy": "ipv4_only",
"detour": "direct"
},
{
"tag": "dns_resolver",
"address": "223.5.5.5",
"detour": "direct"
},
{
"tag": "dns_success",
"address": "rcode://success"
},
{
"tag": "dns_refused",
"address": "rcode://refused"
}
],
"rules": [
{
"outbound": "any",
"server": "dns_resolver"
},
{
"rule_set": "geosite-geolocation-!cn",
"query_type": [
"A",
"AAAA",
"CNAME"
],
"server": "dns_proxy"
},
{
"query_type": [
"A",
"AAAA",
"CNAME"
],
"invert": true,
"server": "dns_refused",
"disable_cache": true
}
],
"final": "dns_direct"
},
"route": {
"rule_set": [
{
"tag": "geosite-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
"download_detour": "proxy"
},
{
"tag": "geosite-geolocation-!cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
"download_detour": "proxy"
},
{
"tag": "geoip-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "proxy"
}
],
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"port": 853,
"network": "tcp",
"outbound": "block"
},
{
"port": [
443,
853
],
"network": "udp",
"outbound": "block"
},
{
"rule_set": "geosite-cn",
"outbound": "direct"
},
{
"rule_set": "geosite-geolocation-!cn",
"outbound": "proxy"
},
{
"rule_set": "geoip-cn",
"outbound": "direct"
},
{
"ip_is_private": true,
"outbound": "direct"
}
],
"final": "proxy",
"auto_detect_interface": true
},
"inbounds": [
{
"type": "tproxy",
"tag": "tproxy-in",
"listen": "::",
"listen_port": 12345,
"tcp_fast_open": true,
"udp_fragment": true,
"sniff": true
},
{
"type": "mixed",
"listen": "::",
"listen_port": 1080
},
{
"type": "mixed",
"listen": "::",
"listen_port": 1081
},
{
"type": "mixed",
"listen": "::",
"listen_port": 1088
}
],
"outbounds": [
{
"routing_mark": 255
},
{
"type": "direct",
"tag": "direct",
"routing_mark": 255
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment