{ "log": { "disabled": false, "level": "warn" }, "dns": { "final": "dns-proxy", "strategy": "ipv4_only", "cache_capacity": 2048, "disable_cache": false, "disable_expire": false, "independent_cache": false, "reverse_mapping": false, "rules": [ { "action": "route", "server": "dns-local", "rule_set": "geosite-private" }, { "action": "reject", "type": "logical", "mode": "or", "rules": [ { "query_type": [ "HTTPS", "SVCB" ] }, { "ip_version": 6 } ] } ], "servers": [ { "type": "tls", "server": "9.9.9.9", "server_port": 853, "detour": "proxy", "tag": "dns-proxy" }, { "type": "tcp", "server": "8.8.8.8", "server_port": 53, "detour": "direct", "tag": "dns-direct" }, { "type": "local", "detour": "direct", "tag": "dns-local" } ] }, "experimental": { "cache_file": { "enabled": true, "store_fakeip": false, "store_rdrc": true, "rdrc_timeout": "1d" }, "clash_api": { "external_controller": "127.0.0.1:9595", "external_ui": "dashboard", "external_ui_download_detour": "proxy", "external_ui_download_url": "https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip" } }, "inbounds": [ { "tag": "tun-in", "type": "tun", "interface_name": "sing-box", "address": [ "172.19.0.1/30" ], "mtu": 65535, "stack": "gvisor", "auto_route": true, "strict_route": true }, { "listen": "::", "listen_port": 8181, "tag": "mixed-in-8181", "type": "mixed", "udp_fragment": false, "tcp_fast_open": false } ], "outbounds": [ { "tag": "proxy", "type": "selector", "interrupt_exist_connections": true, "outbounds": [ "trojan-ws-mux" ] }, { "tag": "trojan-ws-mux", "type": "trojan", "server": "x.x.x.x or config-server-domain.com", "server_port": 443, "udp_fragment": false, "tcp_fast_open": false, "password": "xxxx", "tls": { "enabled": true, "server_name": "config-server-domain.com", "utls": { "enabled": true, "fingerprint": "firefox" } }, "transport": { "type": "ws", "path": "", "headers": {}, "max_early_data": 0, "early_data_header_name": "" }, "multiplex": { "enabled": true, "padding": false, "protocol": "smux", "min_streams": 4, "max_streams": 0, "max_connections": 4, "brutal": { "enabled": false, "down_mbps": 50, "up_mbps": 50 } } }, { "tag": "direct", "type": "direct", "udp_fragment": false, "tcp_fast_open": false } ], "route": { "final": "proxy", "auto_detect_interface": true, "default_domain_resolver": { "server": "dns-direct", "strategy": "ipv4_only" }, "rule_set": [ { "download_detour": "proxy", "format": "binary", "tag": "geoip-private", "type": "remote", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-private.srs" }, { "download_detour": "proxy", "format": "binary", "tag": "geosite-private", "type": "remote", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-private.srs" }, { "download_detour": "proxy", "format": "binary", "tag": "geoip-ir", "type": "remote", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-ir.srs" }, { "download_detour": "proxy", "format": "binary", "tag": "geosite-ir", "type": "remote", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs" } ], "rules": [ { "action": "sniff", "timeout": "10ms" }, { "protocol": "dns", "action": "hijack-dns" }, { "action": "resolve", "ip_cidr": "10.10.34.32/29" }, { "action": "reject", "ip_cidr": "10.10.34.32/29" }, { "ip_is_private": true, "action": "route", "outbound": "direct" }, { "action": "route", "outbound": "direct", "rule_set": [ "geoip-private", "geosite-private" ] }, { "action": "route", "outbound": "direct", "domain_suffix": [ "do-not-proxy-site.com" ] }, { "action": "route", "outbound": "proxy", "domain_suffix": [ "force-proxy-site.com" ] }, { "action": "route", "outbound": "direct", "rule_set": [ "geoip-ir", "geosite-ir" ] } ] } }