From 5da9686c27209a509f0aae23787475ba102af9d8 Mon Sep 17 00:00:00 2001 From: Dmitriy Petrov Date: Sun, 9 Aug 2026 13:05:51 +0300 Subject: [PATCH] Update sing-box to 1.13.18 --- .env.example | 2 +- .gitea/workflows/gateway-build.yml | 2 +- Dockerfile | 2 +- Dockerfile.client | 2 +- Dockerfile.runtime-base | 2 +- docker-compose.client.yml | 2 +- docker-compose.gateway.yml | 2 +- scripts/build-on-107-deploy-111.sh | 2 +- scripts/build-runtime-base.sh | 2 +- src/server/singbox.ts | 1 - src/shared/versions.ts | 4 ++-- test/server/compiled-entrypoint.test.js | 16 ++++++++++++++++ test/server/singbox-client-mode.test.js | 2 +- 13 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index ba96f54..34a04e7 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,7 @@ CLIENT_UI_PORT=3456 CLIENT_PROXY_PORT=8082 HARBOR_GATEWAY_CONTROL_PORT=3456 BASE_IMAGE=debian:bookworm-slim -SINGBOX_VERSION=1.12.13 +SINGBOX_VERSION=1.13.18 INSTALL_RUNTIME_DEPS=true INSTALL_SINGBOX=true PROXY_PORT=8080 diff --git a/.gitea/workflows/gateway-build.yml b/.gitea/workflows/gateway-build.yml index bf6f638..0e56d10 100644 --- a/.gitea/workflows/gateway-build.yml +++ b/.gitea/workflows/gateway-build.yml @@ -12,7 +12,7 @@ env: RUNTIME_BASE_SOURCE_IMAGE: mirror.gcr.io/library/debian:bookworm-slim APT_MIRROR: http://mirror.yandex.ru/debian APT_SECURITY_MIRROR: http://mirror.yandex.ru/debian-security - SINGBOX_VERSION: 1.12.13 + SINGBOX_VERSION: 1.13.18 jobs: build-and-push: diff --git a/Dockerfile b/Dockerfile index 0aa06bf..16b86e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY monitoring/grafana/harbor-gateway.json ./monitoring/grafana/harbor-gateway. RUN npm run build:production FROM ${BASE_IMAGE} -ARG SINGBOX_VERSION=1.12.13 +ARG SINGBOX_VERSION=1.13.18 ARG INSTALL_RUNTIME_DEPS=true ARG INSTALL_SINGBOX=true diff --git a/Dockerfile.client b/Dockerfile.client index d40ddf8..2843f14 100644 --- a/Dockerfile.client +++ b/Dockerfile.client @@ -13,7 +13,7 @@ COPY monitoring/grafana/harbor-gateway.json ./monitoring/grafana/harbor-gateway. RUN npm run build:production FROM ${RUNTIME_IMAGE} -ARG SINGBOX_VERSION=1.12.13 +ARG SINGBOX_VERSION=1.13.18 RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl dumb-init nodejs tar \ diff --git a/Dockerfile.runtime-base b/Dockerfile.runtime-base index a2f59af..4014b30 100644 --- a/Dockerfile.runtime-base +++ b/Dockerfile.runtime-base @@ -1,6 +1,6 @@ ARG BASE_IMAGE=mirror.gcr.io/library/debian:bookworm-slim FROM ${BASE_IMAGE} -ARG SINGBOX_VERSION=1.12.13 +ARG SINGBOX_VERSION=1.13.18 ARG APT_MIRROR=http://mirror.yandex.ru/debian ARG APT_SECURITY_MIRROR=http://mirror.yandex.ru/debian-security ARG HTTP_PROXY diff --git a/docker-compose.client.yml b/docker-compose.client.yml index 8162f77..14e33b4 100644 --- a/docker-compose.client.yml +++ b/docker-compose.client.yml @@ -4,7 +4,7 @@ services: context: . dockerfile: Dockerfile.client args: - SINGBOX_VERSION: ${SINGBOX_VERSION:-1.12.13} + SINGBOX_VERSION: ${SINGBOX_VERSION:-1.13.18} container_name: harbor-connect environment: APP_MODE: client diff --git a/docker-compose.gateway.yml b/docker-compose.gateway.yml index 58af7cf..fe7ccc0 100644 --- a/docker-compose.gateway.yml +++ b/docker-compose.gateway.yml @@ -5,7 +5,7 @@ x-gateway-image: &gateway-image dockerfile: Dockerfile args: BASE_IMAGE: ${BASE_IMAGE:-debian:bookworm-slim} - SINGBOX_VERSION: ${SINGBOX_VERSION:-1.12.13} + SINGBOX_VERSION: ${SINGBOX_VERSION:-1.13.18} INSTALL_RUNTIME_DEPS: ${INSTALL_RUNTIME_DEPS:-true} INSTALL_SINGBOX: ${INSTALL_SINGBOX:-true} diff --git a/scripts/build-on-107-deploy-111.sh b/scripts/build-on-107-deploy-111.sh index fba6afb..f6fe66a 100755 --- a/scripts/build-on-107-deploy-111.sh +++ b/scripts/build-on-107-deploy-111.sh @@ -12,7 +12,7 @@ GATEWAY_IMAGE="${GATEWAY_IMAGE:-${IMAGE_NAME}:${IMAGE_TAG}}" BASE_IMAGE="${BASE_IMAGE:-vpn-proxy-runtime-base:bookworm-slim}" NODE_BUILD_IMAGE="${NODE_BUILD_IMAGE:-node:20.19-alpine}" RUNTIME_BASE_SOURCE_IMAGE="${RUNTIME_BASE_SOURCE_IMAGE:-mirror.gcr.io/library/debian:bookworm-slim}" -SINGBOX_VERSION="${SINGBOX_VERSION:-1.12.13}" +SINGBOX_VERSION="${SINGBOX_VERSION:-1.13.18}" DOCKER_BUILD_PULL="${DOCKER_BUILD_PULL:-false}" INSTALL_RUNTIME_DEPS="${INSTALL_RUNTIME_DEPS:-false}" INSTALL_SINGBOX="${INSTALL_SINGBOX:-false}" diff --git a/scripts/build-runtime-base.sh b/scripts/build-runtime-base.sh index 593a26c..1782dec 100755 --- a/scripts/build-runtime-base.sh +++ b/scripts/build-runtime-base.sh @@ -3,7 +3,7 @@ set -euo pipefail BASE_IMAGE="${BASE_IMAGE:-mirror.gcr.io/library/debian:bookworm-slim}" RUNTIME_BASE_IMAGE="${RUNTIME_BASE_IMAGE:-vpn-proxy-runtime-base:bookworm-slim}" -SINGBOX_VERSION="${SINGBOX_VERSION:-1.12.13}" +SINGBOX_VERSION="${SINGBOX_VERSION:-1.13.18}" APT_MIRROR="${APT_MIRROR:-http://mirror.yandex.ru/debian}" APT_SECURITY_MIRROR="${APT_SECURITY_MIRROR:-http://mirror.yandex.ru/debian-security}" HTTP_PROXY="${HTTP_PROXY:-$(docker info 2>/dev/null | awk -F': ' '/HTTP Proxy:/ {print $2; exit}')}" diff --git a/src/server/singbox.ts b/src/server/singbox.ts index c7cbe6f..59405cb 100644 --- a/src/server/singbox.ts +++ b/src/server/singbox.ts @@ -111,7 +111,6 @@ export function buildGatewayConfig(subscriptionConfig: unknown, selectedTag: unk outbounds: [ vpnOutbound, { type: 'direct', tag: 'direct' }, - { type: 'block', tag: 'block' }, ], route: { rule_set: [], diff --git a/src/shared/versions.ts b/src/shared/versions.ts index 4a4341d..a3de11a 100644 --- a/src/shared/versions.ts +++ b/src/shared/versions.ts @@ -1,7 +1,7 @@ export const HARBOR_VERSIONS = Object.freeze({ - macClient: '0.21.1', + macClient: '0.21.2', gatewayClient: '0.22.0', - gatewayBackend: '0.22.2', + gatewayBackend: '0.22.3', }); export interface ParsedVersion { diff --git a/test/server/compiled-entrypoint.test.js b/test/server/compiled-entrypoint.test.js index 2e86d40..9b8669c 100644 --- a/test/server/compiled-entrypoint.test.js +++ b/test/server/compiled-entrypoint.test.js @@ -154,3 +154,19 @@ test('production paths use only the compiled dispatcher', () => { assert.match(legacyBuild, /npm run build:production && docker build/); assert.match(dockerignore, /^dist$/m); }); + +test('every shipped build defaults to sing-box 1.13.18', () => { + for (const file of [ + '.env.example', + '.gitea/workflows/gateway-build.yml', + 'Dockerfile', + 'Dockerfile.client', + 'Dockerfile.runtime-base', + 'docker-compose.client.yml', + 'docker-compose.gateway.yml', + 'scripts/build-on-107-deploy-111.sh', + 'scripts/build-runtime-base.sh', + ]) { + assert.match(fs.readFileSync(path.join(root, file), 'utf8'), /SINGBOX_VERSION[^\n]*1\.13\.18/); + } +}); diff --git a/test/server/singbox-client-mode.test.js b/test/server/singbox-client-mode.test.js index 9c56c48..9cb78fc 100644 --- a/test/server/singbox-client-mode.test.js +++ b/test/server/singbox-client-mode.test.js @@ -70,5 +70,5 @@ test('client keeps its local proxy but routes directly when Harbor Gateway is ah { inbound: ['mixed-in'], outbound: 'direct' }, ]); assert.equal(config.route.final, 'direct'); - assert.deepEqual(config.outbounds.map((outbound) => outbound.tag), ['test-vpn', 'direct', 'block']); + assert.deepEqual(config.outbounds.map((outbound) => outbound.tag), ['test-vpn', 'direct']); });