The upgraded version adds a CPU fallback renderer and sRGB emulation,
to support very low-spec Android Go devices.
Fixestailscale/tailscale#1008
Signed-off-by: Elias Naur <mail@eliasnaur.com>
There are several situations where a peer may only have IPv6:
+ it was authorized using an ephemeral node key
https://tailscale.com/kb/1111/ephemeral-nodes/
+ the Tailnet has IPv4 disabled
https://twitter.com/bradfitz/status/1398380415124082690
So:
+ if a peer has an IPv4 address, display that.
+ if a peer does not have an IPv4 address, display IPv6.
+ If a peer does not have either IPv4 or IPv6 then leave
the address blank. Not sure how this could happen.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Android updates its DNS config in updateTUN() when in response
to several different channels from the backend.
There is not an Android-specific NewOSConfigurator, we end
up pulling in the Linux NewOSConfigurator:
https://github.com/tailscale/tailscale/blob/main/net/dns/manager_linux.go
The Linux DNS manager expects to be able to write to /etc/resolv.conf,
which does not work on Android and causes errors in updating DNS config.
Instead, allocate dns.NewNoopManager to disable the DNS manager, and
rely on the updateTUN() code to handle DNS.
Fixes https://github.com/tailscale/tailscale/issues/1956
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Three variables are used everywhere a single non-blocking producer sends
values where only the latest is relevant:
var (
mu sync.Mutex
latest T
notify = make(chan struct{}, 1)
)
By draining the notification channel before sending through it, we
can simplify to just one channel:
latest = make(chan T, 1)
Thanks to Chris Waldon for showing me this neat trick.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Specifically, start the main activity to prompt the user to sign in or
be notified of a pending machine auth.
Fixestailscale/tailscale#1225
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The EnvFor converted an uintptr to a pointer value, which is not
guaranteed to work in general. This change removes EnvFor and pushes the
potentially unsafe conversion to users of the jni package.
Fixestailscale/tailscale#1195
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The JVMFor function converted an uintptr to a pointer, which is not
guaranteed to work in general. This change removes JVMFor, forcing the
unsafe conversion to the user of the jni packge.
Updates tailscale/tailscale#1195
Signed-off-by: Elias Naur <mail@eliasnaur.com>
When tailscale starts, any other active VPN service is automatically closed by the system.
However, if the other VPN service is configured to be always-on, we will be denied access
to set up a VPN. The user may not realize this case, so this change adds a notification
when we're denied access.
The failure mode is identical to the user denying access tthrough the system dialog
shown first time Tailscale starts, so the notification also mentions that case.
Fixestailscale/tailscale#1017
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This used to work, but a later ChromeOS workaround closed and cleared the last
configuration before comparing it with the new.
Fixestailscale/tailscale#966
Signed-off-by: Elias Naur <mail@eliasnaur.com>
In preparation for the F-Droid release, refactor the non-free Google dependency
into a separate Java class and make the Go client tolerate missing support.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Also, change the login screen tile to say "Tailscale", not the
redundant "Needs authentication".
Updates tailscale/tailscale#608
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Before this change, the Peer would be registered across Activity restarts
but not after Activity destruction (for example, when the user pressed the
back button).
Use the newer Gio ViewEvent API for tracking the Activity lifecycle and
the most recent Activity reference.
Move Java calls that need an Activity from Peer to App, leaving Peer solely
as a method for receiving onActivityResult.
Fixestailscale/tailscale#670
Signed-off-by: Elias Naur <mail@eliasnaur.com>
logtail.Log by default writes log output to stderr, but stderr is taken over by
filch's ReplaceStderr, resulting in duplicate logs sent to Tailscale.
ReplaceStderr is useful for capturing stack dumps from panics.
Configure logtail to route logs to the Android logger, which stops the
duplicate logging and replaces an existing MultiWriter setup for the same
purpose.
Reduce the scope of the logtail logger while here.
Fixestailscale/tailscale#646
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Contrary to the VpnService.Builder documentation, ChromeOS doesn't
automatically fall back to the underlying network nameservers when
none are provided.
Updates tailscale/tailscale#431
Signed-off-by: Elias Naur <mail@eliasnaur.com>