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

View File

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

View File

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

View File

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

View File

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

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-GeoSite全分组规则 DustinWin_Geo_Full.json
DustinWin-ruleset全分组规则 DustinWin_RS_Full.json
DustinWin-GeoSite无广告全分组规则 DustinWin_Geo_Full_NoAds.json
DustinWin-ruleset无广告全分组规则 DustinWin_RS_Full_NoAds.json
DustinWin-GeoSite精简规则 DustinWin_Geo_Lite.json
DustinWin-ruleset精简规则 DustinWin_RS_Lite.json
DustinWin-GeoSite无广告精简规则 DustinWin_Geo_Lite_NoAds.json
DustinWin-ruleset无广告精简规则 DustinWin_RS_Lite_NoAds.json

View File

@@ -282,7 +282,7 @@ check_clash_config() { #检查clash配置文件
}
check_singbox_config() { #检查singbox配置文件
#检测节点或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 -----------------------------------------------
logger "获取到了配置文件【$core_config_new】,但似乎并不包含正确的节点信息!" 31
echo "请尝试使用6-2或者6-3的方式生成配置文件"
@@ -851,14 +851,14 @@ EOF
sed '$s/,$/ ] } }/' >"$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
echo '{' >"$TMPDIR"/jsons/outbounds.json
echo '{' >"$TMPDIR"/jsons/route.json
cat "$TMPDIR"/format.json | sed -n '/"outbounds":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbounds.json
[ "$crashcore" = "singboxp" ] && {
echo '{' >"$TMPDIR"/jsons/outbound_providers.json
cat "$TMPDIR"/format.json | sed -n '/"outbound_providers":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbound_providers.json
echo '{' >"$TMPDIR"/jsons/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
#清理route.json中的process_name规则以及"auto_detect_interface"
@@ -871,8 +871,8 @@ EOF
else
sed -i 's/"insecure": true/"insecure": false/' "$TMPDIR"/jsons/outbounds.json
fi
#判断可用并修饰outbounds&outbound_providers&route.json结尾
for file in outbounds outbound_providers route; do
#判断可用并修饰outbounds&providers&route.json结尾
for file in outbounds providers route; do
if [ -n "$(grep ${file} "$TMPDIR"/jsons/${file}.json 2>/dev/null)" ]; then
sed -i 's/^ },$/ }/; s/^ ],$/ ]/' "$TMPDIR"/jsons/${file}.json
echo '}' >>"$TMPDIR"/jsons/${file}.json
@@ -888,7 +888,7 @@ EOF
mv -f "$TMPDIR"/jsons/${char}.json "$TMPDIR"/jsons_base #如果重复则临时备份
}
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 ] && {
ln -sf "$CRASHDIR"/jsons/${char}.json "$TMPDIR"/jsons/cust_${char}.json
}
@@ -1201,14 +1201,14 @@ EOF
sed '$s/,$/ ] } }/' >"$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
echo '{' >"$TMPDIR"/jsons/outbounds.json
echo '{' >"$TMPDIR"/jsons/route.json
cat "$TMPDIR"/format.json | sed -n '/"outbounds":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbounds.json
[ "$crashcore" = "singboxp" ] && {
echo '{' >"$TMPDIR"/jsons/outbound_providers.json
cat "$TMPDIR"/format.json | sed -n '/"outbound_providers":/,/^ "[a-z]/p' | sed '$d' >>"$TMPDIR"/jsons/outbound_providers.json
echo '{' >"$TMPDIR"/jsons/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
#清理route.json中的process_name规则以及"auto_detect_interface"
@@ -1221,8 +1221,8 @@ EOF
else
sed -i 's/"insecure": true/"insecure": false/' "$TMPDIR"/jsons/outbounds.json
fi
#判断可用并修饰outbounds&outbound_providers&route.json结尾
for file in outbounds outbound_providers route; do
#判断可用并修饰outbounds&providers&route.json结尾
for file in outbounds providers route; do
if [ -n "$(grep ${file} "$TMPDIR"/jsons/${file}.json 2>/dev/null)" ]; then
sed -i 's/^ },$/ }/; s/^ ],$/ ]/' "$TMPDIR"/jsons/${file}.json
echo '}' >>"$TMPDIR"/jsons/${file}.json
@@ -1238,7 +1238,7 @@ EOF
mv -f "$TMPDIR"/jsons/${char}.json "$TMPDIR"/jsons_base #如果重复则临时备份
}
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 ] && {
ln -sf "$CRASHDIR"/jsons/${char}.json "$TMPDIR"/jsons/cust_${char}.json
}
@@ -2134,7 +2134,7 @@ clash_check() { #clash启动前检查
}
singbox_check() { #singbox启动前检查
#检测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
#预下载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}",
"type": "local",
"healthcheck_url": "https://www.gstatic.com/generate_204",
"healthcheck_interval": "10m",
"path": "${2}"
},
"path": "${2}",
EOF
else
cat >> ${TMPDIR}/providers/providers.json <<EOF
{
"tag": "${1}",
"type": "remote",
"healthcheck_url": "https://www.gstatic.com/generate_204",
"healthcheck_interval": "10m",
"download_url": "${2}",
"url": "${2}",
"path": "./providers/${1}.yaml",
"download_ua": "clash.meta",
"download_interval": "24h",
"download_detour": "DIRECT"
},
"user_agent": "clash.meta;mihomo",
"update_interval": "24h",
EOF
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
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
{
"outbound_providers": [
"providers": [
EOF
cat > ${TMPDIR}/providers/outbounds_add.json <<EOF
{
@@ -495,7 +502,7 @@ EOF
if [ -n "$2" ];then
gen_singbox_providers_txt $1 $2
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
providers_tags=''
while read line;do
@@ -503,14 +510,14 @@ EOF
url=$(echo $line | awk '{print $2}')
providers_tags=$(echo "$providers_tags, \"$tag\"" | sed 's/^, //')
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
fi
#修复文件格式
sed -i '$s/},/}]}/' ${TMPDIR}/providers/outbounds_add.json
sed -i '$s/},/}]}/' ${TMPDIR}/providers/providers.json
#使用模版生成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
#调用内核测试
${CRASHDIR}/start.sh core_check && ${TMPDIR}/CrashCore merge ${TMPDIR}/config.json -C ${TMPDIR}/providers