Skip to content

Default route UI for android #1401

Closed
Closed

Description

@danderson
No description provided.

Activity

  1. bradfitz commented on Feb 25, 2021

    @bradfitz
    Member

    @eliasnaur, Tailscale 1.6 will let you route all your non-Tailscale traffic out one of your Tailscale node (like a traditional VPN).

    We haven't decided a UI yet, but something like this perhaps:

    screenshot

    Can you do something appropriate for Android?

    (with one menu item being "Off (Local)" or equivalent)

    Ultimately you need to set a pref. Here's how the CLI does it for tailscale up:

    prefs.ExitNodeIP = exitNodeIP

  2. added
    OS-android
    on Feb 25, 2021
  3. added a commit that references this issue on Feb 28, 2021
    4f415c5
  4. eliasnaur commented on Feb 28, 2021

    @eliasnaur
    Contributor

    I've implemented this on the tailscale-1.6 branch, using tailscale tip. See below for implementation details.

    How do I coordinate the release with you? Will you notify me when 1.6 is out?

    I couldn't get route-all-traffic to work between my Android emulator and Pixel device. Is the feature supposed to work yet? If so, I can dig deeper and provide logs if they're helpful.

    I opted for integrating the feature in the peer list that is always displayed anyway. A default route is selected by tapping one of your peers:

    2021-02-28-131008_grim

    The routing peer will be marked and appear first in the list of peers:

    2021-02-28-131016_grim

    Tapping it allow you to stop routing through it:

    2021-02-28-131021_grim

  5. bradfitz commented on Mar 1, 2021

    @bradfitz
    Member

    @eliasnaur, an exit node can't be used until two things happen first: a node itself has to "advertise" (offer) the route (e.g. tailscale up --advertise-routes=0.0.0.0/0,::/0 or a simpler UI) and then a network admin has to approve the route.

    @soniaappasamy, can you share your iOS video with @eliasnaur?

  6. soniaappasamy commented on Mar 1, 2021

    @soniaappasamy
    Member

    Sure - @eliasnaur this is what we have on the iOS side (note that some design details may change around a bit once @rosszurowski takes a design review)

    It would be good to align our iOS and Android UX for exit nodes. @rosszurowski for thoughts on this

    ios-default-routes-ui.mp4
  7. eliasnaur commented on Mar 1, 2021

    @eliasnaur
    Contributor

    Ok, thanks @soniaappasamy. I'll wait for @rosszurowski to approve your design to avoid redoing the UI more than once.

  8. rosszurowski commented on Mar 1, 2021

    @rosszurowski
    Contributor

    Yep. Just talking with @soniaappasamy about the design to see what the different considerations / states we need to build are. I should have something to share later today (early tomorrow EST at the latest).

  9. tux21b commented on Mar 1, 2021

    @tux21b

    I personally like Elia's design more, by using the same list of peers. It looks much simpler and I do not have to scan a different list than already present on the screen. But I guess if the ratio of non-exit nodes to exit-nodes is very large, Sonia's design might be better. Otherwise I prefer the single list.

  10. eliasnaur commented on Mar 1, 2021

    @eliasnaur
    Contributor

    FWIW, we could add an "exit nodes" section early in the peer list so they're easy to locate.

  11. rosszurowski commented on Mar 2, 2021

    @rosszurowski
    Contributor

    @eliasnaur here's the design we're thinking for iOS. Android should follow the same general structure in a way that makes sense for Android. For example, swapping out iOS's AlertMenus for Android Menus. For the exit node picker itself, it makes the most sense to me to use a single-choice list AlertDialog, like Gmail's "Move to" feature. You know Android better than I do, and I trust your judgement on the translation. But if it'd save you time, I can prep Android specific mocks too.

    route-traffic-via

    The notification text and exit node icons are placeholders for now, but they should be easy to swap out. I'll get you and Sonia proper versions of both of those at some point today.

  12. added 3 commits that reference this issue on Mar 3, 2021
    4cb2ee4
    16d1cbf
    fb38559
  13. 19 remaining items

  14. added 2 commits that reference this issue on Mar 4, 2021
    1fa5299
    0ca84d9
  15. eliasnaur commented on Mar 4, 2021

    @eliasnaur
    Contributor

    @rosszurowski, I've added you as reviewer for the PR that implements your final design.

  16. added 2 commits that reference this issue on Mar 4, 2021
    871099c
    389ed77
  17. DentonGentry commented on Mar 11, 2021

    @DentonGentry
    Contributor

    I was able to build an Android debug APK using the code in tailscale/tailscale-android#7, and signed in to a Tailnet with a node offering routes to 0.0.0.0/0,::/0

    Nifty.


    Menu selection to Route Traffic Via:

    RouteTrafficVia


    Selecting the node to route via:

    RouteTrafficViaSelection


    Relaying through that node:

    RelayingTraffic


    Disabling Routing via the node:

    DisableRouteTrafficVia


    Relay node lost

    RelayLost


    Relay node is offline

    RelayOffline


    Disabling the relay node

    RelayDisable


    I think I am running into some weird things related to using a FreeBSD system as the exit node, which affect my MacOS laptop (and clearly unrelated to the Android build I'm running). I'll try again using a Linux system as the exit node.

  18. DentonGentry commented on Mar 11, 2021

    @DentonGentry
    Contributor

    After turning off the FreeBSD system and using an Ubuntu system to advertise routes to 0.0.0.0/0,::/0

    I think default route is working for me, at least for IPv4. I've turned off Wi-fi on this phone, to make it use LTE. whatismyipaddress.com says my phone is 2607:fb90:X:X:X:X:X:X and 172.58.X.X.

    2607:fb90 and 172.32.0.0/11 are T/Mobile IP ranges.

    When I enable routing via my Ubuntu machine in the Tailscale app, whatismyipaddress.com says my IPv4 address is 135.180.X.X, and that IPv6 is not detected.

    135.180.X.X is my sonic.net address, so the phone went over LTE to get to the house to the Ubuntu machine to route it back out.

    IPv6 being broken is weird, I'll look into that more.

  19. DentonGentry commented on Mar 11, 2021

    @DentonGentry
    Contributor

    With Tailscale disconnected, using the Wi-Fi in the house, https://ipv6test.google.com/ says that I have an IPv6 address.


    With Tailscale connected but not using an exit node, using the Wi-Fi in the house, https://ipv6test.google.com/ says that I have an IPv6 address.

    I am also able to connect from the Android phone over IP6 on Tailscale to a web server running on the Ubuntu system:

    $ sudo nc -6 -vv -l -p 80
    Listening on :: 80
    Connection received on fd7a:115c:a1e0:ab12:4843:cd96:6256:2c3a 48944
    GET / HTTP/1.1
    Host: [fd7a:115c:a1e0:ab12:4843:cd96:6254:d86f]
    Connection: keep-alive
    Cache-Control: max-age=0
    DNT: 1
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Linux; Android 11; Pixel 3a XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.86 Mobile Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,en;q=0.9
    

    With Tailscale connected and using the Ubuntu system as an exit node, using the Wi-Fi in the house, https://ipv6test.google.com/ says that I do not have an IPv6 address.

    I can still reach the IPv6 web server running on the Ubuntu system, so IPv6 isn't broken altogether. It just seems like Android cannot get IPv6 packets past the Ubuntu system

  20. eliasnaur commented on Mar 12, 2021

    @eliasnaur
    Contributor

    Indeed I had problems getting the exit node to work (macOS). So what I meant is that the UI is ready, and I assume the remaining problem(s) is fixed in a Tailscale module upgrade.

  21. DentonGentry commented on Mar 12, 2021

    @DentonGentry
    Contributor

    Yes. It is quite late here now, we expect to work on this tomorrow.

    We'll track the effort in #1486

  22. added a commit that references this issue on Mar 12, 2021
    3b1a5e7
  23. added a commit that references this issue on Mar 22, 2026
    e5fa1b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OS-android

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions