docs: initial plan for ZeroTier exit gateway switcher
Design: .omp/plans/zerotier-gateway-switching.md — LuCI app + rpcd/ucode backend + zt-gateway-switch shell script for force / graceful-drain gateway switching on OpenWRT.
This commit is contained in:
28
.gitignore
vendored
Normal file
28
.gitignore
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# OpenWRT / LuCI build artifacts
|
||||||
|
bin/
|
||||||
|
tmp/
|
||||||
|
.build/
|
||||||
|
.config
|
||||||
|
.config.old
|
||||||
|
feeds.conf.default
|
||||||
|
feeds.conf
|
||||||
|
*.ipk
|
||||||
|
*.ipk.opk
|
||||||
|
|
||||||
|
# SDK / build cache
|
||||||
|
dl/
|
||||||
|
staging_dir*/
|
||||||
|
build_dir*/
|
||||||
|
|
||||||
|
# Translations (compiled)
|
||||||
|
*.po~
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Common OS / editor files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
1258
.omp/plans/zerotier-gateway-switching.md
Normal file
1258
.omp/plans/zerotier-gateway-switching.md
Normal file
File diff suppressed because it is too large
Load Diff
38
README.md
Normal file
38
README.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# luci-app-zt-gateway
|
||||||
|
|
||||||
|
A LuCI application for OpenWRT that lets users switch which remote ZeroTier node
|
||||||
|
acts as the internet exit gateway for WIBLAN clients (`10.11.13.0/24`).
|
||||||
|
|
||||||
|
Users select a region/gateway, choose a switch mode, and the app reconfigures
|
||||||
|
kernel routing, conntrack, hotplug scripts, and UCI network routes with minimal
|
||||||
|
disruption.
|
||||||
|
|
||||||
|
## Switch modes
|
||||||
|
|
||||||
|
- **Force** — instant cutover (~1-2s disruption); existing connections break and
|
||||||
|
clients auto-reconnect through the new gateway. Flushes conntrack for the
|
||||||
|
WIBLAN subnet.
|
||||||
|
- **Graceful drain** — zero disruption; existing connections keep using the old
|
||||||
|
gateway via fwmark + a drain routing table, while new connections go through
|
||||||
|
the new gateway immediately. Auto-falls-back to a force switch after a
|
||||||
|
configurable timeout if drain does not complete.
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
> **Planning / pre-implementation.**
|
||||||
|
|
||||||
|
The full design — file structure, UCI config schema, rpcd backend (ucode),
|
||||||
|
`zt-gateway-switch` shell script, LuCI frontend, switch logic for both modes,
|
||||||
|
persistence model, health checks, rollback/safety, Docker macvlan test harness,
|
||||||
|
and build/install instructions — is the source of truth in:
|
||||||
|
|
||||||
|
[`docs/.omp/plans/zerotier-gateway-switching.md`](.omp/plans/zerotier-gateway-switching.md)
|
||||||
|
|
||||||
|
(also tracked at `.omp/plans/zerotier-gateway-switching.md`)
|
||||||
|
|
||||||
|
Implementation (Makefile, ucode backend, switch script, `overview.js`, UCI
|
||||||
|
config, ACL, menu entry) lands in subsequent commits against this repository.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Apache-2.0
|
||||||
Reference in New Issue
Block a user