Reaching phones off your Wi-Fi

Six ways to connect phones that are not on the PC's network, from a forwarded port to a relay you deploy, and how to pick one.

A phone on mobile data sits behind its carrier's NAT and cannot accept incoming connections. So the phone always connects out to your PC; what changes is the address it connects to. Droidline does not run a public relay. You pick a method that fits your network and set it up once.

Pick a method

MethodFits whenCostEffortAddress
Same Wi-FiPhones and PC share a routerFreeNoneNot needed
Port forwardingYou can change the router's settingsFreeLowNeeds a dynamic DNS name if the public IP changes
Cloudflare TunnelPort forwarding is not possibleFreeMediumQuick tunnels change on restart; a named tunnel with your domain stays fixed
Cloudflare Workers relayPC and phones are both behind NAT and you do not want a serverA few phones fit the free planMediumFixed
VPS or Docker relayYou already have a serverYour serverMediumFixed
Other tunnelsYou already use ngrok, Tailscale Funnel or similarDepends on the serviceLowDepends on the service

Methods 3 to 6 carry the connection over HTTPS WebSockets. The agent port (8779) accepts plain TCP, TLS and WebSocket on the same port, so one forwarded or tunnelled port covers every method.

What stays the same

  • Past the handshake every line is encrypted end to end with keys only your PC and your phone hold. A tunnel or relay operator sees connection times, sizes and device IDs, never commands or screen content. See Security.
  • The phone tries its addresses in order: the PC it finds on the same Wi-Fi first, then the addresses you configured, then the relay. When it is on another route and its Wi-Fi changes, it looks for the PC again and switches back.
  • droidline devices shows which route each phone is using.

How phones learn the addresses

New phones get every address in the pairing QR code. Phones that are already paired receive the current list from the PC each time they connect, so after you add an address, let each phone connect once on the same Wi-Fi (or pair it again) before you take it out of the building.