mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-07-25 00:13:09 +00:00
Compare commits
14 Commits
655c9aaa07
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc563dcfa1 | ||
|
|
a6e6907e86 | ||
|
|
c71fcce870 | ||
|
|
0f2a0b437c | ||
|
|
8b8d47c633 | ||
|
|
7df1d7aafa | ||
|
|
71c21fa26d | ||
|
|
7ba46d0d2d | ||
|
|
947d93d3ea | ||
|
|
bc26306ebd | ||
|
|
021960fbe7 | ||
|
|
2a084019e2 | ||
|
|
7f22bb550a | ||
|
|
0b7f7161b0 |
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
meta_v=v1.19.17
|
meta_v=v1.19.17
|
||||||
singboxr_v=1.13.0-alpha.27
|
singboxr_v=1.13.0-alpha.27
|
||||||
versionsh=1.9.5alpha14
|
versionsh=1.9.5beta1
|
||||||
GeoIP_v=20251205
|
GeoIP_v=20251205
|
||||||
|
|||||||
@@ -62,147 +62,147 @@ rule-providers:
|
|||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/ai.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/ai.mrs"
|
||||||
youtube:
|
youtube:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/youtube.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/youtube.mrs"
|
||||||
netflix:
|
netflix:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/netflix.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/netflix.mrs"
|
||||||
telegramip:
|
telegramip:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: ipcidr
|
behavior: ipcidr
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/telegramip.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/telegramip.mrs"
|
||||||
applications:
|
applications:
|
||||||
type: http
|
type: http
|
||||||
format: text
|
format: text
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: classical
|
behavior: classical
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/applications.list"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/applications.list"
|
||||||
private:
|
private:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/private.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/private.mrs"
|
||||||
privateip:
|
privateip:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: ipcidr
|
behavior: ipcidr
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/privateip.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/privateip.mrs"
|
||||||
networktest:
|
networktest:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/networktest.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/networktest.mrs"
|
||||||
apple-cn:
|
apple-cn:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/apple-cn.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/apple-cn.mrs"
|
||||||
google-cn:
|
google-cn:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/google-cn.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/google-cn.mrs"
|
||||||
googlefcm:
|
googlefcm:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@refs/heads/meta/geo/geosite/googlefcm.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/googlefcm.mrs"
|
||||||
steamcn:
|
steamcn:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@refs/heads/meta/geo/geosite/steam@cn.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/steam@cn.mrs"
|
||||||
microsoft-cn:
|
microsoft-cn:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/microsoft-cn.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/microsoft-cn.mrs"
|
||||||
games-cn:
|
games-cn:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/games-cn.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/games-cn.mrs"
|
||||||
games:
|
games:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/games.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/games.mrs"
|
||||||
mediaip:
|
mediaip:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: ipcidr
|
behavior: ipcidr
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/mediaip.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/mediaip.mrs"
|
||||||
media:
|
media:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/media.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/media.mrs"
|
||||||
cnip:
|
cnip:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: ipcidr
|
behavior: ipcidr
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/cnip.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/cnip.mrs"
|
||||||
proxy:
|
proxy:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/proxy.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/proxy.mrs"
|
||||||
cn:
|
cn:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/cn.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/cn.mrs"
|
||||||
ads:
|
ads:
|
||||||
type: http
|
type: http
|
||||||
format: mrs
|
format: mrs
|
||||||
interval: 86400
|
interval: 86400
|
||||||
behavior: domain
|
behavior: domain
|
||||||
proxy: DIRECT
|
proxy: DIRECT
|
||||||
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/mihomo-ruleset/ads.mrs"
|
url: "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@mihomo-ruleset/ads.mrs"
|
||||||
|
|
||||||
#规则顺序
|
#规则顺序
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/private.srs",
|
"path": "./ruleset/private.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/private.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/private.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/ads.srs",
|
"path": "./ruleset/ads.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/ads.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/ads.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/networktest.srs",
|
"path": "./ruleset/networktest.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/networktest.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/networktest.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/applications.srs",
|
"path": "./ruleset/applications.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/applications.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/applications.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/apple-cn.srs",
|
"path": "./ruleset/apple-cn.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/apple-cn.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/apple-cn.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/microsoft-cn.srs",
|
"path": "./ruleset/microsoft-cn.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/microsoft-cn.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/microsoft-cn.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/google-cn.srs",
|
"path": "./ruleset/google-cn.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/google-cn.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/google-cn.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/steamcn.srs",
|
"path": "./ruleset/steamcn.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@refs/heads/sing/geo/geosite/steam%40cn.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/steam%40cn.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/games-cn.srs",
|
"path": "./ruleset/games-cn.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/games-cn.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/games-cn.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/googlefcm.srs",
|
"path": "./ruleset/googlefcm.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@refs/heads/sing/geo/geosite/googlefcm.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/googlefcm.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/netflix.srs",
|
"path": "./ruleset/netflix.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/netflix.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/netflix.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/youtube.srs",
|
"path": "./ruleset/youtube.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/youtube.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/youtube.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/ai.srs",
|
"path": "./ruleset/ai.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/ai.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/ai.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/media.srs",
|
"path": "./ruleset/media.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/media.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/media.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/games.srs",
|
"path": "./ruleset/games.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/games.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/games.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/proxy.srs",
|
"path": "./ruleset/proxy.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/proxy.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/proxy.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/cn.srs",
|
"path": "./ruleset/cn.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/cn.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cn.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/privateip.srs",
|
"path": "./ruleset/privateip.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/privateip.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/privateip.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/telegramip.srs",
|
"path": "./ruleset/telegramip.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/telegramip.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/telegramip.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/mediaip.srs",
|
"path": "./ruleset/mediaip.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/mediaip.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/mediaip.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
"type": "remote",
|
"type": "remote",
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"path": "./ruleset/cnip.srs",
|
"path": "./ruleset/cnip.srs",
|
||||||
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@refs/heads/sing-box-ruleset/cnip.srs",
|
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cnip.srs",
|
||||||
"download_detour": "DIRECT"
|
"download_detour": "DIRECT"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
[ "$ts_service" = ON ] && ! grep -q '"tailscale"' "$CRASHDIR"/jsons/endpoints.json 2>/dev/null && {
|
[ "$ts_service" = ON ] && ! grep -q '"tailscale"' "$CRASHDIR"/jsons/endpoints.json 2>/dev/null && {
|
||||||
[ "$ts_subnet" = true ] && {
|
[ "$ts_subnet" = true ] && {
|
||||||
. "$CRASHDIR"/starts/fw_getlanip.sh && getlanip
|
. "$CRASHDIR"/starts/fw_getlanip.sh && getlanip
|
||||||
|
# 给没有 CIDR 前缀的裸 IP 补 /32
|
||||||
|
host_ipv4=$(echo $host_ipv4 | awk '{for(i=1;i<=NF;i++){if($i !~ /\//){$i=$i"/32"}} print}')
|
||||||
advertise_routes=$(echo "$host_ipv4"|sed 's/[[:space:]]\+/", "/g; s/^/"/; s/$/"/')
|
advertise_routes=$(echo "$host_ipv4"|sed 's/[[:space:]]\+/", "/g; s/^/"/; s/$/"/')
|
||||||
}
|
}
|
||||||
[ -z "$ts_exit_node" ] && ts_exit_node=false
|
[ -z "$ts_exit_node" ] && ts_exit_node=false
|
||||||
|
|||||||
@@ -684,6 +684,7 @@ testcommand() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
debug() {
|
debug() {
|
||||||
|
rm -f "$CRASHDIR"/\.start_error #移除自启失败标记
|
||||||
echo "$crashcore" | grep -q 'singbox' && config_tmp="$TMPDIR"/jsons || config_tmp="$TMPDIR"/config.yaml
|
echo "$crashcore" | grep -q 'singbox' && config_tmp="$TMPDIR"/jsons || config_tmp="$TMPDIR"/config.yaml
|
||||||
comp_box "\033[36m$TOOLS_DEBUG_WARN1\033[0m" \
|
comp_box "\033[36m$TOOLS_DEBUG_WARN1\033[0m" \
|
||||||
"${TOOLS_DEBUG_WARN2_PREFIX}\033[32m$TMPDIR/debug.log\033[0m${TOOLS_DEBUG_WARN2_SUFFIX}" \
|
"${TOOLS_DEBUG_WARN2_PREFIX}\033[32m$TMPDIR/debug.log\033[0m${TOOLS_DEBUG_WARN2_SUFFIX}" \
|
||||||
@@ -705,7 +706,7 @@ debug() {
|
|||||||
0) ;;
|
0) ;;
|
||||||
1)
|
1)
|
||||||
"$CRASHDIR"/start.sh stop
|
"$CRASHDIR"/start.sh stop
|
||||||
"$CRASHDIR"/start.sh bfstart
|
"$CRASHDIR"/starts/bfstart.sh
|
||||||
if echo "$crashcore" | grep -q 'singbox'; then
|
if echo "$crashcore" | grep -q 'singbox'; then
|
||||||
"$TMPDIR"/CrashCore run -D "$BINDIR" -C "$TMPDIR"/jsons &
|
"$TMPDIR"/CrashCore run -D "$BINDIR" -C "$TMPDIR"/jsons &
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -447,6 +447,12 @@ setcustcore() {
|
|||||||
crashcore=singboxr
|
crashcore=singboxr
|
||||||
checkcustcore
|
checkcustcore
|
||||||
;;
|
;;
|
||||||
|
6)
|
||||||
|
project=vernesong/mihomo-oix
|
||||||
|
api_tag=Pre-Alpha
|
||||||
|
crashcore=meta
|
||||||
|
checkcustcore
|
||||||
|
;;
|
||||||
9)
|
9)
|
||||||
comp_box "$UPG_CUSTOM_CORE_LINK_HINT" \
|
comp_box "$UPG_CUSTOM_CORE_LINK_HINT" \
|
||||||
"$UPG_CUSTOM_CORE_LINK_HINT2" \
|
"$UPG_CUSTOM_CORE_LINK_HINT2" \
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ set_dns_mod() {
|
|||||||
common_success
|
common_success
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
msg_alert
|
msg_alert "\033[33m$DNS_REDIR_NO_SERVICE\033[0m"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
errornum
|
errornum
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ getlanip() { #获取局域网host地址
|
|||||||
[ -n "$wg_ipv6" ] && wg_host_ipv6=' $wg_ipv6'
|
[ -n "$wg_ipv6" ] && wg_host_ipv6=' $wg_ipv6'
|
||||||
}
|
}
|
||||||
#添加自定义ipv4局域网网段
|
#添加自定义ipv4局域网网段
|
||||||
if [ "$replace_default_host_ipv4" == "ON" ]; then
|
if [ "$replace_default_host_ipv4" = "ON" ]; then
|
||||||
host_ipv4="$cust_host_ipv4"
|
host_ipv4="$cust_host_ipv4"
|
||||||
else
|
else
|
||||||
host_ipv4=$(echo "$host_ipv4 $cust_host_ipv4$ts_host_ipv4$wg_host_ipv4" | tr '\n' ' ' | sed 's/ $//')
|
host_ipv4=$(echo "$host_ipv4 $cust_host_ipv4$ts_host_ipv4$wg_host_ipv4" | tr '\n' ' ' | sed 's/ $//')
|
||||||
|
|||||||
@@ -27,5 +27,6 @@ set_profile "$profile"
|
|||||||
if [ -f "$CRASHDIR"/.dis_startup ] || [ -f "$CRASHDIR"/.start_error ];then
|
if [ -f "$CRASHDIR"/.dis_startup ] || [ -f "$CRASHDIR"/.start_error ];then
|
||||||
cronset "保守模式守护进程"
|
cronset "保守模式守护进程"
|
||||||
else
|
else
|
||||||
|
echo 0 > /proc/sys/vm/overcommit_memory #优化系统默认内存检测机制
|
||||||
"$CRASHDIR"/start.sh start
|
"$CRASHDIR"/start.sh start
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
#修饰singbox配置文件
|
#修饰singbox配置文件
|
||||||
parse_singbox_dns() { #dns转换
|
|
||||||
|
parse_singbox_dns() { #dns转换工具
|
||||||
first_dns=$(echo "$1" | cut -d',' -f1 | cut -d' ' -f1)
|
first_dns=$(echo "$1" | cut -d',' -f1 | cut -d' ' -f1)
|
||||||
type=""
|
type=""
|
||||||
server=""
|
server=""
|
||||||
@@ -41,8 +42,8 @@ parse_singbox_dns() { #dns转换
|
|||||||
# 输出
|
# 输出
|
||||||
echo '"type": "'"$type"'", "server": "'"$server"'", "server_port": '"$port"','
|
echo '"type": "'"$type"'", "server": "'"$server"'", "server_port": '"$port"','
|
||||||
}
|
}
|
||||||
extract_base_jsons() {
|
|
||||||
#提取配置文件以获得outbounds.json,providers.json及route.json
|
extract_base_jsons() { #提取配置文件以获得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
|
||||||
@@ -52,6 +53,8 @@ extract_base_jsons() {
|
|||||||
cat "$TMPDIR"/format.json | sed -n '/^ "providers":/,/^ "[a-z]/p' | sed '$d' >>"$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
|
cat "$TMPDIR"/format.json | sed -n '/"route":/,/^\( "[a-z]\|}\)/p' | sed '$d' >>"$TMPDIR"/jsons/route.json
|
||||||
|
#清理PASS规则
|
||||||
|
sed -i 's/"PASS"/"DIRECT"/g' "$TMPDIR"/jsons/outbounds.json
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_basic_jsons() {
|
generate_basic_jsons() {
|
||||||
@@ -62,6 +65,21 @@ generate_basic_jsons() {
|
|||||||
else
|
else
|
||||||
preferred='"preferred_by": [ "hosts" ],'
|
preferred='"preferred_by": [ "hosts" ],'
|
||||||
detour_direct='"http_client": "detour_direct"'
|
detour_direct='"http_client": "detour_direct"'
|
||||||
|
#生成http_clients.json
|
||||||
|
cat >"$TMPDIR"/jsons/http_clients.json <<EOF
|
||||||
|
{
|
||||||
|
"http_clients": [
|
||||||
|
{
|
||||||
|
"tag": "detour_proxy",
|
||||||
|
"detour": "GLOBAL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "detour_direct",
|
||||||
|
"detour": "DIRECT"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
#生成endpoints.json
|
#生成endpoints.json
|
||||||
[ "$ts_service" = ON ] || [ "$wg_service" = ON ] && [ "$zip_type" != upx ] && {
|
[ "$ts_service" = ON ] || [ "$wg_service" = ON ] && [ "$zip_type" != upx ] && {
|
||||||
@@ -110,7 +128,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_dns_config() {
|
gen_dns() {
|
||||||
#生成dns.json
|
#生成dns.json
|
||||||
[ "$ipv6_dns" != "OFF" ] && strategy='prefer_ipv4' || strategy='ipv4_only'
|
[ "$ipv6_dns" != "OFF" ] && strategy='prefer_ipv4' || strategy='ipv4_only'
|
||||||
#获取detour出口
|
#获取detour出口
|
||||||
@@ -140,7 +158,7 @@ prepare_dns_config() {
|
|||||||
[ -n "$fake_ip_filter_domain" ] && fake_ip_filter_domain="{ \"domain\": [$fake_ip_filter_domain], \"server\": \"dns_direct\" },"
|
[ -n "$fake_ip_filter_domain" ] && fake_ip_filter_domain="{ \"domain\": [$fake_ip_filter_domain], \"server\": \"dns_direct\" },"
|
||||||
[ -n "$fake_ip_filter_suffix" ] && fake_ip_filter_suffix="{ \"domain_suffix\": [$fake_ip_filter_suffix], \"server\": \"dns_direct\" },"
|
[ -n "$fake_ip_filter_suffix" ] && fake_ip_filter_suffix="{ \"domain_suffix\": [$fake_ip_filter_suffix], \"server\": \"dns_direct\" },"
|
||||||
[ -n "$fake_ip_filter_regex" ] && fake_ip_filter_regex="{ \"domain_regex\": [$fake_ip_filter_regex], \"server\": \"dns_direct\" },"
|
[ -n "$fake_ip_filter_regex" ] && fake_ip_filter_regex="{ \"domain_regex\": [$fake_ip_filter_regex], \"server\": \"dns_direct\" },"
|
||||||
proxy_dns='{ "query_type": ["A", "AAAA"], "server": "dns_fakeip", "strategy": "'"$strategy"'", "rewrite_ttl": 1 }'
|
proxy_dns='{ "query_type": ["A", "AAAA"], "server": "dns_fakeip", "rewrite_ttl": 1 }'
|
||||||
#mix模式插入fakeip过滤规则
|
#mix模式插入fakeip过滤规则
|
||||||
[ "$dns_mod" = "mix" ] && direct_dns='{ "rule_set": ["cn"], "server": "dns_direct" },'
|
[ "$dns_mod" = "mix" ] && direct_dns='{ "rule_set": ["cn"], "server": "dns_direct" },'
|
||||||
}
|
}
|
||||||
@@ -150,9 +168,6 @@ prepare_dns_config() {
|
|||||||
}
|
}
|
||||||
#防泄露设置
|
#防泄露设置
|
||||||
[ "$dns_protect" = "OFF" ] && sed -i 's/"server": "dns_proxy"/"server": "dns_direct"/g' "$TMPDIR"/jsons/route.json
|
[ "$dns_protect" = "OFF" ] && sed -i 's/"server": "dns_proxy"/"server": "dns_direct"/g' "$TMPDIR"/jsons/route.json
|
||||||
}
|
|
||||||
|
|
||||||
generate_dns_related_jsons() {
|
|
||||||
#生成add_rule_set.json
|
#生成add_rule_set.json
|
||||||
[ "$dns_mod" = "mix" ] || [ "$dns_mod" = "route" ] && ! grep -Eq '"tag" *:[[:space:]]*"cn"' "$CRASHDIR"/jsons/*.json && {
|
[ "$dns_mod" = "mix" ] || [ "$dns_mod" = "route" ] && ! grep -Eq '"tag" *:[[:space:]]*"cn"' "$CRASHDIR"/jsons/*.json && {
|
||||||
[ "$crashcore" = "singboxr" ] && srs_path='"path": "./ruleset/cn.srs",'
|
[ "$crashcore" = "singboxr" ] && srs_path='"path": "./ruleset/cn.srs",'
|
||||||
@@ -208,18 +223,17 @@ EOF
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rules": [
|
"rules": [
|
||||||
{ "clash_mode": "Direct", "server": "dns_direct", "strategy": "$strategy" },
|
{ "clash_mode": "Direct", "server": "dns_direct" },
|
||||||
{ "domain_suffix": ["services.googleapis.cn"], "server": "dns_fakeip", "strategy": "$strategy", "rewrite_ttl": 1 },
|
{ "domain_suffix": ["services.googleapis.cn"], "server": "dns_fakeip", "rewrite_ttl": 1 },
|
||||||
$fake_ip_filter_domain
|
$fake_ip_filter_domain
|
||||||
$fake_ip_filter_suffix
|
$fake_ip_filter_suffix
|
||||||
$fake_ip_filter_regex
|
$fake_ip_filter_regex
|
||||||
{ "clash_mode": "Global", "query_type": ["A", "AAAA"], "server": "$global_dns", "strategy": "$strategy", "rewrite_ttl": 1 },
|
{ "clash_mode": "Global", "query_type": ["A", "AAAA"], "server": "$global_dns", "rewrite_ttl": 1 },
|
||||||
$direct_dns
|
$direct_dns
|
||||||
$proxy_dns
|
$proxy_dns
|
||||||
],
|
],
|
||||||
"final": "dns_proxy",
|
"final": "dns_proxy",
|
||||||
"strategy": "$strategy",
|
"strategy": "$strategy",
|
||||||
"independent_cache": true,
|
|
||||||
$client_subnet
|
$client_subnet
|
||||||
"reverse_mapping": true
|
"reverse_mapping": true
|
||||||
}
|
}
|
||||||
@@ -227,7 +241,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_route_and_inbounds_jsons() {
|
gen_outbounds() {
|
||||||
#生成add_route.json
|
#生成add_route.json
|
||||||
#域名嗅探配置
|
#域名嗅探配置
|
||||||
grep -q 'telegramip' "$TMPDIR"/jsons/route.json && telegramip_set=' "rule_set": [ "telegramip" ],'
|
grep -q 'telegramip' "$TMPDIR"/jsons/route.json && telegramip_set=' "rule_set": [ "telegramip" ],'
|
||||||
@@ -248,7 +262,9 @@ generate_route_and_inbounds_jsons() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
#生成certificate.json
|
}
|
||||||
|
|
||||||
|
gen_certificate() { #生成certificate.json
|
||||||
cat >"$TMPDIR"/jsons/certificate.json <<EOF
|
cat >"$TMPDIR"/jsons/certificate.json <<EOF
|
||||||
{
|
{
|
||||||
"certificate": {
|
"certificate": {
|
||||||
@@ -256,7 +272,9 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
#生成inbounds.json
|
}
|
||||||
|
|
||||||
|
gen_inbounds() { #生成inbounds.json
|
||||||
[ -n "$authentication" ] && {
|
[ -n "$authentication" ] && {
|
||||||
username=$(echo $authentication | awk -F ':' '{print $1}') #混合端口账号密码
|
username=$(echo $authentication | awk -F ':' '{print $1}') #混合端口账号密码
|
||||||
password=$(echo $authentication | awk -F ':' '{print $2}')
|
password=$(echo $authentication | awk -F ':' '{print $2}')
|
||||||
@@ -320,8 +338,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_outbounds_and_experimental_jsons() {
|
add_outbounds() { #生成add_outbounds.json
|
||||||
#生成add_outbounds.json
|
|
||||||
grep -qE '"tag": "DIRECT"' "$TMPDIR"/jsons/outbounds.json || add_direct='{ "tag": "DIRECT", "type": "direct" }'
|
grep -qE '"tag": "DIRECT"' "$TMPDIR"/jsons/outbounds.json || add_direct='{ "tag": "DIRECT", "type": "direct" }'
|
||||||
grep -qE '"tag": "REJECT"' "$TMPDIR"/jsons/outbounds.json || add_reject='{ "tag": "REJECT", "type": "block" }'
|
grep -qE '"tag": "REJECT"' "$TMPDIR"/jsons/outbounds.json || add_reject='{ "tag": "REJECT", "type": "block" }'
|
||||||
grep -qE '"tag": "GLOBAL"' "$TMPDIR"/jsons/outbounds.json || {
|
grep -qE '"tag": "GLOBAL"' "$TMPDIR"/jsons/outbounds.json || {
|
||||||
@@ -339,22 +356,9 @@ generate_outbounds_and_experimental_jsons() {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
#生成http_clients.json
|
|
||||||
cat >"$TMPDIR"/jsons/http_clients.json <<EOF
|
|
||||||
{
|
|
||||||
"http_clients": [
|
|
||||||
{
|
|
||||||
"tag": "detour_proxy",
|
|
||||||
"detour": "GLOBAL"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"tag": "detour_direct",
|
|
||||||
"detour": "DIRECT"
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
gen_experimental() { #生成experimental.json
|
||||||
EOF
|
|
||||||
#生成experimental.json
|
|
||||||
[ "$crashcore" = "singboxr" ] && urltest_unified_delay=',"urltest_unified_delay": true'
|
[ "$crashcore" = "singboxr" ] && urltest_unified_delay=',"urltest_unified_delay": true'
|
||||||
cat >"$TMPDIR"/jsons/experimental.json <<EOF
|
cat >"$TMPDIR"/jsons/experimental.json <<EOF
|
||||||
{
|
{
|
||||||
@@ -371,8 +375,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_custom_rules_json() {
|
generate_custom_rules_json() { #生成自定义规则文件
|
||||||
#生成自定义规则文件
|
|
||||||
[ -n "$(grep -Ev ^# "$CRASHDIR"/yamls/rules.yaml 2>/dev/null)" ] && {
|
[ -n "$(grep -Ev ^# "$CRASHDIR"/yamls/rules.yaml 2>/dev/null)" ] && {
|
||||||
cat "$CRASHDIR"/yamls/rules.yaml |
|
cat "$CRASHDIR"/yamls/rules.yaml |
|
||||||
sed '/#.*/d' |
|
sed '/#.*/d' |
|
||||||
@@ -397,7 +400,7 @@ generate_custom_rules_json() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
normalize_and_finalize_jsons() {
|
normalize_and_finalize_jsons() { #修饰文件
|
||||||
#清理route.json中的process_name规则以及"auto_detect_interface"
|
#清理route.json中的process_name规则以及"auto_detect_interface"
|
||||||
sed -i '/"process_name": \[/,/],$/d' "$TMPDIR"/jsons/route.json
|
sed -i '/"process_name": \[/,/],$/d' "$TMPDIR"/jsons/route.json
|
||||||
sed -i '/"process_name": "[^"]*",/d' "$TMPDIR"/jsons/route.json
|
sed -i '/"process_name": "[^"]*",/d' "$TMPDIR"/jsons/route.json
|
||||||
@@ -419,7 +422,7 @@ normalize_and_finalize_jsons() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
link_custom_jsons() {
|
link_custom_jsons() { #合并文件
|
||||||
#加载自定义配置文件
|
#加载自定义配置文件
|
||||||
mkdir -p "$TMPDIR"/jsons_base
|
mkdir -p "$TMPDIR"/jsons_base
|
||||||
#以下为覆盖脚本的自定义文件
|
#以下为覆盖脚本的自定义文件
|
||||||
@@ -437,8 +440,7 @@ link_custom_jsons() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
validate_and_restore_custom_jsons() {
|
test_json() { #测试自定义配置文件
|
||||||
#测试自定义配置文件
|
|
||||||
if ! error=$("$TMPDIR"/CrashCore check -D "$BINDIR" -C "$TMPDIR"/jsons 2>&1); then
|
if ! error=$("$TMPDIR"/CrashCore check -D "$BINDIR" -C "$TMPDIR"/jsons 2>&1); then
|
||||||
echo $error
|
echo $error
|
||||||
error_file=$(echo $error | grep -Eo 'cust.*\.json' | sed 's/cust_//g')
|
error_file=$(echo $error | grep -Eo 'cust.*\.json' | sed 's/cust_//g')
|
||||||
@@ -451,17 +453,19 @@ validate_and_restore_custom_jsons() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
modify_json() {
|
modify_json() { #入口
|
||||||
extract_base_jsons
|
extract_base_jsons
|
||||||
generate_basic_jsons
|
generate_basic_jsons
|
||||||
prepare_dns_config
|
gen_dns
|
||||||
generate_dns_related_jsons
|
gen_outbounds
|
||||||
generate_route_and_inbounds_jsons
|
gen_certificate
|
||||||
generate_outbounds_and_experimental_jsons
|
gen_inbounds
|
||||||
|
add_outbounds
|
||||||
|
gen_experimental
|
||||||
generate_custom_rules_json
|
generate_custom_rules_json
|
||||||
normalize_and_finalize_jsons
|
normalize_and_finalize_jsons
|
||||||
link_custom_jsons
|
link_custom_jsons
|
||||||
validate_and_restore_custom_jsons
|
test_json
|
||||||
#清理缓存
|
#清理缓存
|
||||||
rm -rf "$TMPDIR"/*.json
|
rm -rf "$TMPDIR"/*.json
|
||||||
rm -rf "$TMPDIR"/jsons_base
|
rm -rf "$TMPDIR"/jsons_base
|
||||||
|
|||||||
Reference in New Issue
Block a user