{ "log": { "disabled": false, "level": "fatal", "timestamp": true }, "experimental": { "clash_api": { "external_controller": "127.0.0.1:9090", "external_ui": "metacubexd", "external_ui_download_url": "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip", "external_ui_download_detour": "direct", "default_mode": "rule" }, "cache_file": { "enabled": true, "path": "cache.db", "store_fakeip": true, "store_rdrc": true } }, "dns": { "servers": [ { "address": "h3://1.1.1.1/dns-query", "address_strategy": "ipv4_only", "address_resolver": "dns-direct", "tag": "dns-remote" }, { "address": "8.8.8.8", "address_resolver": "dns-local", "detour": "direct", "tag": "dns-direct" }, { "address": "rcode://success", "tag": "dns-block" }, { "address": "local", "detour": "direct", "tag": "dns-local" }, { "tag": "dns-fake", "address": "fakeip" } ], "rules": [ { "outbound": "any", "server": "dns-direct", "action": "route" }, { "domain_suffix": ".ir", "rule_set": [ "geosite-ir" ], "server": "dns-direct", "rewrite_ttl": 3600, "action": "route" }, { "query_type": [ "A" ], "server": "dns-fake", "rewrite_ttl": 3600, "action": "route" } ], "fakeip": { "enabled": true, "inet4_range": "198.18.0.0/15" }, "final": "dns-remote", "independent_cache": true }, "inbounds": [ { "type": "tun", "tag": "tun-in", "interface_name": "tun", "address": [ "172.16.0.1/30" ], "route_exclude_address": [ "17.0.0.0/8" ], "exclude_package": [ "com.myirancell", "ir.mci.ecareapp" ], "mtu": 1492, "auto_route": true, "strict_route": true, "stack": "system", "endpoint_independent_nat": false } ], "outbounds": [ { "tag": "\ud83c\udf10 Proxy", "type": "selector", "outbounds": [ "WARP-MAIN", "WARP-WIW" ], "default": "WARP-WIW", "interrupt_exist_connections": false }, { "tag": "\u26a1 Fastest", "type": "urltest", "outbounds": [ "WARP-MAIN", "WARP-WIW" ], "url": "http://www.gstatic.com/generate_204", "interrupt_exist_connections": false }, { "tag": "WARP-MAIN", "type": "wireguard", "server": "188.114.98.66", "server_port": 939, "local_address": [ "172.16.0.2/32", "2606:4700:110:8735:bb29:91bc:1c82:aa73/128" ], "private_key": "cC7ZBqB5Sep95Wuc5v/EBDIhU0pAgbY8y4F6vuV8/Wk=", "peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=", "mtu": 1384, "reserved": [ 32, 47, 195 ], "detour": "direct", "workers": 2 }, { "tag": "WARP-WIW", "type": "wireguard", "server": "188.114.97.43", "server_port": 1843, "local_address": [ "172.16.0.2/32", "2606:4700:110:8735:bb29:91bc:1c82:aa73/128" ], "private_key": "cC7ZBqB5Sep95Wuc5v/EBDIhU0pAgbY8y4F6vuV8/Wk=", "peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=", "mtu": 1384, "reserved": [ 32, 47, 195 ], "detour": "WARP-MAIN", "workers": 2 }, { "tag": "direct", "type": "direct" } ], "route": { "auto_detect_interface": true, "final": "\ud83c\udf10 Proxy", "rules": [ { "inbound": "tun-in", "strategy": "ipv4_only", "action": "resolve" }, { "inbound": "tun-in", "action": "sniff", "timeout": "1s" }, { "type": "logical", "mode": "or", "rules": [ { "protocol": "dns" }, { "port": 53 } ], "action": "hijack-dns" }, { "type": "logical", "mode": "or", "rules": [ { "network": "tcp", "port": 853 }, { "network": "udp", "port": [ 443, 853 ] }, { "protocol": "stun" } ], "action": "reject", "method": "drop" }, { "domain_suffix": [ ".ir" ], "outbound": "direct", "action": "route" }, { "rule_set": [ "geosite-category-ads-all", "geosite-malware", "geosite-phishing", "geosite-cryptominers", "geoip-malware", "geoip-phishing" ], "action": "reject", "method": "drop" }, { "rule_set": [ "geoip-ir", "geosite-ir", "geoip-private", "geosite-private" ], "outbound": "direct", "action": "route" } ], "rule_set": [ { "tag": "geosite-ir", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geosite-category-ads-all", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-category-ads-all.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geosite-malware", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-malware.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geosite-phishing", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-phishing.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geosite-cryptominers", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-cryptominers.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geoip-ir", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-ir.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geoip-malware", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-malware.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geoip-phishing", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-phishing.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geosite-private", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-private.srs", "download_detour": "direct", "update_interval": "1d" }, { "tag": "geoip-private", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-private.srs", "download_detour": "direct", "update_interval": "1d" } ] } }