66f97f4bea
tka: provide authority StateID in NetworkLockStatus response ( #8200 )
...
Fixes #8201 .
Signed-off-by: Andrea Gottardo <andrea@tailscale.com >
Co-authored-by: Andrea Gottardo <andrea@tailscale.com >
2023-05-24 13:36:25 -07:00
Tom DNetto and Tom
3471fbf8dc
cmd/tailscale: surface node-key for locked out tailnet-lock peers
...
Signed-off-by: Tom DNetto <tom@tailscale.com >
2023-03-09 11:06:23 -10:00
Maisem Ali and Maisem Ali
89bd414be6
ipn/ipnstate: update field docs on PeerStatus.
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2023-02-08 15:23:05 -08:00
Will Norris and Will Norris
71029cea2d
all: update copyright and license headers
...
This updates all source files to use a new standard header for copyright
and license declaration. Notably, copyright no longer includes a date,
and we now use the standard SPDX-License-Identifier header.
This commit was done almost entirely mechanically with perl, and then
some minimal manual fixes.
Updates #6865
Signed-off-by: Will Norris <will@tailscale.com >
2023-01-27 15:36:29 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
06fff461dc
ipn/ipnstate: add PeerStatus.KeyExpiry for tailscale status --json
...
Fixes #6712
Change-Id: I817cd5342fac8a956fcefda2d63158fa488f3395
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2023-01-23 12:45:09 -08:00
Mihai Parparita and Mihai Parparita
67f82e62a1
ipn/ipnlocal: add Expired to PeerStatus
...
Needed for clients that get information via the /v0/status LocalAPI
endpoint (e.g. to not offer expired exit nodes as options).
Updates tailscale/corp#8702
Signed-off-by: Mihai Parparita <mihai@tailscale.com >
2023-01-13 18:21:56 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
61dfbc0a6e
cmd/tailscale/cli: plumb TUN mode into tailscale web template
...
UI works remains, but data is there now.
Updates #4015
Change-Id: Ib91e94718b655ad60a63596e59468f3b3b102306
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2023-01-13 07:59:40 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
aad6830df0
util/codegen, all: use latest year, not time.Now, in generated files
...
Updates #6865
Change-Id: I6b86c646968ebbd4553cf37df5e5612fbf5c5f7d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2023-01-02 20:38:32 -08:00
0f604923d3
ipn/ipnlocal: fix StatusWithoutPeers not populating parts of Status
...
Fixes #4311
Change-Id: Iaae0615148fa7154f4ef8f66b455e3a6c2fa9df3
Co-authored-by: Claire Wang <claire@tailscale.com >
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-12-19 13:15:28 -08:00
Tom DNetto and Tom
9a80b8fb10
cmd/tailscale,ipn: surface TKA-filtered peers in lock status command
...
Signed-off-by: Tom DNetto <tom@tailscale.com >
2022-11-30 13:25:31 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
109aa3b2fb
cmd/tailscale: add start of "debug derp" subcommand
...
Updates #6526
Change-Id: I84e440a8bd837c383000ce0cec4ff36b24249e8b
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-26 15:40:25 -08:00
Tom DNetto and Tom
6708f9a93f
cmd/tailscale,ipn: implement lock log command
...
This commit implements `tailscale lock log [--limit N]`, which displays an ordered list
of changes to network-lock state in a manner familiar to `git log`.
Signed-off-by: Tom DNetto <tom@tailscale.com >
2022-11-22 10:30:59 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
a26f23d949
ipn/ipnlocal: actually fill out PeerAPIURLs in PeerStatus
...
The earlier 5f6d63936f was not complete.
Updates tailscale/corp#7515
Change-Id: I35efca51d1584c48ef6834a7d29cd42d7c943628
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-19 13:35:39 -08:00
Maisem Ali and Tom
235309adc4
all: store NL keys per profile
...
This moves the NetworkLock key from a dedicated StateKey to be part of the persist.Persist struct.
This struct is stored as part for ipn.Prefs and is also the place where we store the NodeKey.
It also moves the ChonkDir from "/tka" to "/tka-profile/<profile-id>". The rename was intentional
to be able to delete the "/tka" dir if it exists.
This means that we will have a unique key per profile, and a unique directory per profile.
Note: `tailscale logout` will delete the entire profile, including any keys. It currently does not
delete the ChonkDir.
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-11-15 19:51:52 +00:00
Tom DNetto and Tom
4c31183781
cmd/tailscale,ipn: minor fixes to tailscale lock commands
...
* Fix broken add/remove key commands
* Make lock status display whether the node is signed
Signed-off-by: Tom DNetto <tom@tailscale.com >
2022-11-11 07:48:40 -06:00
Nahum Shalman and Brad Fitzpatrick
d20392d413
cmd/tailscale: add emoji for illumos in status subcommand
...
Signed-off-by: Nahum Shalman <nahamu@gmail.com >
2022-08-28 08:29:31 -07:00
Tom DNetto and Tom
facafd8819
client,cmd/tailscale,ipn,tka,types: implement tka initialization flow
...
This PR implements the client-side of initializing network-lock with the
Coordination server.
Signed-off-by: Tom DNetto <tom@tailscale.com >
2022-08-22 11:35:16 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
a12aad6b47
all: convert more code to use net/netip directly
...
perl -i -npe 's,netaddr.IPPrefixFrom,netip.PrefixFrom,' $(git grep -l -F netaddr.)
perl -i -npe 's,netaddr.IPPortFrom,netip.AddrPortFrom,' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IPPrefix,netip.Prefix,g' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IPPort,netip.AddrPort,g' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IP\b,netip.Addr,g' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IPv6Raw\b,netip.AddrFrom16,g' $(git grep -l -F netaddr. )
goimports -w .
Then delete some stuff from the net/netaddr shim package which is no
longer neeed.
Updates #5162
Change-Id: Ia7a86893fe21c7e3ee1ec823e8aba288d4566cd8
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-07-25 21:53:49 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
7eaf5e509f
net/netaddr: start migrating to net/netip via new netaddr adapter package
...
Updates #5162
Change-Id: Id7bdec303b25471f69d542f8ce43805328d56c12
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-07-25 16:20:43 -07:00
Melanie Warrick and GitHub
3a182d5dd6
ipn/ipnstate: add ExitNodeStatus to share the exit node if it is in use, the IP, ID and whether its online. ( #4761 )
...
-
Updates #4619
Signed-off-by: nyghtowl <warrick@tailscale.com >
2022-06-07 12:31:10 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
4d85cf586b
cmd/tailscale, ipn/ipnlocal: add "peerapi" ping type
...
For debugging when stuff like #4750 isn't working.
RELNOTE=tailscale ping -peerapi
Change-Id: I9c52c90fb046e3ab7d2b121387073319fbf27b99
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-05-28 13:47:12 -07:00
James Tucker and James Tucker
ae483d3446
wgengine, net/packet, cmd/tailscale: add ICMP echo
...
Updates tailscale/corp#754
Signed-off-by: James Tucker <james@tailscale.com >
2022-05-03 13:03:45 -07:00
James Tucker and James Tucker
c591c91653
tailcfg, control/controlclient: TSMP & disco pings
...
tailcfg.PingResponse formalizes the TSMP & disco response message, and
controlclient is wired to send POST responses containing
tailcfg.PingResponse for TSMP and disco PingRequests.
Updates tailscale/corp#754
Signed-off-by: James Tucker <james@tailscale.com >
2022-04-15 22:36:51 -07:00
Ilya Mateyko and Brad Fitzpatrick
2748750aa2
ipn/ipnstate: make status page more mobile-friendly
...
Signed-off-by: Ilya Mateyko <me@astrophena.name >
2022-04-12 12:33:31 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
cceacda5eb
ipn/ipnstate: put SSH Host Keys in ipnstate.PeerStatus
...
Updates #3802
Change-Id: I47ba3b4545b25988f375bd867aecd98bb0da8d79
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-03-25 12:14:39 -07:00
Josh Bleecher Snyder and Josh Bleecher Snyder
0868329936
all: use any instead of interface{}
...
My favorite part of generics.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2022-03-17 11:35:09 -07:00
Maisem Ali and Maisem Ali
6b9d938c1a
types/views: add generic Slice[T] and remove StringSlice
...
Also make IPPrefixSliceOf use Slice[netaddr.IPPrefix] as it also
provides additional functions besides the standard ones provided by
Slice[T].
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-03-16 22:13:16 -07:00
Maisem Ali and Maisem Ali
c7a8f0992d
ipn/ipnlocal: use views for Peer.PrimaryRoutes and Peer.Tags
...
RELNOTE=`tailscale status --json` now shows Tags and PrimaryRoutes
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-02-22 10:09:02 -08:00
Maisem Ali and Maisem Ali
9cbb0913be
ipn/{ipnlocal,ipnstate}: add Tags and PrimaryRoutes to PeerStatus
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-02-21 20:06:48 -08:00
Ross Zurowski and GitHub
6d02a48d8d
ipn: add TailnetStatus field to tailscale status --json ( #3865 )
...
We need to capture some tailnet-related information for some Docker
features we're building. This exposes the tailnet name and MagicDNS
information via `tailscale status --json`.
Fixes tailscale/corp#3670
Signed-off-by: Ross Zurowski <ross@rosszurowski.com >
2022-02-15 12:36:01 -05:00
Brad Fitzpatrick and Brad Fitzpatrick
857cd6c0d7
ipn/ipnstate: add TailnetName to status
...
RELNOTE=tailscale status --json | jq .TailnetName
Fixes tailscale/corp#3665
Change-Id: I85de027ba2781eb31ee1e0c5ab913b0dfa5b4c86
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-01-26 10:08:39 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
7b9c7bc42b
ipn/ipnstate: remove old deprecated TailAddr IPv4-only field
...
It's been a bunch of releases now since the TailscaleIPs slice
replacement was added.
Change-Id: I3bd80e1466b3d9e4a4ac5bedba8b4d3d3e430a03
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-12-09 09:28:23 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
c0701b130d
ipn/ipnstate, cmd/tailscale: add Online bool to tailscale status & --json
...
Fixes #3533
Change-Id: I2f6f0d712cf3f987fba1c15be74cdb5c8d565f04
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-12-08 09:34:15 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
2a95ee4680
cmd/tailscale, ipn/ipnstate: note which nodes are exit nodes in status
...
Fixes #3446
Change-Id: Ib41d588e7fa434c02d134fa449f85b0e15083683
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-11-30 16:59:23 -08:00
Josh Bleecher Snyder and Brad Fitzpatrick
027b46d0c1
ipn/ipnstate: clarify PeerStatusLite.LastHandshake
...
And document the other fields, as long as we're here.
Updates #1182
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2021-11-22 22:01:20 -08:00
David Anderson and Dave Anderson
c17250cee2
ipn/ipnstate: use key.NodePublic instead of tailcfg.NodeKey.
...
Updates #3206
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-11-01 20:32:10 -07:00
David Anderson and Dave Anderson
c1d009b9e9
ipn/ipnstate: use key.NodePublic instead of the generic key.Public.
...
Updates #3206 .
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-29 10:00:59 -07:00
Brad Fitzpatrick
7bfd4f521d
cmd/tailscale: fix "tailscale ip $self-host-hostname"
...
And in the process, fix the related confusing error messages from
pinging your own IP or hostname.
Fixes #2803
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-09-07 11:57:23 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
5bacbf3744
wgengine/magicsock, health, ipn/ipnstate: track DERP-advertised health
...
And add health check errors to ipnstate.Status (tailscale status --json).
Updates #2746
Updates #2775
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-09-02 10:20:25 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
f3c96df162
ipn/ipnstate: move tailscale status "active" determination to tailscaled
...
Fixes #2579
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-08-04 09:10:49 -07:00
Josh Bleecher Snyder and Josh Bleecher Snyder
8a3d52e882
wgengine/magicsock: use mono.Time
...
magicsock makes multiple calls to Now per packet.
Move to mono.Now. Changing some of the calls to
use package mono has a cascading effect,
causing non-per-packet call sites to also switch.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2021-07-29 12:56:58 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
cd282ec00f
tailcfg: add DNSConfig.CertDomains
...
Updates #1235
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-06-15 14:05:46 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
e72ed3fcc2
ipn/{ipnlocal,ipnstate}: add PeerStatus.ID stable ID to status --json output
...
Needed for the "up checker" to map back from exit node stable IDs (the
ipn.Prefs.ExitNodeID) back to an IP address in error messages.
But also previously requested so people can use it to then make API
calls. The upcoming "tailscale admin" subcommand will probably need it
too.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-05-07 09:31:55 -07:00
Brad Fitzpatrick
b993d9802a
ipn/ipnlocal, etc: require file sharing capability to send/recv files
...
tailscale/corp#1582
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-04-16 10:58:19 -07:00
Brad Fitzpatrick
762180595d
ipn/ipnstate: add PeerStatus.TailscaleIPs slice, deprecate TailAddr
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-04-14 08:12:31 -07:00
Brad Fitzpatrick
41e4e02e57
net/{packet,tstun}: send peerapi port in TSMP pongs
...
For discovery when an explicit hostname/IP is known. We'll still
also send it via control for finding peers by a list.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-03-29 15:18:23 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
81143b6d9a
ipn/ipnlocal: start of peerapi between nodes
...
Also some necessary refactoring of the ipn/ipnstate too.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-03-25 16:00:35 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
2384c112c9
net/packet, wgengine/{filter,tstun}: add TSMP ping
...
Fixes #1467
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-03-24 09:50:01 -07:00
Brad Fitzpatrick
439d70dce2
cmd/tailscale, ipn/localapi: get daemon version from localapi status
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-03-18 21:14:10 -07:00
David Crawshaw and David Crawshaw
bdb91a20eb
ipnstate, ipnlocal: add AuthURL to status
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com >
2021-03-12 08:07:20 -08:00