Brad Fitzpatrick
329a0a8406
client/tailscale: remove some json.Unmarshal repetition, add helper
...
Change-Id: I73ece09895ad04c7d8c4a5673f9bd360be873b9f
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-10 21:54:56 -08:00
Brad Fitzpatrick
f4a522fd67
client/tailscale: make a helper for json.Marshal'ed request bodies
...
Change-Id: I59eb1643addf8793856089690407fb45053c8e4d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-10 20:47:51 -08:00
Brad Fitzpatrick
69e4b8a359
client/tailscale: document ServeConfig accessors a bit more
...
Updates tailscale/corp#7515
Change-Id: Iecae581e4b34ce70b2df531bc95c6c390a398c38
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-10 20:38:07 -08:00
shayne
e3a66e4d2f
ipn/localapi: introduce get/set config for serve ( #6243 )
...
Updates tailscale/corp#7515
Signed-off-by: Shayne Sweeney <shayne@tailscale.com >
2022-11-10 22:58:40 -05:00
Mihai Parparita
7a07bc654b
ipn/localapi: rename /profile to /pprof
...
Avoids name collision with profiles for user switching.
Signed-off-by: Mihai Parparita <mihai@tailscale.com >
2022-11-10 12:02:16 -08:00
Brad Fitzpatrick
5bb7e0307c
cmd/tailscale, ipn/ipnlocal: add debug command to write to StateStore for dev
...
Not for end users (unless directed by support). Mostly for ease of
development for some upcoming webserver work.
Change-Id: I43acfed217514567acb3312367b24d620e739f88
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-07 15:34:43 -08:00
Brad Fitzpatrick
da8def8e13
all: remove old +build tags
...
The //go:build syntax was introduced in Go 1.17:
https://go.dev/doc/go1.17#build-lines
gofmt has kept the +build and go:build lines in sync since
then, but enough time has passed. Time to remove them.
Done with:
perl -i -npe 's,^// \+build.*\n,,' $(git grep -l -F '+build')
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-04 07:25:42 -07:00
Tom DNetto
0af57fce4c
cmd/tailscale,ipn: implement lock sign command
...
Signed-off-by: Tom DNetto <tom@tailscale.com >
2022-11-02 15:00:01 -05:00
Tom DNetto
d98305c537
cmd,ipn/ipnlocal,tailcfg: implement TKA disablement
...
* Plumb disablement values through some of the internals of TKA enablement.
* Transmit the node's TKA hash at the end of sync so the control plane understands each node's head.
* Implement /machine/tka/disable RPC to actuate disablement on the control plane.
There is a partner PR for the control server I'll send shortly.
Signed-off-by: Tom DNetto <tom@tailscale.com >
2022-10-31 11:05:44 -05:00
Andrew Dunham
c32f9f5865
cmd/tailscale, ipn: enable debug logs when --report flag is passed to bugreport ( #5830 )
...
Change-Id: Id22e9f4a2dcf35cecb9cd19dd844389e38c922ec
Signed-off-by: Andrew Dunham <andrew@tailscale.com >
2022-10-15 13:31:35 -04:00
Brad Fitzpatrick
1841d0bf98
wgengine/magicsock: make debug-level stuff not logged by default
...
And add a CLI/localapi and c2n mechanism to enable it for a fixed
amount of time.
Updates #1548
Change-Id: I71674aaf959a9c6761ff33bbf4a417ffd42195a7
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-10-04 11:05:50 -07:00
Josh Soref
d4811f11a0
all: fix spelling mistakes
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2022-09-29 13:36:13 -07:00
Adrian Dewhurst
c581ce7b00
cmd/tailscale, client, ipn, tailcfg: add network lock modify command
...
Signed-off-by: Adrian Dewhurst <adrian@tailscale.com >
2022-09-29 11:28:47 -07:00
Andrew Dunham
b1867457a6
doctor: add package for running in-depth healthchecks; use in bugreport ( #5413 )
...
Change-Id: Iaa4e5b021a545447f319cfe8b3da2bd3e5e5782b
Signed-off-by: Andrew Dunham <andrew@du.nham.ca >
2022-09-26 13:07:28 -04:00
Eng Zer Jun
f0347e841f
refactor: move from io/ioutil to io and os packages
...
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.
Reference: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com >
2022-09-15 21:45:53 -07:00
Tom DNetto
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
e1309e1323
all: require Go 1.19
...
Updates #5210
Change-Id: I2e950b4776636b4ea89b6566b60e4a87596a3a43
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-08-02 11:49:01 -07:00
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
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
Brad Fitzpatrick
c4f06ef7be
client/tailscale: fix ExpandSNIName on non-default LocalClient
...
It was using a mix.
Found by @maisem.
Change-Id: Ieb79d78608474ac13c2f44e0f3d8997a5665eb13
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-05-05 12:22:38 -07:00
Brad Fitzpatrick
3e1f2d01f7
ipn/ipnlocal: move Ping method from IPN bus to LocalBackend (HTTP)
...
Change-Id: I61759f1dae8d9d446353db54c8b1e13bfffb3287
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-05-03 15:59:19 -07:00
Brad Fitzpatrick
a54671529b
client/tailscale: move API client for the control admin API
...
This was work done Nov-Dec 2020 by @c22wen and @chungdaniel.
This is just moving it to another repo.
Co-Authored-By: Christina Wen <37028905+c22wen@users.noreply.github.com >
Co-Authored-By: Christina Wen <christina@tailscale.com >
Co-Authored-By: Daniel Chung <chungdaniel@users.noreply.github.com >
Co-Authored-By: Daniel Chung <daniel@tailscale.com >
Change-Id: I6da3b05b972b54771f796b5be82de5aa463635ca
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-04-30 09:05:26 -07:00
Brad Fitzpatrick
e3619b890c
client/tailscale: rename tailscale.go -> localclient.go
...
In prep for other stuff.
Change-Id: I82c24946d062d668cab48ca6749776b6ae7025ac
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-04-29 19:50:40 -07:00