Skip to content

webui: complete WAN and multi-WAN controls - #154

Merged
Cd1s merged 6 commits into
mainfrom
webui/net-wan
Oct 17, 2026
Merged

Cd1s merged 6 commits into
mainfrom
webui/net-wan

Conversation

@Cd1s

@Cd1s Cd1s commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

What

Complete the WAN, multi-WAN, and IPv6 network UI controls identified by the A2/A3 audits:

  1. Add editable multiwan.dial_order, dial_wait, and dial_restore fields plus an immediate ordered redial action (POST net.dial_restore, operate scope).
  2. Remove WANs from dial order when switching away from PPPoE, clear invalid dial settings, and include disabling multi-WAN in deletion cleanup when fewer than two WANs remain.
  3. Route WAN and IPv6 page switches through the shared IPv6 reference cleanup, including nat6 policy routes.
  4. Generate the existing backend algorithm's locally administered multi-dial MAC automatically for additional PPPoE sessions and expose a WAN card action (POST net.wan_mac, operate scope).
  5. Add the PPPoE modem management switch and private IPv4 address field for wan[].modem.address.
  6. Add policy route domains_file selection and controlled .domains list editing through the existing dns.files API flow.

Review follow-up

  • Manual ordered redial now performs a forced one-shot restore even when scheduled dial_restore is empty or off; it only redials late/out-of-order lines and returns redialled, failed, and reason. The UI reports those values and disables the action without two configured dial-order WANs.
  • Multi-dial MAC generation is shown only for the second and later PPPoE WAN on a shared device/VLAN. Existing MACs require confirmation explaining apply-time redial and possible ISP MAC authentication; the backend rejects a configured primary WAN.
  • Added Go tests for the new behavior, token scopes, input guards, and primary/secondary MAC handling.
  • Documented both operate APIs, synchronized the policy route editor, removed unsolicited IPv6 flag cascades, removed the duplicate flush card, and made the modem address start empty.
  • Added the PPPoE “Require public IPv4” switch and cooldown field (blank defaults to 180 seconds), with the five-attempt stop-and-alert explanation and English translations.
  • Fixed the modem-management toggle to use modem presence, focus the empty address input, warn on empty/LAN-conflicting addresses, and added tools/mock/modem-toggle.test.js to CI.

require_public_ip and require_public_ip_gap are now exposed in PPPoE WAN cards after #150 merged; #153 LAN/core changes are retained by the merge.

Why

The WAN UI left dial order configuration read-only, allowed stale multi-WAN and IPv6 references to block applies, and omitted supported modem, multi-dial MAC, and policy domain-list controls. These changes make the supported backend configuration reachable from the network pages while preserving POST validation and token scopes.

Verification

  • node --check rootfs/www/ui/*.js
  • python3 tools/i18n.py check
  • cd mr && go vet ./...
  • cd mr && go test -count=1 ./...
  • sh tools/ci.sh — ALL CHECKS PASSED
  • Updated mock screenshots uploaded under runs/2026-10-17-minirouter/shots-ui-n1/ (360px WAN/IPv6 and desktop multi-WAN).

Refs A2 audit P1 dial_order, v6off, mr wan mac, modem.address, domains_file; A3-06.

@Cd1s
Cd1s merged commit 2f40ac3 into main Oct 17, 2026
2 checks passed
@Cd1s Cd1s mentioned this pull request Oct 18, 2026
52 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant