dsh-lan-pair: Securely open DSH web interface to LAN
dsh-lan-pair is maintained by FORGE-131 and consists of a DSH plugin and a 45 KB Android shell. It opens a separate local area network (LAN) port within the DSH process, reverse proxies to the local loopback, and holds its own session cookie. A mobile device can connect by entering a 4-digit pairing code once, and it will never obtain a DSH startup token. This resolves the 401 error on mobile devices caused by dsh web only listening on 127.0.0.1 and cookies having SameSite=Strict. This article covers the three-step installation (pnpm add + bundles registration + restart), 4-digit pairing code rules, long-term keys in lan-pair.json and DSH_LAN_PAIR_* environment variables, remote access via cloudflared tunnels or fixed public IP addresses, mDNS dual-address auto-switching, dshlanpair deep links, as well as precautions for sideloading APKs and security boundaries: the pairing key only prevents accidental connections, and communication is in plaintext over the LAN; use TLS for security if required.
Read More