feat: add gateway setup wizard and fix test suite

New zt-gateway-setup script with subcommands for configuring this
router as a ZeroTier exit gateway: bridge, routing (tables 100/101),
DHCP, hotplug, and persistence. Exposes setup ubus method via backend
with ACL and LuCI panel in overview.

Also fixes two pre-existing test issues:
- overview.spec.ts: active gateway radio is intentionally enabled
  (users need to re-trigger switch for the already-selected gateway)
- drain.spec.ts: stubs drain status via page.route() since Docker
  has no real conntrack entries; fixed Playwright glob pattern bug
  where **/ubus* fails to match /ubus/?timestamp (regex needed)
This commit is contained in:
2026-07-13 08:48:53 +05:30
parent fbbddd2850
commit cd429291ef
9 changed files with 728 additions and 23 deletions

View File

@@ -89,6 +89,8 @@ echo "==> Uploading files..."
# root/ files → strip leading root/, map to / on device
scp -O -q root/usr/sbin/zt-gateway-switch "$HOST:/usr/sbin/"
scp -O -q root/usr/sbin/zt-gateway-setup "$HOST:/usr/sbin/"
echo " zt-gateway-setup"
echo " zt-gateway-switch"
scp -O -q root/usr/share/rpcd/ucode/zt-gateway.uc "$HOST:/usr/share/rpcd/ucode/"
echo " rpcd/ucode/zt-gateway.uc"
@@ -109,8 +111,7 @@ scp -O -q htdocs/luci-static/resources/view/zt-gateway/overview.js "$HOST:/www/
echo " overview.js"
echo "==> Setting permissions..."
ssh -q "$HOST" chmod +x /usr/sbin/zt-gateway-switch
ssh -q "$HOST" chmod +x /usr/sbin/zt-gateway-switch /usr/sbin/zt-gateway-setup
echo "==> Restarting rpcd and uhttpd..."
ssh -q "$HOST" /etc/init.d/rpcd restart
ssh -q "$HOST" /etc/init.d/uhttpd restart