Skip to content

Local route is skipped on mobile data even with a VPN into the computer's network #1

Open

Description

@ljmerza

I run the daemon on a home server and connect from my phone without Tailscale. At home on Wi-Fi the local route works fine. Away from home I'm on mobile data with a UniFi VPN into my home network, so the server's 192.168.1.x address is reachable from the phone, but the app never tries the local route and the connection log says "on mobile data: the Mac can't be next door".

Looks like netKind() in android/app/src/main/java/com/prudnikweb/hypernova/data/LanRoute.kt checks TRANSPORT_CELLULAR before TRANSPORT_VPN. On Android a VPN network also reports the transport underneath it, so a VPN over mobile data comes back as Mobile and the VPN branch is never reached. The comment on that branch says the network under the VPN should still count, so I think it's just the order. I have a small PR that moves the VPN check above cellular.

Separately, I wonder if the local route should be tried on any network when the pairing has local addresses, since the pinned certificate already makes a wrong host harmless. That's what I'm running on my fork for now, but it's a bigger change in behaviour so I kept the PR to the order fix. Let me know if you'd want that instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions