Merge branch 'master' of https://github.com/juewuy/ShellCrash into master

# Conflicts:
#	.github/workflows/update_singbox_core.yaml
#	bin/version
This commit is contained in:
juewuy
2024-01-14 13:39:30 +08:00
8 changed files with 41929 additions and 41456 deletions

View File

@@ -1,37 +1,107 @@
name: Update Sing-Box Core
name: Build Sing-Box Core for ShellCrash
on:
workflow_dispatch:
inputs:
version:
description: 'version of singbox, such as 1.7.8'
tag:
description: 'tag of sing-box, such as v1.7.8'
required: true
type: string
env:
download_version: ${{ github.event.inputs.version }}
download_project: SagerNet/sing-box
jobs:
Update:
cross:
strategy:
matrix:
include:
# linux
- name: linux-amd64
goos: linux
goarch: amd64
goamd64: v1
- name: linux-386
goos: linux
goarch: 386
- name: linux-arm64
goos: linux
goarch: arm64
- name: linux-armv5
goos: linux
goarch: arm
goarm: 5
- name: linux-armv7
goos: linux
goarch: arm
goarm: 7
- name: linux-mips-softfloat
goos: linux
goarch: mips
gomips: softfloat
- name: linux-mipsel-softfloat
goos: linux
goarch: mipsle
gomips: softfloat
- name: linux-mipsel-hardfloat
goos: linux
goarch: mipsle
gomips: hardfloat
fail-fast: false
runs-on: ubuntu-latest
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOAMD64: ${{ matrix.goamd64 }}
GOARM: ${{ matrix.goarm }}
GOMIPS: ${{ matrix.gomips }}
CGO_ENABLED: 0
TAGS: with_quic,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
steps:
- name: Checkout sing-box
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: SagerNet/sing-box
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0
- name: Get latest go version
id: version
run: |
echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ steps.version.outputs.go_version }}
- name: Build
id: build
run: make
- name: Upload file to workspace
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: sing-box
push_ShellCrash:
needs: cross
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@main
- name: Init Dependencies
- name: Checkout ShellCrash
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: juewuy/ShellCrash
ref: dev
- name: Get upx
run: |
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
wget https://github.com/upx/upx/releases/download/v3.93/upx-3.93-amd64_linux.tar.xz
tar xf upx-3.96-amd64_linux.tar.xz
tar xf upx-3.93-amd64_linux.tar.xz
- name: Download Core
- name: Download file from workspace
uses: actions/download-artifact@v4
with:
path: ./tmp
- name: Zip core by upx
run: |
#download_version=$(curl -s -L -o /dev/null -w '%{url_effective}' https://github.com/${download_project}/releases/latest | grep -oE "[^/]+$" | awk -F 'v' '{print $2}')
echo "download_version=${download_version}" >> ${GITHUB_ENV}
archs=(386 amd64 armv7 arm64)
new_name=(386 amd64 armv7 armv8)
mkdir tmp
for((i=0;i<4;i++));do
wget "https://github.com/${download_project}/releases/download/v${download_version}/sing-box-${download_version}-linux-${archs[i]}.tar.gz" -O ./tmp/core.tar.gz
tar -zxvf ./tmp/core.tar.gz -C './tmp'
mv -f ./tmp/sing-box-${download_version}-linux-${archs[i]}/sing-box ./tmp/singbox-linux-${new_name[i]}
archs=(amd64 armv5 armv7 arm64 mips-softfloat mipsel-hardfloat mipsel-softfloat)
new_name=(amd64 armv5 armv7 armv8 mips-softfloat mipsle-hardfloat mipsle-softfloat)
for((i=0;i<7;i++));do
mv -f ./tmp/linux-${archs[i]}/sing-box ./tmp/singbox-linux-${new_name[i]}
chmod +x ./tmp/singbox-linux-${new_name[i]}
if [ "${archs[i]}" != "armv5" ];then
if [[ ${archs[i]} = mips* ]];then
@@ -41,21 +111,26 @@ jobs:
fi
fi
done
rm -rf ./tmp/LICENSE
rm -rf core.tar.gz
rm -fr upx*
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name: singbox_core
name: singbox_core
body: "The alpha version of singbox core \n<><6E><EFBFBD><EFBFBD>singbox<6F>Ĺٷ<C4B9>${{ github.event.inputs.version }}<7D><EFBFBD>ں<EFBFBD><DABA>ļ<EFBFBD>\nhttps://github.com/SagerNet/sing-box/releases \nZip by upx\nʹ<6E><CAB9><EFBFBD><EFBFBD>upx<70><78><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9>\nOnly support for ShellCrash\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ShellCrash<73><68>Ŀʹ<C4BF><CAB9>"
draft: false
prerelease: true
files: |
./tmp/*
- name: Update
run: |
mkdir -p ./bin/singbox
rm -fr ./bin/singbox/*
mv -f ./tmp/singbox-linux-* ./bin/singbox/
rm -fr ./tmp
sed -i "s/singbox_v=.*/singbox_v=$(./bin/singbox/singbox-linux-amd64 version 2>/dev/null | grep -Eo 'version .*' | sed 's/version //')/" bin/version
- name: Commit and push
run: |
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
git add . && git commit -m "更新sing-box内核至${{ github.event.inputs.tag }}" || exit 0
git push
- name: Cleanup Workflow
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 2
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sing-box-${{ matrix.name }}
path: sing-box*

