Brad Fitzpatrick
61f3fda405
tsweb: let expvar.Ints be gauges too
6 years ago
Brad Fitzpatrick
6978b93bdd
derp, magicsock: track home (preferred) vs visiting connections for stats
6 years ago
Brad Fitzpatrick
12b77f30ad
wgengine/magicsock: close stale DERP connections
6 years ago
Brad Fitzpatrick
cf4aacde57
derp/derphttp: appease staticcheck
6 years ago
Brad Fitzpatrick
2cff9016e4
net/dnscache: add overly simplistic DNS cache package for selective use
...
I started to write a full DNS caching resolver and I realized it was
overkill and wouldn't work on Windows even in Go 1.14 yet, so I'm
doing this tiny one instead for now, just for all our netcheck STUN
derp lookups, and connections to DERP servers. (This will be caching a
exactly 8 DNS entries, all ours.)
Fixes #145 (can be better later, of course)
6 years ago
Brad Fitzpatrick
a36ccb8525
wgengine/magicsock: actually add to the activeDerp map
...
Fixes bug just introduced in 8f9849c140; not tested enough :(
6 years ago
Brad Fitzpatrick
8f9849c140
wgengine/magicsock: collapse three DERP maps down into one
6 years ago
Brad Fitzpatrick
7e1bed82bd
go.sum: update
6 years ago
Brad Fitzpatrick
40ebba1373
magicsock: use [unexpected] convention more
...
Fixes #136 (not entirely, but we have a convention now)
6 years ago
Brad Fitzpatrick
848a2bddf0
wgengine/magicsock: update set of DERP nodes
6 years ago
David Crawshaw
551964c562
go.mod: update wireguard-go version
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
4a7638c319
go.mod: update wireguard-go version
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
7932481b95
magicsock: lookup AddrSet by key from DERP
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
Brad Fitzpatrick
57de94c7aa
tsweb: add /debug/ access via &debugkey + TS_DEBUG_KEY_PATH
6 years ago
David Anderson
d580157921
tsweb: quote label values to comply with Prometheus format.
6 years ago
Brad Fitzpatrick
ff6b3c2c38
netcheck: include two more DERP nodes, show more in CLI report
6 years ago
David Anderson
f192c05413
metrics: add a LabelMap type for variables with 1 label dimension.
...
This lets us publish sets of vars that are breakdowns along one
dimension in a format that Prometheus and Grafana natively know
how to do useful things with.
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
Brad Fitzpatrick
eac62ec5ff
ipn, wgengine/magicsock: add ipn.Prefs.DisableDERP bool
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
bf704a5218
derp: protocol negotiation, add v2: send src pub keys to clients in packets
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
David Crawshaw
a65b2a0efd
magicsock: add some DERP tests
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
a33419167b
magicsock: plumb through derpTLSConfig variable (for testing)
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
9be9738f62
derphttp: add TLSConfig field
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
caec2c7e8b
magicsock: test sequence of pings
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
9f584414d9
magicsock: simple ping test via magicsock
...
Passes `go test -count=20 -race ./wgengine/magicsock`
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
34859f8e7d
wgengine, magicsock: add a CreateBind method
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Crawshaw
75e62d318f
magicsock: use local STUN server in tests
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
Brad Fitzpatrick
596fd449b9
netcheck: add TODO about alternate timing strategies
6 years ago
Brad Fitzpatrick
b27d4c017a
magicsock, wgengine, ipn, controlclient: plumb regular netchecks to map poll
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
4cf5ac3060
ipn/ipnserver: remove unnecessary closure parameter
6 years ago
Brad Fitzpatrick
724c37fb41
wgengine/magicsock: start tracking nearest DERP node
6 years ago
David Anderson
dbc99dc0d2
paths: use /var/db for state on BSDs, and /var/run for sockets.
...
On BSD, /var/db is what linux calls /var/lib.
On modern linux, /run and /var/run are the same directory, but
on BSD the correct path is /var/run, so use that.
Fixes #79
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
David Anderson
20da44eae3
cmd/mkpkg: support scripts for rpm as well.
6 years ago
Brad Fitzpatrick
e371520cc5
tsweb, derp: add expvar http.Handler for Prometheus's format
...
And add some opinions.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
89a2c3eb04
wgengine: don't create duplicate iptables rules on Linux, clean up
...
Fixes #131
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
David Anderson
21fc5ec371
cmd/mkpkg: support specifying that a package replaces another.
...
Both RPM and Deb require us to specify both Replaces and Conflicts:
Conflicts tells them that the packages cannot coexist on the system,
Replaces tells them which one to keep.
6 years ago
Brad Fitzpatrick
dd68debd64
cmd/derper: set autocert Email
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
68ff31a0ba
ipn: have NewFileStore try to create directories as needed
6 years ago
Brad Fitzpatrick
b3d9eab1fe
safesocket: make some effort to create parent directory of sock
6 years ago
Brad Fitzpatrick
383d86df5f
paths: remove some debug logging I left in
6 years ago
Brad Fitzpatrick
65e7c58aa4
cmd/tailscale, cmd/tailscaled, paths: add paths package for default paths
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
06092a3af3
ipn/ipnserver: document potential race, start on test for it
6 years ago
Brad Fitzpatrick
ef1f967ec0
ipn: remove an unnecessary named parameter in doc
6 years ago
Brad Fitzpatrick
844d991baf
netcheck: add Report.Clone, return cloned report to avoid races on late replies
6 years ago
Brad Fitzpatrick
657f9593ae
Reduce some logspam.
6 years ago
David Crawshaw
61529ac459
controlclient, tailcfg: deliver DERP addresses in a separate field
...
We still include them directly in the controlclient network map
just where we have been. Client plumbing we can do later.
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
David Anderson
ca11e3804b
Add a using section that points to pkgs.tailscale.com.
6 years ago
Brad Fitzpatrick
4675c70464
wgengine/magicsock: check STUN regularly
6 years ago
Brad Fitzpatrick
7172f3dbf4
version: add IsMobile func
...
And use it control/controlclient.
6 years ago
Brad Fitzpatrick
11489a6e67
go.sum: add lines
6 years ago
Brad Fitzpatrick
bc7bc43fb8
magicsock, interfaces: move some code from magicsock to interfaces
6 years ago