Commit Graph

887 Commits (1.76.1-t24929f6b6-ga20b1114dd5)
 

Author SHA1 Message Date
Andrea Gottardo e393dad29e go.mod: update for 1.76.1
Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
kari-ts a20b1114dd android: handle multiple redundant intents (#541)
Use FLAG_UPDATE_CURRENT for managing multiple calls to startForegroundService. This ensures only one instance of the intent is active and replaces any previously pending intents with the latest one.

Fixes tailscale/corp#23828

Signed-off-by: kari-ts <kari@tailscale.com>
(cherry picked from commit 753b8d3fb4)
2 months ago
Jonathan Nobels a8c8301a50 go.mod: update for 1.76.0
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Keli 5f19730c7a
android: bumping OSS (#537)
OSS and Version updated to 1.75.104-tf6d4d0335-gd309f31b5ab

Signed-off-by: Keli Velazquez <keli@tailscale.com>
2 months ago
kari-ts d309f31b5a
android: don't show hex code yet (#536)
Hold off on showing the code until there is a place in the admin console for the user to input the code.

Updates tailscale/tailscale#13277

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Andrea Gottardo cd993fee43
ui: hide commit hashes in user-facing version string (#534)
We currently show the full version number everywhere. This pointlessly causes confusion for users, and is only really useful for Tailscale employees. Let's show the marketing version everywhere instead.

Users can still tap on the version number to copy the full version string. The extended version is also available in the Android settings, when inspecting Tailscale from the Apps list.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Keli a32c2aa0df
android: bumping OSS (#532)
OSS and Version updated to 1.75.81-t4ad3f0122-g0126db799b1

Signed-off-by: Keli Velazquez <keli@tailscale.com>
2 months ago
Andrea Gottardo 0126db799b
ui/model: adjust default control server URL (#531)
Updates tailscale/corp#23660

I screwed up by not including 'https://' in a last-minute refactoring :-)
2 months ago
Andrea Gottardo 4ca757bb75
android: bumping OSS to 1.75.80 (#530)
android: bumping OSS

OSS and Version updated to 1.75.80-t8fdffb8da-g2daeee584df

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Andrea Gottardo 2daeee584d
ui/UserView: show custom control server URL in account switcher (#529) 2 months ago
kari-ts be89cb10fe
android: bumping OSS (#528)
OSS and Version updated to 1.75.58-t262c526c4-gf5ecca3c967

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts f5ecca3c96
android: StringArrayListMDMSetting should check for String[] (#527)
getFromBundle should check for both String[] and ArrayList<String>

Fixes tailscale/corp#23557

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Kristoffer Dalby 8eabe8d6dd
android: bumping OSS (#526)
android: bumping OSS

OSS and Version updated to 1.75.56-t1eaad7d3d-g625f6f02352

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2 months ago
Kristoffer Dalby 2f08e2f02d
libtailscale: add metrics to NewUserspaceEngine (#525)
Updates tailscale/corp#22075

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2 months ago
kari-ts 9572541648
android: bumping OSS (#524)
OSS and Version updated to 1.75.51-ta70287d32-gc10aca720b8

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts c10aca720b
android: don't set vpnService to nil when state is Stopped (#523)
We are currently setting vpnService.service to nil:
-any time there’s an error with updateTUN
-when we exit out of runBackend
-if the config is the default config (aka when the ipn state is Stopped)

When it gets set to nil, we don’t handle state or config updates by calling updateTUN until after startVPN is called again.
The second case never happens because there’s no condition to break out of the loop in runBackend and ctx is uncancelable per the doc for context.Background()
In the third case, we should not establish the VPN; the state is already in the correct Stopped state, but there’s no need to set the service to nil and prevent updateTUN from being called. The quick settings tile bug is caused by this third case, where because the saved prefs starts the app up in the Stopped state, the config is set to the default config, and the service is set to nil, and we can't updateTUN until there’s another startVPN call.

This PR:
-cleans up the updateTUN error handling to be more consistent
-removes the IPNService parameter from updateTUN so that vpnService.service is not set to nil in the third case
-updates IPNService to use stopSelf and not stopForeground when we disconnect the VPN; the latter only disconnects if there is a memory need

Fixes tailscale/tailscale#12489

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 25e7681c32
android: set VPN status in service APIs (#522)
This is mainly a no-op; right now we are setting the VPN status when we successfully edit prefs with wantRunning=false, but the VPN status is separate from tailscaled status and reflects the status of the VPN interface. This change moves that status update into the Android Service APIs.

Updates tailscale/tailscale#12850
Updates tailscale/tailscale#12489

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Jonathan Nobels f8f2ee029a
android: fix all linter warnings and treat warnings as errors (#521)
#Updates tailscale/corp#22284

Fixes and/or explicitly suppresses all linter warnings and
we will now fail the build if new warnings are introduced.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
kari-ts 08ae018468
android: send Android logs to logz (#515)
TSLog sends log messages to Android's logcat and Tailscale's logger
Libtailscale wrapper is a Kotlin wrapper that allows us to get around the problems with mocking a native library

Fixes tailscale/corp#23191

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Brad Fitzpatrick f26a828cbd Makefile: use "tailscale_go" build tag when using Tailscale's Go toolchain
Updates tailscale/tailscale#13527

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2 months ago
kari-ts 9731afd44c
android: use PackageManager to determine install AppSourceChecker (#517)
We were using MaybeGoogle to determine whether the app was installed from the Play Store, but this has not worked since the refactor.
Fixes tailscale/tailscale#13442
Updates tailscale/corp#23283

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 9654bb5d9d
android: include hex in LoginQRView (#502)
Updates tailscale/tailscale#13277

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 2ec7304092
android: use onSuccess parameter in setWantRunning (#516)
Previously we were never actually invoking this parameter
We previously weren't setting vpnActive after closing IPNService

Updates tailscale/corp#22284

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 22de0cdb7e
android: make custom url check case-insensitive (#513)
Fixes tailscale/corp#23210

Signed-off-by: kari-ts <kari@tailscale.com>
Co-authored-by: Jonathan Nobels <jnobels@gmail.com>
2 months ago
kari-ts fc8ccc0057
go/toolchain: use ed9dc37b2b000f376a3e819cbb159e2c17a2dac6 (#514)
Updates #cleanup

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Jonathan Nobels 0b2a04b475
android: bump OSS to 1.75.11 (#512)
android: bumping OSS

OSS and Version updated to 1.75.11-t8b962f23d-gf07d419a125

The toolchain hash is being incorrectly by bumpOSS.
Reverting it back to the correct value for 1.74/1.75

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
kari-ts 9987dbc592
android: only update DNS configs on LinkProperties changes (#511)
We were updating DNS configs when capabilities changed, without LinkProperties having been filled in. Because onAvailable always happened first, LinkProperties were created with default value, and onCapabilitiesChanged sent a DNS update using those LinkProperties.
This change only updates DNS configs on LinkProperties, which is the last update sent on a network change.

Updates tailscale/tailscale#13173

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
kari-ts 8b91b0ff0a
android: bumping OSS (#510)
OSS and Version updated to 1.75.6-tf572286bf-g2fcb080aa67

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
James Tucker 2fcb080aa6 Makefile: ensure go.toolchain.rev is included in bumposs
Updates #501

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
James Tucker 9e09fad087 Makefile: update go.toolchain.rev atomically
Updates #501

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
James Tucker 204173d10c Makefile: use explicit path to command invocations
Make does not respect PATH updates made inside the Makefile for program
lookup in invocations. This can be worked around a number of ways, but
differences between the Linux gmake versions in CI, and the macOS gmake
versions on developer machines constrain us.

Updates #501

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
James Tucker b3a7f7f2ae tool/go: update to correct toolchain as needed
Ensure that the target revision is loaded from this repository, not from
the working directory.
Update go to the target revision if the marker file does not match the
target.

Updates #501

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
James Tucker 209045d4f7 Makefile: remove go toolchain version marker in clean as well
The go wrapper script in tool/go assumes that .extracted is
representative of the state of the toolchain directory, so it must be
removed when the toolchain directory is removed.

Updates #501

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
James Tucker 7888447f3f Makefile: disable GOTOOLCHAIN from dynamic switching
Go has a new build facility that can utilize other toolchains if a
module says so, but we manage the toolchain in our own way, so disable
it.

Updates #501

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
James Tucker 72c410465c Makefile: add command to start emulator
This emulator command starts an emulator and keeps running in the
foreground so as to avoid creating zombies.

Updates #343

Co-authored-by: kari@tailscale.com
Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
Andrea Gottardo 001e79546c
android: bump OSS to 1.75.3 + update toolchain (#501)
OSS and Version updated to 1.75.3-tafec2d41b-gffbc556cde8

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
3 months ago
Andrea Gottardo ffbc556cde
android: bumping OSS to 1.75.2 (#500)
OSS and Version updated to 1.75.2-t93f61aa4c-ge195def5e23

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
3 months ago
Jonathan Nobels e195def5e2
android: fix clean build (#499)
updates tailscale/corp#17686

'make clean' will now purge the cached toolchain to ensure you're using the
right go version when switching branches.  make clean is run in CI before
building anything and the docker container name is updated to pick that up.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Andrew Dunham aaecc62e1c android: rework NetworkChangeCallback to track all networks
Instead of just tracking our default network, track all of them and
decide upon each change which is the "best" option.

Updates tailscale/tailscale#13173

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
3 months ago
Brad Fitzpatrick 33f79deb3a tool/go: fix typo in comment
Updates #cleanup

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
3 months ago
kari-ts 28712da8d0
android: fix BuildConfig infinite loop (#495)
Rather than create a Go struct that is set by Android, have Go call into Android to fetch build BuildConfig
Updates tailscale/tailscale#13431

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
Andrew Dunham 45567146f4 android, libtailscale: pass BuildConfig to Go code; use for DNS config
This commit wires up a method to allow the Tailscale Go backend to
obtain the build configuration, and then adds a new build configuration
to the build to control whether we fall back to the Google public DNS
servers if we can't determine the platform's DNS configuration.

This replaces the previous "IsPlayVersion" / "MaybeGoogle" check for
whether to use the DNS servers as fallbacks, to allow users to decide
this independently of what version of the Android app this is.

Updates tailscale/tailscale#13431

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
3 months ago
kari-ts 283e1ebcd8
android: fix network callback race (#493)
ConnectivityManager doesn't make guarantees about the order of network updates. Only use network updates for currently active network.
Also, use registerDefaultNetworkCallback so that we are only listening for default networks.

Updates tailscale/tailscale#13173

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
Jonathan Nobels 9f87446ab6
android: bumping OSS to 1.73.114 (#492)
OSS Updated to 1.73.114
Version 1.73.114-t0970615b1-gab7ab737364

updates #cleanup

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Jonathan Nobels ab7ab73736
android: fix versioning and bump oss (#490)
* android: update docker image names for go 1.23

updates #cleanup

We need to regenerate the docker images, we'll
denote the new ones with a go1.23 extension.

This also sets the TS_USE_TOOLCHAIN flag so
we're using the corp toolchain which fixes some
versioning script issues.

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

* android: bumping OSS

OSS and Version updated to 1.73.104-te7b5e8c8c-g161457b99b5

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

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Anton Tolchanov fb8a4f51dc Makefile: fix docker-shell command line
- Fix volume mounting (positional argument to `-v`)
- Correct the make target name in README

Updates tailscale/corp#19670

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
3 months ago
Anton Tolchanov 095dae1195 android: exclude MDM classes from ProGuard optimizations
Updates tailscale/corp#22797

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
3 months ago
Andrea Gottardo 19581721cf
android: bump OSS to 1.73.73, use Go 1.23 (#485)
Updates #cleanup

OSS and Version updated to 1.73.73

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
3 months ago
kari-ts 18e4b176c6
android: fix missing '}' issue (#487)
also run linter

Updates #cleanup

Signed-off-by: kari-ts <kari@tailscale.com>
3 months ago
kari-ts 77eaadb360
android: fix missing imports (#486)
android: make clipboard values clickable and focusable

also, use Column isntead of LazyColumn since the Tailnet lock view is a short list and doesn't require lazy rendering

Fixes tailscale/corp#21737

Signed-off-by: kari-ts <kari@tailscale.com>
Signed-off-by: kari-ts <135075563+kari-ts@users.noreply.github.com>
3 months ago