Connection Modes
A Crosslink host decides how a phone can reach it. There is nothing to configure to make that work on the same Wi-Fi, and nothing to sign up for to make it work from another network: no ngrok token, no Cloudflare account, no port forwarding, no DNS, no public IP to look up. The mode is a host-side setting, because only the host can open a socket or ask a router for a port. It is not something the browser can switch.The four modes
What ends up in the QR
The pairing QR carries a list of routes rather than a single URL, tagged by kind, in the order the client should try them:- A private address is never advertised as a public one. A
192.168.x.x,10.x.x.xor172.16.x.xaddress is only ever taggedlan. It is never dressed up as awanroute. - A route is only listed if it exists. A
wanendpoint appears only after a router mapping actually succeeded. IfnetworkMode: "remote"cannot produce one,getPairingCode()throws with the reason instead of quietly handing back a LAN-only QR.
auto
The default. The host listens on every interface and advertises that address.
If you also passed signalingUrl/relayUrl, those are advertised too.
Pairing runs over whichever route answers — including straight to the host,
with no service in the middle at all.
local-only
Same as auto, minus anything brokered: no signaling, no relay, no dev-time
service discovery. The QR contains exactly one route, on this network.
Use it when reaching the host from elsewhere would be a defect, not a feature.
lan-and-relay
Adds a signaling and relay service, for phones that can reach neither the host’s
LAN address nor a public one. The relay forwards ciphertext; it cannot read or
alter your data, and it is not a trust anchor.
remote
Asks the router for an inbound port using NAT-PMP, PCP or UPnP — whichever the
router speaks — and advertises the resulting public address as a wan route.
This is the mode that makes a QR scanned at home keep working from a coffee
shop. It also has real preconditions, which are covered in
Remote access, including the case where your ISP puts
you behind carrier-grade NAT and no amount of software can fix it.
remote implies bind: "all" — a mapping to a loopback-only listener would
map nothing — and it fails loudly rather than falling back.