1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
| { // 出站 "outbounds": [ // 手动选择国家或地区节点;根据“国家或地区出站”的名称对 `outbounds` 值进行增删改,须一一对应 { "tag": "🚀 节点选择", "type": "selector", "outbounds": [ "🇭🇰 香港节点", "🆓 免费节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点" ] }, // 选择`🎯 全球直连`为测试本地网络(运营商网络速度和 IPv6 支持情况),可选择其它节点用于测试机场节点速度和 IPv6 支持情况 { "tag": "📈 网络测试", "type": "selector", "outbounds": [ "🎯 全球直连", "🇭🇰 香港节点", "🆓 免费节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点" ] }, { "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🎯 全球直连" ] }, { "tag": "🔗 直连域名", "type": "selector", "outbounds": [ "🎯 全球直连", "🚀 节点选择" ] }, { "tag": "🪜 代理域名", "type": "selector", "outbounds": [ "🚀 节点选择", "🎯 全球直连" ] }, { "tag": "🎮 游戏平台", "type": "selector", "outbounds": [ "🎯 全球直连", "🚀 节点选择" ] }, { "tag": "Ⓜ️ 微软服务", "type": "selector", "outbounds": [ "🎯 全球直连", "🚀 节点选择" ] }, { "tag": "📢 谷歌服务", "type": "selector", "outbounds": [ "🎯 全球直连", "🚀 节点选择" ] }, { "tag": "🍎 苹果服务", "type": "selector", "outbounds": [ "🎯 全球直连", "🚀 节点选择" ] }, { "tag": "🇨🇳 国内 IP", "type": "selector", "outbounds": [ "🎯 全球直连", "🚀 节点选择" ] }, { "tag": "📲 电报消息", "type": "selector", "outbounds": [ "🚀 节点选择" ] }, // 若使用 ShellCrash,由于无法判断本机进程(默认删除 `process_name` 规则),需删除此条 `🖥️ 直连软件` { "tag": "🖥️ 直连软件", "type": "selector", "outbounds": [ "🎯 全球直连" ] }, { "tag": "🔒 私有网络", "type": "selector", "outbounds": [ "🎯 全球直连" ] }, { "tag": "🛑 广告拦截", "type": "selector", "outbounds": [ "REJECT" ] }, { "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] }, { "tag": "REJECT", "type": "block" }, { "tag": "DIRECT", "type": "direct" }, { "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "REJECT", "🇭🇰 香港节点", "🆓 免费节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点" ] }, { "tag": "dns-out", "type": "dns" },
// 单个出站节点(以 vless 为例) { "tag": "🆓 免费节点", "type": "vless", "server": "example.com", "server_port": 443, "uuid": "{uuid}", "network": "tcp", "tls": { "enabled": true, "server_name": "example.com", "insecure": false }, "transport": { "type": "ws", "path": "/?ed=2048", "headers": { "Host": "example.com" } } },
// -------------------- 国家或地区出站 -------------------- // 自动选择节点,即按照 url 测试结果使用延迟最低的节点;测试后容差大于 50ms 才会切换到延迟低的那个节点;筛选出“香港”节点,支持正则表达式 { "tag": "🇭🇰 香港节点", "type": "urltest", "tolerance": 50, "providers": [ "🛫 我的机场 1", "🛫 我的机场 2" ], "includes": [ "(?i)港|hk|hongkong|hong kong" ] }, // 若有多个机场,可以使用 `"use_all_providers": true` 代替 `"providers": [ "🛫 我的机场 1", "🛫 我的机场 2", ... ]` { "tag": "🇹🇼 台湾节点", "type": "urltest", "tolerance": 50, "use_all_providers": true, "includes": [ "(?i)台|tw|taiwan" ] }, { "tag": "🇯🇵 日本节点", "type": "urltest", "tolerance": 50, "providers": [ "🛫 我的机场 1", "🛫 我的机场 2" ], "includes": [ "(?i)日本|jp|japan" ] }, { "tag": "🇸🇬 新加坡节点", "type": "urltest", "tolerance": 50, "providers": [ "🛫 我的机场 1", "🛫 我的机场 2" ], "includes": [ "(?i)新|sg|singapore" ] }, { "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 50, "providers": [ "🛫 我的机场 1", "🛫 我的机场 2" ], "includes": [ "(?i)美|us|unitedstates|united states" ] } ], // 代理集合(获取机场订阅链接内的所有节点) "outbound_providers": [ { "tag": "🛫 我的机场 1", "type": "http", "healthcheck_url": "https://www.gstatic.com/generate_204", "healthcheck_interval": "10m", // 机场订阅链接,使用 Clash 链接 "download_url": "https://example.com/xxx/xxx&flag=clash", "path": "./providers/airport1.yaml", // 初步筛选需要的节点,可有效减轻路由器压力,支持正则表达式,若不筛选可删除此配置项 "includes": [ "香港|台湾|日本|新加坡|美国" ], // 初步排除不需要的节点,支持正则表达式,若不排除可删除此配置项 "excludes": "高倍|×10", "download_ua": "clash.meta", "download_interval": "24h" }, { "tag": "🛫 我的机场 2", "type": "http", "healthcheck_url": "https://www.gstatic.com/generate_204", "healthcheck_interval": "10m", "download_url": "https://example.com/xxx/xxx&flag=clash", "path": "./providers/airport2.yaml", "includes": [ "香港|台湾|日本|新加坡|美国" ], "excludes": [ "高倍|×10" ], "download_ua": "clash.meta", "download_interval": "24h" } ], // 路由 "route": { // 规则 "rules": [ { "protocol": [ "dns" ], "outbound": "dns-out" }, { "clash_mode": "Direct", "outbound": "DIRECT" }, { "clash_mode": "Global", "outbound": "GLOBAL" }, // 自定义规则优先放前面 { "rule_set": [ "ads" ], "outbound": "🛑 广告拦截" }, // 若使用 ShellCrash,由于无法判断本机进程(默认删除 `process_name` 规则),需删除此条 `rule_set` { "rule_set": [ "applications" ], "outbound": "🖥️ 直连软件" }, // 为过滤 P2P 流量(BT 下载),可添加一条 `port_range` 规则(ShellCrash 会默认开启“只代理常用端口”,可忽略此项) { "port_range": [ "6881:6889" ], "outbound": "🎯 全球直连"}, { "rule_set": [ "private" ], "outbound": "🔒 私有网络" }, { "rule_set": [ "microsoft-cn" ], "outbound": "Ⓜ️ 微软服务" }, { "rule_set": [ "apple-cn" ], "outbound": "🍎 苹果服务" }, { "rule_set": [ "google-cn" ], "outbound": "📢 谷歌服务" }, { "rule_set": [ "games-cn" ], "outbound": "🎮 游戏平台" }, { "rule_set": [ "networktest" ], "outbound": "📈 网络测试" }, { "rule_set": [ "proxy" ], "outbound": "🪜 代理域名" }, { "rule_set": [ "cn" ], "outbound": "🔗 直连域名" }, { "rule_set": [ "telegramip" ], "outbound": "📲 电报消息", "skip_resolve": true }, { "rule_set": [ "privateip" ], "outbound": "🔒 私有网络", "skip_resolve": true }, { "rule_set": [ "cnip" ], "outbound": "🇨🇳 国内 IP" } ], // 规则集(binary 文件每天自动更新) "rule_set": [ { "tag": "ads", "type": "remote", "format": "binary", "path": "./ruleset/ads.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/ads.srs" }, // 若使用 ShellCrash,由于无法判断本机进程(默认删除 `process_name` 规则),需删除此条 `applications` { "tag": "applications", "type": "remote", "format": "binary", "path": "./ruleset/applications.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/applications.srs" }, { "tag": "private", "type": "remote", "format": "binary", "path": "./ruleset/private.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/private.srs" }, { "tag": "microsoft-cn", "type": "remote", "format": "binary", "path": "./ruleset/microsoft-cn.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/microsoft-cn.srs" }, { "tag": "apple-cn", "type": "remote", "format": "binary", "path": "./ruleset/apple-cn.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/apple-cn.srs" }, { "tag": "google-cn", "type": "remote", "format": "binary", "path": "./ruleset/google-cn.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/google-cn.srs" }, { "tag": "games-cn", "type": "remote", "format": "binary", "path": "./ruleset/games-cn.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/games-cn.srs" }, { "tag": "networktest", "type": "remote", "format": "binary", "path": "./ruleset/networktest.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/networktest.srs" }, { "tag": "proxy", "type": "remote", "format": "binary", "path": "./ruleset/proxy.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/proxy.srs" }, { "tag": "cn", "type": "remote", "format": "binary", "path": "./ruleset/cn.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/cn.srs" }, { "tag": "telegramip", "type": "remote", "format": "binary", "path": "./ruleset/telegramip.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/telegramip.srs" }, { "tag": "privateip", "type": "remote", "format": "binary", "path": "./ruleset/privateip.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/privateip.srs" }, { "tag": "cnip", "type": "remote", "format": "binary", "path": "./ruleset/cnip.srs", "url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/cnip.srs" } ], // 默认出站,即没有命中规则的域名或 IP 走该规则 "final": "🐟 漏网之鱼" } }
|