Commit Graph

685 Commits (jonathan/machine_auth)
 

Author SHA1 Message Date
Percy Wegmann 9a6aecb454 android: implement exit node picker
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
8 months ago
Andrea Gottardo 06e850bbd5
ui: assorted UI tweaks + disconnected view (#203) 8 months ago
Jonathan Nobels 4df18951a6
android/ui: fix time formatting strings and main view states (#204)
* android: fix time display localizations and show magic dns name

Updates tailscale/corp#18202

Localizations and some simplifications of the "in x time" conversion strings for node expiry.

We'll also now render the magicDNS name in the list of addresses.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: move the composablestringformatter to it's own file

Updates tailscale/corp#18202

This class deserves it's own file and some documentation

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: show selfNode as connected only when it is connected

Updates tailscale/corp#18202

The selfNode connected state is now properly shown in the nodes list now that we're showing the nodes even when you're not connected to your tailnet.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
8 months ago
Jonathan Nobels 2c694b7159 android: optimize peer search
Updates tailscale/corp#18202

Switch to LazyColumn so we're not redrawing the entire list.

Modify the search logic so we're searching progressively and doing all of the sorting and categorization up front on netmap changes.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
8 months ago
Andrea Gottardo 7c64091aab
ui: add ManagedByView, hide MDMSettingsView on non-debug builds (#201)
Updates tailscale/corp#18202

- Adds the "Managed by OrganizationName" view we currently offer on iOS.
- Hides the MDM settings debug pane on non-debug builds.
- Refactored SettingsViewModel to take an `IpnManager` instead of an `IpnModel` (@barnstar, let me know whether this makes sense given your future plans)

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
8 months ago
James Tucker bf7bf94b52 .github/workflows,Makefile: add a build check CI for the new app
Updates tailscale/tailscale#10992

Signed-off-by: James Tucker <james@tailscale.com>
8 months ago
Jonathan Nobels 16ec19757d
android: adds support for user avatars and some general cleanup (#202)
* android: show user avatars and styling fixes

Updates tailscale/corp#18202
fixes ENG-2852

Load and show the user avatar in the right places.  There's a universal Avatar composable for this that should work everywhere we need it.  This  uses the coil-compose lib which seems to be standard practice and will handle caching for us.

Restyles a few headers to match the about screen and corrects some layout issues with the height of columns.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: add localizations and view model cleanup to match IPNManager

Updates tailscale/corp#18202

Simplifies the view models a bit for readability and localizes a few things that weren't previously localized

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: fix peer categorization

Updates tailscale/corp#18202

Fixes a null predicate issue for searching and removes the self nodes if there are no matches.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: rename avatar loader to avatar and add header

Updates tailscale/corp#18202

Rename the AvatarLoader class to Avatar and move it to views.  Add the proper headers.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
8 months ago
Jonathan Nobels f275656c25
ui: add view to debug MDM settings and add the syspolicy handlers (#199)
* mdm: add Android syspolicy handler (#195)

Updates tailscale/corp#18202

Adds a syspolicy handler for Android in cmd/tailscale. This allows the Go code to use the syspolicy package to read values set by a system administrator using the Android RestrictionsManager.

Out of the box, this adds supports for a number of MDM policies that are fully integrated on the Go side, such as `ExitNodeID` (forced exit node functionality).

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* ui: add view to debug MDM settings

Adds a view to see the currently set MDM settings, we're going to need this to debug actual MDM integrations more effectively.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@gottardo.me>
8 months ago
Jonathan Nobels 1f457399b8
android: code review feedback and stylistic improvements (#200)
Updates tailscale/corp#18202

Review feedback and stylistic improvements.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
8 months ago
Jonathan Nobels 94a4f55eb2
android: implement the bug reporting and about screen and localize (#198)
updates tailscale/corp#18202
fixes ENG-2876

Adds the bug reporting view.  Functional, but not properly styled.

Moves the various link URLs to a constants file and corrects link-opening in both but reporting and the settings screen.

Adds an AboutView with app icon and same content as the iOS version.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
8 months ago
Jonathan Nobels 0d867aedce
mdm: implement initial data structure to read from Android RestrictionsManager (#197)
updates tailscale/corp#18202
updates ENG-2849

Implements the basic data model for supporting MDM to allow us to add the hooks in the UI.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@gottardo.me>
8 months ago
Jonathan Nobels bf0e56469f
android: Add settings screen (#196)
updates tailscale/corp#18202
updates ENG-2854

Adds a basic settings screen.  This isn't correctly localized, but that's on the way.

Adds the required hooks to edit prefs via localAPI.

Adds basic but incomplete login/logout flow.

Fixes the sorting of nodes on the main screen and fixes the proper display of your current node details.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
8 months ago
Jonathan Nobels 3926cf4b56
android: add main screen device details and basic nav (#191)
updates tailscale/corp#18202
updates ENG-2835
updates ENG-2859

Adds the peer details view and some supporting utilities. Eliminates all of the singletons.

None of this is styled correctly, but the layouts match iOS.

Signed-off-by: Jonathan Nobels jonathan@tailscale.com

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
8 months ago
James Tucker 87a8003d39 *: add a CI check for license headers and fix all files
Updates tailscale/tailscale#10992

Signed-off-by: James Tucker <james@tailscale.com>
8 months ago
Jonathan Nobels 4f46c38c99
Jonathan/notifier (#179)
android: add notifier support a data model and compose dependencies

fixes ENG-2084
fixes ENG-2086

Adds support for the ipnBusWatcher directly via a JNI API rather than HTTP via LocalAPIClient

Adds a rudimentary controller class and a model from which we can construct ViewModels

Cleans up some of the JNI bindings.  Adds hooks for ensuring the JNI setup is complete before attempting to do LocalAPIClient things.

Cleans up some wildcard imports.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Signed-off-by: Percy Wegmann <percy@tailscale.com>
Co-authored-by: Percy Wegmann <percy@tailscale.com>
8 months ago
Anton Tolchanov a0f87846fd android: bump version code
Signed-off-by: Anton Tolchanov <anton@tailscale.com>
8 months ago
Anton Tolchanov 7d25cf97f8 Update OSS and latest version
Updates tailscale/corp#18098

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
8 months ago
Jonathan Nobels 9a206805df
cmd/tailscale/main: remove tracked aar lib (#183)
Updates tailscale/tailscale#10748

The built aar should not be checked into android_legacy.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
8 months ago
kari-ts 01ec98f29a
cmd/tailscale/main: restore persisted settings (#169)
Fixes tailscale/tailscale#10748
Fixes tailscale/corp#17470

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
Aalok Kamble f23477e796
Feature: machine status icon added. (#167)
* Feature: machine status icon added.

Signed-off-by: Aalok Kamble <aalok.kamble@gmail.com>

* Update ui.go

Aligned dot vertically with lowercase letters for machine names.
Reverted 'Machine' to 'My devices'

Signed-off-by: Aalok Kamble <aalok.kamble@gmail.com>

* status dot changed from string to drawdisc

Signed-off-by: Aalok Kamble <aalok.kamble@gmail.com>

---------

Signed-off-by: Aalok Kamble <aalok.kamble@gmail.com>
8 months ago
kari-ts 464f089388
android: restructure app (#182)
Make android_legacy for the old app and remove some of the new models from it
Modify Makefile to build the legacy app and the new app

Updates tailscale/tailscale#10992

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
kari-ts 9492b01946
cmd/tailscale, tailscale/ipn: fix alway-on VPN (#168)
=If a ConnectEvent is received before the first notification, (as happens when a connection is attempted due to always-on after device reboot) create state.Prefs.
-Create an intent to start the VPN worker in the case of an always-on intent received on device reboot
-Rename onConnect channel to onVPNRequested, since this isn't doing the actual connecting

Fixes tailscale/tailscale#2481

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
Jonathan Nobels bb7ea7cf9f
android: add kotlin dependencies build the kotlin->go localAPIClient (#173)
updates ENG-2805

Adds all of the kotlin build dependencies and a partial implementation of a LocalAPIClient in the front end, wired up via JNI.  The general idea here is to mimic the architecture used on other Tailscale clients, where the front ends largely interact with the backend via "localapi".

The LocalAPIClient in go has been renamed to LocalAPIService to avoid confusion with the implementation on the future client side in Kotlin.  Some mild refactoring was done to make the localAPI invocations methods on the api service instead of App.

Streaming notifier endpoints like watch-ipn-bus are not supported.  We will build out a separate set of JNI methods for dealing with those.

The jni package is moved under cmd where it is used.

This constains mostly-complete implementation of the required localAPI data classes based on the pieces that are used by the iOS and macOS clients.  The LocalAPIClient itself does not implement all of the endpoints, but is ready to do so when those APIs are needed by a UI component.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
8 months ago
Percy Wegmann 37832a5b72 go.mod: pull in latest tailscale.com
Updates #cleanup

Signed-off-by: Percy Wegmann <percy@tailscale.com>
8 months ago
kari-ts 89e160bd08
cmd/tailscale/main: remove debugging comment (#175)
Updates #cleanup

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
kari-ts bf9be063d7
Makefile: update go version for bumposs (#165)
Updates tailscale/tailscale#10992

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
kari-ts f6b0734e49
cmd/tailscale/main: use localapi for logging out (#164)
Updates tailscale/tailscale#10992

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
Percy Wegmann cbe8858427 cmd/tailscale: pass nil TailFSForLocal to netstack.Create
In the latest tailscale.com, netstack.Create has a new parameter
that must be supplied.

Updates #cleanup

Signed-off-by: Percy Wegmann <percy@tailscale.com>
8 months ago
kari-ts 60b9884aa2
cmd/tailscale/main: clean up unused event (#170)
Updates #cleanup

Signed-off-by: kari-ts <kari@tailscale.com>
8 months ago
kari-ts 98fe1e86e5
cmd/tailscale/main: use localapi for login and add tests. (#157) 8 months ago
Moritz Poldrack e90f39a58c
cmd/tailscale/main: apply custom control server on first start (#156)
Currently the custom control server is not applied on start. To remedy
this, check the stored preference and if they differ issue an event to
switch to the correct backend server.

Updates: tailscale/tailscale#17470

Signed-off-by: Moritz Poldrack <git@moritz.sh>
9 months ago
kari-ts f9310e7a1f
cmd/tailscale/main: use localapi for generating bug report (#155)
Fix logIDPublic and make localapiclient a package with a generic function for calling localapi that can be reused for all features

Updates tailscale/tailscale#10992
9 months ago
Nicola Beghin df9c75136b
Fixes Android quick settings tile - issue #2646 (#143)
* quicksettings - move to use intents com.tailscale.ipn.CONNECT_VPN and com.tailscale.ipn.DICONNECT_VPN - Fixes #2646

Signed-off-by: Nicola Beghin <nicolabeghin@gmail.com>

* cleanup imports - Fixes #2646

Signed-off-by: Nicola Beghin <nicolabeghin@gmail.com>

---------

Signed-off-by: Nicola Beghin <nicolabeghin@gmail.com>
9 months ago
kari-ts 915e4e3394
Dockerfile: update to use go 1.22 (#163)
Updates #cleanup
9 months ago
kari-ts b96df2b830 android: bump version code
Signed-off-by: kari-ts <kari@tailscale.com>
9 months ago
kari-ts 630a6069c4 go.mod: bump oss and version
Updates #cleanup

Signed-off-by: kari-ts <kari@tailscale.com>
9 months ago
Charlotte Brandhorst-Satzkorn 9e8dfbb2ab
cmd/tailscale: do not show location based exit nodes in main view (#158)
This change stops us from clogging up the main UI view with location
based exit nodes, which can be in their hundreds. They will still appear
in the exit node UI.

Updates tailscale/tailscale#9438

Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
9 months ago
Charlotte Brandhorst-Satzkorn 3615398012
cmd/tailscale: improve exit node menu for location based exit nodes (#159)
This change provides minor improvements to the exit node menu when there
are location based exit nodes present. It will ensure that non location
based exit nodes are displayed at the top of the list, followed by a
the best node for a country/city combination, and followed by all
location based exit nodes.

Updates tailscale/tailscale#9421

Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
9 months ago
kari-ts 813ca8adea
android: bump version code (#152)
* go.mod: update for 1.58.0

Signed-off-by: kari-ts <kari@tailscale.com>

* android: bump version code

Signed-off-by: kari-ts <kari@tailscale.com>

* Pulled OSS from HEAD and fixed version name

* Removed swp file

---------

Signed-off-by: kari-ts <kari@tailscale.com>
10 months ago
David Anderson 3255d55e39 Record DNS search domains as well as nameservers.
We accidentally removed this in the big connectivity monitor fix.

Updates tailscale/tailscale#10107

Signed-off-by: David Anderson <danderson@tailscale.com>
10 months ago
David Anderson 4c7d66701f cmd/tailscale: remove obsolete DNS config logging
Causes a JNI crash because 1b42117791
removed those methods when fixing our connectivity monitoring.

Updates tailscale/tailscale#10107

Signed-off-by: David Anderson <dave@natulte.net>
10 months ago
kari-ts a76b36506c
DnsConfig: get rid of unnecessary isEmpty check (#149)
* DnsConfig: remove unnecessary isEmpty check

Updates #cleanup

* DnsConfig: remove unnecessary isEmpty check

Updates #cleanup

* k
10 months ago
kari-ts 1b42117791
use network callback to update DNS config when network changes (#147)
* use network callback to update DNS config when network changes

-Use requestNetwork, which gets the best network matching the passed in network request, to listen for changes to network and cache DNS config
-Call netmon.InjectEvent on network change to indicate a change
Follow-up will fix issue in netmon where IsMajorChangeFrom doesn't identify major changes when a network is added

Fixes #10107

* use network callback to update DNS config when network changes

-Use requestNetwork, which gets the best network matching the passed in network request, to listen for changes to network and cache DNS config
-Call netmon.InjectEvent on network change to indicate a change
Follow-up will fix issue in netmon where IsMajorChangeFrom doesn't identify major changes when a network is added

Updates tailscale/tailscale/#10107

hi

* hi

* .

* use network callback to update DNS config when network changes

-Use requestNetwork, which gets the best network matching the passed in network request, to listen for changes to network and cache DNS config
-Call netmon.InjectEvent on network change to indicate a change
Follow-up will fix issue in netmon where IsMajorChangeFrom doesn't identify major changes when a network is added

Updates tailscale/tailscale/#10107

* fixed missing connectivity manager
10 months ago
kari-ts 99c54591e6
.gitignore: ignore IDE (#148)
Updates #cleanup
10 months ago
Denton Gentry 52601c0dff android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
10 months ago
Denton Gentry dcca09fe7f Update OSS 1.57.x.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
10 months ago
kari-ts 7a52cae96f
.gitignore: ignore Java profiling files (#146)
Updates #cleanup
10 months ago
kari-ts ae647625b0
build.gradle: increase JVM memory settings (#145)
This fixes the issue where building in Android Studio OOMs

Fixes #10714

Signed-off-by: kari-ts <kari@tailscale.com>
10 months ago
Denton Gentry 61453254df android: bump version code
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
11 months ago
Denton Gentry 5ef7bbaff0 Update OSS 1.55.x
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
11 months ago