Binary file not shown.

Binary file not shown.

View File

@@ -133,6 +133,7 @@
2401:3800::/32
2401:5960:5960::/48
2401:7700::/32
2401:7d40::/32
2401:7e00::/32
2401:8d00::/46
2401:8d00:7::/48
@@ -175,6 +176,7 @@
2402:4440::/32
2402:4b80::/32
2402:4e00::/32
2402:5e40::/32
2402:5ec0::/32
2402:6e80::/32
2402:6f40::/48
@@ -281,6 +283,7 @@
2404:2280:1d8::/45
2404:2280:1e0::/48
2404:2280:1e2::/47
2404:2280:1e4::/47
2404:6380::/48
2404:6380:1000::/48
2404:6380:8001::/48
@@ -348,6 +351,7 @@
2405:6f00:c602::/48
2405:7040:6000::/47
2405:78c0:6e00::/43
2405:84c0:ff80::/44
2405:8a40::/32
2405:a900:ffee::/48
2405:a900:fffe::/48
@@ -421,10 +425,10 @@
2406:840:e180::/44
2406:840:e20f::/48
2406:840:e280::/48
2406:840:e300::/47
2406:840:e300::/48
2406:840:e340::/44
2406:840:e36f::/48
2406:840:e501::/48
2406:840:e500::/47
2406:840:e571::/48
2406:840:e576::/48
2406:840:e57b::/48
@@ -440,10 +444,10 @@
2406:840:e84a::/48
2406:840:e84c::/47
2406:840:e84f::/48
2406:840:e880::/44
2406:840:eab0::/48
2406:840:eab2::/47
2406:840:eab4::/48
2406:840:eab6::/48
2406:840:eb00::/46
2406:840:eb04::/47
2406:840:eb07::/48
@@ -455,6 +459,7 @@
2406:840:f0a1::/48
2406:840:f0aa::/48
2406:840:f100::/47
2406:840:f200::/44
2406:840:f230::/44
2406:840:f380::/44
2406:840:f401::/48
@@ -479,6 +484,7 @@
2406:840:fe60::/48
2406:840:fe72::/47
2406:840:fec0::/47
2406:840:fec4::/48
2406:840:fec8::/48
2406:840:fed1::/48
2406:840:fed2::/47
@@ -1111,8 +1117,8 @@
240e::/20
2602:2a3::/40
2602:2a4:ff::/48
2602:f9a9:101::/48
2602:f9df:300::/40
2602:f9df:400::/48
2602:f9df:410::/48
2602:f9df:420::/48
2602:f9df:510::/47
@@ -1168,7 +1174,6 @@
2605:f440:cafe::/48
2607:7640::/48
2804:1e48::/32
2a03:5840:f3::/48
2a03:5840:290::/48
2a04:3e00:1002::/48
2a04:f580:8010::/47
@@ -1234,7 +1239,9 @@
2a06:a005:486::/48
2a06:a005:8d0::/47
2a06:a005:8da::/48
2a06:a005:910::/44
2a06:a005:9c0::/48
2a06:a005:a13::/48
2a06:a005:b69::/48
2a06:a005:d22::/48
2a06:a005:f80::/44
@@ -1249,12 +1256,13 @@
2a06:a005:1700::/44
2a06:a005:1800::/48
2a06:a005:1b60::/47
2a06:a005:1ee1::/48
2a06:a005:1eee::/48
2a06:a005:2040::/44
2a06:a005:2100::/44
2a06:a005:2510::/48
2a06:a005:28f3::/48
2a06:a005:28f4::/48
2a06:a005:2910::/44
2a06:a005:2922::/48
2a06:a005:2925::/48
2a06:a005:2926::/48
@@ -1263,42 +1271,27 @@
2a06:a005:29d1::/48
2a06:de00:de04::/48
2a06:de00:de0e::/47
2a06:de01:80b::/48
2a06:de01:82f::/48
2a06:de01:837::/48
2a06:de01:83d::/48
2a06:de01:856::/48
2a06:de01:861::/48
2a06:de01:863::/48
2a06:de01:865::/48
2a06:de01:87e::/48
2a06:de01:821::/48
2a06:de01:829::/48
2a06:de01:86b::/48
2a06:de01:870::/48
2a06:de01:875::/48
2a06:de01:885::/48
2a06:de01:888::/48
2a06:de01:8a4::/47
2a06:de01:8b8::/48
2a06:de01:8c9::/48
2a06:de01:8ca::/48
2a06:de01:8dd::/48
2a06:de01:8ff::/48
2a06:de01:8b3::/48
2a06:de01:8dc::/48
2a06:de01:8fc::/48
2a06:de01:908::/48
2a06:de01:914::/48
2a06:de01:931::/48
2a06:de01:93c::/48
2a06:de01:94e::/47
2a06:de01:95d::/48
2a06:de01:96d::/48
2a06:de01:964::/48
2a06:de01:96c::/48
2a06:de01:976::/48
2a06:de01:982::/48
2a06:de01:994::/48
2a06:de01:99d::/48
2a06:de01:9b8::/48
2a06:de01:ad4::/48
2a06:de01:ae6::/48
2a06:de01:aee::/48
2a06:de01:af1::/48
2a06:de01:afd::/48
2a06:de01:b07::/48
2a06:de01:b0f::/48
2a06:de01:b39::/48
2a06:de01:b3e::/48
2a06:de01:9b6::/48
2a06:de01:9bc::/48
2a06:de01:ad8::/48
2a06:de01:ae8::/48
2a06:de01:b2e::/48
2a06:e881:2509::/48
2a06:e881:5501::/48
2a06:e881:5502::/48
@@ -1313,6 +1306,7 @@
2a0a:280:2d04::/47
2a0a:2840:20::/43
2a0a:2845:aab8::/46
2a0a:6040:300::/40
2a0a:6040:c00::/41
2a0a:6040:c80::/42
2a0a:6040:cc0::/43
@@ -1349,7 +1343,6 @@
2a0a:6040:c700::/42
2a0a:6040:c740::/47
2a0a:6040:c742::/48
2a0a:6040:c750::/47
2a0a:6040:c770::/44
2a0a:6040:c7a0::/48
2a0a:6040:ce00::/48
@@ -1357,10 +1350,11 @@
2a0a:6040:d0fe::/48
2a0a:6040:d401::/48
2a0a:6040:d600::/44
2a0a:6040:d610::/48
2a0a:6040:d610::/47
2a0a:6040:d612::/48
2a0a:6040:d614::/46
2a0a:6040:d710::/44
2a0a:6040:e100::/40
2a0a:6040:e541::/48
2a0a:6040:e543::/48
2a0a:6040:e544::/47
@@ -1370,6 +1364,7 @@
2a0a:6040:e900::/40
2a0a:6040:ec00::/40
2a0b:b86:ffe0::/48
2a0b:b87:ffb5::/48
2a0b:2542::/48
2a0b:2542:300::/40
2a0b:4340:6::/48
@@ -1394,8 +1389,7 @@
2a0b:4340:1304::/48
2a0b:4340:1340::/48
2a0c:9a40:8cf0::/48
2a0c:9a40:9e04::/47
2a0c:9a40:9e08::/45
2a0c:9a40:9e00::/43
2a0c:b641:130::/44
2a0c:b641:210::/47
2a0c:b641:24f::/48
@@ -1432,7 +1426,6 @@
2a0e:97c0:220::/44
2a0e:97c0:550::/44
2a0e:97c0:5ef::/48
2a0e:97c0:83f::/48
2a0e:aa01:1fff::/48
2a0e:aa06::/40
2a0e:aa06:400::/44
@@ -1456,7 +1449,7 @@
2a0e:aa07:e120::/44
2a0e:aa07:e130::/47
2a0e:aa07:e141::/48
2a0e:aa07:e142::/47
2a0e:aa07:e143::/48
2a0e:aa07:e16a::/48
2a0e:aa07:e200::/44
2a0e:aa07:f000::/48
@@ -1468,7 +1461,6 @@
2a0e:aa07:f0d2::/48
2a0e:aa07:f0d4::/47
2a0e:aa07:f0d6::/48
2a0e:aa07:f0e0::/44
2a0e:b107:30::/48
2a0e:b107:32::/47
2a0e:b107:a0::/44
@@ -1476,7 +1468,6 @@
2a0e:b107:272::/48
2a0e:b107:4e0::/48
2a0e:b107:710::/48
2a0e:b107:790::/44
2a0e:b107:bd0::/48
2a0e:b107:c10::/48
2a0e:b107:da0::/44
@@ -1495,6 +1486,7 @@
2a0f:5707:fff4::/47
2a0f:7803:fc00::/39
2a0f:7803:fe81::/48
2a0f:7803:fe82::/48
2a0f:7803:ff10::/48
2a0f:7980::/44
2a0f:85c1:30::/47
@@ -1521,8 +1513,8 @@
2a12:3fc2:aa10::/44
2a12:3fc2:aa40::/44
2a12:3fc2:ab50::/48
2a12:3fc2:e500::/40
2a12:3fc2:e72e::/48
2a12:3fc2:e810::/44
2a12:3fc7::/48
2a12:3fc7:8000::/48
2a12:dd47:5c00::/40
@@ -1543,12 +1535,11 @@
2a13:a5c7:1200::/40
2a13:a5c7:1500::/40
2a13:a5c7:1600::/46
2a13:a5c7:1604::/47
2a13:a5c7:1604::/48
2a13:a5c7:1802::/48
2a13:b487:1200::/43
2a13:b487:1b86::/48
2a13:b487:1bb2::/48
2a13:b487:1bb7::/48
2a13:b487:1bbb::/48
2a13:b487:1f00::/47
2a13:b487:4200::/47
@@ -1562,6 +1553,7 @@
2a13:df85:be80::/48
2a13:df85:be88::/48
2a13:df85:be90::/48
2a13:df85:beaa::/48
2a13:df85:befe::/48
2c0f:f7a8:8011::/48
2c0f:f7a8:8050::/48

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

