Skip to content

Commit 251f7be

Browse files
committed
feat: add managed upstream proxy support
1 parent 3fd3b7c commit 251f7be

24 files changed

Lines changed: 3235 additions & 218 deletions

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ jobs:
144144
- test:e2e:version-update
145145
- test:e2e:nodeform-config-preservation
146146
- test:e2e:dashboard-concurrency-replace
147+
- test:e2e:upstream-proxy
147148
steps:
148149
- uses: actions/checkout@v4
149150

@@ -177,6 +178,66 @@ jobs:
177178
run: npm run ${{ matrix.script }}
178179
working-directory: frontend
179180

181+
test-upstream-full-stack:
182+
runs-on: ubuntu-latest
183+
timeout-minutes: 15
184+
steps:
185+
- uses: actions/checkout@v4
186+
187+
- name: Set up Node.js
188+
uses: actions/setup-node@v4
189+
with:
190+
node-version: ${{ env.NODE_VERSION }}
191+
cache: npm
192+
cache-dependency-path: frontend/package-lock.json
193+
194+
- name: Install and build frontend
195+
run: |
196+
npm ci
197+
npm run build
198+
working-directory: frontend
199+
200+
- name: Set up Go
201+
uses: actions/setup-go@v5
202+
with:
203+
go-version: ${{ env.GO_VERSION }}
204+
205+
- name: Install pinned sing-box test kernel
206+
run: |
207+
archive="sing-box-${SINGBOX_VERSION}-linux-amd64.tar.gz"
208+
curl --fail --location --silent --show-error \
209+
--output "${RUNNER_TEMP}/${archive}" \
210+
"https://github.com/SagerNet/sing-box/releases/download/v${SINGBOX_VERSION}/${archive}"
211+
echo "${SINGBOX_LINUX_AMD64_SHA256} ${RUNNER_TEMP}/${archive}" | sha256sum --check --strict
212+
tar --extract --gzip --file "${RUNNER_TEMP}/${archive}" --directory "${RUNNER_TEMP}"
213+
binary="${RUNNER_TEMP}/sing-box-${SINGBOX_VERSION}-linux-amd64/sing-box"
214+
chmod +x "${binary}"
215+
echo "SINGBOX_TEST_BINARY=${binary}" >> "${GITHUB_ENV}"
216+
217+
- name: Build backend for full-stack test
218+
run: CGO_ENABLED=0 go build -tags frontend_dist -o "${RUNNER_TEMP}/sbpm-upstream-e2e-backend" ./backend
219+
220+
- name: Resolve browser path
221+
run: |
222+
if command -v google-chrome >/dev/null 2>&1; then
223+
echo "PUPPETEER_EXECUTABLE_PATH=$(command -v google-chrome)" >> "$GITHUB_ENV"
224+
elif command -v google-chrome-stable >/dev/null 2>&1; then
225+
echo "PUPPETEER_EXECUTABLE_PATH=$(command -v google-chrome-stable)" >> "$GITHUB_ENV"
226+
elif command -v chromium-browser >/dev/null 2>&1; then
227+
echo "PUPPETEER_EXECUTABLE_PATH=$(command -v chromium-browser)" >> "$GITHUB_ENV"
228+
elif command -v chromium >/dev/null 2>&1; then
229+
echo "PUPPETEER_EXECUTABLE_PATH=$(command -v chromium)" >> "$GITHUB_ENV"
230+
else
231+
echo "::error::No Chrome/Chromium executable found on runner."
232+
exit 1
233+
fi
234+
235+
- name: Run live upstream full-stack regression
236+
run: npm run test:e2e:full-stack-upstream
237+
working-directory: frontend
238+
env:
239+
SBPM_E2E_BACKEND_BINARY: ${{ runner.temp }}/sbpm-upstream-e2e-backend
240+
180241
test-system-local-deploy:
181242
runs-on: ubuntu-latest
182243
needs:
@@ -186,6 +247,7 @@ jobs:
186247
- test-backend
187248
- test-frontend-build
188249
- test-frontend-e2e
250+
- test-upstream-full-stack
189251
steps:
190252
- uses: actions/checkout@v4
191253

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<img src="./logo.svg" alt="SingBox Proxy Manager Logo" width="96" />
66

7-
![Version](https://img.shields.io/badge/version-1.6.0-blue.svg)
7+
![Version](https://img.shields.io/badge/version-1.7.0-blue.svg)
88
![License](https://img.shields.io/badge/license-MIT-green.svg)
99
![SingBox](https://img.shields.io/badge/sing--box-1.12.12-orange.svg)
1010

0 commit comments

Comments
 (0)