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>
This means that the Tailscale app's traffic will never use
the VPN that it sets up, which avoids routing loops in
scenarios like publishing a default route over Tailscale.
Signed-off-by: David Anderson <danderson@tailscale.com>
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>