How loft runs on a Keenetic router. Client: clients/NDMS/. Plan: clients/NDMS/PLAN.md. Mock: clients/NDMS/design/index.html. Protocol: protocol.md.
Build make -C clients/NDMS ipk (aarch64) or make -C clients/NDMS ipk-all. Dist ships loft-ndms-<version>-{aarch64,armv7,mipsel}.ipk with a .sha256 sidecar. Install with opkg. The page is http://<lan>:8090/. KeeneticOS 5.0+, components OPKG and TUN/TAP, Entware on NAND or USB EXT4.
KeeneticOS owns where packets go (priorities, policies, DNS routes). loft owns how the tunnel looks on the wire (loft fronts).
LAN host
→ Keenetic policy
→ OpkgTun0 (NDM interface, description Loft)
→ loft TUN (no default route)
→ loft get|ws|h2|quic|h3
→ TLS 1.3 → CDN or node
Each connection (a loft profile, VLESS or Trojan) gets its own OpkgTun: OpkgTun0, OpkgTun1, … All enabled connections stay up; Keenetic priorities pick one. SSTP stays the stock Keenetic client.
KeeneticOS 5.0+ maps Entware TUN/TAP into NDM (OpkgTun / OpkgTap) and allows those interfaces in connection policies and static routes.
Sketch after a live Status:
interface OpkgTun0 type OpkgTun
interface OpkgTun0 description Loft
interface OpkgTun0 security-level public
interface OpkgTun0 ip address <overlay-ip> 255.255.255.255
interface OpkgTun0 ip tcp adjust-mss pmtu
interface OpkgTun0 up
ndmc only. Never ip route from the shell — NDM rebuilds tables.
The loft process must not install 0/0 or a kill-switch. It opens a named opkgtunN and leaves the routing table to ndmc.
In the Keenetic UI:
loft use: lists on the router are off by default. The controller may still publish lists; this client ignores them unless an operator turns that on later.
A policy that sends 0/0 into Loft also sends the GET/WS to the CDN/node into the tunnel. Before up, pin outbound IPs on the ISP interface (same idea as a WireGuard endpoint). loft already excludes session hosts from TUN on desktops; Keenetic mode does the same via ndmc host routes.
HTTP http://<lan>:8090/. The process forwards the browser Cookie to 127.0.0.1/auth. 200 and an admin/configurator role → UI. 401 → redirect to the stock web admin.
Cookie is host-only, Path=/, so :80 and :8090 share it. localhost:79 (RCI without a password) stays daemon-only.
KeeneticOS 5.2 may advertise x-ndw4-authenticate; then the panel uses the one-shot redirect token.
Not a Keenetic component. Not a new row in “Add connection”. Not a patch of /usr/share/htdocs_. Those need Keenetic or a per-firmware inject; the panel does not depend on them.