Commit Graph

160 Commits (5bff7f33578732fc15bf23f40613c1a51e2d49ba)

Author SHA1 Message Date
Denton Gentry a965ae0038
cmd/tailscale: add tun Wrapper and call Start() (#140)
Fixes https://github.com/tailscale/corp/issues/15388

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
7 months ago
James Tucker 727e7e2b50 cmd/tailscale: avoid creating multiple netmon instances
This is a quick fix, we should come back and try to reorganize this
later.

Updates tailscale/tailscale#9374
8 months ago
Aaron Klotz 6a142b2f50 cmd/tailscale: fix OSS build breaks
For build #cleanup

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
8 months ago
Brad Fitzpatrick c21bbc94a1 cmd/tailscale: prefer showing Sharer user over Owner user
Fixes tailscale/corp#14056
Updates tailscale/tailscale#8967

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
8 months ago
Brad Fitzpatrick b500bbdad6 go.mod: bump oss
And resulting API changes.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
9 months ago
Maisem Ali 50b5b851eb
go.mod: bump oss (#130)
Updates #oss

Signed-off-by: Maisem Ali <maisem@tailscale.com>
9 months ago
Charlotte Brandhorst-Satzkorn aba683bb61
cmd/tailscale: rebind magicsock.Conn onConnect (#126)
We have been getting into routing loops due to the timing of when we
bind sockets on starting the tailscale app. At this point, we do
not have access to `VpnService.protect()` and are unable to protect
the magicsock sockets, which causes a routing loop issue until we
forcibly rebind about 10 minutes into the service being started.

This change causes a rebind when the service is started, which restores
connectivity in cases where the socket was unprotected.

Updates tailscale/corp#13814
10 months ago
James Tucker 6a6e80db47
go.mod,cmd/tailscale: bump OSS and update logtail transport setup (#119)
Updates #cleanup
10 months ago
Denton Gentry 31f2aa8097 cmd/tailscale/main.go: use ipn.NewPrefs(), not &ipn.Prefs{}
ipn.NewPrefs() sets accepting DNS and routes to true,
among other things. &ipn.Prefs{} initializes all fields
to false.

Fixes https://github.com/tailscale/corp/issues/13377

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
10 months ago
kari-ts 04b79a2206
cmd/tailscale: if first notification, set hostname even if prefs is nil (#111)
Currently, if the notification (ipn.Notify) has a nil Prefs, the hostname defaults to localhost

Fixes #7875

Signed-off-by: kari-ts <kari@tailscale.com>
11 months ago
Brad Fitzpatrick f44692addd
cmd/tailscale: don't render ShareeNode peers (#98)
Fixes tailscale/corp#11006

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
11 months ago
Charlotte Brandhorst-Satzkorn 39717f946b
Revert "Add DNS/routing prefs like on desktop (#86)" (#108)
This reverts commit d316acaa3d.
12 months ago
Brad Fitzpatrick 6b9a11c755 cmd/tailscale: fix regression from earlier commit
In 00a42702cb I bumped go.mod and adjusted the API, but only tested
that it compiled & tests (hah) passed.

I forgot this line. I still haven't tested this, but can't be worse! :)

Fixes 00a42702cb (commitcomment-112642284)

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 year ago
Brad Fitzpatrick 00a42702cb go.mod: bump tailscale.com dep, update for tsd.System API change
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 year ago
Brad Fitzpatrick a7b3ae04b0 cmd/tailscale: use Google as DNS of last resort
Sometimes we try a dozen different ways to read the phone's DNS
settings and it still comes back empty. In that case, if we're already
on a Google-ified Android phone, just use Google's Public DNS servers
as the ultimate fallback, as we already do on ChromeOS to work around
ChromeOS Android VpnBuilder bugs.

Updates tailscale/tailscale#8006 etc etc

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
1 year ago
RoboMagus 13ecd3e34d
Exit node in notification (#96)
* Show exitnode in persistent notification when connected.
* updateNotification when exitnode changes

Fixes https://github.com/tailscale/tailscale/issues/4642

Signed-off-by: RoboMagus <68224306+RoboMagus@users.noreply.github.com>
1 year ago
Denton Gentry aa32919ac3 go.mod: update from OSS
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Brett Jenkins eb9599540c
Add intents (#87)
IPNReceiver: Add intents to connect and disconnect VPN

Added a new class IPNReceiver to listen to intents silently and connect and disconnect the VPN. This uses workers to avoid doing too much in the IPNReceiver which is to be avoided according to documentation.

Also includes a fix for vpn occasionally not starting. Think this was due to a race condition, but now only sets autoConnect to false when we know a connection is connecting or connected.

Fixes https://github.com/tailscale/tailscale/issues/3547
Updates https://github.com/tailscale/tailscale/issues/2481

Signed-off-by: Brett Jenkins <brett@brettjenkins.co.uk>
1 year ago
Mihai Parparita 8e4a740d8e cmd/tailscale: enabled logtail flushing for the Android client
The c2n endpoint was not working since we did not configure the flush
function (same issue that was previously fixed in the iOS client in
tailscale/corp#9939).

Updates tailscale/corp#8564
1 year ago
Mihai Parparita 68ecc44a49 cmd/tailscale: upload client metrics
More generally, make the logtail.Config similar to the one used by
clients for other platforms.

Updates tailscale/corp#9230
1 year ago
Gero Gerke d316acaa3d
Add DNS/routing prefs like on desktop (#86)
ui: Add DNS/routing prefs like on desktop

Fixes https://github.com/tailscale/tailscale/issues/2155

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Jordan Whited 2470284b31
go.mod: Update from OSS and bump wireguard-go. (#88)
Signed-off-by: Jordan Whited <jordan@tailscale.com>
1 year ago
Denton Gentry d0c45c1de1 Revert "IPNReceiver: Add intents to connect and disconnect VPN (#84)"
Reverting according to discussion in
https://github.com/tailscale/tailscale/issues/3547#issuecomment-1465035410

This reverts commit 51a53e5472.
1 year ago
Denton Gentry d53da4ac65 go.mod: update OSS
Skip over the build number used for 1.36.2.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Brett Jenkins 51a53e5472
IPNReceiver: Add intents to connect and disconnect VPN (#84)
* IPNReceiver: Add intents to connect and disconnect VPN

Added a new class IPNReceiver to listen to intents silently and connect and disconnect the VPN
Also removed unneeded comment

Fixes: https://github.com/tailscale/tailscale/issues/3547

Signed-off-by: Brett Jenkins <brett@brettjenkins.co.uk>
1 year ago
David Anderson 52a0509a5d go.mod: update to tailscale HEAD
And update build logic to account for the API change in
tailscale.com/version.

And apply the API change introduced by
tailscale/tailscale@04b57a371e

Signed-off-by: David Anderson <dave@natulte.net>
1 year ago
Denton Gentry 6f1567bac8 go.mod: update from OSS.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 365b0ce6b0
ui: Fix background color of exit node status. (#75)
Prior to https://github.com/tailscale/tailscale-android/pull/73/,
the exit node status pane was set to a background color using:
    paint.Fill(gtx.Ops, bg)

paint.Fill() is documented to fill the entire clipped area.
It assumes that one has already applied a clip area... but
no clip area had been set in this code path.

As far as I can tell, that this worked prior to pull #73
was a bug, something had a side-effect of setting a clipping
rectangle.

We updated to the head of the Gio repo, which apparently fixed
that bug. After pull #73, the paint.Fill() painted the entire
app window.

Fix this using a stacked layout. A color filled widget is the
lower layer, and will expand to the size of the widget sitting
atop of it.

Fixes https://github.com/tailscale/tailscale/issues/6873

Signed-off-by: Denton Gentry <dgentry@tailscale.com>

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 30e46fb854
go.mod: update from OSS. (#74)
Signed-off-by: Denton Gentry <dgentry@tailscale.com>

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 62cc5fe074
cmd/tailscale: update to latest gioui.org. (#73)
There were several API changes since we last updated. We
followed examples from the upstream Gio repository:

1. Replace unit.Px with unit.Dp.
   Followed example in:
   3d37491342

2. op.Offset now takes int coordinates instead of float.
   Followed example in:
   a63e0cb44a

3. clip.RRect now takes int coordinates instead of float.
   Followed example in:
   48a8540a68

4. Replace system.CommandEvent with key.Event.
   Followed example in:
   6c76fa6dec

Updates https://github.com/tailscale/tailscale/issues/6824

Signed-off-by: Denton Gentry <dgentry@tailscale.com>

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
James Tucker 73e3a13322
cmd/tailscale: implement new batch APIs (#71)
Signed-off-by: Jordan Whited <jordan@tailscale.com>
1 year ago
Denton Gentry 0244fd108d
cmd/tailscale: fix alternate ControlURL handling. (#72)
With the Fast User Switching support in Tailscale 1.34,
it is no longer necessary (nor sufficient) to exit
and restart the app, as the settings are saved upon
first connection.

Therefore:
- do not restart the app after changing the control URL,
  just go back to the authentication screen.
- call `ipn/ipnlocal/local.go:Start()` to reinitialize
  the backend using the new auth URL.

Fixes https://github.com/tailscale/tailscale/issues/6671

Signed-off-by: Denton Gentry <dgentry@tailscale.com>

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
1 year ago
Denton Gentry 1181155b7d go.mod: update from OSS.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Denton Gentry 26e72f15ef go.mod: update from OSS.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Denton Gentry d46d247535
cmd/tailscale: set logcfg.FlushDelay (#67)
Signed-off-by: Denton Gentry <dgentry@tailscale.com>

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Denton Gentry 98b7c9d7e5 backend: logcfg.DrainLogs is now the default
We don't need to implement a 2 minute timer.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Andrew Dunham 576b46f8f7
cmd/tailscale: show an error when we hit the multiple users Android bug (#65)
Updates tailscale/tailscale#2180

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
2 years ago
Will Norris 901c43c3b9 android: add about dialog with license link
Add "about" menu item in both the logged out and logged in menus.  About
dialog shows Tailscale version and link to URL with open source
licenses.

Updates tailscale/corp#5780

Signed-off-by: Will Norris <will@tailscale.com>
2 years ago
Denton Gentry bbf31f568f
UI: remove "No internet connection" (#57)
This has never worked well. I think we'd need to periodically re-check
link state, and possibly hook up a generate_204 function, to make this
really work.

Fixes https://github.com/tailscale/tailscale/issues/5422

Signed-off-by: Denton Gentry <dgentry@tailscale.com>

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Brad Fitzpatrick b1501eb5d8 Hide login screen advance settings behind few taps
By default, only show the version number in the login screen's menu.
But if you open and close it a few times, then show the alternate
control plane server option. It's always shown if you've ever edited
the value.

And rename it to just "Change server" and remove "Advanced".

Updates tailscale/tailscale-android#45
2 years ago
Trevor Bergeron d8aedf721a Add ability to choose a custom coordination server
Signed-off-by: Trevor Bergeron <mal@sec.gd>
2 years ago
Brad Fitzpatrick 140149ef87 fix "invalid IP" regression from netaddr to netip migration
Fixes tailscale/tailscale#5243
2 years ago
Brad Fitzpatrick f77610bd62 reformat, rename googleDNSServers variable
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2 years ago
Denton Gentry 1a0253892b go.mod: update from OSS.
Includes netaddr -> netip changes.

main.go getInterfaces still uses netaddr as it needs to return
a net.IPNet (we'd need to add a new implementation in
7c671b0220/net/interfaces/interfaces.go (L110)
to handle a different type).

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Denton Gentry b606b0b668 UI: move exit node function into the main menu
Android running as an exit node has been implemented behind
a magic "debug" search string for three releases. I think we've
gotten as much early usage as we're going to get. Move it into
the main menu as a regular feature.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Denton Gentry 7697c9d300 go.mod: update OSS to main@HEAD.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2 years ago
Brad Fitzpatrick cff9e2a772 cmd/tailscale: fix netstack init, call SetLocalBackend
The netstack code on Android was never told about the LocalBackend,
so the peerapi interception wasn't working.

Fixes tailscale/tailscale#4449
Fixes tailscale/tailscale#4293

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2 years ago
Elias Naur 83bfea18bb cmd/tailscale,com/tailscale/ipn: implement QR sign-in for TV devices
This is a cleand up version of #27.

Fixes tailscale/tailscale#1611

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2 years ago
Elias Naur e316f3b1c2 cmd/tailscale: improve focus navigation
This change prevents focusing hidden widgets or widgets under modal dialogs.

For tailscale/tailscale#1611

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2 years ago
Elias Naur 7c268dfc4f Revert "Revert "cmd/tailscale,go.*: update Gio version""
This reverts commit 213009e9af, and
updates Gio to a version that includes directional focus support.

For tailscale/tailscale#1611

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2 years ago