diff --git "a/sing-box \351\205\215\347\275\256\346\250\241\346\235\277.json" "b/sing-box \351\205\215\347\275\256\346\250\241\346\235\277.json" new file mode 100644 index 0000000..28afb04 --- /dev/null +++ "b/sing-box \351\205\215\347\275\256\346\250\241\346\235\277.json" @@ -0,0 +1,321 @@ +{ + "log": {"disabled": false, "level": "info", "output": "box.log", "timestamp": true}, + "experimental": { + "cache_file": { + "enabled": true, + "store_fakeip": true, + "store_rdrc": true + }, + "clash_api": { + "external_controller": "127.0.0.1:9090", + "external_ui": "ui", + "external_ui_download_url": "https://github.com/MetaCubeX/yacd/archive/gh-pages.zip", + "external_ui_download_detour": "VPN", + "secret": "", + "default_mode": "Rule" + } + }, + "dns": { + "servers": + [ + {"tag": "dns_resolver", "address": "223.5.5.5", "detour": "Direct-Out"}, + {"tag": "dns_proxy", "address": "https://dns.google/dns-query", "address_resolver": "dns_resolver", "strategy": "ipv4_only", "detour": "VPN"}, + {"tag": "dns_direct", "address": "https://120.53.53.53/dns-query", "address_resolver": "dns_resolver", "strategy": "ipv4_only", "detour": "Direct-Out"}, + {"tag": "dns_fakeip", "address": "fakeip" } + ], + "rules": + [ + {"outbound": "any", "action": "route", "server": "dns_resolver"}, + {"clash_mode": "Direct", "query_type": [ "A", "AAAA" ], "action": "reject", "server": "dns_direct"}, + {"clash_mode": "Global", "query_type": [ "A", "AAAA" ], "action": "reject", "server": "dns_proxy"}, + {"type": "logical", "mode": "and", "rules": [ {"rule_set": ["geosite-filter-fakeip"], "invert": true}, {"rule_set": "geosite-geolocation-!cn", "query_type": ["A", "AAAA"]} ], "action": "route-options", "server": "dns_fakeip", "rewrite_ttl": 1 }, + {"rule_set": ["geosite-category-direct"], "query_type": [ "A", "AAAA" ], "action": "route", "server": "dns_direct"}, + {"query_type": ["A", "AAAA", "CNAME"], "invert": true, "action": "reject", "method": "default", "no_drop": false} + ], + "fakeip": {"enabled": true, "inet4_range": "198.18.0.0/15", "inet6_range": "fc00::/18"}, + "final": "dns_proxy" +}, + "inbounds": [ + { + "type": "tun", + "tag": "tun-in", + "address": ["172.19.0.1/30", "fdfe:dcba:9876::1/126"], + "gso": false, + "mtu": 1492, + "auto_route": true, + "strict_route": true, + "stack": "system" + }, + { + "type": "mixed", + "tag": "mixed-in", + "listen": "127.0.0.1", + "listen_port": 7890, + "set_system_proxy": true + } + ], + "outbounds": [ + { + "tag": "VPN", + "type": "selector", + "outbounds": [ + "Auto Proxy", + "Manual Proxy", + "Telecom Proxy", + "Unicom Proxy", + "Mobile Proxy", + "Budget Proxy", + "US Proxy", + "JP Proxy", + "HK Proxy", + "SG Proxy" + ] + }, + { + "tag": "Direct-Out", + "type": "direct" + }, + { + "tag": "Manual Proxy", + "type": "selector", + "outbounds": [ + "你的节点" + ] + }, + { + "tag": "Auto Proxy", + "type": "urltest", + "interval": "3m", + "outbounds": [ + "你的节点" + ] + }, + { + "tag": "Video Service", + "type": "selector", + "default": "Budget Proxy", + "outbounds": [ + "VPN", + "Auto Proxy", + "Manual Proxy", + "Telecom Proxy", + "Unicom Proxy", + "Mobile Proxy", + "Budget Proxy", + "US Proxy", + "JP Proxy", + "HK Proxy", + "SG Proxy" + ] + }, + { + "tag": "Media Service", + "type": "selector", + "default": "VPN", + "outbounds": [ + "VPN", + "Auto Proxy", + "Manual Proxy", + "Telecom Proxy", + "Unicom Proxy", + "Mobile Proxy", + "Budget Proxy", + "US Proxy", + "JP Proxy", + "HK Proxy", + "SG Proxy" + ] + }, + { + "tag": "Communication Service", + "type": "selector", + "default": "VPN", + "outbounds": [ + "VPN", + "Auto Proxy", + "Manual Proxy", + "Telecom Proxy", + "Unicom Proxy", + "Mobile Proxy", + "Budget Proxy", + "US Proxy", + "JP Proxy", + "HK Proxy", + "SG Proxy" + ] + }, + { + "tag": "Download Service", + "type": "selector", + "default": "Budget Proxy", + "outbounds": [ + "VPN", + "Auto Proxy", + "Manual Proxy", + "Telecom Proxy", + "Unicom Proxy", + "Mobile Proxy", + "Budget Proxy", + "US Proxy", + "JP Proxy", + "HK Proxy", + "SG Proxy" + ] + }, + { + "tag": "NSFW Content", + "type": "selector", + "default": "VPN", + "outbounds": [ + "Direct-Out", + "VPN", + "Telecom Proxy", + "Unicom Proxy", + "Mobile Proxy", + "Budget Proxy", + "US Proxy", + "JP Proxy", + "HK Proxy", + "SG Proxy" + ] + }, + { + "tag": "Budget Proxy", + "type": "selector", + "outbounds": [ + "你的低倍率节点" + ] + }, + { + "tag": "Telecom Proxy", + "type": "urltest", + "outbounds": [ + "你的电信直连节点" + ] + }, + { + "tag": "Unicom Proxy", + "type": "urltest", + "outbounds": [ + "你的联通直连节点" + ] + }, + { + "tag": "Mobile Proxy", + "type": "urltest", + "outbounds": [ + "你的移动直连节点" + ] + }, + { + "tag": "US Proxy", + "type": "urltest", + "outbounds": [ + "你的美国节点" + ] + }, + { + "tag": "JP Proxy", + "type": "urltest", + "outbounds": [ + "你的日本节点" + ] + }, + { + "tag": "HK Proxy", + "type": "selector", + "outbounds": [ + "你的香港节点" + ] + }, + { + "tag": "SG Proxy", + "type": "selector", + "outbounds": [ + "你的新加坡节点" + ] + }, + { + "tag": "MY Proxy", + "type": "selector", + "outbounds": [ + "你的马来西亚节点" + ] + }, + { + "tag": "Others", + "type": "selector", + "default": "VPN", + "outbounds": [ + "VPN", + "Budget Proxy", + "Direct-Out" + ] + }, + { + "tag": "GLOBAL", + "type": "selector", + "outbounds": [ + "Direct-Out", + "你的节点" + ] + } + ], + "route": { + "rules": [ + + {"inbound": ["tun-in", "mixed-in"], "action": "sniff", "timeout": "1s"}, + {"clash_mode": "Global", "action": "route", "outbound": "GLOBAL"}, + {"clash_mode": "Direct", "action": "route", "outbound": "Direct-Out"}, + {"type": "logical", "mode": "or", "rules": [{"protocol": "dns"}, {"port": 53}], "action": "hijack-dns"}, + {"port": 853, "network": "tcp", "action": "reject", "method": "default", "no_drop": false}, + {"port": 443, "network": "udp", "action": "reject", "method": "default", "no_drop": false}, + {"rule_set": ["geosite-filter-trash"], "action": "reject", "method": "default", "no_drop": false}, + + {"rule_set": ["geosite-filter-nsfw"], "action": "route", "outbound": "NSFW Content"}, + + {"rule_set": ["geoip-category-download@!cn", "geosite-category-download@!cn"], "action": "route", "outbound": "Download Service"}, + {"rule_set": ["geosite-category-video@!cn", "geoip-category-video@!cn"], "action": "route", "outbound": "Video Service"}, + {"rule_set": ["geosite-category-communitaion@!cn", "geoip-category-communitaion@!cn"], "action": "route", "outbound": "Communication Service"}, + {"type": "logical", "mode": "and", "rules": [{"rule_set": ["geosite-category-media@cn"], "invert":true}, {"rule_set": ["geosite-category-media", "geosite-category-media@!cn"]}], "action": "route", "outbound": "Media Service"}, + {"type": "logical", "mode": "and", "rules": [{"rule_set": ["geoip-category-direct", "geosite-category-direct"], "invert":true}, {"rule_set": ["geosite-category-vpn", "geosite-category-game", "geoip-category-game"]}], "action": "route", "outbound": "VPN"}, + {"rule_set": ["geosite-category-direct", "geoip-category-direct"], "action": "route", "outbound": "Direct-Out"}, + + {"rule_set": ["process-filter-directApp@amos"], "action": "route", "outbound": "Direct-Out"}, + {"rule_set": ["process-filter-rejectApp@amos"], "action": "reject", "method": "default", "no_drop": false}, + {"rule_set": ["process-filter-communicationApp@amos"], "action": "route", "outbound": "Communication Service"}, + {"ip_is_private": true, "action": "route", "outbound": "Direct-Out"} + ], + "rule_set": [ + {"tag": "geoip-category-communitaion@!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geoip-category-communitaion@!cn.srs", "download_detour": "VPN"}, + {"tag": "geoip-category-direct", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geoip-category-direct.srs", "download_detour": "VPN"}, + {"tag": "geoip-category-download@!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geoip-category-download@!cn.srs", "download_detour": "VPN"}, + {"tag": "geoip-category-game", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geoip-category-game.srs", "download_detour": "VPN"}, + {"tag": "geoip-category-video@!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geoip-category-video@!cn.srs", "download_detour": "VPN"}, + {"tag": "geoip-geolocation-!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geoip-geolocation-!cn.srs", "download_detour": "VPN"}, + {"tag": "geoip-geolocation-jp@amos", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geoip-geolocation-jp@amos.srs", "download_detour": "VPN"}, + + {"tag": "geosite-category-communitaion@!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-communitaion@!cn.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-direct", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-direct.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-download@!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-download@!cn.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-game", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-game.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-game@cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-game@cn.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-media", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-media.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-media@!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-media@!cn.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-media@cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-media@cn.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-video@!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-video@!cn.srs", "download_detour": "VPN"}, + {"tag": "geosite-category-vpn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-category-vpn.srs", "download_detour": "VPN"}, + {"tag": "geosite-filter-fakeip", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-filter-fakeip.srs", "download_detour": "VPN"}, + {"tag": "geosite-filter-nsfw", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-filter-nsfw.srs", "download_detour": "VPN"}, + {"tag": "geosite-filter-trash", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-filter-trash.srs", "download_detour": "VPN"}, + {"tag": "geosite-geolocation-!cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/geosite-geolocation-!cn.srs", "download_detour": "VPN"}, + + {"tag": "process-filter-browser", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/process-filter-browser.srs", "download_detour": "VPN"}, + {"tag": "process-filter-directApp@amos", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/process-filter-directApp@amos.srs", "download_detour": "VPN"}, + {"tag": "process-filter-rejectApp@amos", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/process-filter-rejectApp@amos.srs", "download_detour": "VPN"}, + {"tag": "process-filter-communicationApp@amos", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/vstar37/sing-box-ruleset/refs/heads/main/rule/process-filter-communicationApp@amos.srs", "download_detour": "VPN"} + ], + "auto_detect_interface": true, + "final": "Others" + } +} \ No newline at end of file