mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-05 04:51:51 +08:00
- 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`.
21 lines
445 B
Go
21 lines
445 B
Go
//go:build !linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
const tunDeviceName = "artex-tun0"
|
|
|
|
func openTUN(_ string) (io.ReadWriteCloser, error) {
|
|
return nil, fmt.Errorf("TUN interface is only supported on Linux")
|
|
}
|
|
|
|
func applyTunRouting(_ iptablesConfig) error {
|
|
return fmt.Errorf("TUN policy routing is only supported on Linux")
|
|
}
|
|
func reconcileTunRouting(_ *iptablesConfig) bool { return false }
|
|
func cleanupTunRouting(_ iptablesConfig) {}
|