~适配reF1nd版本providers

This commit is contained in:
juewuy
2025-11-30 20:44:39 +08:00
parent cd856f032b
commit 6b9650df8c
8 changed files with 150 additions and 164 deletions

View File

@@ -20,19 +20,16 @@
{ "tag": "🔴 全球拦截", "type": "selector", "outbounds": [ "REJECT" ] }, { "tag": "🔴 全球拦截", "type": "selector", "outbounds": [ "REJECT" ] },
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] }, { "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] },
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "REJECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] }, { "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "REJECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] },
{ "tag": "dns-out", "type": "dns" }, { "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "0\\.[1-5]|低倍率|省流|大流量" },
{ "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" ] }, { "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇭🇰|港|hk|hongkong|hong kong)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "0\\.[1-5]|低倍率|省流|大流量" ] }, { "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇹🇼|台|tw|taiwan|tai wan)" },
{ "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇭🇰|港|hk|hongkong|hong kong)" ] }, { "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇯🇵|日|jp|japan)" },
{ "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇹🇼|台|tw|taiwan|tai wan)" ] }, { "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇸🇬|新|sg|singapore)" },
{ "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇯🇵|日|jp|japan)" ] }, { "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "(?i)(🇺🇸|美|us|unitedstates|united states)" }
{ "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇸🇬|新|sg|singapore)" ] },
{ "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "(?i)(🇺🇸|美|us|unitedstates|united states)" ] }
], ],
"route": { "route": {
"rules": [ "rules": [
{ "protocol": [ "dns" ], "outbound": "dns-out" },
{ "clash_mode": [ "Direct" ], "outbound": "DIRECT" }, { "clash_mode": [ "Direct" ], "outbound": "DIRECT" },
{ "clash_mode": [ "Global" ], "outbound": "GLOBAL" }, { "clash_mode": [ "Global" ], "outbound": "GLOBAL" },
{ "rule_set": [ "private" ], "outbound": "🎯 全球直连" }, { "rule_set": [ "private" ], "outbound": "🎯 全球直连" },
@@ -48,11 +45,11 @@
{ "rule_set": [ "networktest" ], "outbound": "📈 网络测试" }, { "rule_set": [ "networktest" ], "outbound": "📈 网络测试" },
{ "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" }, { "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" },
{ "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" }, { "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" },
{ "rule_set": [ "privateip" ], "outbound": "🎯 全球直连", "skip_resolve": true }, { "rule_set": [ "privateip" ], "outbound": "🎯 全球直连" },
{ "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" }, { "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" },
{ "rule_set": [ "mediaip" ], "outbound": "🌍 国外媒体" }, { "rule_set": [ "mediaip" ], "outbound": "🌍 国外媒体" },
{ "rule_set": [ "gamesip" ], "outbound": "🎮 游戏平台" }, { "rule_set": [ "gamesip" ], "outbound": "🎮 游戏平台" },
{ "rule_set": [ "telegramip" ], "outbound": "📲 电报消息", "skip_resolve": true } { "rule_set": [ "telegramip" ], "outbound": "📲 电报消息" }
], ],
"rule_set": [ "rule_set": [
{ {
@@ -60,126 +57,126 @@
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./private.srs", "path": "./private.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/private.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/private.srs"
}, },
{ {
"tag": "ads", "tag": "ads",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./ads.srs", "path": "./ads.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/ads.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/ads.srs"
}, },
{ {
"tag": "trackerslist", "tag": "trackerslist",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./trackerslist.srs", "path": "./trackerslist.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/trackerslist.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/trackerslist.srs"
}, },
{ {
"tag": "microsoft-cn", "tag": "microsoft-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./microsoft-cn.srs", "path": "./microsoft-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/microsoft-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/microsoft-cn.srs"
}, },
{ {
"tag": "apple-cn", "tag": "apple-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./apple-cn.srs", "path": "./apple-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/apple-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/apple-cn.srs"
}, },
{ {
"tag": "google-cn", "tag": "google-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./google-cn.srs", "path": "./google-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/google-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/google-cn.srs"
}, },
{ {
"tag": "games-cn", "tag": "games-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./games-cn.srs", "path": "./games-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/games-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/games-cn.srs"
}, },
{ {
"tag": "media", "tag": "media",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./media.srs", "path": "./media.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/media.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/media.srs"
}, },
{ {
"tag": "games", "tag": "games",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./games.srs", "path": "./games.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/games.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/games.srs"
}, },
{ {
"tag": "ai", "tag": "ai",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./ai.srs", "path": "./ai.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/ai.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/ai.srs"
}, },
{ {
"tag": "networktest", "tag": "networktest",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./networktest.srs", "path": "./networktest.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/networktest.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/networktest.srs"
}, },
{ {
"tag": "proxy", "tag": "proxy",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./proxy.srs", "path": "./proxy.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/proxy.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/proxy.srs"
}, },
{ {
"tag": "cn", "tag": "cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cn.srs", "path": "./cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cn.srs"
}, },
{ {
"tag": "privateip", "tag": "privateip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./privateip.srs", "path": "./privateip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/privateip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/privateip.srs"
}, },
{ {
"tag": "cnip", "tag": "cnip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cnip.srs", "path": "./cnip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cnip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cnip.srs"
}, },
{ {
"tag": "mediaip", "tag": "mediaip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./mediaip.srs", "path": "./mediaip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/mediaip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/mediaip.srs"
}, },
{ {
"tag": "gamesip", "tag": "gamesip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./gamesip.srs", "path": "./gamesip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/gamesip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/gamesip.srs"
}, },
{ {
"tag": "telegramip", "tag": "telegramip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./telegramip.srs", "path": "./telegramip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/telegramip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/telegramip.srs"
} }
], ],
"final": "🐟 漏网之鱼" "final": "🐟 漏网之鱼"

View File

@@ -18,19 +18,16 @@
{ "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags}, "🎯 全球直连" ] }, { "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags}, "🎯 全球直连" ] },
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] }, { "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] },
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] }, { "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] },
{ "tag": "dns-out", "type": "dns" }, { "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "0\\.[1-5]|低倍率|省流|大流量" },
{ "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" ] }, { "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇭🇰|港|hk|hongkong|hong kong)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "0\\.[1-5]|低倍率|省流|大流量" ] }, { "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇹🇼|台|tw|taiwan|tai wan)" },
{ "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇭🇰|港|hk|hongkong|hong kong)" ] }, { "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇯🇵|日|jp|japan)" },
{ "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇹🇼|台|tw|taiwan|tai wan)" ] }, { "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇸🇬|新|sg|singapore)" },
{ "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇯🇵|日|jp|japan)" ] }, { "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "(?i)(🇺🇸|美|us|unitedstates|united states)" }
{ "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇸🇬|新|sg|singapore)" ] },
{ "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "(?i)(🇺🇸|美|us|unitedstates|united states)" ] }
], ],
"route": { "route": {
"rules": [ "rules": [
{ "protocol": [ "dns" ], "outbound": "dns-out" },
{ "clash_mode": [ "Direct" ], "outbound": "DIRECT" }, { "clash_mode": [ "Direct" ], "outbound": "DIRECT" },
{ "clash_mode": [ "Global" ], "outbound": "GLOBAL" }, { "clash_mode": [ "Global" ], "outbound": "GLOBAL" },
{ "rule_set": [ "private" ], "outbound": "🎯 全球直连" }, { "rule_set": [ "private" ], "outbound": "🎯 全球直连" },
@@ -45,11 +42,11 @@
{ "rule_set": [ "networktest" ], "outbound": "📈 网络测试" }, { "rule_set": [ "networktest" ], "outbound": "📈 网络测试" },
{ "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" }, { "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" },
{ "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" }, { "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" },
{ "rule_set": [ "privateip" ], "outbound": "🎯 全球直连", "skip_resolve": true }, { "rule_set": [ "privateip" ], "outbound": "🎯 全球直连" },
{ "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" }, { "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" },
{ "rule_set": [ "mediaip" ], "outbound": "🌍 国外媒体" }, { "rule_set": [ "mediaip" ], "outbound": "🌍 国外媒体" },
{ "rule_set": [ "gamesip" ], "outbound": "🎮 游戏平台" }, { "rule_set": [ "gamesip" ], "outbound": "🎮 游戏平台" },
{ "rule_set": [ "telegramip" ], "outbound": "📲 电报消息", "skip_resolve": true } { "rule_set": [ "telegramip" ], "outbound": "📲 电报消息" }
], ],
"rule_set": [ "rule_set": [
{ {
@@ -57,119 +54,119 @@
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./private.srs", "path": "./private.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/private.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/private.srs"
}, },
{ {
"tag": "trackerslist", "tag": "trackerslist",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./trackerslist.srs", "path": "./trackerslist.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/trackerslist.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/trackerslist.srs"
}, },
{ {
"tag": "microsoft-cn", "tag": "microsoft-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./microsoft-cn.srs", "path": "./microsoft-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/microsoft-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/microsoft-cn.srs"
}, },
{ {
"tag": "apple-cn", "tag": "apple-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./apple-cn.srs", "path": "./apple-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/apple-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/apple-cn.srs"
}, },
{ {
"tag": "google-cn", "tag": "google-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./google-cn.srs", "path": "./google-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/google-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/google-cn.srs"
}, },
{ {
"tag": "games-cn", "tag": "games-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./games-cn.srs", "path": "./games-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/games-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/games-cn.srs"
}, },
{ {
"tag": "media", "tag": "media",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./media.srs", "path": "./media.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/media.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/media.srs"
}, },
{ {
"tag": "games", "tag": "games",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./games.srs", "path": "./games.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/games.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/games.srs"
}, },
{ {
"tag": "ai", "tag": "ai",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./ai.srs", "path": "./ai.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/ai.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/ai.srs"
}, },
{ {
"tag": "networktest", "tag": "networktest",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./networktest.srs", "path": "./networktest.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/networktest.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/networktest.srs"
}, },
{ {
"tag": "proxy", "tag": "proxy",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./proxy.srs", "path": "./proxy.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/proxy.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/proxy.srs"
}, },
{ {
"tag": "cn", "tag": "cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cn.srs", "path": "./cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cn.srs"
}, },
{ {
"tag": "privateip", "tag": "privateip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./privateip.srs", "path": "./privateip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/privateip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/privateip.srs"
}, },
{ {
"tag": "cnip", "tag": "cnip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cnip.srs", "path": "./cnip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cnip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cnip.srs"
}, },
{ {
"tag": "mediaip", "tag": "mediaip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./mediaip.srs", "path": "./mediaip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/mediaip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/mediaip.srs"
}, },
{ {
"tag": "gamesip", "tag": "gamesip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./gamesip.srs", "path": "./gamesip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/gamesip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/gamesip.srs"
}, },
{ {
"tag": "telegramip", "tag": "telegramip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./telegramip.srs", "path": "./telegramip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/telegramip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/telegramip.srs"
} }
], ],
"final": "🐟 漏网之鱼" "final": "🐟 漏网之鱼"

View File

@@ -8,27 +8,24 @@
{ "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags}, "🎯 全球直连" ] }, { "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags}, "🎯 全球直连" ] },
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] }, { "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] },
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] }, { "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] },
{ "tag": "dns-out", "type": "dns" }, { "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "0\\.[1-5]|低倍率|省流|大流量" },
{ "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" ] }, { "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇭🇰|港|hk|hongkong|hong kong)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "0\\.[1-5]|低倍率|省流|大流量" ] }, { "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇹🇼|台|tw|taiwan|tai wan)" },
{ "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇭🇰|港|hk|hongkong|hong kong)" ] }, { "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇯🇵|日|jp|japan)" },
{ "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇹🇼|台|tw|taiwan|tai wan)" ] }, { "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇸🇬|新|sg|singapore)" },
{ "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇯🇵|日|jp|japan)" ] }, { "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "(?i)(🇺🇸|美|us|unitedstates|united states)" }
{ "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇸🇬|新|sg|singapore)" ] },
{ "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "(?i)(🇺🇸|美|us|unitedstates|united states)" ] }
], ],
"route": { "route": {
"rules": [ "rules": [
{ "protocol": [ "dns" ], "outbound": "dns-out" },
{ "clash_mode": [ "Direct" ], "outbound": "DIRECT" }, { "clash_mode": [ "Direct" ], "outbound": "DIRECT" },
{ "clash_mode": [ "Global" ], "outbound": "GLOBAL" }, { "clash_mode": [ "Global" ], "outbound": "GLOBAL" },
{ "rule_set": [ "private" ], "outbound": "🎯 全球直连" }, { "rule_set": [ "private" ], "outbound": "🎯 全球直连" },
{ "rule_set": [ "tld-proxy" ], "outbound": "🧱 代理域名" }, { "rule_set": [ "tld-proxy" ], "outbound": "🧱 代理域名" },
{ "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" }, { "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" },
{ "rule_set": [ "privateip" ], "outbound": "🎯 全球直连", "skip_resolve": true }, { "rule_set": [ "privateip" ], "outbound": "🎯 全球直连" },
{ "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" }, { "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" },
{ "rule_set": [ "telegramip" ], "outbound": "📲 电报消息", "skip_resolve": true } { "rule_set": [ "telegramip" ], "outbound": "📲 电报消息" }
], ],
"rule_set": [ "rule_set": [
{ {
@@ -36,42 +33,42 @@
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./private.srs", "path": "./private.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/private.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/private.srs"
}, },
{ {
"tag": "tld-proxy", "tag": "tld-proxy",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./tld-proxy.srs", "path": "./tld-proxy.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/tld-proxy.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/tld-proxy.srs"
}, },
{ {
"tag": "proxy", "tag": "proxy",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./proxy.srs", "path": "./proxy.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/proxy.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/proxy.srs"
}, },
{ {
"tag": "privateip", "tag": "privateip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./privateip.srs", "path": "./privateip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/privateip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/privateip.srs"
}, },
{ {
"tag": "cnip", "tag": "cnip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cnip.srs", "path": "./cnip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cnip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cnip.srs"
}, },
{ {
"tag": "telegramip", "tag": "telegramip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./telegramip.srs", "path": "./telegramip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/telegramip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/telegramip.srs"
} }
], ],
"final": "🐟 漏网之鱼" "final": "🐟 漏网之鱼"

View File

@@ -18,19 +18,16 @@
{ "tag": "🔴 全球拦截", "type": "selector", "outbounds": [ "REJECT" ] }, { "tag": "🔴 全球拦截", "type": "selector", "outbounds": [ "REJECT" ] },
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] }, { "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] },
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "REJECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] }, { "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "REJECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] },
{ "tag": "dns-out", "type": "dns" }, { "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "0\\.[1-5]|低倍率|省流|大流量" },
{ "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" ] }, { "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇭🇰|港|hk|hongkong|hong kong)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "0\\.[1-5]|低倍率|省流|大流量" ] }, { "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇹🇼|台|tw|taiwan|tai wan)" },
{ "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇭🇰|港|hk|hongkong|hong kong)" ] }, { "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇯🇵|日|jp|japan)" },
{ "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇹🇼|台|tw|taiwan|tai wan)" ] }, { "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇸🇬|新|sg|singapore)" },
{ "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇯🇵|日|jp|japan)" ] }, { "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "(?i)(🇺🇸|美|us|unitedstates|united states)" }
{ "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇸🇬|新|sg|singapore)" ] },
{ "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "(?i)(🇺🇸|美|us|unitedstates|united states)" ] }
], ],
"route": { "route": {
"rules": [ "rules": [
{ "protocol": [ "dns" ], "outbound": "dns-out" },
{ "clash_mode": [ "Direct" ], "outbound": "DIRECT" }, { "clash_mode": [ "Direct" ], "outbound": "DIRECT" },
{ "clash_mode": [ "Global" ], "outbound": "GLOBAL" }, { "clash_mode": [ "Global" ], "outbound": "GLOBAL" },
{ "rule_set": [ "private" ], "outbound": "🎯 全球直连" }, { "rule_set": [ "private" ], "outbound": "🎯 全球直连" },
@@ -44,9 +41,9 @@
{ "rule_set": [ "networktest" ], "outbound": "📈 网络测试" }, { "rule_set": [ "networktest" ], "outbound": "📈 网络测试" },
{ "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" }, { "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" },
{ "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" }, { "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" },
{ "rule_set": [ "privateip" ], "outbound": "🎯 全球直连", "skip_resolve": true }, { "rule_set": [ "privateip" ], "outbound": "🎯 全球直连" },
{ "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" }, { "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" },
{ "rule_set": [ "telegramip" ], "outbound": "📲 电报消息", "skip_resolve": true } { "rule_set": [ "telegramip" ], "outbound": "📲 电报消息" }
], ],
"rule_set": [ "rule_set": [
{ {
@@ -54,98 +51,98 @@
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./private.srs", "path": "./private.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/private.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/private.srs"
}, },
{ {
"tag": "ads", "tag": "ads",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./ads.srs", "path": "./ads.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/ads.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/ads.srs"
}, },
{ {
"tag": "trackerslist", "tag": "trackerslist",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./trackerslist.srs", "path": "./trackerslist.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/trackerslist.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/trackerslist.srs"
}, },
{ {
"tag": "microsoft-cn", "tag": "microsoft-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./microsoft-cn.srs", "path": "./microsoft-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/microsoft-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/microsoft-cn.srs"
}, },
{ {
"tag": "apple-cn", "tag": "apple-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./apple-cn.srs", "path": "./apple-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/apple-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/apple-cn.srs"
}, },
{ {
"tag": "google-cn", "tag": "google-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./google-cn.srs", "path": "./google-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/google-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/google-cn.srs"
}, },
{ {
"tag": "games-cn", "tag": "games-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./games-cn.srs", "path": "./games-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/games-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/games-cn.srs"
}, },
{ {
"tag": "ai", "tag": "ai",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./ai.srs", "path": "./ai.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/ai.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/ai.srs"
}, },
{ {
"tag": "networktest", "tag": "networktest",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./networktest.srs", "path": "./networktest.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/networktest.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/networktest.srs"
}, },
{ {
"tag": "proxy", "tag": "proxy",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./proxy.srs", "path": "./proxy.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/proxy.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/proxy.srs"
}, },
{ {
"tag": "cn", "tag": "cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cn.srs", "path": "./cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cn-lite.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cn-lite.srs"
}, },
{ {
"tag": "privateip", "tag": "privateip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./privateip.srs", "path": "./privateip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/privateip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/privateip.srs"
}, },
{ {
"tag": "cnip", "tag": "cnip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cnip.srs", "path": "./cnip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cnip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cnip.srs"
}, },
{ {
"tag": "telegramip", "tag": "telegramip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./telegramip.srs", "path": "./telegramip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/telegramip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/telegramip.srs"
} }
], ],
"final": "🐟 漏网之鱼" "final": "🐟 漏网之鱼"

View File

@@ -16,19 +16,16 @@
{ "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags}, "🎯 全球直连" ] }, { "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags}, "🎯 全球直连" ] },
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] }, { "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "DIRECT" ] },
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] }, { "tag": "GLOBAL", "type": "selector", "outbounds": [ "DIRECT", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "👑 高级节点", "📉 省流节点", {providers_tags} ] },
{ "tag": "dns-out", "type": "dns" }, { "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "0\\.[1-5]|低倍率|省流|大流量" },
{ "tag": "👑 高级节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(专线|专用|高级|直连|急速|高倍率|游戏|game|IEPL|IPLC|AIA|CTM|CC|AC)" ] }, { "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇭🇰|港|hk|hongkong|hong kong)" },
{ "tag": "📉 省流节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "0\\.[1-5]|低倍率|省流|大流量" ] }, { "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇹🇼|台|tw|taiwan|tai wan)" },
{ "tag": "🇭🇰 香港节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇭🇰|港|hk|hongkong|hong kong)" ] }, { "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇯🇵|日|jp|japan)" },
{ "tag": "🇹🇼 台湾节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇹🇼|台|tw|taiwan|tai wan)" ] }, { "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "include": "(?i)(🇸🇬|新|sg|singapore)" },
{ "tag": "🇯🇵 日本节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇯🇵|日|jp|japan)" ] }, { "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "include": "(?i)(🇺🇸|美|us|unitedstates|united states)" }
{ "tag": "🇸🇬 新加坡节点", "type": "urltest", "use_all_providers": true, "includes": [ "(?i)(🇸🇬|新|sg|singapore)" ] },
{ "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "(?i)(🇺🇸|美|us|unitedstates|united states)" ] }
], ],
"route": { "route": {
"rules": [ "rules": [
{ "protocol": [ "dns" ], "outbound": "dns-out" },
{ "clash_mode": [ "Direct" ], "outbound": "DIRECT" }, { "clash_mode": [ "Direct" ], "outbound": "DIRECT" },
{ "clash_mode": [ "Global" ], "outbound": "GLOBAL" }, { "clash_mode": [ "Global" ], "outbound": "GLOBAL" },
{ "rule_set": [ "private" ], "outbound": "🎯 全球直连" }, { "rule_set": [ "private" ], "outbound": "🎯 全球直连" },
@@ -41,9 +38,9 @@
{ "rule_set": [ "networktest" ], "outbound": "📈 网络测试" }, { "rule_set": [ "networktest" ], "outbound": "📈 网络测试" },
{ "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" }, { "rule_set": [ "proxy" ], "outbound": "🧱 代理域名" },
{ "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" }, { "rule_set": [ "cn" ], "outbound": "🛡️ 直连域名" },
{ "rule_set": [ "privateip" ], "outbound": "🎯 全球直连", "skip_resolve": true }, { "rule_set": [ "privateip" ], "outbound": "🎯 全球直连" },
{ "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" }, { "rule_set": [ "cnip" ], "outbound": "🀄️ 直连 IP" },
{ "rule_set": [ "telegramip" ], "outbound": "📲 电报消息", "skip_resolve": true } { "rule_set": [ "telegramip" ], "outbound": "📲 电报消息" }
], ],
"rule_set": [ "rule_set": [
{ {
@@ -51,91 +48,91 @@
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./private.srs", "path": "./private.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/private.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/private.srs"
}, },
{ {
"tag": "trackerslist", "tag": "trackerslist",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./trackerslist.srs", "path": "./trackerslist.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/trackerslist.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/trackerslist.srs"
}, },
{ {
"tag": "microsoft-cn", "tag": "microsoft-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./microsoft-cn.srs", "path": "./microsoft-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/microsoft-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/microsoft-cn.srs"
}, },
{ {
"tag": "apple-cn", "tag": "apple-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./apple-cn.srs", "path": "./apple-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/apple-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/apple-cn.srs"
}, },
{ {
"tag": "google-cn", "tag": "google-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./google-cn.srs", "path": "./google-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/google-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/google-cn.srs"
}, },
{ {
"tag": "games-cn", "tag": "games-cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./games-cn.srs", "path": "./games-cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/games-cn.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/games-cn.srs"
}, },
{ {
"tag": "ai", "tag": "ai",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./ai.srs", "path": "./ai.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/ai.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/ai.srs"
}, },
{ {
"tag": "networktest", "tag": "networktest",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./networktest.srs", "path": "./networktest.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/networktest.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/networktest.srs"
}, },
{ {
"tag": "proxy", "tag": "proxy",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./proxy.srs", "path": "./proxy.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/proxy.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/proxy.srs"
}, },
{ {
"tag": "cn", "tag": "cn",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cn.srs", "path": "./cn.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cn-lite.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cn-lite.srs"
}, },
{ {
"tag": "privateip", "tag": "privateip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./privateip.srs", "path": "./privateip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/privateip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/privateip.srs"
}, },
{ {
"tag": "cnip", "tag": "cnip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./cnip.srs", "path": "./cnip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/cnip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cnip.srs"
}, },
{ {
"tag": "telegramip", "tag": "telegramip",
"type": "remote", "type": "remote",
"format": "binary", "format": "binary",
"path": "./telegramip.srs", "path": "./telegramip.srs",
"url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset-compatible/telegramip.srs" "url": "https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/telegramip.srs"
} }
], ],
"final": "🐟 漏网之鱼" "final": "🐟 漏网之鱼"

View File

@@ -1,11 +1,5 @@
ShellCrash-GeoIP极简规则 ShellCrash_Geo_Nano.json
DustinWin-GeoSite轻量规则 DustinWin_Geo_Light.json
DustinWin-ruleset轻量规则 DustinWin_RS_Light.json DustinWin-ruleset轻量规则 DustinWin_RS_Light.json
DustinWin-GeoSite全分组规则 DustinWin_Geo_Full.json
DustinWin-ruleset全分组规则 DustinWin_RS_Full.json DustinWin-ruleset全分组规则 DustinWin_RS_Full.json
DustinWin-GeoSite无广告全分组规则 DustinWin_Geo_Full_NoAds.json
DustinWin-ruleset无广告全分组规则 DustinWin_RS_Full_NoAds.json DustinWin-ruleset无广告全分组规则 DustinWin_RS_Full_NoAds.json
DustinWin-GeoSite精简规则 DustinWin_Geo_Lite.json
DustinWin-ruleset精简规则 DustinWin_RS_Lite.json DustinWin-ruleset精简规则 DustinWin_RS_Lite.json
DustinWin-GeoSite无广告精简规则 DustinWin_Geo_Lite_NoAds.json
DustinWin-ruleset无广告精简规则 DustinWin_RS_Lite_NoAds.json DustinWin-ruleset无广告精简规则 DustinWin_RS_Lite_NoAds.json

View File

@@ -282,7 +282,7 @@ check_clash_config() { #检查clash配置文件
} }
check_singbox_config() { #检查singbox配置文件 check_singbox_config() { #检查singbox配置文件
#检测节点或providers #检测节点或providers
if ! grep -qE '"(socks|http|shadowsocks(r)?|vmess|trojan|wireguard|hysteria(2)?|vless|shadowtls|tuic|ssh|tor|outbound_providers)"' "$core_config_new"; then if ! grep -qE '"(socks|http|shadowsocks(r)?|vmess|trojan|wireguard|hysteria(2)?|vless|shadowtls|tuic|ssh|tor|providers)"' "$core_config_new"; then
echo ----------------------------------------------- echo -----------------------------------------------
logger "获取到了配置文件【$core_config_new】,但似乎并不包含正确的节点信息!" 31 logger "获取到了配置文件【$core_config_new】,但似乎并不包含正确的节点信息!" 31
echo "请尝试使用6-2或者6-3的方式生成配置文件" echo "请尝试使用6-2或者6-3的方式生成配置文件"
@@ -851,14 +851,14 @@ EOF
sed '$s/,$/ ] } }/' >"$TMPDIR"/jsons/cust_add_rules.json sed '$s/,$/ ] } }/' >"$TMPDIR"/jsons/cust_add_rules.json
[ ! -s "$TMPDIR"/jsons/cust_add_rules.json ] && rm -rf "$TMPDIR"/jsons/cust_add_rules.json [ ! -s "$TMPDIR"/jsons/cust_add_rules.json ] && rm -rf "$TMPDIR"/jsons/cust_add_rules.json
} }
#提取配置文件以获得outbounds.json,outbound_providers.json及route.json #提取配置文件以获得outbounds.json,providers.json及route.json
"$TMPDIR"/CrashCore format -c $core_config >"$TMPDIR"/format.json "$TMPDIR"/CrashCore format -c $core_config >"$TMPDIR"/format.json
echo '{' >"$TMPDIR"/jsons/outbounds.json echo '{' >"$TMPDIR"/jsons/outbounds.json
echo '{' >"$TMPDIR"/jsons/route.json echo '{' >"$TMPDIR"/jsons/route.json
cat "$TMPDIR"/format.json | sed -n '/"outbounds":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbounds.json cat "$TMPDIR"/format.json | sed -n '/"outbounds":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbounds.json
[ "$crashcore" = "singboxp" ] && { [ "$crashcore" = "singboxp" ] && {
echo '{' >"$TMPDIR"/jsons/outbound_providers.json echo '{' >"$TMPDIR"/jsons/providers.json
cat "$TMPDIR"/format.json | sed -n '/"outbound_providers":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbound_providers.json cat "$TMPDIR"/format.json | sed -n '/"providers":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/providers.json
} }
cat "$TMPDIR"/format.json | sed -n '/"route":/,/^\( "[a-z]\|}\)/p' | sed '$d' >>"$TMPDIR"/jsons/route.json cat "$TMPDIR"/format.json | sed -n '/"route":/,/^\( "[a-z]\|}\)/p' | sed '$d' >>"$TMPDIR"/jsons/route.json
#清理route.json中的process_name规则以及"auto_detect_interface" #清理route.json中的process_name规则以及"auto_detect_interface"
@@ -871,8 +871,8 @@ EOF
else else
sed -i 's/"insecure": true/"insecure": false/' "$TMPDIR"/jsons/outbounds.json sed -i 's/"insecure": true/"insecure": false/' "$TMPDIR"/jsons/outbounds.json
fi fi
#判断可用并修饰outbounds&outbound_providers&route.json结尾 #判断可用并修饰outbounds&providers&route.json结尾
for file in outbounds outbound_providers route; do for file in outbounds providers route; do
if [ -n "$(grep ${file} "$TMPDIR"/jsons/${file}.json 2>/dev/null)" ]; then if [ -n "$(grep ${file} "$TMPDIR"/jsons/${file}.json 2>/dev/null)" ]; then
sed -i 's/^ },$/ }/; s/^ ],$/ ]/' "$TMPDIR"/jsons/${file}.json sed -i 's/^ },$/ }/; s/^ ],$/ ]/' "$TMPDIR"/jsons/${file}.json
echo '}' >>"$TMPDIR"/jsons/${file}.json echo '}' >>"$TMPDIR"/jsons/${file}.json
@@ -888,7 +888,7 @@ EOF
mv -f "$TMPDIR"/jsons/${char}.json "$TMPDIR"/jsons_base #如果重复则临时备份 mv -f "$TMPDIR"/jsons/${char}.json "$TMPDIR"/jsons_base #如果重复则临时备份
} }
done done
for char in others inbounds outbounds outbound_providers route rule-set; do for char in others inbounds outbounds providers route rule-set; do
[ -s "$CRASHDIR"/jsons/${char}.json ] && { [ -s "$CRASHDIR"/jsons/${char}.json ] && {
ln -sf "$CRASHDIR"/jsons/${char}.json "$TMPDIR"/jsons/cust_${char}.json ln -sf "$CRASHDIR"/jsons/${char}.json "$TMPDIR"/jsons/cust_${char}.json
} }
@@ -1201,14 +1201,14 @@ EOF
sed '$s/,$/ ] } }/' >"$TMPDIR"/jsons/cust_add_rules.json sed '$s/,$/ ] } }/' >"$TMPDIR"/jsons/cust_add_rules.json
[ ! -s "$TMPDIR"/jsons/cust_add_rules.json ] && rm -rf "$TMPDIR"/jsons/cust_add_rules.json [ ! -s "$TMPDIR"/jsons/cust_add_rules.json ] && rm -rf "$TMPDIR"/jsons/cust_add_rules.json
} }
#提取配置文件以获得outbounds.json,outbound_providers.json及route.json #提取配置文件以获得outbounds.json,providers.json及route.json
"$TMPDIR"/CrashCore format -c $core_config >"$TMPDIR"/format.json "$TMPDIR"/CrashCore format -c $core_config >"$TMPDIR"/format.json
echo '{' >"$TMPDIR"/jsons/outbounds.json echo '{' >"$TMPDIR"/jsons/outbounds.json
echo '{' >"$TMPDIR"/jsons/route.json echo '{' >"$TMPDIR"/jsons/route.json
cat "$TMPDIR"/format.json | sed -n '/"outbounds":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbounds.json cat "$TMPDIR"/format.json | sed -n '/"outbounds":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbounds.json
[ "$crashcore" = "singboxp" ] && { [ "$crashcore" = "singboxp" ] && {
echo '{' >"$TMPDIR"/jsons/outbound_providers.json echo '{' >"$TMPDIR"/jsons/providers.json
cat "$TMPDIR"/format.json | sed -n '/"outbound_providers":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbound_providers.json cat "$TMPDIR"/format.json | sed -n '/^ "providers":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/providers.json
} }
cat "$TMPDIR"/format.json | sed -n '/"route":/,/^\( "[a-z]\|}\)/p' | sed '$d' >>"$TMPDIR"/jsons/route.json cat "$TMPDIR"/format.json | sed -n '/"route":/,/^\( "[a-z]\|}\)/p' | sed '$d' >>"$TMPDIR"/jsons/route.json
#清理route.json中的process_name规则以及"auto_detect_interface" #清理route.json中的process_name规则以及"auto_detect_interface"
@@ -1221,8 +1221,8 @@ EOF
else else
sed -i 's/"insecure": true/"insecure": false/' "$TMPDIR"/jsons/outbounds.json sed -i 's/"insecure": true/"insecure": false/' "$TMPDIR"/jsons/outbounds.json
fi fi
#判断可用并修饰outbounds&outbound_providers&route.json结尾 #判断可用并修饰outbounds&providers&route.json结尾
for file in outbounds outbound_providers route; do for file in outbounds providers route; do
if [ -n "$(grep ${file} "$TMPDIR"/jsons/${file}.json 2>/dev/null)" ]; then if [ -n "$(grep ${file} "$TMPDIR"/jsons/${file}.json 2>/dev/null)" ]; then
sed -i 's/^ },$/ }/; s/^ ],$/ ]/' "$TMPDIR"/jsons/${file}.json sed -i 's/^ },$/ }/; s/^ ],$/ ]/' "$TMPDIR"/jsons/${file}.json
echo '}' >>"$TMPDIR"/jsons/${file}.json echo '}' >>"$TMPDIR"/jsons/${file}.json
@@ -1238,7 +1238,7 @@ EOF
mv -f "$TMPDIR"/jsons/${char}.json "$TMPDIR"/jsons_base #如果重复则临时备份 mv -f "$TMPDIR"/jsons/${char}.json "$TMPDIR"/jsons_base #如果重复则临时备份
} }
done done
for char in others inbounds outbounds outbound_providers route rule-set; do for char in others inbounds outbounds providers route rule-set; do
[ -s "$CRASHDIR"/jsons/${char}.json ] && { [ -s "$CRASHDIR"/jsons/${char}.json ] && {
ln -sf "$CRASHDIR"/jsons/${char}.json "$TMPDIR"/jsons/cust_${char}.json ln -sf "$CRASHDIR"/jsons/${char}.json "$TMPDIR"/jsons/cust_${char}.json
} }
@@ -2134,7 +2134,7 @@ clash_check() { #clash启动前检查
} }
singbox_check() { #singbox启动前检查 singbox_check() { #singbox启动前检查
#检测PuerNya专属功能 #检测PuerNya专属功能
[ "$crashcore" != "singboxp" ] && [ -n "$(cat "$CRASHDIR"/jsons/*.json | grep -oE '"shadowsocksr"|"outbound_providers"')" ] && core_exchange singboxp 'PuerNya内核专属功能' [ "$crashcore" != "singboxp" ] && [ -n "$(cat "$CRASHDIR"/jsons/*.json | grep -oE '"shadowsocksr"|"providers"')" ] && core_exchange singboxp 'PuerNya内核专属功能'
core_check core_check
#预下载geoip-cn.srs数据库 #预下载geoip-cn.srs数据库
[ -n "$(cat "$CRASHDIR"/jsons/*.json | grep -oEi '"rule_set" *: *"geoip-cn"')" ] && ckgeo geoip-cn.srs srs_geoip_cn.srs [ -n "$(cat "$CRASHDIR"/jsons/*.json | grep -oEi '"rule_set" *: *"geoip-cn"')" ] && ckgeo geoip-cn.srs srs_geoip_cn.srs

View File

@@ -441,27 +441,34 @@ gen_singbox_providers(){ #生成singbox的providers配置文件
{ {
"tag": "${1}", "tag": "${1}",
"type": "local", "type": "local",
"healthcheck_url": "https://www.gstatic.com/generate_204", "path": "${2}",
"healthcheck_interval": "10m",
"path": "${2}"
},
EOF EOF
else else
cat >> ${TMPDIR}/providers/providers.json <<EOF cat >> ${TMPDIR}/providers/providers.json <<EOF
{ {
"tag": "${1}", "tag": "${1}",
"type": "remote", "type": "remote",
"healthcheck_url": "https://www.gstatic.com/generate_204", "url": "${2}",
"healthcheck_interval": "10m",
"download_url": "${2}",
"path": "./providers/${1}.yaml", "path": "./providers/${1}.yaml",
"download_ua": "clash.meta", "user_agent": "clash.meta;mihomo",
"download_interval": "24h", "update_interval": "24h",
"download_detour": "DIRECT"
},
EOF EOF
fi fi
#通用部分生成
[ "$skip_cert" != "未开启" ] && override_tls='true' || override_tls='false'
cat >> ${TMPDIR}/providers/providers.json <<EOF
"health_check": {
"enabled": true,
"url": "https://www.gstatic.com/generate_204",
"interval": "10m",
"timeout": "3s"
},
"override_tls": {
"enabled": $override_tls,
"insecure": $override_tls
}
},
EOF
} }
if [ -z "$(grep "provider_temp_${coretype}" ${CRASHDIR}/configs/ShellCrash.cfg)" ];then if [ -z "$(grep "provider_temp_${coretype}" ${CRASHDIR}/configs/ShellCrash.cfg)" ];then
provider_temp_file=$(sed -n "1 p" ${CRASHDIR}/configs/${coretype}_providers.list | awk '{print $2}') provider_temp_file=$(sed -n "1 p" ${CRASHDIR}/configs/${coretype}_providers.list | awk '{print $2}')
@@ -485,7 +492,7 @@ EOF
#预创建文件并写入对应文件头 #预创建文件并写入对应文件头
cat > ${TMPDIR}/providers/providers.json <<EOF cat > ${TMPDIR}/providers/providers.json <<EOF
{ {
"outbound_providers": [ "providers": [
EOF EOF
cat > ${TMPDIR}/providers/outbounds_add.json <<EOF cat > ${TMPDIR}/providers/outbounds_add.json <<EOF
{ {
@@ -495,7 +502,7 @@ EOF
if [ -n "$2" ];then if [ -n "$2" ];then
gen_singbox_providers_txt $1 $2 gen_singbox_providers_txt $1 $2
providers_tags=\"$1\" providers_tags=\"$1\"
echo '{ "tag": "'${1}'", "type": "urltest", "tolerance": 100, "providers": "'${1}'", "includes": ".*" },' >> ${TMPDIR}/providers/outbounds_add.json echo '{ "tag": "'${1}'", "type": "urltest", "tolerance": 100, "providers": ["'${1}'"], "include": ".*" },' >> ${TMPDIR}/providers/outbounds_add.json
else else
providers_tags='' providers_tags=''
while read line;do while read line;do
@@ -503,14 +510,14 @@ EOF
url=$(echo $line | awk '{print $2}') url=$(echo $line | awk '{print $2}')
providers_tags=$(echo "$providers_tags, \"$tag\"" | sed 's/^, //') providers_tags=$(echo "$providers_tags, \"$tag\"" | sed 's/^, //')
gen_singbox_providers_txt $tag $url gen_singbox_providers_txt $tag $url
echo '{ "tag": "'${tag}'", "type": "urltest", "tolerance": 100, "providers": "'${tag}'", "includes": ".*" },' >> ${TMPDIR}/providers/outbounds_add.json echo '{ "tag": "'${tag}'", "type": "urltest", "tolerance": 100, "providers": ["'${tag}'"], "include": ".*" },' >> ${TMPDIR}/providers/outbounds_add.json
done < ${CRASHDIR}/configs/providers.cfg done < ${CRASHDIR}/configs/providers.cfg
fi fi
#修复文件格式 #修复文件格式
sed -i '$s/},/}]}/' ${TMPDIR}/providers/outbounds_add.json sed -i '$s/},/}]}/' ${TMPDIR}/providers/outbounds_add.json
sed -i '$s/},/}]}/' ${TMPDIR}/providers/providers.json sed -i '$s/},/}]}/' ${TMPDIR}/providers/providers.json
#使用模版生成outbounds和rules模块 #使用模版生成outbounds和rules模块
cat ${TMPDIR}/provider_temp_file | sed "s/{providers_tags}/$providers_tags/g" >> ${TMPDIR}/providers/outbounds.json cat ${TMPDIR}/provider_temp_file | sed "s/{providers_tags}/$providers_tags/g" > ${TMPDIR}/providers/outbounds.json
rm -rf ${TMPDIR}/provider_temp_file rm -rf ${TMPDIR}/provider_temp_file
#调用内核测试 #调用内核测试
${CRASHDIR}/start.sh core_check && ${TMPDIR}/CrashCore merge ${TMPDIR}/config.json -C ${TMPDIR}/providers ${CRASHDIR}/start.sh core_check && ${TMPDIR}/CrashCore merge ${TMPDIR}/config.json -C ${TMPDIR}/providers