├── .github
├── dependabot.yml
└── workflows
│ ├── delete-old-workflows.yml
│ ├── update-adguardhome.yml
│ ├── update-dashboard.yml
│ ├── update-mihomo.yml
│ └── update-singbox.yml
└── README.md
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "daily"
7 | timezone: "Asia/Shanghai"
8 | time: "06:00"
9 | pull-request-branch-name:
10 | separator: "-"
11 |
--------------------------------------------------------------------------------
/.github/workflows/delete-old-workflows.yml:
--------------------------------------------------------------------------------
1 | name: Delete old workflows
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: '0 22 * * *'
6 |
7 | jobs:
8 | del_runs:
9 | runs-on: ubuntu-latest
10 | permissions:
11 | actions: write
12 | steps:
13 | - name: Delete old workflow runs
14 | uses: Mattraks/delete-workflow-runs@v2
15 | with:
16 | token: ${{ github.token }}
17 | repository: ${{ github.repository }}
18 | retain_days: 3
19 | keep_minimum_runs: 1
20 |
--------------------------------------------------------------------------------
/.github/workflows/update-adguardhome.yml:
--------------------------------------------------------------------------------
1 | name: Update AdGuard Home
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: "0 17 * * *"
6 | push:
7 | branches:
8 | - main
9 | paths-ignore:
10 | - "README.md"
11 | - ".github/workflows/delete-old-workflows.yml"
12 | - ".github/workflows/update-dashboard.yml"
13 | - ".github/workflows/update-mihomo.yml"
14 | - ".github/workflows/update-singbox.yml"
15 |
16 | jobs:
17 | go:
18 | runs-on: ubuntu-latest
19 | outputs:
20 | version: ${{ steps.go.outputs.version }}
21 | steps:
22 | - name: Get `Go` latest version
23 | id: go
24 | run: |
25 | echo version=$(curl -sSL https://raw.githubusercontent.com/actions/go-versions/update-versions-manifest-file/versions-manifest.json | jq -r '.[0].version') >> $GITHUB_OUTPUT
26 |
27 | node:
28 | runs-on: ubuntu-latest
29 | outputs:
30 | version: ${{ steps.node.outputs.version }}
31 | steps:
32 | - name: Get `Node` latest version (LTS)
33 | id: node
34 | run: |
35 | echo version=$(curl -sSL https://nodejs.org/dist/index.json | jq -r 'map(select(.lts)) | .[0].version[1:]') >> $GITHUB_OUTPUT
36 |
37 | release:
38 | runs-on: ubuntu-latest
39 | outputs:
40 | release_version: ${{ steps.release.outputs.release_version }}
41 | release_time: ${{ steps.release.outputs.release_time }}
42 | steps:
43 | - name: Get `AdGuard Home Release` version and time
44 | id: release
45 | run: |
46 | release_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.tag_name')
47 | echo "release_version=$release_version" >> $GITHUB_OUTPUT
48 | release_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
49 | echo "release_time=$release_time" >> $GITHUB_OUTPUT
50 |
51 | release_cross:
52 | runs-on: ubuntu-latest
53 | strategy:
54 | matrix:
55 | include:
56 | # Linux
57 | - { name: linux_amd64, goos: linux, goarch: amd64, goamd64: v1 }
58 | - { name: linux_armv5, goos: linux, goarch: arm, goarm: 5 }
59 | - { name: linux_armv6, goos: linux, goarch: arm, goarm: 6 }
60 | - { name: linux_armv7, goos: linux, goarch: arm, goarm: 7 }
61 | - { name: linux_arm64, goos: linux, goarch: arm64 }
62 | - { name: linux_mips_softfloat, goos: linux, goarch: mips, gomips: softfloat }
63 | - { name: linux_mipsle_softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
64 | # Windows
65 | - { name: windows_amd64, goos: windows, goarch: amd64, goamd64: v1 }
66 | - { name: windows_arm64, goos: windows, goarch: arm64 }
67 |
68 | fail-fast: false
69 | needs:
70 | - go
71 | - node
72 | - release
73 | env:
74 | release_VERSION: ${{ needs.release.outputs.release_version }}
75 | steps:
76 | - name: Checkout `AdguardTeam/AdGuardHome`
77 | uses: actions/checkout@v4
78 | with:
79 | repository: AdguardTeam/AdGuardHome
80 |
81 | - name: Setup `Go`
82 | uses: actions/setup-go@v5
83 | with:
84 | go-version: ${{ needs.go.outputs.version }}
85 |
86 | - name: Adapt `Go` version
87 | run: |
88 | go get go@${{ needs.go.outputs.version }}
89 | go mod tidy
90 |
91 | - name: Setup `Node`
92 | uses: actions/setup-node@v4
93 | with:
94 | node-version: ${{ needs.node.outputs.version }}
95 |
96 | - name: Setup `Snapcraft`
97 | run: |
98 | sudo snap install snapcraft --classic
99 |
100 | - name: Build `AdGuard Home Release`
101 | id: build
102 | run: |
103 | make SIGN=0 VERBOSE=1 ARCH=${{ matrix.goarch }} OS=${{ matrix.goos }} CHANNEL=release VERSION=${{ env.release_VERSION }} GOTOOLCHAIN=local build-release
104 |
105 | - name: Upload files to workspace
106 | uses: actions/upload-artifact@v4
107 | with:
108 | name: AdGuardHome_release_${{ matrix.name }}
109 | path: '**/AdGuardHome/AdGuardHome*'
110 | compression-level: 9
111 |
112 | beta:
113 | runs-on: ubuntu-latest
114 | outputs:
115 | beta_version: ${{ steps.beta.outputs.beta_version }}
116 | beta_time: ${{ steps.beta.outputs.beta_time }}
117 | steps:
118 | - name: Get `AdGuard Home Beta` version and time
119 | id: beta
120 | run: |
121 | beta_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | contains("b"))][0].tag_name')
122 | echo "beta_version=$beta_version" >> $GITHUB_OUTPUT
123 | beta_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | contains("b"))][0].created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
124 | echo "beta_time=$beta_time" >> $GITHUB_OUTPUT
125 |
126 | beta_cross:
127 | runs-on: ubuntu-latest
128 | strategy:
129 | matrix:
130 | include:
131 | # Linux
132 | - { name: linux_amd64, goos: linux, goarch: amd64, goamd64: v1 }
133 | - { name: linux_armv5, goos: linux, goarch: arm, goarm: 5 }
134 | - { name: linux_armv6, goos: linux, goarch: arm, goarm: 6 }
135 | - { name: linux_armv7, goos: linux, goarch: arm, goarm: 7 }
136 | - { name: linux_arm64, goos: linux, goarch: arm64 }
137 | - { name: linux_mips_softfloat, goos: linux, goarch: mips, gomips: softfloat }
138 | - { name: linux_mipsle_softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
139 | # Windows
140 | - { name: windows_amd64, goos: windows, goarch: amd64, goamd64: v1 }
141 | - { name: windows_arm64, goos: windows, goarch: arm64 }
142 |
143 | fail-fast: false
144 | needs:
145 | - go
146 | - node
147 | - beta
148 | env:
149 | beta_VERSION: ${{ needs.beta.outputs.beta_version }}
150 | steps:
151 | - name: Checkout `AdguardTeam/AdGuardHome`
152 | uses: actions/checkout@v4
153 | with:
154 | repository: AdguardTeam/AdGuardHome
155 |
156 | - name: Setup `Go`
157 | uses: actions/setup-go@v5
158 | with:
159 | go-version: ${{ needs.go.outputs.version }}
160 |
161 | - name: Adapt `Go` version
162 | run: |
163 | go get go@${{ needs.go.outputs.version }}
164 | go mod tidy
165 |
166 | - name: Setup `Node`
167 | uses: actions/setup-node@v4
168 | with:
169 | node-version: ${{ needs.node.outputs.version }}
170 |
171 | - name: Setup `Snapcraft`
172 | run: |
173 | sudo snap install snapcraft --classic
174 |
175 | - name: Build `AdGuard Home Beta`
176 | id: build
177 | run: |
178 | make SIGN=0 VERBOSE=1 ARCH=${{ matrix.goarch }} OS=${{ matrix.goos }} CHANNEL=beta VERSION=${{ env.beta_VERSION }} GOTOOLCHAIN=local build-release
179 |
180 | - name: Upload files to workspace
181 | uses: actions/upload-artifact@v4
182 | with:
183 | name: AdGuardHome_beta_${{ matrix.name }}
184 | path: '**/AdGuardHome/AdGuardHome*'
185 | compression-level: 9
186 |
187 | push_adguardhome:
188 | needs:
189 | - release_cross
190 | - release
191 | - beta_cross
192 | - beta
193 | runs-on: ubuntu-latest
194 | env:
195 | release_VERSION: ${{ needs.release.outputs.release_version }}
196 | release_TIME: ${{ needs.release.outputs.release_time }}
197 | beta_VERSION: ${{ needs.beta.outputs.beta_version }}
198 | beta_TIME: ${{ needs.beta.outputs.beta_time }}
199 | steps:
200 | - name: Clone Repository
201 | uses: actions/checkout@main
202 |
203 | - name: Download files from workspace
204 | uses: actions/download-artifact@v4
205 | with:
206 | path: ./tmp-AdGuardHome/
207 |
208 | - name: Batch move and rename `AdGuard Home` files
209 | run: |
210 | mkdir -p ./tmp-AdGuardHome/compress/
211 | archs=(amd64 armv5 armv6 armv7 arm64 mips_softfloat mipsle_softfloat)
212 | new_name=(amd64 armv5 armv6 armv7 armv8 mips_softfloat mipsle_softfloat)
213 | for ((i = 0; i < 7; i++)); do
214 | mv -f "./tmp-AdGuardHome/AdGuardHome_release_linux_${archs[i]}/dist/AdGuardHome_linux_${archs[i]//v/_}/AdGuardHome/AdGuardHome" "./tmp-AdGuardHome/compress/AdGuardHome_release_linux_${new_name[i]}"
215 | mv -f "./tmp-AdGuardHome/AdGuardHome_beta_linux_${archs[i]}/dist/AdGuardHome_linux_${archs[i]//v/_}/AdGuardHome/AdGuardHome" "./tmp-AdGuardHome/compress/AdGuardHome_beta_linux_${new_name[i]}"
216 | done
217 | chmod +x ./tmp-AdGuardHome/compress/*
218 |
219 | - name: Setup `upx` and compress `AdGuard Home` files
220 | uses: crazy-max/ghaction-upx@v3
221 | with:
222 | version: latest
223 | files: ./tmp-AdGuardHome/compress/*
224 |
225 | - name: Move `AdGuard Home` files
226 | run: |
227 | mkdir -p ./AdGuardHome/
228 | mv -f ./tmp-AdGuardHome/compress/* ./AdGuardHome/
229 | # `Release` for Windows
230 | mv -f ./tmp-AdGuardHome/AdGuardHome_release_windows_amd64/dist/AdGuardHome_windows_amd64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_release_windows_amd64.exe
231 | mv -f ./tmp-AdGuardHome/AdGuardHome_release_windows_arm64/dist/AdGuardHome_windows_arm64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_release_windows_arm64.exe
232 |
233 | # `Beta` for Windows
234 | mv -f ./tmp-AdGuardHome/AdGuardHome_beta_windows_amd64/dist/AdGuardHome_windows_amd64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_beta_windows_amd64.exe
235 | mv -f ./tmp-AdGuardHome/AdGuardHome_beta_windows_arm64/dist/AdGuardHome_windows_arm64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_beta_windows_arm64.exe
236 | rm -rf ./tmp*
237 |
238 | - name: Release and upload `AdGuardHome` assets
239 | uses: svenstaro/upload-release-action@v2
240 | with:
241 | repo_token: ${{ secrets.GITHUB_TOKEN }}
242 | release_name: AdGuardHome
243 | tag: AdGuardHome
244 | overwrite: true
245 | body: |
246 | 更新 [AdGuard Home Release 版](https://github.com/AdguardTeam/AdGuardHome/tree/beta-v0.107)至 ${{ env.release_VERSION }},发布于 ${{ env.release_TIME }}
247 | 更新 [AdGuard Home Beta 版](https://github.com/AdguardTeam/AdGuardHome/tree/beta-v0.108)至 ${{ env.beta_VERSION }},发布于 ${{ env.beta_TIME }}
248 | file_glob: true
249 | file: ./AdGuardHome/*
250 |
--------------------------------------------------------------------------------
/.github/workflows/update-dashboard.yml:
--------------------------------------------------------------------------------
1 | name: Update Dashboard
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: "30 17 * * *"
6 | push:
7 | branches:
8 | - main
9 | paths-ignore:
10 | - "README.md"
11 | - ".github/workflows/delete-old-workflows.yml"
12 | - ".github/workflows/update-adguardhome.yml"
13 | - ".github/workflows/update-mihomo.yml"
14 | - ".github/workflows/update-singbox.yml"
15 |
16 | jobs:
17 | Update:
18 | runs-on: ubuntu-latest
19 | steps:
20 | - name: Clone Repository
21 | uses: actions/checkout@main
22 |
23 | - name: Get `yacd` version and time
24 | run: |
25 | yacd_version=$(curl -sSL https://api.github.com/repos/haishanh/yacd/releases/latest | jq -r '.tag_name')
26 | echo "yacd_version=$yacd_version" >> ${GITHUB_ENV}
27 | yacd_time=$(curl -sSL https://api.github.com/repos/haishanh/yacd/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
28 | echo "yacd_time=$yacd_time" >> ${GITHUB_ENV}
29 |
30 | - name: Get `Yacd-meta` version and time
31 | run: |
32 | yacd_meta_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/Yacd-meta/releases/latest | jq -r '.tag_name')
33 | echo "yacd_meta_version=$yacd_meta_version" >> ${GITHUB_ENV}
34 | yacd_meta_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/Yacd-meta/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
35 | echo "yacd_meta_time=$yacd_meta_time" >> ${GITHUB_ENV}
36 |
37 | - name: Get `metacubexd` version and time
38 | run: |
39 | metacubexd_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/metacubexd/releases/latest | jq -r '.tag_name')
40 | echo "metacubexd_version=$metacubexd_version" >> ${GITHUB_ENV}
41 | metacubexd_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/metacubexd/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
42 | echo "metacubexd_time=$metacubexd_time" >> ${GITHUB_ENV}
43 |
44 | - name: Get `zashboard` version and time
45 | run: |
46 | zashboard_version=$(curl -sSL https://api.github.com/repos/Zephyruso/zashboard/releases/latest | jq -r '.tag_name')
47 | echo "zashboard_version=$zashboard_version" >> ${GITHUB_ENV}
48 | zashboard_time=$(curl -sSL https://api.github.com/repos/Zephyruso/zashboard/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
49 | echo "zashboard_time=$zashboard_time" >> ${GITHUB_ENV}
50 |
51 | - name: Download and compress `yacd` dashboard
52 | run: |
53 | mkdir -p ./Dashboard/ ./tmp/yacd/
54 | curl -o ./tmp/yacd/gh-pages.zip -L https://github.com/haishanh/yacd/archive/refs/heads/gh-pages.zip
55 | unzip -o ./tmp/yacd/gh-pages.zip -d ./tmp/yacd/
56 | tar -czf ./Dashboard/yacd.tar.gz -C ./tmp/yacd/yacd-gh-pages/ .
57 |
58 | - name: Download and compress `Yacd-meta` dashboard
59 | run: |
60 | mkdir -p ./tmp/Yacd-meta/
61 | curl -o ./tmp/Yacd-meta/gh-pages.zip -L https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip
62 | unzip -o ./tmp/Yacd-meta/gh-pages.zip -d ./tmp/Yacd-meta/
63 | tar -czf ./Dashboard/Yacd-meta.tar.gz -C ./tmp/Yacd-meta/Yacd-meta-gh-pages/ .
64 |
65 | - name: Download and compress `metacubexd` dashboard
66 | run: |
67 | mkdir -p ./tmp/metacubexd/
68 | curl -o ./tmp/metacubexd/gh-pages.zip -L https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip
69 | unzip -o ./tmp/metacubexd/gh-pages.zip -d ./tmp/metacubexd/
70 | tar -czf ./Dashboard/metacubexd.tar.gz -C ./tmp/metacubexd/metacubexd-gh-pages/ .
71 |
72 | - name: Download and compress `zashboard` dashboard
73 | run: |
74 | mkdir -p ./tmp/zashboard/
75 | curl -o ./tmp/zashboard/gh-pages.zip -L https://github.com/Zephyruso/zashboard/releases/latest/download/dist-cdn-fonts.zip
76 | unzip -o ./tmp/zashboard/gh-pages.zip -d ./tmp/zashboard/
77 | tar -czf ./Dashboard/zashboard.tar.gz -C ./tmp/zashboard/dist/ .
78 | rm -rf ./tmp*
79 |
80 | - name: Release and upload `Dashboard` assets
81 | uses: svenstaro/upload-release-action@v2
82 | with:
83 | repo_token: ${{ secrets.GITHUB_TOKEN }}
84 | release_name: Dashboard
85 | tag: Dashboard
86 | overwrite: true
87 | body: |
88 | 更新 [yacd 面板](https://github.com/haishanh/yacd)至 ${{ env.yacd_version }},发布于 ${{ env.yacd_time }}
89 | 更新 [Yacd-meta 面板](https://github.com/MetaCubeX/Yacd-meta)至 ${{ env.yacd_meta_version }},发布于 ${{ env.yacd_meta_time }}
90 | 更新 [metacubexd 面板](https://github.com/MetaCubeX/metacubexd)至 ${{ env.metacubexd_version }},发布于 ${{ env.metacubexd_time }}
91 | 更新 [zashboard 面板](https://github.com/Zephyruso/zashboard)至 ${{ env.zashboard_version }},发布于 ${{ env.zashboard_time }}
92 | file_glob: true
93 | file: ./Dashboard/*
94 |
--------------------------------------------------------------------------------
/.github/workflows/update-mihomo.yml:
--------------------------------------------------------------------------------
1 | name: Update mihomo
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: "0 18 * * *"
6 | push:
7 | branches:
8 | - main
9 | paths-ignore:
10 | - "README.md"
11 | - ".github/workflows/delete-old-workflows.yml"
12 | - ".github/workflows/update-adguardhome.yml"
13 | - ".github/workflows/update-dashboard.yml"
14 | - ".github/workflows/update-singbox.yml"
15 |
16 | jobs:
17 | go:
18 | runs-on: ubuntu-latest
19 | outputs:
20 | version: ${{ steps.go.outputs.version }}
21 | steps:
22 | - name: Get `Go` latest version
23 | id: go
24 | run: |
25 | echo version=$(curl -sSL https://raw.githubusercontent.com/actions/go-versions/update-versions-manifest-file/versions-manifest.json | jq -r '.[0].version') >> $GITHUB_OUTPUT
26 |
27 | meta:
28 | runs-on: ubuntu-latest
29 | outputs:
30 | meta_version: ${{ steps.meta.outputs.meta_version }}
31 | meta_tags: ${{ steps.meta.outputs.meta_tags }}
32 | meta_time: ${{ steps.meta.outputs.meta_time}}
33 | steps:
34 | - name: Get `mihomo Meta` version and time
35 | id: meta
36 | run: |
37 | meta_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | jq -r '.tag_name')
38 | echo "meta_version=$meta_version" >> $GITHUB_OUTPUT
39 | echo meta_tags=with_gvisor >> $GITHUB_OUTPUT
40 | meta_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
41 | echo "meta_time=$meta_time" >> $GITHUB_OUTPUT
42 |
43 | meta_cross:
44 | strategy:
45 | matrix:
46 | include:
47 | # Linux
48 | - { name: linux-amd64, goos: linux, goarch: amd64, goamd64: v1 }
49 | - { name: linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3 }
50 | - { name: linux-armv5, goos: linux, goarch: arm, goarm: 5 }
51 | - { name: linux-armv6, goos: linux, goarch: arm, goarm: 6 }
52 | - { name: linux-armv7, goos: linux, goarch: arm, goarm: 7 }
53 | - { name: linux-arm64, goos: linux, goarch: arm64 }
54 | - { name: linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat }
55 | - { name: linux-mipsle-softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
56 | - { name: linux-mipsle-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat }
57 | # Windows
58 | - { name: windows-amd64, goos: windows, goarch: amd64, goamd64: v1 }
59 | - { name: windows-amd64-v3, goos: windows, goarch: amd64, goamd64: v3 }
60 | - { name: windows-arm64, goos: windows, goarch: arm64 }
61 |
62 | fail-fast: false
63 | runs-on: ubuntu-latest
64 | needs:
65 | - go
66 | - meta
67 | env:
68 | GOOS: ${{ matrix.goos }}
69 | GOARCH: ${{ matrix.goarch }}
70 | GOAMD64: ${{ matrix.goamd64 }}
71 | GOARM: ${{ matrix.goarm }}
72 | GOMIPS: ${{ matrix.gomips }}
73 | CGO_ENABLED: 0
74 | meta_TAGS: ${{ needs.meta.outputs.meta_tags }}
75 | meta_VERSION: ${{ needs.meta.outputs.meta_version }}
76 | steps:
77 | - name: Checkout `Meta`
78 | uses: actions/checkout@v4
79 | with:
80 | repository: MetaCubeX/mihomo
81 | ref: Meta
82 |
83 | - name: Setup `Go`
84 | uses: actions/setup-go@v5
85 | with:
86 | go-version: ${{ needs.go.outputs.version }}
87 |
88 | - name: Set ENV
89 | run: |
90 | sudo timedatectl set-timezone "Asia/Shanghai"
91 | echo "BUILDTIME=$(date)" >> $GITHUB_ENV
92 | shell: bash
93 |
94 | - name: Build `mihomo Meta` core
95 | id: build
96 | run: go build -v -trimpath -ldflags "-X 'github.com/metacubex/mihomo/constant.Version=${meta_VERSION}' -X 'github.com/metacubex/mihomo/constant.BuildTime=${BUILDTIME}' -s -w -buildid=" -tags "${meta_TAGS}" -o meta
97 |
98 | - name: Upload files to workspace
99 | uses: actions/upload-artifact@v4
100 | with:
101 | name: mihomo-meta-${{ matrix.name }}
102 | path: meta*
103 | compression-level: 9
104 |
105 | alpha:
106 | runs-on: ubuntu-latest
107 | outputs:
108 | alpha_version: ${{ steps.alpha.outputs.alpha_version }}
109 | alpha_tags: ${{ steps.alpha.outputs.alpha_tags }}
110 | alpha_time: ${{ steps.alpha.outputs.alpha_time }}
111 | steps:
112 | - name: Get `mihomo Alpha` version and time
113 | id: alpha
114 | run: |
115 | alpha_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases | jq -r '[.[] | select(type=="object" and .tag_name=="Prerelease-Alpha")][0].assets[].name' | sed -n 's/.*-\(alpha-[^-]*\)\..*/\1/p' | head -n 1)
116 | echo "alpha_version=$alpha_version" >> $GITHUB_OUTPUT
117 | echo alpha_tags=with_gvisor >> $GITHUB_OUTPUT
118 | alpha_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases | jq -r '[.[] | select(.tag_name=="Prerelease-Alpha")][0].created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
119 | echo "alpha_time=$alpha_time" >> $GITHUB_OUTPUT
120 |
121 | alpha_cross:
122 | strategy:
123 | matrix:
124 | include:
125 | # Linux
126 | - { name: linux-amd64, goos: linux, goarch: amd64, goamd64: v1 }
127 | - { name: linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3 }
128 | - { name: linux-armv5, goos: linux, goarch: arm, goarm: 5 }
129 | - { name: linux-armv6, goos: linux, goarch: arm, goarm: 6 }
130 | - { name: linux-armv7, goos: linux, goarch: arm, goarm: 7 }
131 | - { name: linux-arm64, goos: linux, goarch: arm64 }
132 | - { name: linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat }
133 | - { name: linux-mipsle-softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
134 | - { name: linux-mipsle-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat }
135 | # Windows
136 | - { name: windows-amd64, goos: windows, goarch: amd64, goamd64: v1 }
137 | - { name: windows-amd64-v3, goos: windows, goarch: amd64, goamd64: v3 }
138 | - { name: windows-arm64, goos: windows, goarch: arm64 }
139 |
140 | fail-fast: false
141 | runs-on: ubuntu-latest
142 | needs:
143 | - go
144 | - alpha
145 | env:
146 | GOOS: ${{ matrix.goos }}
147 | GOARCH: ${{ matrix.goarch }}
148 | GOAMD64: ${{ matrix.goamd64 }}
149 | GOARM: ${{ matrix.goarm }}
150 | GOMIPS: ${{ matrix.gomips }}
151 | CGO_ENABLED: 0
152 | alpha_TAGS: ${{ needs.alpha.outputs.alpha_tags }}
153 | alpha_VERSION: ${{ needs.alpha.outputs.alpha_version }}
154 | steps:
155 | - name: Checkout `Alpha`
156 | uses: actions/checkout@v4
157 | with:
158 | repository: MetaCubeX/mihomo
159 | ref: Alpha
160 |
161 | - name: Setup `Go`
162 | uses: actions/setup-go@v5
163 | with:
164 | go-version: ${{ needs.go.outputs.version }}
165 |
166 | - name: Set ENV
167 | run: |
168 | sudo timedatectl set-timezone "Asia/Shanghai"
169 | echo "BUILDTIME=$(date)" >> $GITHUB_ENV
170 | shell: bash
171 |
172 | - name: Build `mihomo Alpha` core
173 | id: build
174 | run: go build -v -trimpath -ldflags "-X 'github.com/metacubex/mihomo/constant.Version=${alpha_VERSION}' -X 'github.com/metacubex/mihomo/constant.BuildTime=${BUILDTIME}' -s -w -buildid=" -tags "${alpha_TAGS}" -o meta
175 |
176 | - name: Upload files to workspace
177 | uses: actions/upload-artifact@v4
178 | with:
179 | name: mihomo-alpha-${{ matrix.name }}
180 | path: meta*
181 | compression-level: 9
182 |
183 | push_mihomo:
184 | needs:
185 | - meta_cross
186 | - meta
187 | - alpha_cross
188 | - alpha
189 | runs-on: ubuntu-latest
190 | env:
191 | meta_VERSION: ${{ needs.meta.outputs.meta_version }}
192 | meta_TIME: ${{ needs.meta.outputs.meta_time }}
193 | alpha_VERSION: ${{ needs.alpha.outputs.alpha_version }}
194 | alpha_TIME: ${{ needs.alpha.outputs.alpha_time }}
195 | steps:
196 | - name: Clone Repository
197 | uses: actions/checkout@main
198 |
199 | - name: Download files from workspace
200 | uses: actions/download-artifact@v4
201 | with:
202 | path: ./tmp-mihomo/
203 |
204 | - name: Zip `mihomo` cores by `tar`
205 | run: |
206 | mkdir -p ./tmp-mihomo/compress/
207 | archs=(amd64 amd64-v3 armv5 armv6 armv7 arm64 mips-softfloat mipsle-hardfloat mipsle-softfloat)
208 | new_name=(amd64 amd64v3 armv5 armv6 armv7 armv8 mips-softfloat mipsle-hardfloat mipsle-softfloat)
209 | # `Meta` cores
210 | for ((i = 0; i < 9; i++)); do
211 | mv -f "./tmp-mihomo/mihomo-meta-linux-${archs[i]}/meta" ./tmp-mihomo/CrashCore
212 | chmod +x ./tmp-mihomo/CrashCore
213 | tar --no-same-owner -czf "./tmp-mihomo/compress/mihomo-meta-linux-${new_name[i]}.tar.gz" -C ./tmp-mihomo/ ./CrashCore
214 | done
215 |
216 | # `Alpha` cores
217 | for ((i = 0; i < 9; i++)); do
218 | mv -f "./tmp-mihomo/mihomo-alpha-linux-${archs[i]}/meta" ./tmp-mihomo/CrashCore
219 | chmod +x ./tmp-mihomo/CrashCore
220 | tar --no-same-owner -czf "./tmp-mihomo/compress/mihomo-alpha-linux-${new_name[i]}.tar.gz" -C ./tmp-mihomo/ ./CrashCore
221 | done
222 |
223 | - name: Move `mihomo` cores
224 | run: |
225 | mkdir -p ./mihomo/
226 | mv -f ./tmp-mihomo/compress/* ./mihomo/
227 | # `Meta` cores for Windows
228 | mv -f ./tmp-mihomo/mihomo-meta-windows-amd64/meta ./mihomo/mihomo-meta-windows-amd64.exe
229 | mv -f ./tmp-mihomo/mihomo-meta-windows-amd64-v3/meta ./mihomo/mihomo-meta-windows-amd64v3.exe
230 | mv -f ./tmp-mihomo/mihomo-meta-windows-arm64/meta ./mihomo/mihomo-meta-windows-arm64.exe
231 |
232 | # `Alpha` cores for Windows
233 | mv -f ./tmp-mihomo/mihomo-alpha-windows-amd64/meta ./mihomo/mihomo-alpha-windows-amd64.exe
234 | mv -f ./tmp-mihomo/mihomo-alpha-windows-amd64-v3/meta ./mihomo/mihomo-alpha-windows-amd64v3.exe
235 | mv -f ./tmp-mihomo/mihomo-alpha-windows-arm64/meta ./mihomo/mihomo-alpha-windows-arm64.exe
236 | rm -rf ./tmp*
237 |
238 | - name: Release and upload `mihomo` assets
239 | uses: svenstaro/upload-release-action@v2
240 | with:
241 | repo_token: ${{ secrets.GITHUB_TOKEN }}
242 | release_name: mihomo
243 | tag: mihomo
244 | overwrite: true
245 | body: |
246 | 更新 [mihomo Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)至 ${{ env.meta_VERSION }},发布于 ${{ env.meta_TIME }}
247 | 更新 [mihomo Alpha 版](https://github.com/MetaCubeX/mihomo/tree/Alpha)至 ${{ env.alpha_VERSION }},发布于 ${{ env.alpha_TIME }}
248 | file_glob: true
249 | file: ./mihomo/*
250 |
--------------------------------------------------------------------------------
/.github/workflows/update-singbox.yml:
--------------------------------------------------------------------------------
1 | name: Update sing-box
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: "30 18 * * *"
6 | push:
7 | branches:
8 | - main
9 | paths-ignore:
10 | - "README.md"
11 | - ".github/workflows/delete-old-workflows.yml"
12 | - ".github/workflows/update-adguardhome.yml"
13 | - ".github/workflows/update-dashboard.yml"
14 | - ".github/workflows/update-mihomo.yml"
15 |
16 | jobs:
17 | go:
18 | runs-on: ubuntu-latest
19 | outputs:
20 | version: ${{ steps.go.outputs.version }}
21 | steps:
22 | - name: Get `Go` latest version
23 | id: go
24 | run: |
25 | echo version=$(curl -sSL https://raw.githubusercontent.com/actions/go-versions/update-versions-manifest-file/versions-manifest.json | jq -r '.[0].version') >> $GITHUB_OUTPUT
26 |
27 | puernya:
28 | runs-on: ubuntu-latest
29 | needs: go
30 | outputs:
31 | puernya_version: ${{ steps.puernya.outputs.puernya_version }}
32 | puernya_tags: ${{ steps.puernya.outputs.puernya_tags }}
33 | puernya_time: ${{ steps.puernya.outputs.puernya_time }}
34 | steps:
35 | - name: Checkout `building`
36 | uses: actions/checkout@v4
37 | with:
38 | repository: PuerNya/sing-box
39 | ref: building
40 | fetch-depth: 0
41 |
42 | - name: Setup `Go`
43 | uses: actions/setup-go@v5
44 | with:
45 | go-version: ${{ needs.go.outputs.version }}
46 |
47 | - name: Get `sing-box PuerNya` version
48 | id: puernya
49 | run: |
50 | git remote add sekai https://github.com/SagerNet/sing-box.git
51 | git fetch --tags sekai
52 | puernya_version=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
53 | echo "puernya_version=$puernya_version" >> $GITHUB_OUTPUT
54 | echo puernya_tags=with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_gvisor >> $GITHUB_OUTPUT
55 | puernya_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' $(echo "$puernya_version" | awk -F'-' '{print $3}'))
56 | echo "puernya_time=$puernya_time" >> $GITHUB_OUTPUT
57 |
58 | puernya_cross:
59 | strategy:
60 | matrix:
61 | include:
62 | # linux
63 | - { name: linux-amd64, goos: linux, goarch: amd64, goamd64: v1 }
64 | - { name: linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3 }
65 | - { name: linux-armv5, goos: linux, goarch: arm, goarm: 5 }
66 | - { name: linux-armv6, goos: linux, goarch: arm, goarm: 6 }
67 | - { name: linux-armv7, goos: linux, goarch: arm, goarm: 7 }
68 | - { name: linux-arm64, goos: linux, goarch: arm64 }
69 | - { name: linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat }
70 | - { name: linux-mipsle-softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
71 | - { name: linux-mipsle-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat }
72 | # windows
73 | - { name: windows-amd64, goos: windows, goarch: amd64, goamd64: v1 }
74 | - { name: windows-amd64-v3, goos: windows, goarch: amd64, goamd64: v3 }
75 | - { name: windows-arm64, goos: windows, goarch: arm64 }
76 |
77 | fail-fast: false
78 | runs-on: ubuntu-latest
79 | needs:
80 | - go
81 | - puernya
82 | env:
83 | GOOS: ${{ matrix.goos }}
84 | GOARCH: ${{ matrix.goarch }}
85 | GOAMD64: ${{ matrix.goamd64 }}
86 | GOARM: ${{ matrix.goarm }}
87 | GOMIPS: ${{ matrix.gomips }}
88 | CGO_ENABLED: 0
89 | puernya_TAGS: ${{ needs.puernya.outputs.puernya_tags }}
90 | puernya_VERSION: ${{ needs.puernya.outputs.puernya_version }}
91 | steps:
92 | - name: Checkout `building`
93 | uses: actions/checkout@v4
94 | with:
95 | repository: PuerNya/sing-box
96 | ref: building
97 |
98 | - name: Fix sniff
99 | run: sed -i 's/sniffHosts/sniffHost/' ./experimental/clashapi/trafficontrol/tracker.go
100 |
101 | - name: Setup `Go`
102 | uses: actions/setup-go@v5
103 | with:
104 | go-version: ${{ needs.go.outputs.version }}
105 |
106 | - name: Build `sing-box PuerNya` core
107 | id: build
108 | run: go build -v -trimpath -ldflags "-checklinkname=0 -X 'github.com/sagernet/sing-box/constant.Version=${puernya_VERSION}' -s -w -buildid=" -tags "${puernya_TAGS}" ./cmd/sing-box
109 |
110 | - name: Upload files to workspace
111 | uses: actions/upload-artifact@v4
112 | with:
113 | name: sing-box-puernya-${{ matrix.name }}
114 | path: sing-box*
115 | compression-level: 9
116 |
117 | release:
118 | runs-on: ubuntu-latest
119 | outputs:
120 | release_version: ${{ steps.release.outputs.release_version }}
121 | release_tags: ${{ steps.release.outputs.release_tags }}
122 | release_time: ${{ steps.release.outputs.release_time }}
123 | steps:
124 | - name: Get `sing-box Release` version and time
125 | id: release
126 | run: |
127 | release_version=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases/latest | jq -r '.tag_name')
128 | echo "release_version=$release_version" >> $GITHUB_OUTPUT
129 | echo release_tags=with_gvisor,with_dhcp,with_wireguard,with_clash_api,with_quic,with_utls,with_ech >> $GITHUB_OUTPUT
130 | release_time=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
131 | echo "release_time=$release_time" >> $GITHUB_OUTPUT
132 |
133 | release_cross:
134 | strategy:
135 | matrix:
136 | include:
137 | # linux
138 | - { name: linux-amd64, goos: linux, goarch: amd64, goamd64: v1 }
139 | - { name: linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3 }
140 | - { name: linux-armv5, goos: linux, goarch: arm, goarm: 5 }
141 | - { name: linux-armv6, goos: linux, goarch: arm, goarm: 6 }
142 | - { name: linux-armv7, goos: linux, goarch: arm, goarm: 7 }
143 | - { name: linux-arm64, goos: linux, goarch: arm64 }
144 | - { name: linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat }
145 | - { name: linux-mipsle-softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
146 | - { name: linux-mipsle-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat }
147 | # windows
148 | - { name: windows-amd64, goos: windows, goarch: amd64, goamd64: v1 }
149 | - { name: windows-amd64-v3, goos: windows, goarch: amd64, goamd64: v3 }
150 | - { name: windows-arm64, goos: windows, goarch: arm64 }
151 |
152 | fail-fast: false
153 | runs-on: ubuntu-latest
154 | needs:
155 | - go
156 | - release
157 | env:
158 | GOOS: ${{ matrix.goos }}
159 | GOARCH: ${{ matrix.goarch }}
160 | GOAMD64: ${{ matrix.goamd64 }}
161 | GOARM: ${{ matrix.goarm }}
162 | GOMIPS: ${{ matrix.gomips }}
163 | CGO_ENABLED: 0
164 | release_TAGS: ${{ needs.release.outputs.release_tags }}
165 | release_VERSION: ${{ needs.release.outputs.release_version }}
166 | steps:
167 | - name: Checkout `main`
168 | uses: actions/checkout@v4
169 | with:
170 | repository: SagerNet/sing-box
171 | ref: main
172 |
173 | - name: Setup `Go`
174 | uses: actions/setup-go@v5
175 | with:
176 | go-version: ${{ needs.go.outputs.version }}
177 |
178 | - name: Build `sing-box Release` core
179 | id: build
180 | run: go build -v -trimpath -ldflags "-checklinkname=0 -X 'github.com/sagernet/sing-box/constant.Version=${release_VERSION}' -s -w -buildid=" -tags "${release_TAGS}" ./cmd/sing-box
181 |
182 | - name: Upload files to workspace
183 | uses: actions/upload-artifact@v4
184 | with:
185 | name: sing-box-release-${{ matrix.name }}
186 | path: sing-box*
187 | compression-level: 9
188 |
189 | dev:
190 | runs-on: ubuntu-latest
191 | outputs:
192 | dev_version: ${{ steps.dev.outputs.dev_version }}
193 | dev_tags: ${{ steps.dev.outputs.dev_tags }}
194 | dev_time: ${{ steps.dev.outputs.dev_time }}
195 | steps:
196 | - name: Get `sing-box Dev` version and time
197 | id: dev
198 | run: |
199 | dev_version=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases | jq -r '[.[] | select(.tag_name | test("alpha|beta|rc"))][0].tag_name')
200 | echo "dev_version=$dev_version" >> $GITHUB_OUTPUT
201 | echo dev_tags=with_gvisor,with_dhcp,with_wireguard,with_clash_api,with_quic,with_utls,with_tailscale >> $GITHUB_OUTPUT
202 | dev_time=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases | jq -r '[.[] | select(.tag_name | test("alpha|beta|rc"))][0].created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
203 | echo "dev_time=$dev_time" >> $GITHUB_OUTPUT
204 |
205 | dev_cross:
206 | strategy:
207 | matrix:
208 | include:
209 | # linux
210 | - { name: linux-amd64, goos: linux, goarch: amd64, goamd64: v1 }
211 | - { name: linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3 }
212 | - { name: linux-armv5, goos: linux, goarch: arm, goarm: 5 }
213 | - { name: linux-armv6, goos: linux, goarch: arm, goarm: 6 }
214 | - { name: linux-armv7, goos: linux, goarch: arm, goarm: 7 }
215 | - { name: linux-arm64, goos: linux, goarch: arm64 }
216 | - { name: linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat }
217 | - { name: linux-mipsle-softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
218 | - { name: linux-mipsle-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat }
219 | # windows
220 | - { name: windows-amd64, goos: windows, goarch: amd64, goamd64: v1 }
221 | - { name: windows-amd64-v3, goos: windows, goarch: amd64, goamd64: v3 }
222 | - { name: windows-arm64, goos: windows, goarch: arm64 }
223 |
224 | fail-fast: false
225 | runs-on: ubuntu-latest
226 | needs:
227 | - go
228 | - dev
229 | env:
230 | GOOS: ${{ matrix.goos }}
231 | GOARCH: ${{ matrix.goarch }}
232 | GOAMD64: ${{ matrix.goamd64 }}
233 | GOARM: ${{ matrix.goarm }}
234 | GOMIPS: ${{ matrix.gomips }}
235 | CGO_ENABLED: 0
236 | dev_TAGS: ${{ needs.dev.outputs.dev_tags }}
237 | dev_VERSION: ${{ needs.dev.outputs.dev_version }}
238 | steps:
239 | - name: Checkout `dev`
240 | uses: actions/checkout@v4
241 | with:
242 | repository: SagerNet/sing-box
243 | ref: dev
244 |
245 | - name: Setup `Go`
246 | uses: actions/setup-go@v5
247 | with:
248 | go-version: ${{ needs.go.outputs.version }}
249 |
250 | - name: Build `sing-box Dev` core
251 | id: build
252 | run: go build -v -trimpath -ldflags "-checklinkname=0 -X 'github.com/sagernet/sing-box/constant.Version=${dev_VERSION}' -s -w -buildid=" -tags "${dev_TAGS}" ./cmd/sing-box
253 |
254 | - name: Upload files to workspace
255 | uses: actions/upload-artifact@v4
256 | with:
257 | name: sing-box-dev-${{ matrix.name }}
258 | path: sing-box*
259 | compression-level: 9
260 |
261 | push_sing-box:
262 | needs:
263 | - puernya_cross
264 | - puernya
265 | - release_cross
266 | - release
267 | - dev_cross
268 | - dev
269 | runs-on: ubuntu-latest
270 | env:
271 | puernya_VERSION: ${{ needs.puernya.outputs.puernya_version }}
272 | puernya_TIME: ${{ needs.puernya.outputs.puernya_time }}
273 | release_VERSION: ${{ needs.release.outputs.release_version }}
274 | release_TIME: ${{ needs.release.outputs.release_time }}
275 | dev_VERSION: ${{ needs.dev.outputs.dev_version }}
276 | dev_TIME: ${{ needs.dev.outputs.dev_time }}
277 | steps:
278 | - name: Clone Repository
279 | uses: actions/checkout@main
280 |
281 | - name: Download files from workspace
282 | uses: actions/download-artifact@v4
283 | with:
284 | path: ./tmp-sing-box/
285 |
286 | - name: Zip `sing-box` cores by `tar`
287 | run: |
288 | mkdir -p ./tmp-sing-box/compress/
289 | archs=(amd64 amd64-v3 armv5 armv6 armv7 arm64 mips-softfloat mipsle-hardfloat mipsle-softfloat)
290 | new_name=(amd64 amd64v3 armv5 armv6 armv7 armv8 mips-softfloat mipsle-hardfloat mipsle-softfloat)
291 | # `PuerNya` cores
292 | for ((i = 0; i < 9; i++)); do
293 | mv -f "./tmp-sing-box/sing-box-puernya-linux-${archs[i]}/sing-box" ./tmp-sing-box/CrashCore
294 | chmod +x ./tmp-sing-box/CrashCore
295 | tar --no-same-owner -czf "./tmp-sing-box/compress/sing-box-puernya-linux-${new_name[i]}.tar.gz" -C ./tmp-sing-box/ ./CrashCore
296 | done
297 |
298 | # `Release` cores
299 | for ((i = 0; i < 9; i++)); do
300 | mv -f "./tmp-sing-box/sing-box-release-linux-${archs[i]}/sing-box" ./tmp-sing-box/CrashCore
301 | chmod +x ./tmp-sing-box/CrashCore
302 | tar --no-same-owner -czf "./tmp-sing-box/compress/sing-box-release-linux-${new_name[i]}.tar.gz" -C ./tmp-sing-box/ ./CrashCore
303 | done
304 |
305 | # `dev` cores
306 | for ((i = 0; i < 9; i++)); do
307 | mv -f "./tmp-sing-box/sing-box-dev-linux-${archs[i]}/sing-box" ./tmp-sing-box/CrashCore
308 | chmod +x ./tmp-sing-box/CrashCore
309 | tar --no-same-owner -czf "./tmp-sing-box/compress/sing-box-dev-linux-${new_name[i]}.tar.gz" -C ./tmp-sing-box/ ./CrashCore
310 | done
311 |
312 | - name: Move `sing-box` cores
313 | run: |
314 | mkdir -p ./sing-box/
315 | mv -f ./tmp-sing-box/compress/* ./sing-box/
316 | # `PuerNya` cores for Windows
317 | mv -f ./tmp-sing-box/sing-box-puernya-windows-amd64/sing-box.exe ./sing-box/sing-box-puernya-windows-amd64.exe
318 | mv -f ./tmp-sing-box/sing-box-puernya-windows-amd64-v3/sing-box.exe ./sing-box/sing-box-puernya-windows-amd64v3.exe
319 | mv -f ./tmp-sing-box/sing-box-puernya-windows-arm64/sing-box.exe ./sing-box/sing-box-puernya-windows-arm64.exe
320 |
321 | # `Release` cores for Windows
322 | mv -f ./tmp-sing-box/sing-box-release-windows-amd64/sing-box.exe ./sing-box/sing-box-release-windows-amd64.exe
323 | mv -f ./tmp-sing-box/sing-box-release-windows-amd64-v3/sing-box.exe ./sing-box/sing-box-release-windows-amd64v3.exe
324 | mv -f ./tmp-sing-box/sing-box-release-windows-arm64/sing-box.exe ./sing-box/sing-box-release-windows-arm64.exe
325 |
326 | # `dev` cores for Windows
327 | mv -f ./tmp-sing-box/sing-box-dev-windows-amd64/sing-box.exe ./sing-box/sing-box-dev-windows-amd64.exe
328 | mv -f ./tmp-sing-box/sing-box-dev-windows-amd64-v3/sing-box.exe ./sing-box/sing-box-dev-windows-amd64v3.exe
329 | mv -f ./tmp-sing-box/sing-box-dev-windows-arm64/sing-box.exe ./sing-box/sing-box-dev-windows-arm64.exe
330 | rm -rf ./tmp*
331 |
332 | - name: Release and upload `sing-box` assets
333 | uses: svenstaro/upload-release-action@v2
334 | with:
335 | repo_token: ${{ secrets.GITHUB_TOKEN }}
336 | release_name: sing-box
337 | tag: sing-box
338 | overwrite: true
339 | body: |
340 | 更新 [sing-box PuerNya 版](https://github.com/PuerNya/sing-box/tree/building)至 v${{ env.puernya_VERSION }},发布于 ${{ env.puernya_TIME }}
341 | 更新 [sing-box Release 版](https://github.com/SagerNet/sing-box/tree/main)至 ${{ env.release_VERSION }},发布于 ${{ env.release_TIME }}
342 | 更新 [sing-box Dev 版](https://github.com/SagerNet/sing-box/tree/dev)至 ${{ env.dev_VERSION }},发布于 ${{ env.dev_TIME }}
343 | file_glob: true
344 | file: ./sing-box/*
345 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 更新 [mihomo 内核](https://github.com/MetaCubeX/mihomo)、[sing-box 内核](https://github.com/SagerNet/sing-box)、[sing-box PuerNya 版内核](https://github.com/PuerNya/sing-box/tree/building)、Dashboard 面板和 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome)
2 | # 一、 说明
3 | 每天凌晨(北京时间 UTC+8)自动构建生成:
4 | 1. [Clash Premium Release 版和 Nightly 版内核](https://github.com/DustinWin/proxy-tools/releases/tag/Clash-Premium)(已停更)
5 | 2. mihomo [Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)和 [Alpha 版](https://github.com/MetaCubeX/mihomo/tree/Alpha)内核
6 | 3. sing-box [Release 版](https://github.com/SagerNet/sing-box/tree/main)、[Dev 版](https://github.com/SagerNet/sing-box/tree/dev)和 [PuerNya 版](https://github.com/PuerNya/sing-box/tree/building)(支持[出站提供者](https://sing-boxp.dustinwin.top/zh/configuration/provider/) `outbound_providers`,类似于 mihomo 内核的[代理集合](https://wiki.metacubex.one/config/proxy-providers/) `proxy-providers`)内核
7 | 4. Dashboard 面板:[yacd 面板](https://github.com/haishanh/yacd)、[Yacd-meta 面板](https://github.com/MetaCubeX/Yacd-meta)、[metacubexd 面板](https://github.com/MetaCubeX/metacubexd)和 [zashboard 面板](https://github.com/Zephyruso/zashboard)
8 | 5. AdGuard Home [Release 版](https://github.com/AdguardTeam/AdGuardHome/tree/beta-v0.107)和 [Beta 版](https://github.com/AdguardTeam/AdGuardHome/tree/beta-v0.108)
9 |
10 | **注:**
11 | - 1. 本教程中的下载链接以 CPU 架构 ARMv8 为例,请注意修改链接后缀
12 | - 2. 查看 CPU 架构可连接 SSH 后执行命令 `uname -ms`,若执行结果是“linux aarch64”,就是搭载的 ARMv8 架构
13 | - 3. 对下载源的说明,可[点此](https://proxy-tutorials.dustinwin.top/about/#%E5%AF%B9%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%9A%84%E8%AF%B4%E6%98%8E)了解
14 |
15 | # 二、 使用方法
16 | ## 1. 导入内核(以 [ShellCrash](https://github.com/juewuy/ShellCrash) 导入内核为例)
17 | **mihomo 内核和 sing-box 内核 Linux 版下载链接后缀和 CPU 架构对应关系如下表:**
18 | |CPU 架构|AMD64|AMD64v3|ARMv5|ARMv6|ARMv7|ARMv8&ARM64&AArch64|mips-softfloat|mipsle-hardfloat|mipsle-softfloat|
19 | |-----|-----|-----|-----|-----|-----|:---:|-----|-----|-----|
20 | |**链接后缀**|`amd64`|`amd64v3`|`armv5`|`armv6`|`armv7`|`armv8`|`mips-softfloat`|`mipsle-hardfloat`|`mipsle-softfloat`|
21 |
22 |
23 | ① 首次导入
24 |
25 | 连接 SSH 后执行如下命令:
26 | ```shell
27 | # mihomo 内核 Meta 版
28 | curl -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/mihomo/mihomo-meta-linux-armv8.tar.gz | tar -zx -C /tmp/ && crash
29 | # mihomo 内核 Alpha 版
30 | curl -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/mihomo/mihomo-alpha-linux-armv8.tar.gz | tar -zx -C /tmp/ && crash
31 | # sing-box 内核 PuerNya 版
32 | curl -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/sing-box/sing-box-puernya-linux-armv8.tar.gz | tar -zx -C /tmp/ && crash
33 | # sing-box 内核 Release 版
34 | curl -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/sing-box/sing-box-release-linux-armv8.tar.gz | tar -zx -C /tmp/ && crash
35 | # sing-box 内核 Dev 版
36 | curl -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/sing-box/sing-box-dev-linux-armv8.tar.gz | tar -zx -C /tmp/ && crash
37 | ```
38 | 此时脚本会自动“发现可用的内核文件”,选择 1 加载,后选择对应的内核
39 |
40 |
41 | ② 升级导入(ShellCrash -> 9 更新/卸载 -> 2 切换内核文件,内核版本不会刷新)
42 |
43 | 连接 SSH 后执行如下命令:
44 | ```shell
45 | # mihomo 内核 Meta 版
46 | curl -o $CRASHDIR/CrashCore.tar.gz -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/mihomo/mihomo-meta-linux-armv8.tar.gz && $CRASHDIR/start.sh restart
47 | # mihomo 内核 Alpha 版
48 | curl -o $CRASHDIR/CrashCore.tar.gz -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/mihomo/mihomo-alpha-linux-armv8.tar.gz && $CRASHDIR/start.sh restart
49 | # sing-box 内核 PuerNya 版
50 | curl -o $CRASHDIR/CrashCore.tar.gz -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/sing-box/sing-box-puernya-linux-armv8.tar.gz && $CRASHDIR/start.sh restart
51 | # sing-box 内核 Release 版
52 | curl -o $CRASHDIR/CrashCore.tar.gz -L https://cdn.jsdelivr.net/gh/DustinWin/proxy-tools/@sing-box/sing-box-release-linux-armv8.tar.gz && $CRASHDIR/start.sh restart
53 | # sing-box 内核 Dev 版
54 | curl -o $CRASHDIR/CrashCore.tar.gz -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/sing-box/sing-box-dev-linux-armv8.tar.gz && $CRASHDIR/start.sh restart
55 | ```
56 |
57 |
58 | ## 2. 安装 Dashboard 面板(以 ShellCrash 安装 metacubexd 面板为例)
59 | **Dashboard 面板对应文件名和网址关系如下表:**
60 | |面板名称|文件名|网址|
61 | |-----|-----|-----|
62 | |yacd 面板|`yacd.tar.gz`||
63 | |Yacd-meta 面板|`Yacd-meta.tar.gz`||
64 | |metacubexd 面板|`metacubexd.tar.gz`||
65 | |zashboard 面板|`zashboard.tar.gz`||
66 |
67 | 连接 SSH 后执行如下命令:
68 | ```shell
69 | curl -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/Dashboard/metacubexd.tar.gz | tar -zx -C $CRASHDIR/ui/ && $CRASHDIR/start.sh restart
70 | ```
71 | - 注:若使用基于 [Chromium 项目](https://www.chromium.org/Home/)开发的浏览器打开网址去访问 Dashboard 面板时,以 [Chrome 浏览器](https://www.google.com/chrome/)为例,需要设置该网址域名“允许显示不安全内容”。方法如下:
72 | 进入设置 -> 隐私和安全 -> 网站设置 -> 更多内容设置 -> 不安全内容(或者地址栏直接打开 chrome://settings/content/insecureContent 进行设置),在“允许显示不安全内容”内添加网址域名如:`metacubex.github.io`
73 |
74 | ## 3. 安装 AdGuard Home
75 | **AdGuard Home Linux 版 CPU 架构和链接后缀对应关系如下表:**
76 | |CPU 架构|AMD64|ARMv5|ARMv6|ARMv7|ARMv8|mips-softfloat|mipsle-softfloat|
77 | |-----|-----|-----|-----|-----|-----|-----|-----|
78 | |**链接后缀**|`amd64`|`armv5`|`armv6`|`armv7`|`armv8`|`mips-softfloat`|`mipsle-softfloat`|
79 |
80 |
81 | ① 安装 AdGuard Home
82 |
83 | 连接 SSH 后执行如下命令:
84 | ```shell
85 | mkdir -p /data/AdGuardHome
86 | # AdGuard Home Release 版
87 | curl -o /data/AdGuardHome/AdGuardHome -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/AdGuardHome/AdGuardHome_release_linux_armv8
88 | # AdGuard Home Beta 版
89 | curl -o /data/AdGuardHome/AdGuardHome -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/AdGuardHome/AdGuardHome_beta_linux_armv8
90 | chmod +x /data/AdGuardHome/AdGuardHome
91 | /data/AdGuardHome/AdGuardHome -s install
92 | /data/AdGuardHome/AdGuardHome -s start
93 | ```
94 |
95 |
96 | ② 升级 AdGuard Home
97 |
98 | 连接 SSH 后执行如下命令:
99 | ```shell
100 | # AdGuard Home Release 版
101 | curl -o /data/AdGuardHome/AdGuardHome -L https://ghgo.xyz/https://github.com/DustinWin/proxy-tools/releases/download/AdGuardHome/AdGuardHome_release_linux_armv8
102 | # AdGuard Home Beta 版
103 | curl -o /data/AdGuardHome/AdGuardHome -L https://ghgo.xyz/https://github.com/DustinWin/proxy-tools/releases/download/AdGuardHome/AdGuardHome_beta_linux_armv8
104 | /data/AdGuardHome/AdGuardHome -s restart
105 | ```
106 |
107 |
108 | # 三、 扩展(以 ShellCrash 配置定时任务为例)
109 | 可在 ShellCrash 里添加定时更新 mihomo 内核、sing-box 内核、metacubexd 面板和 AdGuard Home 的任务
110 | 1. 连接 SSH 后执行 `vi $CRASHDIR/task/task.user`,按一下 Ins 键(Insert 键),粘贴如下内容:
111 | 注:
112 | - 1. 留意链接后缀是否与 CPU 架构匹配
113 | - 2. ShellCrash 安装路径为 */data/ShellCrash*
114 |
115 | ```shell
116 | 201#curl -o /data/ShellCrash/CrashCore.tar.gz -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/mihomo/mihomo-meta-linux-armv8.tar.gz && /data/ShellCrash/start.sh restart >/dev/null 2>&1#更新mihomo内核
117 | 202#curl -o /data/ShellCrash/CrashCore.tar.gz -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/sing-box/sing-box-puernya-linux-armv8.tar.gz && /data/ShellCrash/start.sh restart >/dev/null 2>&1#更新sing-box_PuerNya版内核
118 | 203#curl -o /data/ShellCrash/CrashCore.tar.gz -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/sing-box/sing-box-release-linux-armv8.tar.gz && /data/ShellCrash/start.sh restart >/dev/null 2>&1#更新sing-box内核
119 | 204#curl -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/Dashboard/metacubexd.tar.gz | tar -zx -C $CRASHDIR/ui/ && /data/ShellCrash/start.sh restart >/dev/null 2>&1#更新metacubexd面板
120 | 205#curl -o /data/AdGuardHome/AdGuardHome -L https://ghfast.top/https://github.com/DustinWin/proxy-tools/releases/download/AdGuardHome/AdGuardHome_beta_linux_armv8 && /data/AdGuardHome/AdGuardHome -s restart >/dev/null 2>&1#更新AdGuardHome
121 | ```
122 | 2. 按一下 Esc 键(退出键),输入英文冒号 `:`,继续输入 `wq` 并回车
123 | 3. 执行 `crash`,进入 ShellCrash -> 5 配置自动任务 -> 1 添加自动任务,可以看到末尾就有添加的定时任务,输入对应的数字并回车后可设置执行条件
124 |
125 | # 给作者加鸡腿
126 |
127 |
128 |
129 | # 机场推荐
130 | [Bitz Net](https://new.bnaffloop.com/#/register?code=HT0ALWZq)(仅次于一线机场,推荐打折时购买)
131 | 88 折优惠码:`512025`(有效期至 2025 年 5 月 2 日 23:59 分)
--------------------------------------------------------------------------------