Skip to content

android: extend support for protocol navigation to Android#815

Open
willh-ts wants to merge 1 commit into
mainfrom
will/navigate
Open

android: extend support for protocol navigation to Android#815
willh-ts wants to merge 1 commit into
mainfrom
will/navigate

Conversation

@willh-ts

@willh-ts willh-ts commented Jun 29, 2026

Copy link
Copy Markdown

Extends support for the navigate path of the tailscale: protocol to Android,
mirroring the existing macOS routes & pending iOS routes.

All settings tabs without existing routes simply open the main settings view
for now.

tailscale://navigate/main/devices
tailscale://navigate/main/devices/<computedName or stableID>
tailscale://navigate/main/exit-nodes
tailscale://navigate/main/exit-nodes/<stableID>
tailscale://navigate/main/exit-nodes/location/<country>
tailscale://navigate/settings[/<anyTab>]

The complete list of registered routes can be retrieved with the added
scripts/deeplink-probe.sh script, passing "--routes" or "-l". This
script can further be used to trigger the application to navigate to a
given route by passing that to it. e.g., scripts/deeplink-probe.sh settings/about

updates tailscale/corp#41056

Extends support for the `navigate` path of the `tailscale:` protocol to Android,
mirroring the existing macOS routes & pending iOS routes.

All settings tabs without existing routes simply open the main settings view
for now.

```
tailscale://navigate/main/devices
tailscale://navigate/main/devices/<computedName or stableID>
tailscale://navigate/main/exit-nodes
tailscale://navigate/main/exit-nodes/<stableID>
tailscale://navigate/main/exit-nodes/location/<country>
tailscale://navigate/settings[/<anyTab>]
```

The complete list of registered routes can be retrieved with the added
`scripts/deeplink-probe.sh` script, passing "--routes" or "-l". This
script can further be used to trigger the application to navigate to a
given route by passing that to it. e.g., `scripts/deeplink-probe.sh settings/about`

updates tailscale/corp#41056

Signed-off-by: Will Hannah <willh@tailscale.com>

@barnstar barnstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly, I think we need to be really conservative on performing actions with deeplinks (and perhaps audit iOS/macOS if we allow that there). Navigation is perfectly fine, but the idea that clicking a link can change what exit node I'm using has some implications we need to consider before rolling it out.

import com.tailscale.ipn.util.TSLog
import kotlinx.coroutines.CoroutineScope

// URL shape (mirrors iOS / macOS):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's link this to our documentation instead.

navController.navigate("peerDetails/${node.StableID}")
}

// Matches macOS: ComputedName (case-insensitive) first, then StableID.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the macOS ref... Let's just document the scheme (somewhere).

when {
rest.isEmpty() -> {
presentExitNodePicker()
true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do this elsewhere, I think we shouldn't. It's one thing to present the UI - it's another thing to allow changing something like an exit node via a deeplink.

Comment thread scripts/deeplink-probe.sh
@@ -0,0 +1,100 @@
#!/usr/bin/env bash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: go, not bash when we can... Maybe toss this into an llm and have it port it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants