Brad Fitzpatrick and Brad Fitzpatrick
df9ce972c7
tailcfg, ipn/ipnlocal: add debug flag to enable one-big-CGNAT/10 route
...
To experiment with avoiding Chrome ERR_NETWORK_CHANGED errors on route
changes.
Updates #3102
Change-Id: I339da14c684fdac45ac261566aa21bf2198672ff
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-04-14 14:47:42 -07:00
Maisem Ali and Maisem Ali
3603a18710
ipn/localapi: add endpoint to request id token
...
Updates tailscale/corp#4347
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-04-05 14:48:45 -07:00
Maisem Ali and Maisem Ali
035e8ab00e
tailcfg: add Token{Request,Response} types
...
Updates tailscale/corp#4347
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-04-05 14:48:45 -07:00
Joe Tsai and GitHub
01adcfa688
tailcfg: add omitempty to all fields of Hostinfo ( #4360 )
...
This reduces the noise when marshaling only a subset of this type.
Signed-off-by: Joe Tsai <joetsai@digital-static.net >
2022-04-05 13:25:14 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
0861923c21
ssh/tailssh, tailcfg: add more HoldAndDelegate expansions, document
...
Updates #3802
Change-Id: I447f06b49e2a917bffe36881d0634c9195085512
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-03-22 17:56:45 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
f3b13604b3
control/controlclient, ipn/ipnlocal, tailcfg: add MapResponse.PopBrowserURL
...
Updates #3802
Change-Id: I89481fc5782a0cc8084354706f8f28d94f197325
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-03-22 09:37:00 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
f7e976db55
tailcfg, ssh/tailssh: make SSHUser value '=' map ssh-user to same local-user
...
Updates #3802
Change-Id: Icde60d4150ca15c25d615a4effb3d3c236f020a8
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-03-21 10:49:37 -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
45a7f6689c
tailcfg: add field to allow LocalPortForwarding in SSHAction
...
Updates #3802 , #4129
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-03-14 13:39:42 -07:00
Maisem Ali and Maisem Ali
98b45ef12c
ssh/tailssh: add support for agent forwarding.
...
Updates #3802
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-03-14 13:38:53 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
efc48b0578
ssh/tailssh, ipnlocal, controlclient: fetch next SSHAction from network
...
Updates #3802
Change-Id: I08e98805ab86d6bbabb6c365ed4526f54742fd8e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-03-10 13:41:08 -08:00
Maisem Ali and Maisem Ali
2bcc047d4f
tailcfg: bump capVer for Noise
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-03-09 14:41:24 -08:00
Maisem Ali and Maisem Ali
da1821197a
tailcfg: add SetDNSResponse
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-03-07 16:27:13 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
d5f8f38ac6
tailcfg: rename map request version to "capability version"
...
And add a CapabilityVersion type, primarily for documentation.
This makes MapRequest.Version, RegisterRequest.Version, and
SetDNSRequest.Version all use the same version, which will avoid
confusing in the future if Register or SetDNS ever changed their
semantics on Version change. (Currently they're both always 1)
This will requre a control server change to allow a
SetDNSRequest.Version value other than 1 to be deployed first.
Change-Id: I073042a216e0d745f52ee2dbc45cf336b9f84b7c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-03-06 14:29:08 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
105dfa1efa
tailcfg: add OverTLSPublicKeyResponse for the new response from /key
...
Updates #3488
Change-Id: I8729cb3fb7f6dda1a874f8ae2d9570311ed158db
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-03-06 13:51:32 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
e1e20f6d39
ssh/tailssh: evaluate tailcfg.SSHPolicy on incoming connections
...
Updates #3802
Fixes #3960
Change-Id: Ieda2007d462ddce6c217b958167417ae9755774e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-02-18 18:07:39 -08:00
Josh Bleecher Snyder and Josh Bleecher Snyder
8c3c5e80b7
tailcfg: make MapResponse.ControlTime a pointer
...
Otherwise omitempty doesn't work.
This is wire-compatible with a non-pointer type, so switching
is safe, now and in the future.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2022-02-18 10:37:27 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
bb93e29d5c
tailcfg, ipn/ipnlocal: add Hostinfo.SSH_HostKeys, send when SSH enabled
...
(The name SSH_HostKeys is bad but SSHHostKeys is worse.)
Updates #3802
Change-Id: I2a889019c9e8b065b668dd58140db4fcab868a91
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-02-17 15:46:57 -08:00
Josh Bleecher Snyder and Josh Bleecher Snyder
4609096271
tailcfg: fix stale docs for MapResponse.KeepAlive
...
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2022-02-17 15:15:43 -08:00
Josh Bleecher Snyder and Josh Bleecher Snyder
8cf6d0a17b
tailcfg: add MapResponse.ControlTime field
...
And log it when provided in map responses.
The test uses the date on which I joined Tailscale. :)
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2022-02-16 20:18:03 -08:00
Maisem Ali and Maisem Ali
72d8672ef7
tailcfg: make Node.Hostinfo a HostinfoView
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-02-16 12:55:57 -08:00
Maisem Ali and Maisem Ali
53998e26a6
tailcfg: introduce HostinfoView
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-02-16 12:55:57 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
57115e923e
tailcfg: add start of SSH policy to be sent from control plane to nodes
...
Updates #3802
Change-Id: Iec58f35d445aaa267d0f7e7e2f30c049c1df4c0e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-02-15 16:05:42 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
a7da236d3d
tailcfg: no-op bump of MapRequest.Version
...
So 1.18 and 1.20 don't have the same.
Change-Id: Ib2cac7c11eb37d9a0c2fcb66630f1cae619a97f4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-01-12 15:20:52 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
bc537adb1a
tailcfg: add Hostinfo.HowUnequal method
...
Change-Id: I80ee49c2ab581feccc4aa6ab47bc3c8392d9989d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-12-23 09:04:53 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
b811a316bc
tailcfg, ipn/ipnlocal: advertise a Service when exit node DNS proxy available
...
Updates #1713
Change-Id: I20c8e2ad1062d82ef17363414e372133f4c7181e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-11-29 21:57:06 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
135580a5a8
tailcfg, ipn/ipnlocal, net/dns: forward exit node DNS on Unix to system DNS
...
Updates #1713
Change-Id: I4c073fec0992d9e01a9a4ce97087d5af0efdc68d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-11-29 15:25:41 -08:00
David Anderson and Brad Fitzpatrick
0532eb30db
all: replace tailcfg.DiscoKey with key.DiscoPublic.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-11-03 14:00:16 -07:00
David Anderson
17b5782b3a
types/key: delete legacy NodeKey type.
...
Fixes #3206
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-11-02 14:14:32 -07:00
David Anderson and Dave Anderson
7e6a1ef4f1
tailcfg: use key.NodePublic in wire protocol types.
...
Updates #3206 .
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-11-02 09:11:43 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
ff597e773e
tailcfg, control/controlclient: add method to exit client from control plane
...
Change-Id: Ic28ef283ba63396b68fab86bfb0a8ee8f432474c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-11-01 11:59:04 -07:00
David Anderson
0fcc88873b
tailcfg: remove NodeKeyFromNodePublic.
...
Updates #3206
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-29 16:35:32 -07:00
David Anderson
c0ae1d2563
tailcfg: update go generate, which apparently normalizes type aliases.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-29 16:24:38 -07:00
David Anderson
ff16e58d23
tailcfg: move NodeKey type to types/key.
...
This leaves behind a type alias and associated constructor, to allow
for gradual switchover.
Updates #3206 .
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-29 16:04:45 -07:00
David Anderson
15d329b4fa
tailcfg: add marshaling round-tripping test.
...
Temporary until #3206 goes away, but having changed the marshal/unmarshal
implementation I got nervous about the new one doing the correct thing.
Thankfully, the test says it does.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-29 15:21:41 -07:00
David Anderson
2486d7cb9b
tailcfg: remove use of legacy key parsing helper.
...
Updates #3206 .
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-29 14:48:07 -07:00
David Anderson
ef241f782e
wgengine/magicsock: remove uses of tailcfg.DiscoKey.
...
Updates #3206
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-29 14:31:44 -07:00
David Anderson
ebae0d95d0
Revert "Revert "tailcfg: remove reference to types/key.Public.""
...
Updates #3206
This reverts commit ef14663934 .
2021-10-29 09:38:44 -07:00
David Anderson
ef14663934
Revert "tailcfg: remove reference to types/key.Public."
...
Breaks corp unit tests.
Updates #3206
This reverts commit 94f6257fde .
2021-10-28 19:00:29 -07:00
David Anderson
94f6257fde
tailcfg: remove reference to types/key.Public.
...
Updates #3206
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-28 16:16:38 -07:00
Josh Bleecher Snyder and Josh Bleecher Snyder
94fb42d4b2
all: use testingutil.MinAllocsPerRun
...
There are a few remaining uses of testing.AllocsPerRun:
Two in which we only log the number of allocations,
and one in which dynamically calculate the allocations
target based on a different AllocsPerRun run.
This also allows us to tighten the "no allocs"
test in wgengine/filter.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2021-10-28 12:48:37 -07:00
David Anderson
bab2d92c42
tailcfg: remove use of wgkey.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-28 10:39:56 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
7b87c04861
tailcfg: add RegisterRequest.Ephemeral to request new ephemeral node
...
So js/wasm clients can log in for a bit using regular Gmail/GitHub auth
without using an ephemeral key but still have their node cleaned up
when they're done.
Updates #3157
Change-Id: I49e3d14e9d355a9b8bff0ea810b0016bfe8d47f2
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-10-28 10:05:36 -07:00
David Anderson and Dave Anderson
bc89a796ec
types/key: add a dedicated type for node keys.
...
Complete with converters to all the other types that represent a
node key today, so the new type can gradually subsume old ones.
Updates #3206
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-10-28 09:16:39 -07:00
Maisem Ali and Maisem Ali
81cabf48ec
control/controlclient,tailcfg: propagate registration errors to the frontend
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2021-10-27 06:57:26 -07:00
Maisem Ali and Maisem Ali
10745c099a
tailcfg: add Node.Tags
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2021-10-25 22:04:45 -07:00
Joe Tsai and Brad Fitzpatrick
9af27ba829
cmd/cloner: mangle "go:generate" in cloner.go
...
The "go generate" command blindly looks for "//go:generate" anywhere
in the file regardless of whether it is truly a comment.
Prevent this false positive in cloner.go by mangling the string
to look less like "//go:generate".
Signed-off-by: Joe Tsai <joetsai@digital-static.net >
2021-10-16 17:53:43 -07:00
Brad Fitzpatrick and Brad Fitzpatrick
aae622314e
tailcfg, health: add way for control plane to add problems to health check
...
So if the control plane knows that something's broken about the node, it can
include problem(s) in MapResponse and "tailscale status" will show it.
(and GUIs in the future, as it's in ipnstate.Status/JSON)
This also bumps the MapRequest.Version, though it's not strictly
required. Doesn't hurt.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-09-19 17:55:49 -07:00
Josh Bleecher Snyder and Josh Bleecher Snyder
d5ab18b2e6
cmd/cloner: add Clone context to regen struct assignments
...
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2021-09-17 16:46:08 -07:00