Brad Fitzpatrick
824f825552
tsweb, cmd/derper: move common web/debug stuff from derper to new tsweb
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-25 10:06:56 -08:00
Brad Fitzpatrick
367ffde21a
ipn: misc cleanup
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-25 10:05:14 -08:00
Brad Fitzpatrick
04e6b77774
safesocket: delete incorrect build tag
...
Leftover from copying one file to another to create safesocket.go
in the earlier documentation change (29f7d64091 ).
2020-02-25 09:02:52 -08:00
Brad Fitzpatrick
29f7d64091
safesocket: document
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-25 08:46:34 -08:00
Brad Fitzpatrick
8696b17b5f
wgengine/magicsock: turn off DERP log spamminess by default
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-24 10:24:12 -08:00
Brad Fitzpatrick
f473965ca1
go.sum: update
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-24 08:48:06 -08:00
Brad Fitzpatrick
7a3b91390b
wgengine/magicsock: fix crash in Send when Endpoint isn't an AddrSet
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-24 08:47:20 -08:00
Brad Fitzpatrick
cc7b9b0dff
control/controlclient: fix priority of DERP server, add comment
2020-02-21 14:47:05 -08:00
Brad Fitzpatrick
3317531021
derp: fix JSON field typo, sort fields to make it easier to see inconsistencies
2020-02-21 14:18:09 -08:00
Brad Fitzpatrick
6cd81d5d1f
derp: add more derp stats for dropped and received packets
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-21 14:13:50 -08:00
Brad Fitzpatrick
c02f4b5a1f
control/controlclient: add temporary mechanism to force derp on
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-21 14:09:24 -08:00
Brad Fitzpatrick
525bf1f3d2
wgengine/magicsock: remember fixed port number preference
...
So LinkChange events rebind to the same port when possible.
2020-02-21 13:51:18 -08:00
Brad Fitzpatrick
c763901b1a
cmd/derper: provide debug access over port 80 to trusted (tailscale) IPs
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-21 11:52:27 -08:00
Brad Fitzpatrick
2612e54ad1
derp, cmd/derper: add debug handlers, stats
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-21 09:35:53 -08:00
Brad Fitzpatrick
433b917977
interfaces, cmd/tsshd: move interface lookup from tsshd to its own package
...
For reuse by derper, etc.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-21 08:13:21 -08:00
Brad Fitzpatrick
37e115834e
cmd/derper: support logging to logtail
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-21 07:53:22 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
379a3125fd
derp, wgengine/magicsock: support more than just packets from Client.Recv
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 22:08:13 -08:00
Brad Fitzpatrick and Dave Anderson
88f1cc0c98
derp, cmd/derper: add rate limiting support, add default 5Mbps limit
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 15:26:30 -08:00
Brad Fitzpatrick
1166c34f6c
derp: fix staticcheck warning
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 14:49:47 -08:00
Brad Fitzpatrick
322cb58b14
derp: deflake test I flaked up in earlier change
...
I broke an invariant in 11048b8932 (it was even nicely
documented then).
Also clean up the test a bit from while I was debugging it.
Fixes #84
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 14:41:39 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
f029c4c82d
derp: change the protocol framing to always include a length
...
Addresses one of crawshaw's TODOs.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 13:37:44 -08:00
Brad Fitzpatrick
11048b8932
derp: add docs on current protocol overview, break accept apart a bit
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 09:57:05 -08:00
Brad Fitzpatrick
79af6054bf
derp: don't start sending keepalives to client until after serverInfo sent
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 09:34:01 -08:00
Brad Fitzpatrick
1155716318
derp: rename some things in the client, add some docs
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 09:11:56 -08:00
Brad Fitzpatrick
4b461c2e77
derp: rename some things in the server, add some docs
2020-02-20 08:50:25 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
d298d5b1f8
wgengine/magicsock: support multiple derp servers, and not just for handshakes
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-20 08:10:12 -08:00
Brad Fitzpatrick
f266e2d1eb
version: add CmdName func for future use by logpolicy
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
Change-Id: I02a7c907844f71242ef06ed097f2a92ece7ae091
2020-02-19 11:34:45 -08:00
Brad Fitzpatrick
b72e6446e2
cmd/derper: add a basic DERP server
...
Mostly Crawshaw's earlier code, refactored a bit.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-18 11:25:11 -08:00
Brad Fitzpatrick
fd1aa4f7f6
wgengine/magicsock: add a reSTUN method
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-18 10:55:36 -08:00
Brad Fitzpatrick
619697063e
derp: more misc cleanups
...
And add an explicit derphttp.Client.Connect in the test now that it's
done lazily.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-18 10:09:37 -08:00
Brad Fitzpatrick
e06ca40650
wgengine, magicsock, derp: misc cleanups, docs
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-18 08:58:00 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
259406e797
derp: move away from [32]byte key types
...
And some minor cleanup in the process.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-17 14:18:09 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
769e25e37b
derp: use new types/key package
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-17 13:29:49 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
997678f540
wgengine/monitor: make Close not block forever on Linux
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-17 11:39:33 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
7f5e3febe5
wgengine: move link monitor to be owned by the engine, not the router
...
And make the monitor package portable with no-op implementations on
unsupported operating systems.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-17 09:53:17 -08:00
Brad Fitzpatrick
80d5d4bdfe
ipn: fix test breakage from earlier 79295b1138
...
This test is skipped in tailscale/tailscale because it depends on
parts that haven't been released yet and was thus overlooked in the
git commit 79295b1138 cleanup.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-17 08:19:50 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
79295b1138
wgengine: simplify, change some signatures
...
* make RouterGen return an error, not take both tunname and tundev
* also remove RouteGen taking a wireguard/device.Device; currently unused
* remove derp parameter (it'll work differently)
* unexport NewUserspaceRouter in per-OS impls, add documented wrapper
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-17 08:04:31 -08:00
Brad Fitzpatrick
9dbc52bb5b
go.mod: fix wireguard-go dep
...
Fixes #59
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-15 18:50:05 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
2896be60db
Move "logger" package to under types, now that we have it.
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-14 20:23:05 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
c393f0bfae
Dockerfile: optimize incremental build a bit, copy all binaries to output
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-14 13:39:59 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
747c7d7ce2
types/empty: add Message, stop using mysterious *struct{}
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-14 13:35:49 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
587c3fcac4
control/controlclient, wgengine/magicsock: misc cleanups
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-14 09:50:08 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
fbfe474492
logpolicy: add some docs
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-14 07:51:51 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
b5346fe7b4
meta: move cross-compiled builds to their own parallel jobs
...
And add FreeBSD.
Fixes #37
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-13 11:28:07 -08:00
Brad Fitzpatrick
c773abde77
wgengine: fix nil pointer deref crash from earlier change
...
Fixes #45
2020-02-13 08:59:31 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
745c8c92b1
wgengine: fix windows build for winipcfg-go
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-12 22:05:13 -08:00
Brad Fitzpatrick
13dc12814e
cmd/tsshd: fix log text
2020-02-12 14:51:47 -08:00
Brad Fitzpatrick
d404f1caed
cmd/tsshd: add basic SSH server
2020-02-12 14:46:59 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
7e5e32775a
wgengine: flesh out some docs, minor cleanups
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-12 13:37:45 -08:00
Brad Fitzpatrick and Brad Fitzpatrick
819daf10e2
wgengine: flesh out some docs
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-12 13:37:45 -08:00
Brad Fitzpatrick
a59dc5f155
Use logger.Logf consistently. It was used in most places.
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2020-02-11 09:38:32 -08:00
Brad Fitzpatrick
fef2548981
README: https, links, mention Go version, DCO
2020-02-10 14:01:37 -08:00
Brad Fitzpatrick
516a15ee58
cmd: add import comments
...
See https://golang.org/cmd/go/#hdr-Import_path_checking
2020-02-10 13:32:37 -08:00
Brad Fitzpatrick
1f1dc3ad14
version: fix path for git describe of version for redo
2020-02-10 09:19:57 -08:00
Brad Fitzpatrick
a1fbf25f77
version: add stub; use rsc.io/goversion/version later
2020-02-10 09:00:30 -08:00