{ "log": { "disabled": false, "level": "warn", "timestamp": true }, "experimental": { "cache_file": { "enabled": true, "path": "cache.db" }, "clash_api": { "external_controller": "0.0.0.0:9090", "external_ui": "yacd", "external_ui_download_url": "https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip", "external_ui_download_detour": "Internet", "secret": "", "default_mode": "rule" } }, "dns": { "servers": [ { "tag": "Internet-dns", "address": "1.0.0.1", "strategy": "ipv4_only", "detour": "Internet" }, { "tag": "Best Latency-dns", "address": "1.1.1.1", "strategy": "ipv4_only", "detour": "Best Latency" }, { "tag": "direct-dns", "address": "local", "strategy": "ipv4_only", "detour": "direct" }, { "tag": "block-dns", "address": "rcode://success" } ], "rules": [ { "domain_suffix": [ ".arpa.", ".arpa" ], "server": "block-dns", "rewrite_ttl": 20 }, { "domain_suffix": [], "server": "direct-dns", "rewrite_ttl": 20 }, { "network": "udp", "port": 443, "server": "block-dns", "rewrite_ttl": 20 }, { "outbound": "Internet", "server": "Internet-dns", "rewrite_ttl": 20 }, { "outbound": "Best Latency", "server": "Best Latency-dns", "rewrite_ttl": 20 }, { "outbound": "direct", "server": "direct-dns", "rewrite_ttl": 20 }, { "outbound": "any", "server": "direct-dns", "rewrite_ttl": 20 } ], "reverse_mapping": true, "strategy": "ipv4_only", "independent_cache": true, "disable_cache": true }, "inbounds": [ { "type": "tun", "tag": "tun-in", "interface_name": "tun0", "inet4_address": "172.19.0.1/30", "mtu": 9000, "auto_route": true, "strict_route": true, "stack": "system", "endpoint_independent_nat": true, "sniff": true }, { "listen": "0.0.0.0", "listen_port": 2080, "sniff": true, "tag": "mixed-in", "type": "mixed" } ], "outbounds": [ { "type": "selector", "tag": "Internet", "outbounds": [ "Best Latency" ] }, { "type": "urltest", "tag": "Best Latency", "outbounds": [ ], "url": "https://detectportal.firefox.com/success.txt", "interval": "1m0s" }, { "type": "direct", "tag": "direct" }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns-out" } ], "route": { "auto_detect_interface": true, "override_android_vpn": true, "final": "Internet", "geoip": { "download_url": "https://github.com/malikshi/sing-box-geo/releases/latest/download/geoip.db", "download_detour": "Best Latency" }, "geosite": { "download_url": "https://github.com/malikshi/v2ray-rules-dat/releases/latest/download/geosite.db", "download_detour": "Best Latency" }, "rules": [ { "outbound": "dns-out", "port": [ 53 ] } ] } }