After

Width:  |  Height:  |  Size: 275 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1622,7 +1622,7 @@ tools(){
fi
}
#获取设置默认显示
[ -n "$(cat /etc/crontabs/root 2>&1| grep otapredownload)" ] && mi_update=禁用 || mi_update=启用
grep -qE "^\s*[^#].*otapredownload" /etc/crontabs/root >/dev/null 2>&1 && mi_update=禁用 || mi_update=启用
[ "$mi_autoSSH" = "已配置" ] && mi_autoSSH_type=32m已配置 || mi_autoSSH_type=31m未配置
[ -f ${CRASHDIR}/tools/tun.ko ] && mi_tunfix=32m已启用 || mi_tunfix=31m未启用
#
@@ -1682,7 +1682,16 @@ tools(){
tools
elif [ -x /usr/sbin/otapredownload ] && [ "$num" = 5 ]; then
[ "$mi_update" = "禁用" ] && sed -i "/otapredownload/d" /etc/crontabs/root || echo "15 3,4,5 * * * /usr/sbin/otapredownload >/dev/null 2>&1" >> /etc/crontabs/root
if [ "$mi_update" = "禁用" ]; then
grep -q "otapredownload" /etc/crontabs/root && \
sed -i "/^[^\#]*otapredownload/ s/^/#/" /etc/crontabs/root || \
echo "#15 3,4,5 * * * /usr/sbin/otapredownload >/dev/null 2>&1" >> /etc/crontabs/root
else
grep -q "otapredownload" /etc/crontabs/root && \
sed -i "/^\s*#.*otapredownload/ s/^\s*#//" /etc/crontabs/root || \
echo "15 3,4,5 * * * /usr/sbin/otapredownload >/dev/null 2>&1" >> /etc/crontabs/root
fi
echo -----------------------------------------------
echo -e "已\033[33m$mi_update\033[0m小米路由器的自动更新如未生效请在官方APP中同步设置"
sleep 1