Commit Graph
5 Commits
Author SHA1 Message Date
ji ruo ffd4dc9a17 fix(compose): pin internal network name so :8787 is never published via the sandbox bridge
Docker picks a multi-network container's default route and published-port
target by network name order. With the project dir named ARTEX the generated
artex_artex-internal sorts after artex-sandbox, so 8787/8788 were DNATed to the
sandbox bridge: unreachable from other hosts, and host-local requests looked
like sandbox traffic (403). Name the network artex-internal, warn when a custom
ARTEX_SANDBOX_NETWORK would sort before it, and prefer the exact name in the
firewall script.
2026-12-05 03:04:16 +08:00
ji ruo fd0ba5052c fix(sandbox): exempt bridge gateway from sandbox-source block, auto-pick free sandbox subnet
- Docker 28.x publishes :8787 via the artex endpoint on the sandbox bridge, so
  host-local requests (update.sh health check, artex-gateway policy sync) arrived
  from the bridge gateway IP and were rejected with 403, triggering auto-rollback.
  Record all bridge gateway IPs (IPv4/IPv6, derived when Docker omits them) and
  exempt them from IsSandboxSourceIP.
- install/update: detect overlap of the default 172.30.0.0/16 with host
  interfaces, routes and other Docker networks; auto-switch to a free
  10.230-10.239/16 subnet. Existing sandbox networks and user-set subnets kept.
- firewall script reads the real subnet from Docker when unset.
- rollback: when the snapshot lacks a gateway image, fall back to the local
  target-version/latest/any gateway image and use --no-build.
2026-12-05 02:39:20 +08:00
ji ruo 659e43e91e release(v0.3.35): sandbox upgrade guard, shell timezone i18n, and release notes
- Add validate_sandbox_compose check and compose snapshot backup/restore in deploy-lib.sh
- Show both git clone and non-git sync upgrade commands in sandbox page and settings card
- Gate standalone-to-sandbox warning in update modal to Docker non-sandbox mode only
- Add timezone-based zh/en auto-switching (with ARTEX_LANG override) across shell scripts
- Extract CHANGELOG.md section into GitHub Release notes and add v0.3.35 release notes
2026-12-04 16:45:32 +08:00
ji ruo f5b446e3bf refactor(deploy,update): drop standalone edition and add sandbox upgrade confirmation
- Remove standalone Docker edition (Dockerfile.standalone, docker-compose.standalone.yml, release.yml standalone jobs, and dual-edition env/script branches).
- Remove deploy_edition field from /api/update/check and dual-edition UI/i18n branching in UpdateCard.
- Replace window.confirm on upgrade with AlertDialog informing users of the irreversible Standalone -> Sandbox security upgrade.
2026-12-04 15:14:06 +08:00
ji ruo 07309e4530 feat(deploy,gateway): add dual-edition deployment/migration/rollback and TUN route reconciliation
- Add standalone edition (`Dockerfile.standalone`, `docker-compose.standalone.yml`) alongside sandbox edition and publish both in `.github/workflows/release.yml`.
- Implement `scripts/deploy-lib.sh`, `install.sh`, `update.sh`, and `scripts/artex-sandbox-firewall.sh --cleanup` with edition detection, legacy standalone -> sandbox migration (symlink-safe workspace permissions), automatic snapshots with pinned `artex-rollback/*` images + PG dump, auto/manual cross-edition rollback, and post-rollback upstream unpinning.
- Update `ensureWritableDir` in `internal/sandbox/manager.go` to safely migrate nested root-owned workspace files without following symlinks.
- Expose `deploy_edition` in `/api/update/check` and update `UpdateCard` UI/i18n warnings for sandbox vs standalone in-app update/rollback.
- Reconcile `artex-gateway` TUN policy routing (`priority 218`, `raw PREROUTING`, `nat POSTROUTING`, `DOCKER-USER`) every 15s to self-heal after host network rule flushes or bridge changes.
- Add unit and shell tests (`scripts/deploy_test.sh`, `cmd/artex-gateway/tun_linux_test.go`, `internal/sandbox/sandbox_test.go`, `server/update_test.go`) and update `README.md` / `.env.example`.
2026-12-02 13:31:05 +08:00