Compare commits
226 Commits
singbox_co
...
stable
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4819ad3d70 | ||
|
|
b1ca8ff331 | ||
|
|
603fba86c6 | ||
|
|
95369f6c98 | ||
|
|
5abadbbf3d | ||
|
|
bfd608b3f8 | ||
|
|
2b8864d463 | ||
|
|
469d279066 | ||
|
|
f481248a18 | ||
|
|
4d84fdaaff | ||
|
|
59d36e8c65 | ||
|
|
b2a457908d | ||
|
|
d8a9ce9ec3 | ||
|
|
530c0c4ce6 | ||
|
|
d73e95c5c5 | ||
|
|
c98e50bf01 | ||
|
|
8939ef4241 | ||
|
|
de554bb283 | ||
|
|
fcba4d21fc | ||
|
|
2401c2737c | ||
|
|
3c4b64d291 | ||
|
|
273a2359d2 | ||
|
|
fa49934a71 | ||
|
|
9f4bfdb1b1 | ||
|
|
78808bee20 | ||
|
|
c6f9859e9a | ||
|
|
773de08341 | ||
|
|
aa759d3b8d | ||
|
|
995bc451ec | ||
|
|
0b8c0e646d | ||
|
|
c85bfc53a0 | ||
|
|
047297ba2a | ||
|
|
e203938ca6 | ||
|
|
cda68af040 | ||
|
|
98fc357402 | ||
|
|
27539f1cc3 | ||
|
|
f2c88356c2 | ||
|
|
903b6385b0 | ||
|
|
6015bc4425 | ||
|
|
95c507f61e | ||
|
|
52d3fa08d9 | ||
|
|
88a334012f | ||
|
|
999e42c9b1 | ||
|
|
e2af3ba63e | ||
|
|
fd2c60e1f2 | ||
|
|
023787a712 | ||
|
|
1bcd7b69d5 | ||
|
|
c553475e8a | ||
|
|
5ec0b9c238 | ||
|
|
a698c923c2 | ||
|
|
11ea4ce4aa | ||
|
|
c4d4ad86b9 | ||
|
|
8721743020 | ||
|
|
d41a5fde67 | ||
|
|
55916882b1 | ||
|
|
4949e9ce1c | ||
|
|
f790aee120 | ||
|
|
ca72df9584 | ||
|
|
0247645770 | ||
|
|
58e644f9f4 | ||
|
|
a29d66ec1c | ||
|
|
cf64cd48b8 | ||
|
|
f449bea0c7 | ||
|
|
f359cb866e | ||
|
|
cdb4b94471 | ||
|
|
90606590a4 | ||
|
|
6a813f1ca6 | ||
|
|
1918d41bb4 | ||
|
|
e64bafeb04 | ||
|
|
31a1f8ef4a | ||
|
|
4c105733fa | ||
|
|
52741c719c | ||
|
|
b8af49fcbe | ||
|
|
b524c6e32a | ||
|
|
7384f69856 | ||
|
|
cc1f9391f9 | ||
|
|
ec1ccf21dc | ||
|
|
1ec46a2367 | ||
|
|
bb325d23ae | ||
|
|
0e0504cefa | ||
|
|
f9fcd715c9 | ||
|
|
9f00e7ec23 | ||
|
|
160b07cdca | ||
|
|
8c558765ef | ||
|
|
dea65009d2 | ||
|
|
8fc502d3e7 | ||
|
|
4f25207aba | ||
|
|
29c00c5937 | ||
|
|
b8fe2666a1 | ||
|
|
aaa9503c14 | ||
|
|
16a7f3e249 | ||
|
|
2835d9d532 | ||
|
|
729ab71e49 | ||
|
|
d2c468cb38 | ||
|
|
91a0866b9e | ||
|
|
390f47148a | ||
|
|
dd730ea9cd | ||
|
|
f1f8fa4395 | ||
|
|
58bc356628 | ||
|
|
4fe3dfa173 | ||
|
|
ce86942ac7 | ||
|
|
1be0a35d20 | ||
|
|
792edb67a4 | ||
|
|
e131179be1 | ||
|
|
d49d3a97b4 | ||
|
|
286f95c290 | ||
|
|
1acb1464bd | ||
|
|
58d3cda5b6 | ||
|
|
f3f51d93f0 | ||
|
|
561354434a | ||
|
|
759c367837 | ||
|
|
47b66859b0 | ||
|
|
d8f1cf245b | ||
|
|
9124d0fade | ||
|
|
23d10a8be6 | ||
|
|
d7647580f8 | ||
|
|
bd9249c6a4 | ||
|
|
94815d1ce7 | ||
|
|
f5292006f4 | ||
|
|
0992b1c208 | ||
|
|
f799fbed4f | ||
|
|
86b9d34812 | ||
|
|
7156178949 | ||
|
|
08e24e206e | ||
|
|
d873678ac6 | ||
|
|
44efdb99ea | ||
|
|
1dee6eaaed | ||
|
|
b904405d0c | ||
|
|
d2b094718a | ||
|
|
5ff25682c1 | ||
|
|
32f48046fa | ||
|
|
fbb8bbf25e | ||
|
|
36c9601749 | ||
|
|
284b89f705 | ||
|
|
0afd40443b | ||
|
|
ac505e1a9a | ||
|
|
a330ad8b5b | ||
|
|
cc9cf7ddbf | ||
|
|
5ed7ab3269 | ||
|
|
a8c2fb1a6f | ||
|
|
5baf50f16b | ||
|
|
63161a24c0 | ||
|
|
4fdc3fffec | ||
|
|
cdad31d90b | ||
|
|
edf175a8b8 | ||
|
|
747670f996 | ||
|
|
830cb0288a | ||
|
|
2922173f8a | ||
|
|
3089db422e | ||
|
|
de4ddea6d3 | ||
|
|
83b619e104 | ||
|
|
384cd7c339 | ||
|
|
9400fc702d | ||
|
|
00f10b81f9 | ||
|
|
7a6b7a7e5a | ||
|
|
46a5c5eea8 | ||
|
|
0741ab8ab2 | ||
|
|
d60cd78336 | ||
|
|
93402e1dcb | ||
|
|
23c1b43edd | ||
|
|
fe37b4f7bf | ||
|
|
69e62994bd | ||
|
|
d703ac6d83 | ||
|
|
baf4ca07e1 | ||
|
|
95bc25831f | ||
|
|
4098134329 | ||
|
|
86a8ee9768 | ||
|
|
a4cab8f66b | ||
|
|
9a3b9e3acc | ||
|
|
119c0fab50 | ||
|
|
986c54feda | ||
|
|
09cb52f8e0 | ||
|
|
c5b577593f | ||
|
|
e19559905e | ||
|
|
3b2c4f7a13 | ||
|
|
e50ac88ca0 | ||
|
|
5daef27891 | ||
|
|
c5e28110cb | ||
|
|
20c7212047 | ||
|
|
f83fb78e6a | ||
|
|
43e57d91ec | ||
|
|
0463d938a7 | ||
|
|
d8d43f9625 | ||
|
|
fcb7c90935 | ||
|
|
82b51cd22c | ||
|
|
f5618ef3d8 | ||
|
|
6eff925b1d | ||
|
|
ef4d6f51eb | ||
|
|
c20e8f3d15 | ||
|
|
d796947688 | ||
|
|
1c8c149fe8 | ||
|
|
9ec018bf5f | ||
|
|
0d1383d132 | ||
|
|
1d84e34134 | ||
|
|
d6d07abaef | ||
|
|
0033d86e65 | ||
|
|
323b32ae0c | ||
|
|
006d71b74b | ||
|
|
afc81c884b | ||
|
|
9a34a401c6 | ||
|
|
65da11ec15 | ||
|
|
b5fd6f0bef | ||
|
|
745520d101 | ||
|
|
2e05e80e2a | ||
|
|
a1f4d48739 | ||
|
|
a8ebb6182e | ||
|
|
63b02a830c | ||
|
|
3956c955cf | ||
|
|
cd67f55125 | ||
|
|
e7a5c48cce | ||
|
|
8b92402f00 | ||
|
|
d03dd1d4c6 | ||
|
|
21f8035ef6 | ||
|
|
8f8a61191a | ||
|
|
65c1678bc9 | ||
|
|
eb34a73270 | ||
|
|
164bcb9f26 | ||
|
|
381d905ed9 | ||
|
|
575f1d5d4b | ||
|
|
03e711a1ee | ||
|
|
8f9a81057b | ||
|
|
c057781314 | ||
|
|
1d43845a6e | ||
|
|
fd1b592a7e | ||
|
|
78d834bc7f | ||
|
|
bebf39bf71 |
13
.github/workflows/bin_update.yml
vendored
13
.github/workflows/bin_update.yml
vendored
@@ -98,7 +98,14 @@ jobs:
|
||||
rm -rf Yacd-meta-gh-pages
|
||||
rm -rf metacubexd-gh-pages
|
||||
echo 面板更新完成!
|
||||
|
||||
|
||||
- name: Update certificate
|
||||
run: |
|
||||
wget https://raw.githubusercontent.com/curl/curl/master/scripts/mk-ca-bundle.pl
|
||||
chmod +x ./mk-ca-bundle.pl
|
||||
./mk-ca-bundle.pl
|
||||
rm -f mk-ca-bundle.pl certdata.txt
|
||||
|
||||
- name: Update GeoIP
|
||||
run: |
|
||||
cd bin
|
||||
@@ -112,13 +119,13 @@ jobs:
|
||||
curl -kfSL -o geodata/geosite_cn.db https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite-cn.db
|
||||
curl -kfSL -o geodata/srs_geoip_cn.srs https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs
|
||||
curl -kfSL -o geodata/srs_geosite_cn.srs https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs
|
||||
curl -kfSL -o fix/ca-certificates.crt https://raw.githubusercontent.com/P3TERX/ca-certificates.crt/download/ca-certificates.crt
|
||||
mv -f ../ca-bundle.crt ./fix/ca-certificates.crt
|
||||
sed -i "s/GeoIP_v=.*/GeoIP_v=$(date '+%Y%m%d')/" version #修改版本号
|
||||
echo 数据库及根证书文件更新完成!
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
||||
git add . && git commit -m "自动更新最新Dashboard、地址库、根证书" || exit 0
|
||||
git push
|
||||
|
||||
|
||||
52
.github/workflows/core_auto_update.yml
vendored
Normal file
52
.github/workflows/core_auto_update.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: core_auto_update
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 18 * * *
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check_version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: PuerNya/sing-box
|
||||
ref: building
|
||||
fetch-depth: 0
|
||||
- name: Check version
|
||||
run: |
|
||||
git remote add sekai https://github.com/SagerNet/sing-box.git
|
||||
git fetch --tags sekai
|
||||
version_new=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
|
||||
version_old=$(curl -sSl https://github.com/juewuy/ShellCrash/releases/download/singbox_core_PuerNya/version)
|
||||
if [ "$version_old" != "$version_new" ];then
|
||||
echo a=$version_old >> $GITHUB_ENV
|
||||
echo b=$version_new >> $GITHUB_ENV
|
||||
else
|
||||
echo "未检查到版本更新,已退出!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
auto_update_singboxp_with_wg:
|
||||
needs: check_version
|
||||
if: ${{ success() }}
|
||||
permissions: write-all
|
||||
uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev
|
||||
with:
|
||||
tag1: PuerNya/sing-box
|
||||
tag2: building
|
||||
tag3: singbox_core_PuerNya
|
||||
tag5: with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_gvisor
|
||||
secrets: inherit
|
||||
|
||||
cleanup:
|
||||
needs: check_version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: cleanup
|
||||
uses: Mattraks/delete-workflow-runs@main
|
||||
with:
|
||||
retain_days: 1
|
||||
keep_minimum_runs: 2
|
||||
2
.github/workflows/release_new_version.yaml
vendored
2
.github/workflows/release_new_version.yaml
vendored
@@ -53,7 +53,7 @@ jobs:
|
||||
- name: Commit and push
|
||||
if: ${{ github.event.inputs.release_type != '内测版' }}
|
||||
run: |
|
||||
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
||||
git add . && git commit -m "${new_type} ${new_version} 打包" || exit 0
|
||||
git push
|
||||
if [[ "${new_type}" == "正式版" ]]; then
|
||||
|
||||
2
.github/workflows/update_meta_core.yaml
vendored
2
.github/workflows/update_meta_core.yaml
vendored
@@ -178,7 +178,7 @@ jobs:
|
||||
mv -f ./tmp/clash-linux-*.tar.gz ./bin/${crashcore}/
|
||||
rm -fr ./tmp
|
||||
sed -i "s/${crashcore}_v=.*/${crashcore}_v=${VERSION}/" ./bin/version
|
||||
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
||||
git add . && git commit -m "更新${crashcore}内核至${VERSION}" || exit 0
|
||||
git push
|
||||
|
||||
|
||||
60
.github/workflows/update_singbox_core.yaml
vendored
60
.github/workflows/update_singbox_core.yaml
vendored
@@ -23,6 +23,24 @@ on:
|
||||
description: 'build tags'
|
||||
required: false
|
||||
type: string
|
||||
workflow_call:
|
||||
inputs:
|
||||
tag1:
|
||||
required: true
|
||||
type: string
|
||||
tag2:
|
||||
required: true
|
||||
type: string
|
||||
tag3:
|
||||
required: false
|
||||
type: string
|
||||
tag4:
|
||||
required: false
|
||||
type: string
|
||||
tag5:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
go:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -38,20 +56,20 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: go
|
||||
env:
|
||||
REPO: ${{ github.event.inputs.tag1 }}
|
||||
TAGS: ${{ github.event.inputs.tag5 }}
|
||||
REPO: ${{ inputs.tag1 }}
|
||||
TAGS: ${{ inputs.tag5 }}
|
||||
outputs:
|
||||
version: ${{steps.sing-box.outputs.version}}
|
||||
tags: ${{steps.sing-box.outputs.tags}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
repository: ${{ github.event.inputs.tag1 }}
|
||||
ref: ${{ github.event.inputs.tag2 }}
|
||||
repository: ${{ inputs.tag1 }}
|
||||
ref: ${{ inputs.tag2 }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup go
|
||||
uses: actions/setup-go@v4.1.0
|
||||
uses: actions/setup-go@v5.0.0
|
||||
with:
|
||||
go-version: ${{needs.go.outputs.version}}
|
||||
|
||||
@@ -61,7 +79,7 @@ jobs:
|
||||
git remote add sekai https://github.com/SagerNet/sing-box.git
|
||||
git fetch --tags sekai
|
||||
version=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
|
||||
[ -z "$version" ] && version=${{ github.event.inputs.tag2 }}
|
||||
[ -z "$version" ] && version=${{ inputs.tag2 }}
|
||||
echo version=$version >> $GITHUB_OUTPUT
|
||||
if [ -z "$TAGS" ];then
|
||||
if [ "$REPO" = 'PuerNya/sing-box' ];then
|
||||
@@ -120,15 +138,15 @@ jobs:
|
||||
GOARM: ${{ matrix.goarm }}
|
||||
GOMIPS: ${{ matrix.gomips }}
|
||||
CGO_ENABLED: 0
|
||||
REPO: ${{ github.event.inputs.tag1 }}
|
||||
REPO: ${{ inputs.tag1 }}
|
||||
TAGS: ${{needs.sing-box.outputs.tags}}
|
||||
VERSION: ${{needs.sing-box.outputs.version}}
|
||||
steps:
|
||||
- name: Checkout sing-box
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
with:
|
||||
repository: ${{ github.event.inputs.tag1 }}
|
||||
ref: ${{ github.event.inputs.tag2 }}
|
||||
repository: ${{ inputs.tag1 }}
|
||||
ref: ${{ inputs.tag2 }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Go
|
||||
@@ -140,13 +158,9 @@ jobs:
|
||||
if: ${{ env.REPO == 'PuerNya/sing-box' }}
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
ref: fix-interface
|
||||
ref: building
|
||||
path: sing
|
||||
repository: PuerNya/sing
|
||||
|
||||
- name: replace sing
|
||||
if: ${{ env.REPO == 'PuerNya/sing-box' }}
|
||||
run: sed -i 's/^\/\/replace github.com.*$/replace github.com\/sagernet\/sing => .\/sing/' go.mod
|
||||
|
||||
- name: build core
|
||||
id: build
|
||||
@@ -164,8 +178,8 @@ jobs:
|
||||
- sing-box
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RELEASE: ${{ github.event.inputs.tag3 }}
|
||||
PUSHDIR: ${{ github.event.inputs.tag4 }}
|
||||
RELEASE: ${{ inputs.tag3 }}
|
||||
PUSHDIR: ${{ inputs.tag4 }}
|
||||
VERSION: ${{needs.sing-box.outputs.version}}
|
||||
steps:
|
||||
- name: Checkout ShellCrash
|
||||
@@ -188,18 +202,19 @@ jobs:
|
||||
done
|
||||
mv -f ./tmp/singbox-linux-mipsel-hardfloat.tar.gz ./tmp/singbox-linux-mipsle-hardfloat.tar.gz
|
||||
mv -f ./tmp/singbox-linux-mipsel-softfloat.tar.gz ./tmp/singbox-linux-mipsle-softfloat.tar.gz
|
||||
echo ${VERSION} > ./tmp/version
|
||||
|
||||
- name: Commit and push
|
||||
if: ${{ env.PUSHDIR != '' }}
|
||||
run: |
|
||||
[ "${{ github.event.inputs.tag1 }}" = SagerNet/sing-box ] && crashcore='singbox'
|
||||
[ "${{ github.event.inputs.tag1 }}" = PuerNya/sing-box ] && crashcore='singboxp'
|
||||
[ "${{ inputs.tag1 }}" = SagerNet/sing-box ] && crashcore='singbox'
|
||||
[ "${{ inputs.tag1 }}" = PuerNya/sing-box ] && crashcore='singboxp'
|
||||
mkdir -p ./bin/${crashcore}
|
||||
rm -fr ./bin/${crashcore}/*
|
||||
mv -f ./tmp/singbox-linux-*.tar.gz ./bin/${crashcore}/
|
||||
rm -fr ./tmp
|
||||
sed -i "s/${crashcore}_v=.*/${crashcore}_v=${VERSION}/" ./bin/version
|
||||
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
||||
git add . && git commit -m "更新${crashcore}内核至${VERSION}" || exit 0
|
||||
git push
|
||||
|
||||
@@ -207,13 +222,14 @@ jobs:
|
||||
if: ${{ env.RELEASE != '' && env.PUSHDIR == '' }}
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.tag3 }}
|
||||
name: ${{ github.event.inputs.tag3 }}
|
||||
body: "The ${{env.VERSION}} version of ${{ github.event.inputs.tag1 }} \n这是${{ github.event.inputs.tag1 }}的${{env.VERSION}}版本内核文件\nhttps://github.com/${{ github.event.inputs.tag1 }}/releases \nOnly support for ShellCrash\n仅适配ShellCrash项目"
|
||||
tag_name: ${{ inputs.tag3 }}
|
||||
name: ${{ inputs.tag3 }}
|
||||
body: "The ${{env.VERSION}} version of ${{ inputs.tag1 }} \n这是${{ inputs.tag1 }}的${{env.VERSION}}版本内核文件\nhttps://github.com/${{ inputs.tag1 }}/releases \nOnly support for ShellCrash\n仅适配ShellCrash项目"
|
||||
draft: false
|
||||
prerelease: true
|
||||
files: |
|
||||
./tmp/singbox*.tar.gz
|
||||
./tmp/version
|
||||
|
||||
- name: Cleanup Workflow
|
||||
uses: Mattraks/delete-workflow-runs@main
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
功能简介:
|
||||
--
|
||||
|
||||
~通过管理脚本在Shell环境下便捷使用<br>
|
||||
~通过管理脚本在Shell环境下便捷使用Mihomo/Singbox内核<br>
|
||||
~支持在Shell环境下管理<br>
|
||||
~支持在线导入订阅及配置链接<br>
|
||||
~支持配置定时任务,支持配置文件定时更新<br>
|
||||
@@ -131,8 +131,8 @@ export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$
|
||||
安装完成管理脚本后,执行如下命令使用~
|
||||
|
||||
```Shell
|
||||
Clash #进入对话
|
||||
Clash -h #帮助列表
|
||||
crash #进入对话
|
||||
crash -h #帮助列表
|
||||
```
|
||||
|
||||
#### **运行时的额外依赖**:<br>
|
||||
@@ -160,5 +160,4 @@ ubus/iproute-doc 极低 缺少时无法正常获取本机host地址
|
||||
|
||||
机场推荐:
|
||||
--
|
||||
#### [大米-群友力荐,流媒体解锁,月付推荐](https://cloud.bigme.pro/user#/register?code=2PuWY9I7)<br>
|
||||
#### [Dler-老牌稳定,流媒体解锁,年付推荐](https://dler.best/auth/register?affid=89698)<br>
|
||||
#### [大米-群友力荐,流媒体解锁,月付推荐](https://1s.bigmeok.me/user#/register?code=2PuWY9I7)<br>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 126 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 495 KiB |
108355
bin/geodata/geosite.dat
108355
bin/geodata/geosite.dat
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,4 @@
|
||||
1.9.1
|
||||
1.9.0
|
||||
1.8.0
|
||||
1.7.0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
bin/version
10
bin/version
@@ -1,8 +1,8 @@
|
||||
clashnet_v=v1.7.6
|
||||
clashpre_v=2022.11.25
|
||||
clash_v=v1.7.1
|
||||
meta_v=v1.18.1
|
||||
singboxp_v=1.8.5-73d97226
|
||||
singbox_v=1.8.8
|
||||
versionsh=1.9.1alpha9
|
||||
GeoIP_v=20240316
|
||||
meta_v=v1.18.7
|
||||
singboxp_v=1.10.0-alpha.29-067c81a7
|
||||
singbox_v=1.9.0
|
||||
versionsh=1.9.1
|
||||
GeoIP_v=20241130
|
||||
|
||||
290
install.sh
290
install.sh
@@ -2,9 +2,9 @@
|
||||
# Copyright (C) Juewuy
|
||||
|
||||
[ -z "$url" ] && url="https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master"
|
||||
type bash &>/dev/null && shtype=bash || shtype=sh
|
||||
echo='echo -e'
|
||||
[ -n "$(echo -e|grep e)" ] && {
|
||||
type bash &>/dev/null && shtype=bash || shtype=sh
|
||||
echo='echo -e'
|
||||
[ -n "$(echo -e | grep e)" ] && {
|
||||
echo "\033[31m不支持dash环境安装!请先输入bash命令后再运行安装命令!\033[0m"
|
||||
exit
|
||||
}
|
||||
@@ -15,23 +15,23 @@ echo "** ShellCrash **"
|
||||
echo "** by Juewuy **"
|
||||
echo "***********************************************"
|
||||
#内置工具
|
||||
dir_avail(){
|
||||
df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep -E 'Ava|可用' |awk '{print $2}'
|
||||
dir_avail() {
|
||||
df $2 $1 | awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' | grep -E 'Ava|可用' | awk '{print $2}'
|
||||
}
|
||||
setconfig(){
|
||||
setconfig() {
|
||||
configpath=$CRASHDIR/configs/ShellCrash.cfg
|
||||
[ -n "$(grep ${1} $configpath)" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath
|
||||
[ -n "$(grep ${1} $configpath)" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >>$configpath
|
||||
}
|
||||
webget(){
|
||||
webget() {
|
||||
#参数【$1】代表下载目录,【$2】代表在线地址
|
||||
#参数【$3】代表输出显示,【$4】不启用重定向
|
||||
if curl --version > /dev/null 2>&1;then
|
||||
if curl --version >/dev/null 2>&1; then
|
||||
[ "$3" = "echooff" ] && progress='-s' || progress='-#'
|
||||
[ -z "$4" ] && redirect='-L' || redirect=''
|
||||
result=$(curl -w %{http_code} --connect-timeout 5 $progress $redirect -ko $1 $2)
|
||||
[ -n "$(echo $result | grep -e ^2)" ] && result="200"
|
||||
else
|
||||
if wget --version > /dev/null 2>&1;then
|
||||
if wget --version >/dev/null 2>&1; then
|
||||
[ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress'
|
||||
[ "$4" = "rediroff" ] && redirect='--max-redirect=0' || redirect=''
|
||||
certificate='--no-check-certificate'
|
||||
@@ -39,18 +39,18 @@ webget(){
|
||||
fi
|
||||
[ "$3" = "echoon" ] && progress=''
|
||||
[ "$3" = "echooff" ] && progress='-q'
|
||||
wget $progress $redirect $certificate $timeout -O $1 $2
|
||||
wget $progress $redirect $certificate $timeout -O $1 $2
|
||||
[ $? -eq 0 ] && result="200"
|
||||
fi
|
||||
}
|
||||
error_down(){
|
||||
error_down() {
|
||||
$echo "请参考 \033[32mhttps://github.com/juewuy/ShellCrash/blob/master/README_CN.md"
|
||||
$echo "\033[33m使用其他安装源重新安装!\033[0m"
|
||||
$echo "\033[33m使用其他安装源重新安装!\033[0m"
|
||||
}
|
||||
#安装及初始化
|
||||
gettar(){
|
||||
gettar() {
|
||||
webget /tmp/ShellCrash.tar.gz "$url/bin/ShellCrash.tar.gz"
|
||||
if [ "$result" != "200" ];then
|
||||
if [ "$result" != "200" ]; then
|
||||
$echo "\033[33m文件下载失败!\033[0m"
|
||||
error_down
|
||||
exit 1
|
||||
@@ -59,142 +59,161 @@ gettar(){
|
||||
#解压
|
||||
echo -----------------------------------------------
|
||||
echo 开始解压文件!
|
||||
mkdir -p $CRASHDIR > /dev/null
|
||||
mkdir -p $CRASHDIR >/dev/null
|
||||
tar -zxf '/tmp/ShellCrash.tar.gz' -C $CRASHDIR/ || tar -zxf '/tmp/ShellCrash.tar.gz' --no-same-owner -C $CRASHDIR/
|
||||
if [ -f $CRASHDIR/init.sh ];then
|
||||
source $CRASHDIR/init.sh >/dev/null
|
||||
if [ -s $CRASHDIR/init.sh ]; then
|
||||
. $CRASHDIR/init.sh >/dev/null || $echo "\033[33m初始化失败,请尝试本地安装!\033[0m"
|
||||
else
|
||||
rm -rf /tmp/ShellCrash.tar.gz
|
||||
$echo "\033[33m文件解压失败!\033[0m"
|
||||
error_down
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
setdir(){
|
||||
set_usb_dir(){
|
||||
setdir() {
|
||||
set_usb_dir() {
|
||||
$echo "请选择安装目录"
|
||||
du -hL /mnt | awk '{print " "NR" "$2" "$1}'
|
||||
read -p "请输入相应数字 > " num
|
||||
dir=$(du -hL /mnt | awk '{print $2}' | sed -n "$num"p)
|
||||
if [ -z "$dir" ];then
|
||||
if [ -z "$dir" ]; then
|
||||
$echo "\033[31m输入错误!请重新设置!\033[0m"
|
||||
set_usb_dir
|
||||
fi
|
||||
}
|
||||
set_cust_dir(){
|
||||
set_asus_dir() {
|
||||
echo -e "请选择U盘目录"
|
||||
du -hL /tmp/mnt | awk '{print " "NR" "$2" "$1}'
|
||||
read -p "请输入相应数字 > " num
|
||||
dir=$(du -hL /tmp/mnt | awk '{print $2}' | sed -n "$num"p)
|
||||
if [ ! -f "$dir/asusware.arm/etc/init.d/S50downloadmaster" ]; then
|
||||
echo -e "\033[31m未找到下载大师自启文件:$dir/asusware.arm/etc/init.d/S50downloadmaster,请检查设置!\033[0m"
|
||||
set_asus_dir
|
||||
fi
|
||||
}
|
||||
set_cust_dir() {
|
||||
echo -----------------------------------------------
|
||||
echo '可用路径 剩余空间:'
|
||||
df -h | awk '{print $6,$4}'| sed 1d
|
||||
df -h | awk '{print $6,$4}' | sed 1d
|
||||
echo '路径是必须带 / 的格式,注意写入虚拟内存(/tmp,/opt,/sys...)的文件会在重启后消失!!!'
|
||||
read -p "请输入自定义路径 > " dir
|
||||
if [ "$(dir_avail $dir)" = 0 ];then
|
||||
if [ "$(dir_avail $dir)" = 0 ]; then
|
||||
$echo "\033[31m路径错误!请重新设置!\033[0m"
|
||||
set_cust_dir
|
||||
fi
|
||||
}
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m注意:安装ShellCrash至少需要预留约1MB的磁盘空间\033[0m"
|
||||
if [ -n "$systype" ];then
|
||||
[ "$systype" = "Padavan" ] && dir=/etc/storage
|
||||
[ "$systype" = "mi_snapshot" ] && {
|
||||
$echo "\033[33m检测到当前设备为小米官方系统,请选择安装位置\033[0m"
|
||||
[ "$(dir_avail /data)" -gt 256 ] && $echo " 1 安装到 /data 目录(推荐,支持软固化功能)"
|
||||
[ "$(dir_avail /userdisk)" -gt 256 ] && $echo " 2 安装到 /userdisk 目录(推荐,支持软固化功能)"
|
||||
$echo " 3 安装到自定义目录(不推荐,不明勿用!)"
|
||||
$echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
dir=/data
|
||||
;;
|
||||
2)
|
||||
dir=/userdisk
|
||||
;;
|
||||
3)
|
||||
set_cust_dir
|
||||
;;
|
||||
*)
|
||||
exit 1 ;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "asusrouter" ] && {
|
||||
$echo "\033[33m检测到当前设备为华硕固件,请选择安装方式\033[0m"
|
||||
$echo " 1 基于USB设备安装(通用,须插入\033[31m任意\033[0mUSB设备)"
|
||||
$echo " 2 基于自启脚本安装(仅支持梅林及部分官改固件)"
|
||||
$echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
read -p "将脚本安装到USB存储/系统闪存?(1/0) > " res
|
||||
[ "$res" = "1" ] && set_usb_dir || dir=/jffs
|
||||
usb_status=1
|
||||
;;
|
||||
2)
|
||||
$echo "如无法正常开机启动,请重新使用USB方式安装!"
|
||||
sleep 2
|
||||
dir=/jffs ;;
|
||||
*)
|
||||
exit 1 ;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt
|
||||
else
|
||||
$echo " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
||||
$echo " 2 在\033[32m/usr/share目录\033[0m下安装(适合Linux系统)"
|
||||
$echo " 3 在\033[32m当前用户目录\033[0m下安装(适合非root用户)"
|
||||
$echo " 4 在\033[32m外置存储\033[0m中安装"
|
||||
$echo " 5 手动设置安装目录"
|
||||
$echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
#设置目录
|
||||
if [ -z $num ];then
|
||||
echo 安装已取消
|
||||
exit 1;
|
||||
elif [ "$num" = "1" ];then
|
||||
dir=/etc
|
||||
elif [ "$num" = "2" ];then
|
||||
dir=/usr/share
|
||||
elif [ "$num" = "3" ];then
|
||||
dir=~/.local/share
|
||||
mkdir -p ~/.config/systemd/user
|
||||
elif [ "$num" = "4" ];then
|
||||
set_usb_dir
|
||||
elif [ "$num" = "5" ];then
|
||||
set_cust_dir
|
||||
$echo "\033[33m注意:安装ShellCrash至少需要预留约1MB的磁盘空间\033[0m"
|
||||
if [ -n "$systype" ]; then
|
||||
[ "$systype" = "Padavan" ] && dir=/etc/storage
|
||||
[ "$systype" = "mi_snapshot" ] && {
|
||||
$echo "\033[33m检测到当前设备为小米官方系统,请选择安装位置\033[0m"
|
||||
[ "$(dir_avail /data)" -gt 256 ] && $echo " 1 安装到 /data 目录(推荐,支持软固化功能)"
|
||||
[ "$(dir_avail /userdisk)" -gt 256 ] && $echo " 2 安装到 /userdisk 目录(推荐,支持软固化功能)"
|
||||
$echo " 3 安装到自定义目录(不推荐,不明勿用!)"
|
||||
$echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
dir=/data
|
||||
;;
|
||||
2)
|
||||
dir=/userdisk
|
||||
;;
|
||||
3)
|
||||
set_cust_dir
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "asusrouter" ] && {
|
||||
$echo "\033[33m检测到当前设备为华硕固件,请选择安装方式\033[0m"
|
||||
$echo " 1 基于USB设备安装(限23年9月之前固件,须插入\033[31m任意\033[0mUSB设备)"
|
||||
$echo " 2 基于自启脚本安装(仅支持梅林及部分非koolshare官改固件)"
|
||||
$echo " 3 基于U盘+下载大师安装(支持所有固件,限ARM设备,须插入U盘或移动硬盘)"
|
||||
$echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
read -p "将脚本安装到USB存储/系统闪存?(1/0) > " res
|
||||
[ "$res" = "1" ] && set_usb_dir || dir=/jffs
|
||||
usb_status=1
|
||||
;;
|
||||
2)
|
||||
$echo "如无法正常开机启动,请重新使用USB方式安装!"
|
||||
sleep 2
|
||||
dir=/jffs
|
||||
;;
|
||||
3)
|
||||
echo -e "请先在路由器网页后台安装下载大师并启用,之后选择外置存储所在目录!"
|
||||
sleep 2
|
||||
set_asus_dir
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt
|
||||
else
|
||||
echo 安装已取消!!!
|
||||
exit 1;
|
||||
$echo " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
||||
$echo " 2 在\033[32m/usr/share目录\033[0m下安装(适合Linux系统)"
|
||||
$echo " 3 在\033[32m当前用户目录\033[0m下安装(适合非root用户)"
|
||||
$echo " 4 在\033[32m外置存储\033[0m中安装"
|
||||
$echo " 5 手动设置安装目录"
|
||||
$echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
#设置目录
|
||||
if [ -z $num ]; then
|
||||
echo 安装已取消
|
||||
exit 1
|
||||
elif [ "$num" = "1" ]; then
|
||||
dir=/etc
|
||||
elif [ "$num" = "2" ]; then
|
||||
dir=/usr/share
|
||||
elif [ "$num" = "3" ]; then
|
||||
dir=~/.local/share
|
||||
mkdir -p ~/.config/systemd/user
|
||||
elif [ "$num" = "4" ]; then
|
||||
set_usb_dir
|
||||
elif [ "$num" = "5" ]; then
|
||||
set_cust_dir
|
||||
else
|
||||
echo 安装已取消!!!
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -w $dir ];then
|
||||
$echo "\033[31m没有$dir目录写入权限!请重新设置!\033[0m" && sleep 1 && setdir
|
||||
else
|
||||
$echo "目标目录\033[32m$dir\033[0m空间剩余:$(dir_avail $dir -h)"
|
||||
read -p "确认安装?(1/0) > " res
|
||||
[ "$res" = "1" ] && CRASHDIR=$dir/ShellCrash || setdir
|
||||
fi
|
||||
if [ ! -w $dir ]; then
|
||||
$echo "\033[31m没有$dir目录写入权限!请重新设置!\033[0m" && sleep 1 && setdir
|
||||
else
|
||||
$echo "目标目录\033[32m$dir\033[0m空间剩余:$(dir_avail $dir -h)"
|
||||
read -p "确认安装?(1/0) > " res
|
||||
[ "$res" = "1" ] && CRASHDIR=$dir/ShellCrash || setdir
|
||||
fi
|
||||
}
|
||||
install(){
|
||||
echo -----------------------------------------------
|
||||
echo 开始从服务器获取安装文件!
|
||||
echo -----------------------------------------------
|
||||
gettar
|
||||
echo -----------------------------------------------
|
||||
echo ShellCrash 已经安装成功!
|
||||
[ "$profile" = "~/.bashrc" ] && echo "请执行【source ~/.bashrc &> /dev/null】命令以加载环境变量!"
|
||||
[ -n "$(ls -l /bin/sh|grep -oE 'zsh')" ] && echo "请执行【source ~/.zshrc &> /dev/null】命令以加载环境变量!"
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m输入\033[30;47m crash \033[0;33m命令即可管理!!!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
}
|
||||
setversion(){
|
||||
install() {
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m请选择想要安装的版本:\033[0m"
|
||||
echo 开始从服务器获取安装文件!
|
||||
echo -----------------------------------------------
|
||||
gettar
|
||||
echo -----------------------------------------------
|
||||
echo ShellCrash 已经安装成功!
|
||||
[ "$profile" = "~/.bashrc" ] && echo "请执行【. ~/.bashrc &> /dev/null】命令以加载环境变量!"
|
||||
[ -n "$(ls -l /bin/sh | grep -oE 'zsh')" ] && echo "请执行【. ~/.zshrc &> /dev/null】命令以加载环境变量!"
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m输入\033[30;47m crash \033[0;33m命令即可管理!!!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
}
|
||||
setversion() {
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m请选择想要安装的版本:\033[0m"
|
||||
$echo " 1 \033[32m公测版(推荐)\033[0m"
|
||||
$echo " 2 \033[36m稳定版\033[0m"
|
||||
$echo " 3 \033[31m开发版\033[0m"
|
||||
@@ -203,29 +222,28 @@ setversion(){
|
||||
case "$num" in
|
||||
2)
|
||||
url=$(echo $url | sed 's/master/stable/')
|
||||
;;
|
||||
;;
|
||||
3)
|
||||
url=$(echo $url | sed 's/master/dev/')
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
#特殊固件识别及标记
|
||||
[ -f "/etc/storage/started_script.sh" ] && {
|
||||
systype=Padavan #老毛子固件
|
||||
initdir='/etc/storage/started_script.sh'
|
||||
}
|
||||
}
|
||||
[ -d "/jffs" ] && {
|
||||
systype=asusrouter #华硕固件
|
||||
[ -f "/jffs/.asusrouter" ] && initdir='/jffs/.asusrouter'
|
||||
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
||||
}
|
||||
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
||||
}
|
||||
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
|
||||
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
|
||||
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
|
||||
|
||||
#检查root权限
|
||||
if [ "$USER" != "root" -a -z "$systype" ];then
|
||||
if [ "$USER" != "root" -a -z "$systype" ]; then
|
||||
echo 当前用户:$USER
|
||||
$echo "\033[31m请尽量使用root用户(不要直接使用sudo命令!)执行安装!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
@@ -233,7 +251,7 @@ if [ "$USER" != "root" -a -z "$systype" ];then
|
||||
[ "$res" != "1" ] && exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$(echo $url | grep master)" ];then
|
||||
if [ -n "$(echo $url | grep master)" ]; then
|
||||
setversion
|
||||
fi
|
||||
#获取版本信息
|
||||
@@ -248,26 +266,26 @@ $echo "\033[44m如遇问题请加TG群反馈:\033[42;30m t.me/ShellClash \033[
|
||||
$echo "\033[37m支持各种基于openwrt的路由器设备"
|
||||
$echo "\033[33m支持Debian、Centos等标准Linux系统\033[0m"
|
||||
|
||||
if [ -n "$CRASHDIR" ];then
|
||||
if [ -n "$CRASHDIR" ]; then
|
||||
echo -----------------------------------------------
|
||||
$echo "检测到旧的安装目录\033[36m$CRASHDIR\033[0m,是否覆盖安装?"
|
||||
$echo "\033[32m覆盖安装时不会移除配置文件!\033[0m"
|
||||
read -p "覆盖安装/卸载旧版本?(1/0) > " res
|
||||
if [ "$res" = "1" ];then
|
||||
if [ "$res" = "1" ]; then
|
||||
install
|
||||
elif [ "$res" = "0" ];then
|
||||
elif [ "$res" = "0" ]; then
|
||||
rm -rf $CRASHDIR
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[31m 旧版本文件已卸载!\033[0m"
|
||||
setdir
|
||||
install
|
||||
elif [ "$res" = "9" ];then
|
||||
elif [ "$res" = "9" ]; then
|
||||
echo 测试模式,变更安装位置
|
||||
setdir
|
||||
install
|
||||
else
|
||||
$echo "\033[31m输入错误!已取消安装!\033[0m"
|
||||
exit 1;
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
setdir
|
||||
|
||||
@@ -71,9 +71,12 @@ localhost.sec.qq.com
|
||||
+.qq.com
|
||||
+.tencent.com
|
||||
#Game
|
||||
#Steam
|
||||
+.steamcontent.com
|
||||
#Nintendo Switch
|
||||
+.srv.nintendo.net
|
||||
*.n.n.srv.nintendo.net
|
||||
+.cdn.nintendo.net
|
||||
#Sony PlayStation
|
||||
+.stun.playstation.net
|
||||
#Microsoft Xbox
|
||||
@@ -129,6 +132,8 @@ ff.dorado.sdo.com
|
||||
shark007.net
|
||||
#Mijia
|
||||
Mijia Cloud
|
||||
#Xiaomi
|
||||
+.market.xiaomi.com
|
||||
#招商银行
|
||||
+.cmbchina.com
|
||||
+.cmbimg.com
|
||||
@@ -143,3 +148,9 @@ static.adtidy.org
|
||||
+.n0808.com
|
||||
#T-mobile and Ultra Mobile wifi calling
|
||||
+.3gppnetwork.org
|
||||
#UU Plugin
|
||||
+.uu.163.com
|
||||
ps.res.netease.com
|
||||
#向日葵远程控制
|
||||
+.oray.com
|
||||
+.orayimg.com
|
||||
|
||||
@@ -7,13 +7,9 @@
|
||||
|
||||
201 wwng2333自建CN源(请勿滥用!) https://mirrors.csgo.ovh/ShellClash 公测版
|
||||
202 http私人内测源(危险!非必要请勿使用) http://t.jwsc.eu.org 开发版
|
||||
|
||||
301 墙洞提供,不支持vless|hy https://api.dler.io
|
||||
302 SUB作者提供,不支持vless|hy https://sub.xeton.dev
|
||||
303 品云提供,不支持vless|hy https://sub.id9.cc
|
||||
|
||||
401 肥羊提供(有广告),支持vless|hy2 https://sub.d1.mk
|
||||
402 作者提供,支持vless|hy2 https://sub.jwsc.eu.org
|
||||
401 作者提供,支持vless|hy2 https://sub.jwsc.eu.org
|
||||
402 肥羊提供(有广告),支持vless|hy2 https://sub.d1.mk
|
||||
403 肥羊提供(有广告),支持vless|hy2 https://api.v1.mk
|
||||
|
||||
497 作者提供,未加密仅备用 http://sub2.jwsc.eu.org
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
113#$CRASHDIR/task/task.sh update_mmdb#自动更新数据库文件
|
||||
|
||||
121#$CRASHDIR/task/task.sh reset_firewall#重设透明路由防火墙
|
||||
122#reboot#重启路由设备(慎用)
|
||||
122#sleep 70 && touch /etc/banner && reboot#重启路由设备(慎用)
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
[custom]
|
||||
ruleset=TikTok,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/TikTok/TikTok.list
|
||||
ruleset=国内直连流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
|
||||
ruleset=国内直连流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
|
||||
ruleset=国内直连流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
|
||||
ruleset=普通外网流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
|
||||
ruleset=普通外网流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list
|
||||
ruleset=普通外网流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
|
||||
ruleset=普通外网流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
|
||||
ruleset=国内直连流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
|
||||
ruleset=国内直连流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
|
||||
ruleset=国内直连流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list
|
||||
@@ -15,6 +18,8 @@ custom_proxy_group=IP验证专用`select`.*
|
||||
custom_proxy_group=922未知地址`select`[]🇨🇳 台湾自动`[]🇨🇳 台湾均衡`[]🇨🇳 台湾手动`[]🇭🇰 香港自动`[]🇭🇰 香港均衡`[]🇭🇰 香港手动`[]🇸🇬 新加坡自动`[]🇸🇬 新加坡均衡`[]🇸🇬 新加坡手动`[]🇺🇲 美国自动`[]🇺🇲 美国均衡`[]🇺🇲 美国手动`[]所有节点手选
|
||||
custom_proxy_group=abc全球节点`select`[]🇨🇳 台湾自动`[]🇨🇳 台湾均衡`[]🇨🇳 台湾手动`[]🇭🇰 香港自动`[]🇭🇰 香港均衡`[]🇭🇰 香港手动`[]🇸🇬 新加坡自动`[]🇸🇬 新加坡均衡`[]🇸🇬 新加坡手动`[]🇺🇲 美国自动`[]🇺🇲 美国均衡`[]🇺🇲 美国手动`[]所有节点手选
|
||||
custom_proxy_group=PIA全球节点`select`[]🇨🇳 台湾自动`[]🇨🇳 台湾均衡`[]🇨🇳 台湾手动`[]🇭🇰 香港自动`[]🇭🇰 香港均衡`[]🇭🇰 香港手动`[]🇸🇬 新加坡自动`[]🇸🇬 新加坡均衡`[]🇸🇬 新加坡手动`[]🇺🇲 美国自动`[]🇺🇲 美国均衡`[]🇺🇲 美国手动`[]所有节点手选
|
||||
custom_proxy_group=比特熊专用`select`.*
|
||||
custom_proxy_group=TikTok`select`[]REJECT`[]DIRECT`[]普通外网流量
|
||||
|
||||
custom_proxy_group=🇭🇰 香港手动`select`(港|HK|🇭🇰|Hong Kong)
|
||||
custom_proxy_group=🇺🇲 美国手动`select`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|🇺🇲)
|
||||
@@ -22,13 +27,14 @@ custom_proxy_group=🇨🇳 台湾手动`select`(台|新北|彰化|TW|Taiwan)
|
||||
custom_proxy_group=🇸🇬 新加坡手动`select`(新加坡|坡|狮城|广新|SG|Singapore|🇸🇬)
|
||||
custom_proxy_group=所有节点手选`select`.*
|
||||
|
||||
custom_proxy_group=普通外网流量`select`[]🇭🇰 香港自动`[]🇨🇳 台湾自动`[]🇸🇬 新加坡自动`[]🇺🇲 美国自动`[]dler-AC`[]所有节点自动`[]所有节点手选`[]DIRECT
|
||||
custom_proxy_group=普通外网流量`select`[]🇭🇰 香港自动`[]🇨🇳 台湾自动`[]🇸🇬 新加坡自动`[]🇺🇲 美国自动`[]大米bigmi`[]dler-AC`[]所有节点自动`[]所有节点手选`[]DIRECT
|
||||
custom_proxy_group=国内直连流量`select`[]DIRECT`[]所有节点自动`[]所有节点手选
|
||||
|
||||
custom_proxy_group=🇭🇰 香港自动`url-test`(港|HK|Hong Kong)`https://www.gstatic.com/generate_204`300,,50
|
||||
custom_proxy_group=🇺🇲 美国自动`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
|
||||
custom_proxy_group=🇨🇳 台湾自动`url-test`(台|新北|彰化|TW|Taiwan)`https://www.gstatic.com/generate_204`300,,50
|
||||
custom_proxy_group=🇸🇬 新加坡自动`url-test`(新加坡|坡|狮城|SG|Singapore)`https://www.gstatic.com/generate_204`300,,50
|
||||
custom_proxy_group=大米bigmi`url-test`(香港0|台湾0|日本0|新加坡0|美国0)`https://www.gstatic.com/generate_204`300,,50
|
||||
custom_proxy_group=dler-AC`url-test`(AC)`https://www.gstatic.com/generate_204`300,,50
|
||||
custom_proxy_group=所有节点自动`url-test`.*`https://www.gstatic.com/generate_204`300,,50
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ custom_proxy_group=🚀 手动切换`select`.*
|
||||
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
|
||||
custom_proxy_group=🛑 广告拦截`select`[]DIRECT`[]REJECT
|
||||
custom_proxy_group=🍃 应用净化`select`[]DIRECT`[]REJECT
|
||||
custom_proxy_group=🎮 外服游戏`select`[]🎯 全球直连`[]🎮 游戏节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 新加坡节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🇺🇲 美国节点`[]🚀 手动切换
|
||||
custom_proxy_group=🎮 外服游戏`select`.*
|
||||
custom_proxy_group=📲 电报消息`select`[]🚀 节点选择`[]♻️ 自动选择`[]📺 省流节点`[]🇸🇬 新加坡节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🇺🇲 美国节点`[]🚀 手动切换`[]DIRECT
|
||||
custom_proxy_group=📢 谷歌FCM`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 新加坡节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🚀 手动切换
|
||||
custom_proxy_group=🎥 NETFLIX`select`[]🎥 流媒体解锁`[]👍 高级节点`[]🇸🇬 新加坡节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇰🇷 韩国节点`[]🇺🇲 美国节点`[]🚀 节点选择
|
||||
|
||||
@@ -3,9 +3,9 @@ ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/mast
|
||||
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
|
||||
ruleset=🛑 广告拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
|
||||
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
|
||||
ruleset=🆎 增强拦截,rules/ACL4SSR/Clash/BanEasyList.list
|
||||
ruleset=🆎 增强拦截,rules/ACL4SSR/Clash/BanEasyListChina.list
|
||||
ruleset=🆎 增强拦截,rules/ACL4SSR/Clash/BanEasyPrivacy.list
|
||||
ruleset=🆎 增强拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyList.list
|
||||
ruleset=🆎 增强拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyListChina.list
|
||||
ruleset=🆎 增强拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanEasyPrivacy.list
|
||||
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
|
||||
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
|
||||
ruleset=🎥 NETFLIX,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/Netflix.list
|
||||
|
||||
@@ -19,7 +19,7 @@ custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/genera
|
||||
custom_proxy_group=🔯 故障转移首选`select`.*
|
||||
custom_proxy_group=🔯 故障转移`fallback`[]🔯 故障转移首选`[]👍 高级节点`[]♻️ 自动选择`http://www.gstatic.com/generate_204`180
|
||||
custom_proxy_group=🛑 广告拦截`select`[]DIRECT`[]REJECT
|
||||
custom_proxy_group=🤖 人工智能`select`[]🔯 故障转移`[]🔯 故障转移首选
|
||||
custom_proxy_group=🤖 人工智能`select`[]🔯 故障转移`.*
|
||||
custom_proxy_group=🎥 奈飞解锁`select`[]🎥 流媒体解锁`[]👍 高级节点`[]🔯 故障转移`[]🚀 节点选择
|
||||
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
|
||||
custom_proxy_group=🐟 漏网之鱼`select`[]🔯 故障转移`[]🚀 节点选择`[]📺 省流节点`[]♻️ 自动选择`[]DIRECT
|
||||
|
||||
@@ -16,3 +16,6 @@ DOMAIN-SUFFIX,statsigapi.net
|
||||
DOMAIN-SUFFIX,claude.ai
|
||||
DOMAIN-SUFFIX,Anthropic.com
|
||||
DOMAIN-SUFFIX,opera-api.com
|
||||
DOMAIN-SUFFIX,aistudio.google.com
|
||||
DOMAIN-SUFFIX,ciciai.com
|
||||
DOMAIN-KEYWORD,chatgpt
|
||||
|
||||
@@ -7,8 +7,8 @@ proxy-groups:
|
||||
- {name: 🤖 人工智能, type: select, proxies: [🇯🇵 日本节点, 🇺🇸 美国节点, 🇸🇬 新加坡节点, 🚀 节点选择, 🚀 手动切换]}
|
||||
- {name: 📲 电报消息, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇹🇼 台湾节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎮 游戏平台, type: select, proxies: [🎯 本机直连, 👍 高级节点, 🚀 节点选择]}
|
||||
- {name: Ⓜ️ 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📢 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🪟 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🇬 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🍎 苹果服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📈 网络测试, type: select, proxies: [🎯 本机直连, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎯 本机直连, type: select, proxies: [DIRECT]}
|
||||
@@ -25,9 +25,9 @@ rules:
|
||||
- GEOSITE,category-ads-all,🛑 广告拦截
|
||||
- GEOSITE,private,🎯 全球直连
|
||||
- GEOSITE,openai,🤖 人工智能
|
||||
- GEOSITE,microsoft@cn,Ⓜ️ 微软服务
|
||||
- GEOSITE,microsoft@cn,🪟 微软服务
|
||||
- GEOSITE,apple-cn,🍎 苹果服务
|
||||
- GEOSITE,google-cn,📢 谷歌服务
|
||||
- GEOSITE,google-cn,🇬 谷歌服务
|
||||
- GEOSITE,category-games@cn,🎮 游戏平台
|
||||
- GEOSITE,speedtest,📈 网络测试
|
||||
- GEOSITE,geolocation-!cn,🚀 节点选择
|
||||
@@ -36,4 +36,3 @@ rules:
|
||||
- GEOIP,private,🎯 全球直连,no-resolve
|
||||
- GEOIP,cn,🎯 全球直连
|
||||
- MATCH,🐟 漏网之鱼
|
||||
|
||||
@@ -6,8 +6,8 @@ proxy-groups:
|
||||
- {name: 🤖 人工智能, type: select, proxies: [🇯🇵 日本节点, 🇺🇸 美国节点, 🇸🇬 新加坡节点, 🚀 节点选择, 🚀 手动切换]}
|
||||
- {name: 📲 电报消息, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇹🇼 台湾节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎮 游戏平台, type: select, proxies: [🎯 本机直连, 👍 高级节点, 🚀 节点选择]}
|
||||
- {name: Ⓜ️ 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📢 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🪟 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🇬 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🍎 苹果服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📈 网络测试, type: select, proxies: [🎯 本机直连, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎯 本机直连, type: select, proxies: [DIRECT]}
|
||||
@@ -23,9 +23,9 @@ proxy-groups:
|
||||
rules:
|
||||
- GEOSITE,private,🎯 全球直连
|
||||
- GEOSITE,openai,🤖 人工智能
|
||||
- GEOSITE,microsoft@cn,Ⓜ️ 微软服务
|
||||
- GEOSITE,microsoft@cn,🪟 微软服务
|
||||
- GEOSITE,apple-cn,🍎 苹果服务
|
||||
- GEOSITE,google-cn,📢 谷歌服务
|
||||
- GEOSITE,google-cn,🇬 谷歌服务
|
||||
- GEOSITE,category-games@cn,🎮 游戏平台
|
||||
- GEOSITE,speedtest,📈 网络测试
|
||||
- GEOSITE,geolocation-!cn,🚀 节点选择
|
||||
@@ -34,4 +34,3 @@ rules:
|
||||
- GEOIP,private,🎯 全球直连,no-resolve
|
||||
- GEOIP,cn,🎯 全球直连
|
||||
- MATCH,🐟 漏网之鱼
|
||||
|
||||
@@ -7,8 +7,8 @@ proxy-groups:
|
||||
- {name: 🤖 人工智能, type: select, proxies: [🇯🇵 日本节点, 🇺🇸 美国节点, 🇸🇬 新加坡节点, 🚀 节点选择, 🚀 手动切换]}
|
||||
- {name: 📲 电报消息, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇹🇼 台湾节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎮 游戏平台, type: select, proxies: [🎯 本机直连, 👍 高级节点, 🚀 节点选择]}
|
||||
- {name: Ⓜ️ 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📢 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🪟 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🇬 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🍎 苹果服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📈 网络测试, type: select, proxies: [🎯 本机直连, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎯 本机直连, type: select, proxies: [DIRECT]}
|
||||
@@ -20,84 +20,84 @@ proxy-groups:
|
||||
- {name: 🇯🇵 日本节点, type: url-test, tolerance: 100, lazy: true, use: [{providers_tags}], filter: "(?i)日本|jp|japan"}
|
||||
- {name: 🇸🇬 新加坡节点, type: url-test, tolerance: 100, lazy: true, use: [{providers_tags}], filter: "(?i)新|sg|singapore"}
|
||||
- {name: 🇺🇸 美国节点, type: url-test, tolerance: 100, lazy: true, use: [{providers_tags}], filter: "(?i)美|us|unitedstates|united states"}
|
||||
|
||||
|
||||
rule-providers:
|
||||
ads:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/ads.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/ads.yaml"
|
||||
path: ./providers/ads.yaml
|
||||
interval: 86400
|
||||
ai:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/ai.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/ai.yaml"
|
||||
path: ./providers/ai.yaml
|
||||
interval: 86400
|
||||
private:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/private.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/private.yaml"
|
||||
path: ./providers/private.yaml
|
||||
interval: 86400
|
||||
microsoft-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/microsoft-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/microsoft-cn.yaml"
|
||||
path: ./providers/microsoft-cn.yaml
|
||||
interval: 86400
|
||||
apple-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/apple-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/apple-cn.yaml"
|
||||
path: ./providers/apple-cn.yaml
|
||||
interval: 86400
|
||||
google-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/google-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/google-cn.yaml"
|
||||
path: ./providers/google-cn.yaml
|
||||
interval: 86400
|
||||
games-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/games-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/games-cn.yaml"
|
||||
path: ./providers/games-cn.yaml
|
||||
interval: 86400
|
||||
networktest:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/networktest.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/networktest.yaml"
|
||||
path: ./providers/networktest.yaml
|
||||
interval: 86400
|
||||
proxy:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/proxy.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/proxy.yaml"
|
||||
path: ./providers/proxy.yaml
|
||||
interval: 86400
|
||||
cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/cn.yaml"
|
||||
path: ./providers/cn.yaml
|
||||
interval: 86400
|
||||
telegramip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/telegramip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/telegramip.yaml"
|
||||
path: ./providers/telegramip.yaml
|
||||
interval: 86400
|
||||
privateip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/privateip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/privateip.yaml"
|
||||
path: ./providers/privateip.yaml
|
||||
interval: 86400
|
||||
cnip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/cnip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/cnip.yaml"
|
||||
path: ./providers/cnip.yaml
|
||||
interval: 86400
|
||||
|
||||
@@ -105,9 +105,9 @@ rules:
|
||||
- RULE-SET,ads,🛑 广告拦截
|
||||
- RULE-SET,private,🎯 全球直连
|
||||
- RULE-SET,ai,🤖 人工智能
|
||||
- RULE-SET,microsoft-cn,Ⓜ️ 微软服务
|
||||
- RULE-SET,microsoft-cn,🪟 微软服务
|
||||
- RULE-SET,apple-cn,🍎 苹果服务
|
||||
- RULE-SET,google-cn,📢 谷歌服务
|
||||
- RULE-SET,google-cn,🇬 谷歌服务
|
||||
- RULE-SET,games-cn,🎮 游戏平台
|
||||
- RULE-SET,networktest,📈 网络测试
|
||||
- RULE-SET,proxy,🚀 节点选择
|
||||
|
||||
@@ -6,8 +6,8 @@ proxy-groups:
|
||||
- {name: 🤖 人工智能, type: select, proxies: [🇯🇵 日本节点, 🇺🇸 美国节点, 🇸🇬 新加坡节点, 🚀 节点选择, 🚀 手动切换]}
|
||||
- {name: 📲 电报消息, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇹🇼 台湾节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎮 游戏平台, type: select, proxies: [🎯 本机直连, 👍 高级节点, 🚀 节点选择]}
|
||||
- {name: Ⓜ️ 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📢 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🪟 微软服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🇬 谷歌服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 🍎 苹果服务, type: select, proxies: [🎯 本机直连, 🚀 节点选择]}
|
||||
- {name: 📈 网络测试, type: select, proxies: [🎯 本机直连, {providers_tags}, 🚀 手动切换]}
|
||||
- {name: 🎯 本机直连, type: select, proxies: [DIRECT]}
|
||||
@@ -19,87 +19,87 @@ proxy-groups:
|
||||
- {name: 🇯🇵 日本节点, type: url-test, tolerance: 100, lazy: true, use: [{providers_tags}], filter: "(?i)日本|jp|japan"}
|
||||
- {name: 🇸🇬 新加坡节点, type: url-test, tolerance: 100, lazy: true, use: [{providers_tags}], filter: "(?i)新|sg|singapore"}
|
||||
- {name: 🇺🇸 美国节点, type: url-test, tolerance: 100, lazy: true, use: [{providers_tags}], filter: "(?i)美|us|unitedstates|united states"}
|
||||
|
||||
|
||||
rule-providers:
|
||||
private:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/private.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/private.yaml"
|
||||
path: ./providers/private.yaml
|
||||
interval: 86400
|
||||
ai:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/ai.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/ai.yaml"
|
||||
path: ./providers/ai.yaml
|
||||
interval: 86400
|
||||
microsoft-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/microsoft-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/microsoft-cn.yaml"
|
||||
path: ./providers/microsoft-cn.yaml
|
||||
interval: 86400
|
||||
apple-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/apple-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/apple-cn.yaml"
|
||||
path: ./providers/apple-cn.yaml
|
||||
interval: 86400
|
||||
google-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/google-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/google-cn.yaml"
|
||||
path: ./providers/google-cn.yaml
|
||||
interval: 86400
|
||||
games-cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/games-cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/games-cn.yaml"
|
||||
path: ./providers/games-cn.yaml
|
||||
interval: 86400
|
||||
networktest:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/networktest.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/networktest.yaml"
|
||||
path: ./providers/networktest.yaml
|
||||
interval: 86400
|
||||
proxy:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/proxy.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/proxy.yaml"
|
||||
path: ./providers/proxy.yaml
|
||||
interval: 86400
|
||||
cn:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/cn.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/cn.yaml"
|
||||
path: ./providers/cn.yaml
|
||||
interval: 86400
|
||||
telegramip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/telegramip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/telegramip.yaml"
|
||||
path: ./providers/telegramip.yaml
|
||||
interval: 86400
|
||||
privateip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/privateip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/privateip.yaml"
|
||||
path: ./providers/privateip.yaml
|
||||
interval: 86400
|
||||
cnip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/cnip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/cnip.yaml"
|
||||
path: ./providers/cnip.yaml
|
||||
interval: 86400
|
||||
|
||||
rules:
|
||||
- RULE-SET,private,🎯 全球直连
|
||||
- RULE-SET,ai,🤖 人工智能
|
||||
- RULE-SET,microsoft-cn,Ⓜ️ 微软服务
|
||||
- RULE-SET,microsoft-cn,🪟 微软服务
|
||||
- RULE-SET,apple-cn,🍎 苹果服务
|
||||
- RULE-SET,google-cn,📢 谷歌服务
|
||||
- RULE-SET,google-cn,🇬 谷歌服务
|
||||
- RULE-SET,games-cn,🎮 游戏平台
|
||||
- RULE-SET,networktest,📈 网络测试
|
||||
- RULE-SET,proxy,🚀 节点选择
|
||||
|
||||
@@ -18,37 +18,37 @@ rule-providers:
|
||||
private:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/private.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/private.yaml"
|
||||
path: ./providers/private.yaml
|
||||
interval: 86400
|
||||
ai:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/ai.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/ai.yaml"
|
||||
path: ./providers/ai.yaml
|
||||
interval: 86400
|
||||
proxy:
|
||||
type: http
|
||||
behavior: domain
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/proxy.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/proxy.yaml"
|
||||
path: ./providers/proxy.yaml
|
||||
interval: 86400
|
||||
telegramip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/telegramip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/telegramip.yaml"
|
||||
path: ./providers/telegramip.yaml
|
||||
interval: 86400
|
||||
privateip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/privateip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/privateip.yaml"
|
||||
path: ./providers/privateip.yaml
|
||||
interval: 86400
|
||||
cnip:
|
||||
type: http
|
||||
behavior: ipcidr
|
||||
url: "https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/cnip.yaml"
|
||||
url: "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash-ruleset/cnip.yaml"
|
||||
path: ./providers/cnip.yaml
|
||||
interval: 86400
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
"outbounds": [
|
||||
{ "tag": "🚀 节点选择", "type": "selector", "outbounds": [ {providers_tags}, "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "📺 省流节点", "👍 高级节点", "🚀 手动切换", "🎯 本机直连" ] },
|
||||
{ "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ {providers_tags}, "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "📺 省流节点", "👍 高级节点", "🚀 手动切换", "🎯 本机直连" ] },
|
||||
{ "tag": "🛑 广告拦截", "type": "selector", "outbounds": [ "❌ 禁止连接", "🎯 本机直连" ] },
|
||||
{ "tag": "🛑 广告拦截", "type": "selector", "outbounds": [ "❌ 禁止连接", "🎯 本机直连" ] },
|
||||
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📲 电报消息", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点" ] },
|
||||
{ "tag": "🤖 人工智能", "type": "selector", "outbounds": [ "🇯🇵 日本节点", "🇺🇸 美国节点", "🇸🇬 新加坡节点", "🇰🇷 韩国节点", "🚀 节点选择" ] },
|
||||
{ "tag": "🎮 游戏平台", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "Ⓜ️ 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📢 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🪟 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🇬 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🍎 苹果服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "🎯 本机直连", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", {providers_tags}, "🚀 手动切换" ] },
|
||||
{ "tag": "🚀 手动切换", "type": "selector", "use_all_providers": true },
|
||||
@@ -21,9 +21,9 @@
|
||||
{ "tag": "🇰🇷 韩国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "KR|Korea|KOR|首尔|韩|韓" ] },
|
||||
{ "tag": "🇸🇬 新加坡节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "新加坡|坡|狮城|SG|Singapore" ] },
|
||||
{ "tag": "🇺🇸 美国节点", "type": "urltest", "tolerance": 100, "use_all_providers": true, "includes": [ "美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States" ] },
|
||||
{ "tag": "🎯 本机直连", "type": "direct" },
|
||||
{ "tag": "❌ 禁止连接", "type": "block" },
|
||||
{ "tag": "dns-out", "type": "dns" }
|
||||
{ "tag": "🎯 本机直连", "type": "direct" },
|
||||
{ "tag": "❌ 禁止连接", "type": "block" },
|
||||
{ "tag": "dns-out", "type": "dns" }
|
||||
],
|
||||
"route": {
|
||||
"rules": [
|
||||
@@ -32,15 +32,14 @@
|
||||
{ "clash_mode": "Direct", "outbound": "🎯 本机直连" },
|
||||
{ "geosite": "category-ads-all", "outbound": "🛑 广告拦截" },
|
||||
{ "geosite": "private", "outbound": "🎯 全球直连" },
|
||||
{ "geosite": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "geosite": "microsoft@cn", "outbound": "Ⓜ️ 微软服务" },
|
||||
{ "geosite": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "geosite": "microsoft@cn", "outbound": "🪟 微软服务" },
|
||||
{ "geosite": "apple-cn", "outbound": "🍎 苹果服务" },
|
||||
{ "geosite": "google-cn", "outbound": "📢 谷歌服务" },
|
||||
{ "geosite": "google-cn", "outbound": "🇬 谷歌服务" },
|
||||
{ "geosite": "category-games@cn", "outbound": "🎮 游戏平台" },
|
||||
{ "geosite": "geolocation-!cn", "outbound": "🚀 节点选择" },
|
||||
{ "geosite": "cn", "outbound": "🎯 全球直连" },
|
||||
{ "geoip": "telegram", "outbound": "📲 电报消息" },
|
||||
{ "geoip": "private", "outbound": "🎯 全球直连" },
|
||||
{ "geoip": "cn", "outbound": "🎯 全球直连" }
|
||||
],
|
||||
"final": "🐟 漏网之鱼"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
{ "tag": "📲 电报消息", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点" ] },
|
||||
{ "tag": "🤖 人工智能", "type": "selector", "outbounds": [ "🇯🇵 日本节点", "🇺🇸 美国节点", "🇸🇬 新加坡节点", "🇰🇷 韩国节点", "🚀 节点选择" ] },
|
||||
{ "tag": "🎮 游戏平台", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "Ⓜ️ 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📢 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🪟 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🇬 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🍎 苹果服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "🎯 本机直连", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", {providers_tags}, "🚀 手动切换" ] },
|
||||
{ "tag": "🚀 手动切换", "type": "selector", "use_all_providers": true },
|
||||
@@ -29,15 +29,14 @@
|
||||
{ "clash_mode": "Global", "outbound": "GLOBAL" },
|
||||
{ "clash_mode": "Direct", "outbound": "🎯 本机直连" },
|
||||
{ "geosite": "private", "outbound": "🎯 全球直连" },
|
||||
{ "geosite": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "geosite": "microsoft@cn", "outbound": "Ⓜ️ 微软服务" },
|
||||
{ "geosite": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "geosite": "microsoft@cn", "outbound": "🪟 微软服务" },
|
||||
{ "geosite": "apple-cn", "outbound": "🍎 苹果服务" },
|
||||
{ "geosite": "google-cn", "outbound": "📢 谷歌服务" },
|
||||
{ "geosite": "google-cn", "outbound": "🇬 谷歌服务" },
|
||||
{ "geosite": "category-games@cn", "outbound": "🎮 游戏平台" },
|
||||
{ "geosite": "geolocation-!cn", "outbound": "🚀 节点选择" },
|
||||
{ "geosite": "cn", "outbound": "🎯 全球直连" },
|
||||
{ "geoip": "telegram", "outbound": "📲 电报消息" },
|
||||
{ "geoip": "private", "outbound": "🎯 全球直连" },
|
||||
{ "geoip": "cn", "outbound": "🎯 全球直连" }
|
||||
],
|
||||
"final": "🐟 漏网之鱼"
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
"outbounds": [
|
||||
{ "tag": "🚀 节点选择", "type": "selector", "outbounds": [ {providers_tags}, "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "📺 省流节点", "👍 高级节点", "🚀 手动切换", "🎯 本机直连" ] },
|
||||
{ "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ {providers_tags}, "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", "📺 省流节点", "👍 高级节点", "🚀 手动切换", "🎯 本机直连" ] },
|
||||
{ "tag": "🛑 广告拦截", "type": "selector", "outbounds": [ "❌ 禁止连接", "🎯 本机直连" ] },
|
||||
{ "tag": "🛑 广告拦截", "type": "selector", "outbounds": [ "❌ 禁止连接", "🎯 本机直连" ] },
|
||||
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📲 电报消息", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点" ] },
|
||||
{ "tag": "🤖 人工智能", "type": "selector", "outbounds": [ "🇯🇵 日本节点", "🇺🇸 美国节点", "🇸🇬 新加坡节点", "🇰🇷 韩国节点", "🚀 节点选择" ] },
|
||||
{ "tag": "🎮 游戏平台", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "Ⓜ️ 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📢 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🪟 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🇬 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🍎 苹果服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📈 网络测试", "type": "selector", "outbounds": [ "🎯 本机直连", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", {providers_tags}, "🚀 手动切换" ] },
|
||||
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "🎯 本机直连", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", {providers_tags}, "🚀 手动切换" ] },
|
||||
@@ -32,17 +32,16 @@
|
||||
{ "clash_mode": "Global", "outbound": "GLOBAL" },
|
||||
{ "clash_mode": "Direct", "outbound": "🎯 本机直连" },
|
||||
{ "rule_set": "private", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "rule_set": "ads", "outbound": "🛑 广告拦截" },
|
||||
{ "rule_set": "microsoft-cn", "outbound": "Ⓜ️ 微软服务" },
|
||||
{ "rule_set": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "rule_set": "ads", "outbound": "🛑 广告拦截" },
|
||||
{ "rule_set": "microsoft-cn", "outbound": "🪟 微软服务" },
|
||||
{ "rule_set": "apple-cn", "outbound": "🍎 苹果服务" },
|
||||
{ "rule_set": "google-cn", "outbound": "📢 谷歌服务" },
|
||||
{ "rule_set": "google-cn", "outbound": "🇬 谷歌服务" },
|
||||
{ "rule_set": "games-cn", "outbound": "🎮 游戏平台" },
|
||||
{ "rule_set": "networktest", "outbound": "📈 网络测试" },
|
||||
{ "rule_set": "proxy", "outbound": "🚀 节点选择" },
|
||||
{ "rule_set": "cn", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "telegramip", "outbound": "📲 电报消息" },
|
||||
{ "rule_set": "privateip", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "cnip", "outbound": "🎯 全球直连" }
|
||||
],
|
||||
"rule_set": [
|
||||
@@ -50,91 +49,84 @@
|
||||
"tag": "private",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/private.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/private.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
},
|
||||
{
|
||||
"tag": "ai",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/ai.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/ai.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "ads",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/ads.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/ads.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "microsoft-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/microsoft-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/microsoft-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "apple-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/apple-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/apple-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "google-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/google-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/google-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "games-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/games-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/games-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "networktest",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/networktest.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/networktest.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "proxy",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/proxy.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/proxy.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "telegramip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/telegramip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "privateip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/privateip.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/telegramip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "cnip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/cnip.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cnip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
{ "tag": "📲 电报消息", "type": "selector", "outbounds": [ "🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点" ] },
|
||||
{ "tag": "🤖 人工智能", "type": "selector", "outbounds": [ "🇯🇵 日本节点", "🇺🇸 美国节点", "🇸🇬 新加坡节点", "🇰🇷 韩国节点", "🚀 节点选择" ] },
|
||||
{ "tag": "🎮 游戏平台", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "Ⓜ️ 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📢 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🪟 微软服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🇬 谷歌服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "🍎 苹果服务", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "📈 网络测试", "type": "selector", "outbounds": [ "🎯 本机直连", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", {providers_tags}, "🚀 手动切换" ] },
|
||||
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "🎯 本机直连", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点", {providers_tags}, "🚀 手动切换" ] },
|
||||
@@ -30,16 +30,15 @@
|
||||
{ "clash_mode": "Global", "outbound": "GLOBAL" },
|
||||
{ "clash_mode": "Direct", "outbound": "🎯 本机直连" },
|
||||
{ "rule_set": "private", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "rule_set": "microsoft-cn", "outbound": "Ⓜ️ 微软服务" },
|
||||
{ "rule_set": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "rule_set": "microsoft-cn", "outbound": "🪟 微软服务" },
|
||||
{ "rule_set": "apple-cn", "outbound": "🍎 苹果服务" },
|
||||
{ "rule_set": "google-cn", "outbound": "📢 谷歌服务" },
|
||||
{ "rule_set": "google-cn", "outbound": "🇬 谷歌服务" },
|
||||
{ "rule_set": "games-cn", "outbound": "🎮 游戏平台" },
|
||||
{ "rule_set": "networktest", "outbound": "📈 网络测试" },
|
||||
{ "rule_set": "proxy", "outbound": "🚀 节点选择" },
|
||||
{ "rule_set": "cn", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "telegramip", "outbound": "📲 电报消息" },
|
||||
{ "rule_set": "privateip", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "cnip", "outbound": "🎯 全球直连" }
|
||||
],
|
||||
"rule_set": [
|
||||
@@ -47,84 +46,77 @@
|
||||
"tag": "private",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/private.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/private.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "ai",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/ai.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/ai.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "microsoft-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/microsoft-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/microsoft-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "apple-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/apple-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/apple-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "google-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/google-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/google-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "games-cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/games-cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/games-cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "networktest",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/networktest.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/networktest.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "proxy",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/proxy.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/proxy.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "cn",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/cn.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cn.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "telegramip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/telegramip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "privateip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/privateip.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/telegramip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "cnip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/cnip.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cnip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -25,10 +25,9 @@
|
||||
{ "clash_mode": "Global", "outbound": "GLOBAL" },
|
||||
{ "clash_mode": "Direct", "outbound": "🎯 本机直连" },
|
||||
{ "rule_set": "private", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "rule_set": "ai", "outbound": "🤖 人工智能" },
|
||||
{ "rule_set": "proxy", "outbound": "🚀 节点选择" },
|
||||
{ "rule_set": "telegramip", "outbound": "📲 电报消息" },
|
||||
{ "rule_set": "privateip", "outbound": "🎯 全球直连" },
|
||||
{ "rule_set": "cnip", "outbound": "🎯 全球直连" }
|
||||
],
|
||||
"rule_set": [
|
||||
@@ -36,42 +35,35 @@
|
||||
"tag": "private",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/private.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/private.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "ai",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/ai.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/ai.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "proxy",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/proxy.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/proxy.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "telegramip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/telegramip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "privateip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/privateip.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/telegramip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
},
|
||||
{
|
||||
"tag": "cnip",
|
||||
"type": "remote",
|
||||
"format": "binary",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/cnip.srs",
|
||||
"url": "https://fastly.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cnip.srs",
|
||||
"download_detour": "🎯 本机直连"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
{ "tag": "🚀 节点选择", "type": "selector", "outbounds": [ {providers_tags} ], "use_all_providers": true },
|
||||
{ "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": [ "🚀 节点选择", "🎯 本机直连" ] },
|
||||
{ "tag": "🎯 全球直连", "type": "selector", "outbounds": [ "🎯 本机直连", "🚀 节点选择" ] },
|
||||
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "🎯 本机直连", {providers_tags} ], "use_all_providers": true },
|
||||
{ "tag": "🎯 本机直连", "type": "direct" },
|
||||
{ "tag": "GLOBAL", "type": "selector", "outbounds": [ "🎯 本机直连", {providers_tags} ], "use_all_providers": true },
|
||||
{ "tag": "🎯 本机直连", "type": "direct" },
|
||||
{ "tag": "dns-out", "type": "dns" }
|
||||
],
|
||||
"route": {
|
||||
|
||||
324
scripts/init.sh
324
scripts/init.sh
@@ -1,144 +1,166 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Juewuy
|
||||
|
||||
version=1.9.1alpha9
|
||||
version=1.9.1
|
||||
|
||||
setdir(){
|
||||
dir_avail(){
|
||||
df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep -E 'Ava|可用' |awk '{print $2}'
|
||||
setdir() {
|
||||
dir_avail() {
|
||||
df $2 $1 | awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' | grep -E 'Ava|可用' | awk '{print $2}'
|
||||
}
|
||||
set_usb_dir(){
|
||||
set_usb_dir() {
|
||||
echo -e "请选择安装目录"
|
||||
du -hL /mnt | awk '{print " "NR" "$2" "$1}'
|
||||
read -p "请输入相应数字 > " num
|
||||
dir=$(du -hL /mnt | awk '{print $2}' | sed -n "$num"p)
|
||||
if [ -z "$dir" ];then
|
||||
if [ -z "$dir" ]; then
|
||||
echo -e "\033[31m输入错误!请重新设置!\033[0m"
|
||||
set_usb_dir
|
||||
fi
|
||||
}
|
||||
set_cust_dir(){
|
||||
set_asus_dir() {
|
||||
echo -e "请选择U盘目录"
|
||||
du -hL /tmp/mnt | awk '{print " "NR" "$2" "$1}'
|
||||
read -p "请输入相应数字 > " num
|
||||
dir=$(du -hL /tmp/mnt | awk '{print $2}' | sed -n "$num"p)
|
||||
if [ ! -f "$dir/asusware.arm/etc/init.d/S50downloadmaster" ]; then
|
||||
echo -e "\033[31m未找到下载大师自启文件:$dir/asusware.arm/etc/init.d/S50downloadmaster,请检查设置!\033[0m"
|
||||
set_asus_dir
|
||||
fi
|
||||
}
|
||||
set_cust_dir() {
|
||||
echo -----------------------------------------------
|
||||
echo '可用路径 剩余空间:'
|
||||
df -h | awk '{print $6,$4}'| sed 1d
|
||||
df -h | awk '{print $6,$4}' | sed 1d
|
||||
echo '路径是必须带 / 的格式,注意写入虚拟内存(/tmp,/opt,/sys...)的文件会在重启后消失!!!'
|
||||
read -p "请输入自定义路径 > " dir
|
||||
if [ "$(dir_avail $dir)" = 0 ];then
|
||||
if [ "$(dir_avail $dir)" = 0 ]; then
|
||||
echo "\033[31m路径错误!请重新设置!\033[0m"
|
||||
set_cust_dir
|
||||
fi
|
||||
}
|
||||
echo -----------------------------------------------
|
||||
if [ -n "$systype" ];then
|
||||
[ "$systype" = "Padavan" ] && dir=/etc/storage
|
||||
[ "$systype" = "mi_snapshot" ] && {
|
||||
echo -e "\033[33m检测到当前设备为小米官方系统,请选择安装位置\033[0m"
|
||||
[ "$(dir_avail /data)" -gt 256 ] && echo " 1 安装到 /data 目录(推荐,支持软固化功能)"
|
||||
[ "$(dir_avail /userdisk)" -gt 256 ] && echo " 2 安装到 /userdisk 目录(推荐,支持软固化功能)"
|
||||
echo " 3 安装自定义目录(不推荐,不明勿用!)"
|
||||
echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
dir=/data
|
||||
;;
|
||||
2)
|
||||
dir=/userdisk
|
||||
;;
|
||||
3)
|
||||
set_cust_dir
|
||||
;;
|
||||
*)
|
||||
exit 1 ;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "asusrouter" ] && {
|
||||
echo -e "\033[33m检测到当前设备为华硕固件,请选择安装方式\033[0m"
|
||||
echo -e " 1 基于USB设备安装(通用,须插入\033[31m任意\033[0mUSB设备)"
|
||||
echo -e " 2 基于自启脚本安装(仅支持梅林及部分官改固件)"
|
||||
echo -----------------------------------------------
|
||||
if [ -n "$systype" ]; then
|
||||
[ "$systype" = "Padavan" ] && dir=/etc/storage
|
||||
[ "$systype" = "mi_snapshot" ] && {
|
||||
echo -e "\033[33m检测到当前设备为小米官方系统,请选择安装位置\033[0m"
|
||||
[ "$(dir_avail /data)" -gt 256 ] && echo " 1 安装到 /data 目录(推荐,支持软固化功能)"
|
||||
[ "$(dir_avail /userdisk)" -gt 256 ] && echo " 2 安装到 /userdisk 目录(推荐,支持软固化功能)"
|
||||
echo " 3 安装自定义目录(不推荐,不明勿用!)"
|
||||
echo " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
dir=/data
|
||||
;;
|
||||
2)
|
||||
dir=/userdisk
|
||||
;;
|
||||
3)
|
||||
set_cust_dir
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "asusrouter" ] && {
|
||||
echo -e "\033[33m检测到当前设备为华硕固件,请选择安装方式\033[0m"
|
||||
echo -e " 1 基于USB设备安装(限23年9月之前固件,须插入\033[31m任意\033[0mUSB设备)"
|
||||
echo -e " 2 基于自启脚本安装(仅支持梅林及部分非koolshare官改固件)"
|
||||
echo -e " 3 基于U盘+下载大师安装(支持所有固件,限ARM设备,须插入U盘或移动硬盘)"
|
||||
echo -e " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
read -p "将脚本安装到USB存储/系统闪存?(1/0) > " res
|
||||
[ "$res" = "1" ] && set_usb_dir || dir=/jffs
|
||||
usb_status=1
|
||||
;;
|
||||
2)
|
||||
echo -e "如无法正常开机启动,请重新使用USB方式安装!"
|
||||
sleep 2
|
||||
dir=/jffs
|
||||
;;
|
||||
3)
|
||||
echo -e "请先在路由器网页后台安装下载大师并启用,之后选择外置存储所在目录!"
|
||||
sleep 2
|
||||
set_asus_dir
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt
|
||||
else
|
||||
echo -e "\033[33m安装ShellCrash至少需要预留约1MB的磁盘空间\033[0m"
|
||||
echo -e " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
||||
echo -e " 2 在\033[32m/usr/share目录\033[0m下安装(适合Linux系统)"
|
||||
echo -e " 3 在\033[32m当前用户目录\033[0m下安装(适合非root用户)"
|
||||
echo -e " 4 在\033[32m外置存储\033[0m中安装"
|
||||
echo -e " 5 手动设置安装目录"
|
||||
echo -e " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
case "$num" in
|
||||
1)
|
||||
read -p "将脚本安装到USB存储/系统闪存?(1/0) > " res
|
||||
[ "$res" = "1" ] && set_usb_dir || dir=/jffs
|
||||
usb_status=1
|
||||
;;
|
||||
2)
|
||||
echo -e "如无法正常开机启动,请重新使用USB方式安装!"
|
||||
sleep 2
|
||||
dir=/jffs ;;
|
||||
*)
|
||||
exit 1 ;;
|
||||
esac
|
||||
}
|
||||
[ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt
|
||||
else
|
||||
echo -e "\033[33m安装ShellCrash至少需要预留约1MB的磁盘空间\033[0m"
|
||||
echo -e " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
||||
echo -e " 2 在\033[32m/usr/share目录\033[0m下安装(适合Linux系统)"
|
||||
echo -e " 3 在\033[32m当前用户目录\033[0m下安装(适合非root用户)"
|
||||
echo -e " 4 在\033[32m外置存储\033[0m中安装"
|
||||
echo -e " 5 手动设置安装目录"
|
||||
echo -e " 0 退出安装"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
#设置目录
|
||||
if [ -z $num ];then
|
||||
echo 安装已取消
|
||||
exit 1;
|
||||
elif [ "$num" = "1" ];then
|
||||
dir=/etc
|
||||
elif [ "$num" = "2" ];then
|
||||
dir=/usr/share
|
||||
elif [ "$num" = "3" ];then
|
||||
dir=~/.local/share
|
||||
mkdir -p ~/.config/systemd/user
|
||||
elif [ "$num" = "4" ];then
|
||||
set_usb_dir
|
||||
elif [ "$num" = "5" ];then
|
||||
echo -----------------------------------------------
|
||||
echo '可用路径 剩余空间:'
|
||||
df -h | awk '{print $6,$4}'| sed 1d
|
||||
echo '路径是必须带 / 的格式,注意写入虚拟内存(/tmp,/opt,/sys...)的文件会在重启后消失!!!'
|
||||
read -p "请输入自定义路径 > " dir
|
||||
if [ -z "$dir" ];then
|
||||
echo -e "\033[31m路径错误!请重新设置!\033[0m"
|
||||
setdir
|
||||
#设置目录
|
||||
if [ -z $num ]; then
|
||||
echo 安装已取消
|
||||
exit 1
|
||||
elif [ "$num" = "1" ]; then
|
||||
dir=/etc
|
||||
elif [ "$num" = "2" ]; then
|
||||
dir=/usr/share
|
||||
elif [ "$num" = "3" ]; then
|
||||
dir=~/.local/share
|
||||
mkdir -p ~/.config/systemd/user
|
||||
elif [ "$num" = "4" ]; then
|
||||
set_usb_dir
|
||||
elif [ "$num" = "5" ]; then
|
||||
echo -----------------------------------------------
|
||||
echo '可用路径 剩余空间:'
|
||||
df -h | awk '{print $6,$4}' | sed 1d
|
||||
echo '路径是必须带 / 的格式,注意写入虚拟内存(/tmp,/opt,/sys...)的文件会在重启后消失!!!'
|
||||
read -p "请输入自定义路径 > " dir
|
||||
if [ -z "$dir" ]; then
|
||||
echo -e "\033[31m路径错误!请重新设置!\033[0m"
|
||||
setdir
|
||||
fi
|
||||
else
|
||||
echo 安装已取消!!!
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo 安装已取消!!!
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -w $dir ];then
|
||||
echo -e "\033[31m没有$dir目录写入权限!请重新设置!\033[0m" && sleep 1 && setdir
|
||||
else
|
||||
echo -e "目标目录\033[32m$dir\033[0m空间剩余:$(dir_avail $dir -h)"
|
||||
read -p "确认安装?(1/0) > " res
|
||||
[ "$res" = "1" ] && CRASHDIR=$dir/ShellCrash || setdir
|
||||
fi
|
||||
if [ ! -w $dir ]; then
|
||||
echo -e "\033[31m没有$dir目录写入权限!请重新设置!\033[0m" && sleep 1 && setdir
|
||||
else
|
||||
echo -e "目标目录\033[32m$dir\033[0m空间剩余:$(dir_avail $dir -h)"
|
||||
read -p "确认安装?(1/0) > " res
|
||||
[ "$res" = "1" ] && CRASHDIR=$dir/ShellCrash || setdir
|
||||
fi
|
||||
}
|
||||
setconfig(){
|
||||
setconfig() {
|
||||
#参数1代表变量名,参数2代表变量值,参数3即文件路径
|
||||
[ -z "$3" ] && configpath=${CRASHDIR}/configs/ShellCrash.cfg || configpath="${3}"
|
||||
[ -n "$(grep "${1}=" "$configpath")" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath
|
||||
[ -n "$(grep "${1}=" "$configpath")" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >>$configpath
|
||||
}
|
||||
#特殊固件识别及标记
|
||||
[ -f "/etc/storage/started_script.sh" ] && {
|
||||
systype=Padavan #老毛子固件
|
||||
initdir='/etc/storage/started_script.sh'
|
||||
}
|
||||
}
|
||||
[ -d "/jffs" ] && {
|
||||
systype=asusrouter #华硕固件
|
||||
[ -f "/jffs/.asusrouter" ] && initdir='/jffs/.asusrouter'
|
||||
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
||||
}
|
||||
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
||||
#华硕启用jffs
|
||||
nvram set jffs2_scripts="1"
|
||||
nvram commit
|
||||
}
|
||||
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
|
||||
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
|
||||
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
|
||||
|
||||
#检查环境变量
|
||||
[ -z "$CRASHDIR" -a -n "$clashdir" ] && CRASHDIR=$clashdir
|
||||
@@ -149,25 +171,25 @@ mv -f /tmp/SC_tmp/* ${CRASHDIR} 2>/dev/null
|
||||
|
||||
#初始化
|
||||
mkdir -p ${CRASHDIR}/configs
|
||||
[ -f "${CRASHDIR}/configs/ShellCrash.cfg" ] || echo '#ShellCrash配置文件,不明勿动!' > ${CRASHDIR}/configs/ShellCrash.cfg
|
||||
[ -f "${CRASHDIR}/configs/ShellCrash.cfg" ] || echo '#ShellCrash配置文件,不明勿动!' >${CRASHDIR}/configs/ShellCrash.cfg
|
||||
#判断系统类型写入不同的启动文件
|
||||
if [ -f /etc/rc.common -a "$(cat /proc/1/comm)" = "procd" ];then
|
||||
#设为init.d方式启动
|
||||
cp -f ${CRASHDIR}/shellcrash.procd /etc/init.d/shellcrash
|
||||
chmod 755 /etc/init.d/shellcrash
|
||||
if [ -f /etc/rc.common -a "$(cat /proc/1/comm)" = "procd" ]; then
|
||||
#设为init.d方式启动
|
||||
cp -f ${CRASHDIR}/shellcrash.procd /etc/init.d/shellcrash
|
||||
chmod 755 /etc/init.d/shellcrash
|
||||
else
|
||||
[ -w /usr/lib/systemd/system ] && sysdir=/usr/lib/systemd/system
|
||||
[ -w /etc/systemd/system ] && sysdir=/etc/systemd/system
|
||||
if [ -n "$sysdir" -a "$USER" = "root" -a "$(cat /proc/1/comm)" = "systemd" ];then
|
||||
if [ -n "$sysdir" -a "$USER" = "root" -a "$(cat /proc/1/comm)" = "systemd" ]; then
|
||||
#创建shellcrash用户
|
||||
type userdel && userdel shellcrash 2>/dev/null
|
||||
userdel shellcrash 2>/dev/null
|
||||
sed -i '/0:7890/d' /etc/passwd
|
||||
sed -i '/x:7890/d' /etc/group
|
||||
if type useradd >/dev/null 2>&1; then
|
||||
if useradd -h >/dev/null 2>&1; then
|
||||
useradd shellcrash -u 7890 2>/dev/null
|
||||
sed -Ei s/7890:7890/0:7890/g /etc/passwd
|
||||
else
|
||||
echo "shellcrash:x:0:7890::/home/shellcrash:/bin/sh" >> /etc/passwd
|
||||
echo "shellcrash:x:0:7890::/home/shellcrash:/bin/sh" >>/etc/passwd
|
||||
fi
|
||||
#配置systemd
|
||||
mv -f ${CRASHDIR}/shellcrash.service $sysdir/shellcrash.service 2>/dev/null
|
||||
@@ -181,8 +203,9 @@ else
|
||||
fi
|
||||
fi
|
||||
#修饰文件及版本号
|
||||
command -v bash >/dev/null 2>&1 && shtype=bash || shtype=sh
|
||||
for file in start.sh task.sh ;do
|
||||
command -v bash >/dev/null 2>&1 && shtype=bash
|
||||
[ -x /bin/ash ] && shtype=ash
|
||||
for file in start.sh task.sh menu.sh; do
|
||||
sed -i "s|/bin/sh|/bin/$shtype|" ${CRASHDIR}/${file}
|
||||
chmod 755 ${CRASHDIR}/${file}
|
||||
done
|
||||
@@ -193,17 +216,17 @@ setconfig versionsh_l $version
|
||||
BINDIR=${CRASHDIR}
|
||||
touch ${CRASHDIR}/configs/command.env
|
||||
setconfig TMPDIR ${TMPDIR} ${CRASHDIR}/configs/command.env
|
||||
setconfig BINDIR ${BINDIR} ${CRASHDIR}/configs/command.env
|
||||
setconfig BINDIR ${BINDIR} ${CRASHDIR}/configs/command.env
|
||||
}
|
||||
if [ -n "$(grep 'crashcore=singbox' ${CRASHDIR}/configs/ShellCrash.cfg)" ];then
|
||||
if [ -n "$(grep 'crashcore=singbox' ${CRASHDIR}/configs/ShellCrash.cfg)" ]; then
|
||||
COMMAND='"$TMPDIR/CrashCore run -D $BINDIR -C $TMPDIR/jsons"'
|
||||
else
|
||||
COMMAND='"$TMPDIR/CrashCore -d $BINDIR -f $TMPDIR/config.yaml"'
|
||||
fi
|
||||
setconfig COMMAND "$COMMAND" ${CRASHDIR}/configs/command.env
|
||||
#设置防火墙执行模式
|
||||
[ -z "$(grep firewall_mod $CRASHDIR/configs/ShellClash.cfg 2>/dev/null)" ] && {
|
||||
ckcmd iptables && firewall_mod=iptables
|
||||
grep -q 'firewall_mod' "$CRASHDIR/configs/ShellClash.cfg" 2>/dev/null || {
|
||||
iptables -j REDIRECT -h >/dev/null 2>&1 && firewall_mod=iptables
|
||||
nft add table inet shellcrash 2>/dev/null && firewall_mod=nftables
|
||||
setconfig firewall_mod $firewall_mod
|
||||
}
|
||||
@@ -214,41 +237,49 @@ setconfig COMMAND "$COMMAND" ${CRASHDIR}/configs/command.env
|
||||
[ -w /jffs/configs/profile.add ] && profile=/jffs/configs/profile.add
|
||||
[ -w ~/.bashrc ] && profile=~/.bashrc
|
||||
[ -w /etc/profile ] && profile=/etc/profile
|
||||
if [ -n "$profile" ];then
|
||||
if [ -n "$profile" ]; then
|
||||
sed -i '/alias crash=*/'d $profile
|
||||
echo "alias crash=\"$shtype $CRASHDIR/menu.sh\"" >> $profile #设置快捷命令环境变量
|
||||
echo "alias crash=\"$shtype $CRASHDIR/menu.sh\"" >>$profile #设置快捷命令环境变量
|
||||
sed -i '/alias clash=*/'d $profile
|
||||
echo "alias clash=\"$shtype $CRASHDIR/menu.sh\"" >> $profile #设置快捷命令环境变量
|
||||
echo "alias clash=\"$shtype $CRASHDIR/menu.sh\"" >>$profile #设置快捷命令环境变量
|
||||
sed -i '/export CRASHDIR=*/'d $profile
|
||||
echo "export CRASHDIR=\"$CRASHDIR\"" >> $profile #设置路径环境变量
|
||||
echo "export CRASHDIR=\"$CRASHDIR\"" >>$profile #设置路径环境变量
|
||||
source $profile >/dev/null 2>&1 || echo 运行错误!请使用bash而不是dash运行安装命令!!!
|
||||
#适配zsh环境变量
|
||||
[ -n "$(cat /etc/shells 2>/dev/null|grep -oE 'zsh')" ] && [ -z "$(cat ~/.zshrc 2>/dev/null|grep CRASHDIR)" ] && {
|
||||
[ -n "$(cat /etc/shells 2>/dev/null | grep -oE 'zsh')" ] && [ -z "$(cat ~/.zshrc 2>/dev/null | grep CRASHDIR)" ] && {
|
||||
sed -i '/alias crash=*/'d ~/.zshrc 2>/dev/null
|
||||
echo "alias crash=\"$shtype $CRASHDIR/menu.sh\"" >> ~/.zshrc
|
||||
# 兼容 clash 命令
|
||||
echo "alias crash=\"$shtype $CRASHDIR/menu.sh\"" >>~/.zshrc
|
||||
# 兼容 clash 命令
|
||||
sed -i '/alias clash=*/'d ~/.zshrc 2>/dev/null
|
||||
echo "alias clash=\"$shtype $CRASHDIR/menu.sh\"" >> ~/.zshrc
|
||||
echo "alias clash=\"$shtype $CRASHDIR/menu.sh\"" >>~/.zshrc
|
||||
sed -i '/export CRASHDIR=*/'d ~/.zshrc 2>/dev/null
|
||||
echo "export CRASHDIR=\"$CRASHDIR\"" >> ~/.zshrc
|
||||
echo "export CRASHDIR=\"$CRASHDIR\"" >>~/.zshrc
|
||||
source ~/.zshrc >/dev/null 2>&1
|
||||
}
|
||||
else
|
||||
echo -e "\033[33m无法写入环境变量!请检查安装权限!\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
#在允许的情况下创建/usr/bin/crash文件
|
||||
touch /usr/bin/crash 2>/dev/null && {
|
||||
cat >/usr/bin/crash <<EOF
|
||||
#/bin/$shtype
|
||||
$CRASHDIR/menu.sh \$1 \$2 \$3 \$4 \$5
|
||||
EOF
|
||||
chmod +x /usr/bin/crash
|
||||
}
|
||||
#梅林/Padavan额外设置
|
||||
[ -n "$initdir" ] && {
|
||||
sed -i '/ShellCrash初始化/'d $initdir
|
||||
touch $initdir
|
||||
echo "$CRASHDIR/start.sh init #ShellCrash初始化脚本" >> $initdir
|
||||
echo "$CRASHDIR/start.sh init & #ShellCrash初始化脚本" >>$initdir
|
||||
chmod a+rx $initdir 2>/dev/null
|
||||
setconfig initdir $initdir
|
||||
}
|
||||
#Padavan额外设置
|
||||
[ -f "/etc/storage/started_script.sh" ] && mount -t tmpfs -o remount,rw,size=45M tmpfs /tmp #增加/tmp空间以适配新的内核压缩方式
|
||||
#镜像化OpenWrt(snapshot)额外设置
|
||||
if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ];then
|
||||
if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ]; then
|
||||
chmod 755 ${CRASHDIR}/misnap_init.sh
|
||||
uci delete firewall.ShellClash 2>/dev/null
|
||||
uci delete firewall.ShellCrash 2>/dev/null
|
||||
@@ -262,11 +293,14 @@ else
|
||||
rm -rf ${CRASHDIR}/misnap_init.sh
|
||||
fi
|
||||
#华硕USB启动额外设置
|
||||
[ "$usb_status" = "1" ] && {
|
||||
echo "$CRASHDIR/start.sh init #ShellCrash初始化脚本" > ${CRASHDIR}/asus_usb_mount.sh
|
||||
[ "$usb_status" = "1" ] && {
|
||||
echo "$CRASHDIR/start.sh init & #ShellCrash初始化脚本" >${CRASHDIR}/asus_usb_mount.sh
|
||||
nvram set script_usbmount="$CRASHDIR/asus_usb_mount.sh"
|
||||
nvram commit
|
||||
}
|
||||
#华硕下载大师启动额外设置
|
||||
[ -f "$dir/asusware.arm/etc/init.d/S50downloadmaster" ] && [ -z "$(grep 'ShellCrash' $dir/asusware.arm/etc/init.d/S50downloadmaster)" ] &&
|
||||
sed -i "/^PATH=/a\\$CRASHDIR/start.sh init & #ShellCrash初始化脚本" "$dir/asusware.arm/etc/init.d/S50downloadmaster"
|
||||
#删除临时文件
|
||||
rm -rf /tmp/*rash*gz
|
||||
rm -rf /tmp/SC_tmp
|
||||
@@ -275,26 +309,26 @@ mkdir -p ${CRASHDIR}/yamls
|
||||
mkdir -p ${CRASHDIR}/jsons
|
||||
mkdir -p ${CRASHDIR}/tools
|
||||
mkdir -p ${CRASHDIR}/task
|
||||
for file in config.yaml.bak user.yaml proxies.yaml proxy-groups.yaml rules.yaml others.yaml ;do
|
||||
for file in config.yaml.bak user.yaml proxies.yaml proxy-groups.yaml rules.yaml others.yaml; do
|
||||
mv -f ${CRASHDIR}/$file ${CRASHDIR}/yamls/$file 2>/dev/null
|
||||
done
|
||||
[ ! -L ${CRASHDIR}/config.yaml ] && mv -f ${CRASHDIR}/config.yaml ${CRASHDIR}/yamls/config.yaml 2>/dev/null
|
||||
for file in fake_ip_filter mac web_save servers.list fake_ip_filter.list fallback_filter.list singbox_providers.list clash_providers.list;do
|
||||
[ ! -L ${CRASHDIR}/config.yaml ] && mv -f ${CRASHDIR}/config.yaml ${CRASHDIR}/yamls/config.yaml 2>/dev/null
|
||||
for file in fake_ip_filter mac web_save servers.list fake_ip_filter.list fallback_filter.list singbox_providers.list clash_providers.list; do
|
||||
mv -f ${CRASHDIR}/$file ${CRASHDIR}/configs/$file 2>/dev/null
|
||||
done
|
||||
#配置文件改名
|
||||
mv -f ${CRASHDIR}/mark ${CRASHDIR}/configs/ShellCrash.cfg 2>/dev/null
|
||||
mv -f ${CRASHDIR}/configs/ShellClash.cfg ${CRASHDIR}/configs/ShellCrash.cfg 2>/dev/null
|
||||
#数据库改名
|
||||
mv -f ${CRASHDIR}/geosite.dat ${CRASHDIR}/GeoSite.dat 2>/dev/null
|
||||
#内核改名
|
||||
mv -f ${CRASHDIR}/clash ${CRASHDIR}/CrashCore 2>/dev/null
|
||||
#内核压缩
|
||||
[ -f ${CRASHDIR}/CrashCore ] && tar -zcf ${CRASHDIR}/CrashCore.tar.gz -C ${CRASHDIR} CrashCore
|
||||
for file in dropbear_rsa_host_key authorized_keys tun.ko ShellDDNS.sh;do
|
||||
#配置文件改名
|
||||
mv -f ${CRASHDIR}/mark ${CRASHDIR}/configs/ShellCrash.cfg 2>/dev/null
|
||||
mv -f ${CRASHDIR}/configs/ShellClash.cfg ${CRASHDIR}/configs/ShellCrash.cfg 2>/dev/null
|
||||
#数据库改名
|
||||
mv -f ${CRASHDIR}/geosite.dat ${CRASHDIR}/GeoSite.dat 2>/dev/null
|
||||
#内核改名
|
||||
mv -f ${CRASHDIR}/clash ${CRASHDIR}/CrashCore 2>/dev/null
|
||||
#内核压缩
|
||||
[ -f ${CRASHDIR}/CrashCore ] && tar -zcf ${CRASHDIR}/CrashCore.tar.gz -C ${CRASHDIR} CrashCore
|
||||
for file in dropbear_rsa_host_key authorized_keys tun.ko ShellDDNS.sh; do
|
||||
mv -f ${CRASHDIR}/$file ${CRASHDIR}/tools/$file 2>/dev/null
|
||||
done
|
||||
for file in cron task.sh task.list;do
|
||||
for file in cron task.sh task.list; do
|
||||
mv -f ${CRASHDIR}/$file ${CRASHDIR}/task/$file 2>/dev/null
|
||||
done
|
||||
#旧版文件清理
|
||||
@@ -303,7 +337,7 @@ sed -i '/shellclash/d' /etc/passwd
|
||||
sed -i '/shellclash/d' /etc/group
|
||||
rm -rf /etc/init.d/clash
|
||||
[ "$systype" = "mi_snapshot" -a "$CRASHDIR" != '/data/clash' ] && rm -rf /data/clash
|
||||
for file in CrashCore clash.sh getdate.sh shellcrash.rc core.new clashservice log shellcrash.service mark? mark.bak;do
|
||||
for file in CrashCore clash.sh getdate.sh shellcrash.rc core.new clashservice log shellcrash.service mark? mark.bak; do
|
||||
rm -rf ${CRASHDIR}/$file
|
||||
done
|
||||
#旧版变量改名
|
||||
|
||||
1373
scripts/menu.sh
1373
scripts/menu.sh
File diff suppressed because it is too large
Load Diff
@@ -43,10 +43,10 @@ tproxyfix(){
|
||||
}
|
||||
init(){
|
||||
#等待启动完成
|
||||
log_file=$(uci get system.@system[0].log_file)
|
||||
while ! /sbin/ip a| grep -q lan; do
|
||||
while ! ip a| grep -q lan; do
|
||||
sleep 10
|
||||
done
|
||||
sleep 20
|
||||
#初始化环境变量
|
||||
sed -i "/alias crash/d" $profile
|
||||
sed -i "/alias clash/d" $profile
|
||||
@@ -62,9 +62,11 @@ init(){
|
||||
#启动服务
|
||||
if [ ! -f $CRASHDIR/.dis_startup ]; then
|
||||
#AX6S/AX6000修复tun功能
|
||||
[ -f $CRASHDIR/configs/tun.ko ] && tunfix
|
||||
[ -s $CRASHDIR/tools/tun.ko ] && tunfix
|
||||
#小米7000/小米万兆修复tproxy
|
||||
[ -f /etc/init.d/qca-nss-ecm ] && [ -n "$(grep 'redir_mod=Tproxy' $CRASHDIR/configs/ShellCrash.cfg )" ] && tproxyfix
|
||||
#自动覆盖根证书文件
|
||||
[ -s $CRASHDIR/tools/ca-certificates.crt ] && cp -f $CRASHDIR/tools/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
#启动服务
|
||||
$CRASHDIR/start.sh start
|
||||
/etc/init.d/shellcrash enable
|
||||
|
||||
@@ -11,14 +11,14 @@ CRASHDIR=$(cat /etc/profile | grep CRASHDIR | awk -F "\"" '{print $2}')
|
||||
source ${CRASHDIR}/configs/command.env #加载启动命令和启动目录
|
||||
|
||||
start_service() {
|
||||
if [ -n "$(cat $CRASHDIR/configs/ShellCrash.cfg | grep 'firewall_area=5')" ];then
|
||||
if [ -n "$(cat $CRASHDIR/configs/ShellCrash.cfg | grep 'firewall_area=5')" ]; then
|
||||
$CRASHDIR/start.sh start_firewall #主旁转发
|
||||
else
|
||||
#本机代理用户
|
||||
[ -n "$(grep 'shellcrash:x:0:7890' /etc/passwd)" ] && USER=shellcrash || USER=root
|
||||
#检测必须文件
|
||||
$CRASHDIR/start.sh bfstart
|
||||
if [ "$?" = "0" ];then
|
||||
if [ "$?" = "0" ]; then
|
||||
#使用procd创建clash后台进程
|
||||
procd_open_instance
|
||||
procd_set_param user $USER
|
||||
@@ -32,8 +32,8 @@ start_service() {
|
||||
fi
|
||||
fi
|
||||
}
|
||||
stop_service(){
|
||||
stop_service() {
|
||||
procd_close_instance
|
||||
$CRASHDIR/start.sh stop_firewall
|
||||
$CRASHDIR/start.sh stop_firewall
|
||||
$CRASHDIR/start.sh unset_proxy
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ After=network.target
|
||||
Type=simple
|
||||
User=shellcrash
|
||||
ExecStartPre=/etc/ShellCrash/start.sh bfstart
|
||||
ExecStart=/etc/ShellCrash/CrashCore run -D /etc/ShellCrash -C /tmp/ShellCrash/jsons
|
||||
ExecStartPost=/etc/ShellCrash/start.sh afstart >/dev/null &
|
||||
ExecStart=/etc/ShellCrash/CrashCore run -D /etc/ShellCrash -C /tmp/ShellCrash/jsons >/dev/null
|
||||
ExecStartPost=/etc/ShellCrash/start.sh afstart
|
||||
ExecStopPost=/etc/ShellCrash/start.sh stop_firewall ; /etc/ShellCrash/start.sh unset_proxy
|
||||
Restart=on-abnormal
|
||||
RestartSec=10s
|
||||
|
||||
1950
scripts/start.sh
1950
scripts/start.sh
File diff suppressed because it is too large
Load Diff
@@ -222,6 +222,7 @@ set_service(){
|
||||
task_user_add(){ #自定义命令添加
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[33m命令可包含空格,请确保命令可执行!\033[0m"
|
||||
echo -e "\033[36m此处不要添加执行条件,请在添加完成后返回添加具体执行条件!\033[0m"
|
||||
echo -e "也可以手动编辑\033[32m${CRASHDIR}/task/task.user\033[0m添加"
|
||||
read -p "请输入命令语句 > " script
|
||||
if [ -n "$script" ];then
|
||||
@@ -318,13 +319,15 @@ task_type(){ #任务条件选择菜单
|
||||
;;
|
||||
1)
|
||||
echo -----------------------------------------------
|
||||
echo -e " 输入 1~7 对应\033[33m每周的指定某天\033[0m运行"
|
||||
echo -e " 输入 1,3,6 代表\033[36m每周1,3,6\033[0m运行"
|
||||
echo -e " 输入 0~6 对应\033[33m每周的指定某天\033[0m运行(0=周日)"
|
||||
echo -e " 输入 1,4,0 代表\033[36m每周一、周四、周日\033[0m运行"
|
||||
echo -e " 输入 1-5 代表\033[36m周一至周五\033[0m运行"
|
||||
read -p "请在每周哪天执行? > " week
|
||||
read -p "在每周哪天执行? > " week
|
||||
week=`echo ${week/7/0}` #把7换成0
|
||||
echo -----------------------------------------------
|
||||
read -p "想在该日的具体哪个小时执行?(0-23) > " hour
|
||||
cron_time="在每周$week的$hour点整"
|
||||
cron_time=`echo ${cron_time/0/日}` #把0换成日
|
||||
set_cron
|
||||
;;
|
||||
2)
|
||||
|
||||
@@ -65,7 +65,7 @@ setrules(){ #自定义规则
|
||||
}
|
||||
del_rule_type(){
|
||||
echo -e "输入对应数字即可移除相应规则:"
|
||||
sed -i '/^ *$/d' $YAMLSDIR/rules.yaml
|
||||
sed -i '/^ *$/d; /^#/d' $YAMLSDIR/rules.yaml
|
||||
cat $YAMLSDIR/rules.yaml | grep -Ev '^#' | awk -F "#" '{print " "NR" "$1$2$3}'
|
||||
echo -----------------------------------------------
|
||||
echo -e " 0 返回上级菜单"
|
||||
@@ -74,9 +74,8 @@ setrules(){ #自定义规则
|
||||
0) ;;
|
||||
'') ;;
|
||||
*)
|
||||
text=$(cat $YAMLSDIR/rules.yaml | grep -Ev '^#' | sed -n "$num p" | awk '{print $2}')
|
||||
if [ -n $text ];then
|
||||
sed -i "/$text/d" $YAMLSDIR/rules.yaml
|
||||
if [ "$num" -le "$(wc -l < $YAMLSDIR/rules.yaml)" ];then
|
||||
sed -i "${num}d" $YAMLSDIR/rules.yaml
|
||||
sleep 1
|
||||
del_rule_type
|
||||
else
|
||||
@@ -98,6 +97,8 @@ setrules(){ #自定义规则
|
||||
echo -e " 0 返回上级菜单"
|
||||
read -p "请输入对应数字 > " num
|
||||
case $num in
|
||||
0)
|
||||
;;
|
||||
1)
|
||||
rule_type="DOMAIN-SUFFIX DOMAIN-KEYWORD IP-CIDR SRC-IP-CIDR DST-PORT SRC-PORT GEOIP GEOSITE IP-CIDR6 DOMAIN"
|
||||
rule_group="DIRECT#REJECT$(cat $YAMLSDIR/proxy-groups.yaml $YAMLSDIR/config.yaml 2>/dev/null | grep -Ev '^#' | grep -o '\- name:.*' | sed 's/- name: /#/g' | tr -d '\n')"
|
||||
@@ -208,6 +209,8 @@ EOF
|
||||
echo -e " 0 返回上级菜单"
|
||||
read -p "请输入对应数字 > " num
|
||||
case $num in
|
||||
0)
|
||||
;;
|
||||
1)
|
||||
group_type="select url-test fallback load-balance"
|
||||
group_type_cn="手动选择 自动选择 故障转移 负载均衡"
|
||||
@@ -284,6 +287,8 @@ setproxies(){ #自定义clash节点
|
||||
echo -e " 0 返回上级菜单"
|
||||
read -p "请输入对应数字 > " num
|
||||
case $num in
|
||||
0)
|
||||
;;
|
||||
1)
|
||||
proxy_type="DOMAIN-SUFFIX DOMAIN-KEYWORD IP-CIDR SRC-IP-CIDR DST-PORT SRC-PORT GEOIP GEOSITE IP-CIDR6 DOMAIN MATCH"
|
||||
proxy_group="$(cat $YAMLSDIR/proxy-groups.yaml $YAMLSDIR/config.yaml 2>/dev/null | sed "/#自定义策略组开始/,/#自定义策略组结束/d" | grep -Ev '^#' | grep -o '\- name:.*' | sed 's/#.*//' | sed 's/- name: /#/g' | tr -d '\n' | sed 's/#//')"
|
||||
@@ -347,7 +352,7 @@ gen_clash_providers(){ #生成clash的providers配置文件
|
||||
fi
|
||||
cat >> $TMPDIR/providers/providers.yaml <<EOF
|
||||
${1}:
|
||||
type: http
|
||||
type: $type
|
||||
url: "$download_url"
|
||||
path: "$path"
|
||||
interval: 43200
|
||||
@@ -395,7 +400,7 @@ EOF
|
||||
if [ -n "$2" ];then
|
||||
gen_clash_providers_txt $1 $2
|
||||
providers_tags=$1
|
||||
sed -i 's/, {providers_tags}//g' ${TMPDIR}/providers/proxy-groups.yaml
|
||||
echo ' - {name: '${1}', type: url-test, tolerance: 100, lazy: true, use: ['${1}']}' >> ${TMPDIR}/providers/proxy-groups.yaml
|
||||
else
|
||||
providers_tags=''
|
||||
while read line;do
|
||||
@@ -432,7 +437,7 @@ gen_singbox_providers(){ #生成singbox的providers配置文件
|
||||
cat >> ${TMPDIR}/providers/providers.json <<EOF
|
||||
{
|
||||
"tag": "${1}",
|
||||
"type": "file",
|
||||
"type": "local",
|
||||
"healthcheck_url": "https://www.gstatic.com/generate_204",
|
||||
"healthcheck_interval": "10m",
|
||||
"path": "${2}"
|
||||
@@ -442,7 +447,7 @@ EOF
|
||||
cat >> ${TMPDIR}/providers/providers.json <<EOF
|
||||
{
|
||||
"tag": "${1}",
|
||||
"type": "http",
|
||||
"type": "remote",
|
||||
"healthcheck_url": "https://www.gstatic.com/generate_204",
|
||||
"healthcheck_interval": "10m",
|
||||
"download_url": "${2}",
|
||||
@@ -479,14 +484,16 @@ EOF
|
||||
{
|
||||
"outbound_providers": [
|
||||
EOF
|
||||
if [ -n "$2" ];then
|
||||
gen_singbox_providers_txt $1 $2
|
||||
providers_tags=\"$1\"
|
||||
else
|
||||
cat > ${TMPDIR}/providers/outbounds_add.json <<EOF
|
||||
cat > ${TMPDIR}/providers/outbounds_add.json <<EOF
|
||||
{
|
||||
"outbounds": [
|
||||
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
|
||||
else
|
||||
providers_tags=''
|
||||
while read line;do
|
||||
tag=$(echo $line | awk '{print $1}')
|
||||
@@ -495,9 +502,10 @@ EOF
|
||||
gen_singbox_providers_txt $tag $url
|
||||
echo '{ "tag": "'${tag}'", "type": "urltest", "tolerance": 100, "providers": "'${tag}'", "includes": ".*" },' >> ${TMPDIR}/providers/outbounds_add.json
|
||||
done < ${CRASHDIR}/configs/providers.cfg
|
||||
sed -i '$s/},/}]}/' ${TMPDIR}/providers/outbounds_add.json #修复文件格式
|
||||
fi
|
||||
sed -i '$s/},/}]}/' ${TMPDIR}/providers/providers.json #修复文件格式
|
||||
#修复文件格式
|
||||
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
|
||||
rm -rf ${TMPDIR}/provider_temp_file
|
||||
@@ -673,7 +681,7 @@ setproviders(){ #自定义providers
|
||||
[ "$res" = "1" ] && rm -rf $CRASHDIR/configs/providers.cfg
|
||||
setproviders
|
||||
;;
|
||||
d)
|
||||
e)
|
||||
echo -e "\033[33m将清空 $CRASHDIR/providers 目录下所有内容\033[0m"
|
||||
read -p "是否继续?(1/0) > " res
|
||||
[ "$res" = "1" ] && rm -rf $CRASHDIR/providers
|
||||
@@ -740,6 +748,8 @@ override(){ #配置文件覆写
|
||||
[ "$inuserguide" = 1 ] || echo -e " 0 返回上级菜单"
|
||||
read -p "请输入对应数字 > " num
|
||||
case "$num" in
|
||||
0)
|
||||
;;
|
||||
1)
|
||||
if [ -n "$(pidof CrashCore)" ];then
|
||||
echo -----------------------------------------------
|
||||
@@ -1007,7 +1017,11 @@ set_core_config(){ #配置文件功能
|
||||
echo -e "\033[30;47m ShellCrash配置文件管理\033[0m"
|
||||
echo -----------------------------------------------
|
||||
echo -e " 1 在线\033[32m生成$crashcore配置文件\033[0m"
|
||||
echo -e " 2 在线\033[33m获取完整配置文件\033[0m"
|
||||
if [ -f "$CRASHDIR"/v2b_api.sh ];then
|
||||
echo -e " 2 登录\033[33m获取订阅(推荐!)\033[0m"
|
||||
else
|
||||
echo -e " 2 在线\033[33m获取完整配置文件\033[0m"
|
||||
fi
|
||||
echo -e " 3 本地\033[32m生成providers配置文件\033[0m"
|
||||
echo -e " 4 本地\033[33m上传完整配置文件\033[0m"
|
||||
echo -e " 5 设置\033[36m自动更新\033[0m"
|
||||
@@ -1018,6 +1032,8 @@ set_core_config(){ #配置文件功能
|
||||
[ "$inuserguide" = 1 ] || echo -e " 0 返回上级菜单"
|
||||
read -p "请输入对应数字 > " num
|
||||
case "$num" in
|
||||
0)
|
||||
;;
|
||||
1)
|
||||
if [ -n "$Url" ];then
|
||||
echo -----------------------------------------------
|
||||
@@ -1036,20 +1052,25 @@ set_core_config(){ #配置文件功能
|
||||
gen_core_config_link
|
||||
;;
|
||||
2)
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[33m此功能可能会导致一些bug!!!\033[0m"
|
||||
echo -e "强烈建议你使用\033[32m在线生成配置文件功能!\033[0m"
|
||||
echo -e "\033[33m继续后如出现任何问题,请务必自行解决,一切提问恕不受理!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
sleep 1
|
||||
read -p "我确认遇到问题可以自行解决[1/0] > " res
|
||||
if [ "$res" = '1' ]; then
|
||||
set_core_config_link
|
||||
if [ -f "$CRASHDIR"/v2b_api.sh ];then
|
||||
. "$CRASHDIR"/v2b_api.sh
|
||||
set_core_config
|
||||
else
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[32m正在跳转……\033[0m"
|
||||
echo -e "\033[33m此功能可能会导致一些bug!!!\033[0m"
|
||||
echo -e "强烈建议你使用\033[32m在线生成配置文件功能!\033[0m"
|
||||
echo -e "\033[33m继续后如出现任何问题,请务必自行解决,一切提问恕不受理!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
sleep 1
|
||||
gen_core_config_link
|
||||
read -p "我确认遇到问题可以自行解决[1/0] > " res
|
||||
if [ "$res" = '1' ]; then
|
||||
set_core_config_link
|
||||
else
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[32m正在跳转……\033[0m"
|
||||
sleep 1
|
||||
gen_core_config_link
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
3)
|
||||
@@ -1458,11 +1479,11 @@ setcore(){ #内核选择菜单
|
||||
echo -e " >>\033[32m$singbox_v \033[33m不支持providers\033[0m"
|
||||
echo -e " 说明文档: \033[36;4mhttps://sing-box.sagernet.org\033[0m"
|
||||
echo -e "3 \033[43;30m Meta \033[0m: \033[32m多功能,支持全面\033[0m"
|
||||
echo -e " >>\033[32m$meta_v \033[33m内存占用较高\033[0m"
|
||||
echo -e " >>\033[32m$meta_v \033[33m占用略高,GeoSite可能不兼容华硕固件\033[0m"
|
||||
echo -e " 说明文档: \033[36;4mhttps://wiki.metacubex.one\033[0m"
|
||||
echo -e "4 \033[43;30m SingBoxP \033[0m: \033[32m支持ssr、providers、dns并发……\033[0m"
|
||||
echo -e " >>\033[32m$singboxp_v \033[33mPuerNya分支版本\033[0m"
|
||||
echo -e " 说明文档: \033[36;4mhttps://sing-box.sagernet.org\033[0m"
|
||||
echo -e " 说明文档: \033[36;4mhttps://sing-boxp.dustinwin.top\033[0m"
|
||||
echo -----------------------------------------------
|
||||
echo -e "5 \033[36m自定义内核\033[0m $custcore"
|
||||
echo -----------------------------------------------
|
||||
@@ -1471,6 +1492,8 @@ setcore(){ #内核选择菜单
|
||||
echo 0 返回上级菜单
|
||||
read -p "请输入对应数字 > " num
|
||||
case "$num" in
|
||||
0)
|
||||
;;
|
||||
1)
|
||||
crashcore=clash
|
||||
custcorelink=''
|
||||
@@ -1482,6 +1505,10 @@ setcore(){ #内核选择菜单
|
||||
getcore
|
||||
;;
|
||||
3)
|
||||
[ -d "/jffs" ] && {
|
||||
echo -e "\033[31mMeta内核使用的GeoSite.dat数据库在华硕设备存在被系统误删的问题,可能无法使用!\033[0m"
|
||||
sleep 3
|
||||
}
|
||||
crashcore=meta
|
||||
custcorelink=''
|
||||
getcore
|
||||
@@ -1648,7 +1675,7 @@ setcustgeo(){ #下载自定义数据库文件
|
||||
}
|
||||
setgeo(){ #数据库选择菜单
|
||||
source $CFG_PATH > /dev/null
|
||||
[ -n "$cn_mini.mmdb_v" ] && geo_type_des=精简版 || geo_type_des=全球版
|
||||
[ -n "$cn_mini_v" ] && geo_type_des=精简版 || geo_type_des=全球版
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[36m请选择需要更新的Geo/CN数据库文件:\033[0m"
|
||||
echo -e "\033[36m全球版GeoIP和精简版CN-IP数据库不共存\033[0m"
|
||||
@@ -1905,7 +1932,9 @@ getcrt(){ #下载根证书文件
|
||||
error_down
|
||||
else
|
||||
echo -----------------------------------------------
|
||||
mkdir -p $openssldir
|
||||
[ "$systype" = 'mi_snapshot' ] && cp -f ${TMPDIR}/ca-certificates.crt $CRASHDIR/tools #镜像化设备特殊处理
|
||||
[ -f $openssldir/certs ] && rm -rf $openssldir/certs #如果certs不是目录而是文件则删除并创建目录
|
||||
mkdir -p $openssldir/certs
|
||||
mv -f ${TMPDIR}/ca-certificates.crt $crtdir
|
||||
${CRASHDIR}/start.sh webget /dev/null https://baidu.com echooff rediron skipceroff
|
||||
if [ "$?" = "1" ];then
|
||||
@@ -1917,10 +1946,13 @@ getcrt(){ #下载根证书文件
|
||||
fi
|
||||
}
|
||||
setcrt(){
|
||||
openssldir=$(openssl version -a 2>&1 | grep OPENSSLDIR | awk -F "\"" '{print $2}')
|
||||
[ -z "$openssldir" ] && openssldir=/etc/ssl
|
||||
openssldir="$(openssl version -d 2>&1 | awk -F '"' '{print $2}')"
|
||||
if [ -d "$openssldir/certs/" ];then
|
||||
crtdir="$openssldir/certs/ca-certificates.crt"
|
||||
else
|
||||
crtdir="/etc/ssl/certs/ca-certificates.crt"
|
||||
fi
|
||||
if [ -n "$openssldir" ];then
|
||||
crtdir="$openssldir/certs/ca-certificates.crt"
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[36m安装/更新本地根证书文件(ca-certificates.crt)\033[0m"
|
||||
echo -e "\033[33m用于解决证书校验错误,x509报错等问题\033[0m"
|
||||
@@ -2219,12 +2251,11 @@ userguide(){
|
||||
} && echo "已成功开启ipv4转发,如未正常开启,请手动重启设备!" || echo "开启失败!请自行谷歌查找当前设备的开启方法!"
|
||||
fi
|
||||
elif [ "$num" = 2 ];then
|
||||
setconfig redir_mod "纯净模式"
|
||||
setconfig redir_mod "Redir模式"
|
||||
setconfig crashcore "clash"
|
||||
setconfig common_ports "未开启"
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[36m请选择设置本机代理的方式\033[0m"
|
||||
localproxy
|
||||
setconfig firewall_area '2'
|
||||
|
||||
elif [ "$num" = 3 ];then
|
||||
mv -f $CFG_PATH.bak $CFG_PATH
|
||||
echo -e "\033[32m脚本设置已还原!\033[0m"
|
||||
@@ -2248,8 +2279,8 @@ userguide(){
|
||||
}
|
||||
fi
|
||||
#检测及下载根证书
|
||||
openssldir=$(openssl version -a 2>&1 | grep OPENSSLDIR | awk -F "\"" '{print $2}')
|
||||
[ -z "$openssldir" ] && openssldir=/etc/ssl
|
||||
openssldir="$(openssl version -d 2>&1 | awk -F '"' '{print $2}')"
|
||||
[ ! -d "$openssldir/certs" ] && openssldir=/etc/ssl
|
||||
if [ -d $openssldir/certs -a ! -f $openssldir/certs/ca-certificates.crt ];then
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[33m当前设备未找到根证书文件\033[0m"
|
||||
@@ -2310,10 +2341,18 @@ userguide(){
|
||||
[ ! -s $CRASHDIR/yamls/config.yaml -a ! -s $CRASHDIR/jsons/config.json ] && {
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[32m是否导入配置文件?\033[0m(这是运行前的最后一步)"
|
||||
echo -e "\033[0m你必须拥有一份yaml格式的配置文件才能运行服务!\033[0m"
|
||||
echo -e "\033[0m你必须拥有一份配置文件才能运行服务!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
read -p "现在开始导入?(1/0) > " res
|
||||
[ "$res" = 1 ] && inuserguide=1 && set_core_config && inuserguide=""
|
||||
[ "$res" = 1 ] && inuserguide=1 && {
|
||||
if [ -f "$CRASHDIR"/v2b_api.sh ];then
|
||||
. "$CRASHDIR"/v2b_api.sh
|
||||
else
|
||||
set_core_config
|
||||
fi
|
||||
set_core_config
|
||||
inuserguide=""
|
||||
}
|
||||
}
|
||||
#回到主界面
|
||||
echo -----------------------------------------------
|
||||
@@ -2439,7 +2478,7 @@ testcommand(){
|
||||
if [ "$firewall_mod" = "nftables" ];then
|
||||
nft list table inet shellcrash
|
||||
else
|
||||
[ "$firewall_area" = 1 -o "$firewall_area" = 3 -o "$firewall_area" = 5 ] && {
|
||||
[ "$firewall_area" = 1 -o "$firewall_area" = 3 -o "$firewall_area" = 5 -o "$vm_redir" = "已开启" ] && {
|
||||
echo ----------------Redir+DNS---------------------
|
||||
iptables -t nat -L PREROUTING --line-numbers
|
||||
iptables -t nat -L shellcrash_dns --line-numbers
|
||||
@@ -2476,6 +2515,11 @@ testcommand(){
|
||||
}
|
||||
}
|
||||
}
|
||||
[ "$vm_redir" = "已开启" ] && {
|
||||
echo -------------vm-Redir-------------------
|
||||
iptables -t nat -L shellcrash_vm --line-numbers
|
||||
iptables -t nat -L shellcrash_vm_dns --line-numbers
|
||||
}
|
||||
fi
|
||||
exit;
|
||||
elif [ "$num" = 5 ]; then
|
||||
@@ -7,10 +7,10 @@ tmp_dir=/tmp/ddns_$USER
|
||||
[ ! -f "$ddns_dir" -o ! -d "/etc/ddns" ] && echo -e "本脚本依赖OpenWrt内置的DDNS服务,当前设备无法运行,已退出!" && exit 1
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[30;46m欢迎使用ShellDDNS!\033[0m"
|
||||
echo -e "TG群:\033[36;4mhttps://t.me/clashfm\033[0m"
|
||||
echo -e "TG群:\033[36;4mhttps://t.me/ShellCrash\033[0m"
|
||||
|
||||
add_ddns(){
|
||||
cat >> $ddns_dir << EOF
|
||||
add_ddns() {
|
||||
cat >>$ddns_dir <<EOF
|
||||
config service '$service'
|
||||
option enabled '1'
|
||||
option force_unit 'hours'
|
||||
@@ -31,7 +31,7 @@ EOF
|
||||
sleep 3
|
||||
echo 服务已经添加!
|
||||
}
|
||||
set_ddns(){
|
||||
set_ddns() {
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入你的域名 > " str
|
||||
[ -z "$str" ] && domain=$domain || domain=$str
|
||||
@@ -58,7 +58,7 @@ set_ddns(){
|
||||
[ "$res" = 1 ] && add_ddns || set_ddns
|
||||
}
|
||||
|
||||
set_service(){
|
||||
set_service() {
|
||||
services_dir=/etc/ddns/$services
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[32m请选择服务提供商\033[0m"
|
||||
@@ -78,7 +78,7 @@ set_service(){
|
||||
fi
|
||||
}
|
||||
|
||||
network_type(){
|
||||
network_type() {
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[32m请选择网络模式\033[0m"
|
||||
echo -e " 1 \033[36mIPV4\033[0m"
|
||||
@@ -86,11 +86,11 @@ network_type(){
|
||||
read -p "请输入对应数字 > " num
|
||||
if [ -z "$num" ]; then
|
||||
i=
|
||||
elif [ "$num" = 1 ];then
|
||||
elif [ "$num" = 1 ]; then
|
||||
use_ipv6=0
|
||||
services=services
|
||||
set_service
|
||||
elif [ "$num" = 2 ];then
|
||||
elif [ "$num" = 2 ]; then
|
||||
use_ipv6=1
|
||||
services=services_ipv6
|
||||
set_service
|
||||
@@ -101,13 +101,13 @@ network_type(){
|
||||
fi
|
||||
}
|
||||
|
||||
rev_service(){
|
||||
rev_service() {
|
||||
enabled=$(uci show ddns.$service | grep 'enabled' | awk -F "\'" '{print $2}')
|
||||
[ "$enabled" = 1 ] && enabled_b="停用" || enabled_b="启用"
|
||||
echo -----------------------------------------------
|
||||
echo -e " 1 \033[32m立即更新\033[0m"
|
||||
echo -e " 2 编辑当前服务\033[0m"
|
||||
echo -e " 3 $enabled_b当前服务"
|
||||
echo -e " 3 $enabled_b当前服务"
|
||||
echo -e " 4 移除当前服务"
|
||||
echo -e " 0 返回上级菜单"
|
||||
echo -----------------------------------------------
|
||||
@@ -133,21 +133,21 @@ rev_service(){
|
||||
fi
|
||||
}
|
||||
|
||||
load_ddns(){
|
||||
load_ddns() {
|
||||
nr=0
|
||||
cat $ddns_dir | grep 'config service' | awk '{print $3}' | sed "s/\'//g" > $tmp_dir
|
||||
cat $ddns_dir | grep 'config service' | awk '{print $3}' | sed "s/\'//g" >$tmp_dir
|
||||
echo -----------------------------------------------
|
||||
echo -e "列表 域名 启用 IP地址"
|
||||
echo -----------------------------------------------
|
||||
for service in $(cat $tmp_dir) ;do
|
||||
echo $service >> $tmp_dir
|
||||
nr=$((nr+1))
|
||||
for service in $(cat $tmp_dir); do
|
||||
echo $service >>$tmp_dir
|
||||
nr=$((nr + 1))
|
||||
enabled=$(uci show ddns.$service | grep 'enabled' | awk -F "\'" '{print $2}')
|
||||
domain=$(uci show ddns.$service | grep 'domain' | awk -F "\'" '{print $2}')
|
||||
local_ip=$(cat /var/log/ddns/$service.log | grep 'Local IP' | tail -1 | awk -F "\'" '{print $2}')
|
||||
echo -e " $nr $domain $enabled $local_ip"
|
||||
done
|
||||
echo -e " $((nr+1)) 添加DDNS服务"
|
||||
echo -e " $((nr + 1)) 添加DDNS服务"
|
||||
echo -e " 0 退出"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入对应序号 > " num
|
||||
@@ -165,7 +165,5 @@ load_ddns(){
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
load_ddns
|
||||
rm -rf $tmp_dir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user