David Crawshaw
6a5cfd39cc
control/controlclient: some extra debug info in errors
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-10-06 14:02:33 -04:00
Brad Fitzpatrick
b5a3850d29
control/controlclient, ipn: store machine key separately from user prefs/persist
...
Updates #610 (fixes after some win/xcode changes in a separate repo)
2020-10-01 14:30:20 -07:00
Josh Bleecher Snyder
efb08e4fee
all: use IsZero methods
...
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-30 17:13:41 -07:00
Brad Fitzpatrick
c8f257df00
Revert "all: keep UserProfiles a slice instead of a map for longer"
...
This reverts commit e5894aba42
.
Breaks macOS/iOS build. Reverting per chat with Josh; he'll fix later today.
2020-09-30 08:43:31 -07:00
Josh Bleecher Snyder
1fecf87363
control/controlclient: use wgcfg.PrivateKey.IsZero
...
Generated by eg using template:
---
package p
import "github.com/tailscale/wireguard-go/wgcfg"
func before(k wgcfg.PrivateKey) bool { return k == wgcfg.PrivateKey{} }
func after(k wgcfg.PrivateKey) bool { return k.IsZero() }
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-29 17:50:40 -07:00
Josh Bleecher Snyder
e5894aba42
all: keep UserProfiles a slice instead of a map for longer
...
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-29 11:36:35 -07:00
Josh Bleecher Snyder
4d4ca2e496
control/controlclient: remove Roles fields from client
...
They are unused.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-29 11:36:35 -07:00
Brad Fitzpatrick
5d8b88be88
control/controlclient, version/distro, wgengine: recognize OpenWrt
...
And help out with missing packages.
Thanks to @willangley for tips.
Updates #724
2020-09-22 10:28:40 -07:00
Brad Fitzpatrick
904a91038a
tailcfg: add MapRequest.ReadOnly and OmitPeers; remove DebugForceDisco
...
DebugForceDisco was a development & safety knob during the the transition
to discovery. It's no longer needed.
Add MapRequest.ReadOnly to prevent clients needing to do two
peer-spamming MapRequest at start-up.
This only adds the field, not the use of the field. (The control server
needs to support it first.)
Updates tailscale/corp#557
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-09-17 12:07:49 -07:00
Brad Fitzpatrick
761fe19e5f
control/controlclient: don't accept /32 routes without --accept-routes
...
Fixes tailscale/corp#500
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-09-15 10:18:14 -07:00
Brad Fitzpatrick
88107b1287
control/controlclient: add TS_DEBUG_MAPRESPONSE to dump all MapResponses
...
I'm always adding this by hand during development. Time to check it in.
2020-09-15 09:54:52 -07:00
Brad Fitzpatrick
931bcd44cb
control/controlclient: report Synology "distro" + its version to control
2020-09-15 08:32:06 -07:00
David Anderson
8f5b52e571
net/netns: add windows support.
...
Also remove rebinding logic from the windows router. Magicsock will
instead rebind based on link change signals.
Signed-off-by: David Anderson <danderson@tailscale.com>
2020-09-14 16:28:49 -07:00
Brad Fitzpatrick
662c19551a
control/controlclient: deal with localized 'Version' string getting Windows version
2020-09-13 10:06:20 -07:00
Brad Fitzpatrick
28f9cd06f5
tshttpproxy, controlclient, derphttp, logpolicy: send Negotiate auth to proxies
...
For Windows only, and only when built with Tailscale's Go tree.
Updates tailscale/corp#583
2020-08-26 20:08:05 -07:00
Brad Fitzpatrick
9337a99dff
tailcfg, wgengine, controlclient: add control-side gating of lazy WG config
2020-08-20 13:21:25 -07:00
chungdaniel
4d56d19b46
control/controlclient, wgengine/filter: extract parsePacketFilter to … ( #696 )
...
control/controlclient, wgengine/filter: extract parsePacketFilter to new constructor in wgengine/filter
Signed-off-by: chungdaniel <daniel@tailscale.com>
2020-08-20 10:36:19 -07:00
Brad Fitzpatrick
c5eb57f4d6
net/tshttpproxy: new package, support WPAD/PAC proxies on Windows
...
Updates tailscale/corp#553
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-18 15:40:56 -07:00
Brad Fitzpatrick
f6dc47efe4
tailcfg, controlclient, magicsock: add control feature flag to enable DRPO
...
Updates #150
2020-08-17 13:01:39 -07:00
Brad Fitzpatrick
337c86b89d
control/controlclient: don't crash on invalid filter CIDR from server
...
Fixes #691
2020-08-17 07:56:03 -07:00
Brad Fitzpatrick
a275b9d7aa
control/controlclient: use less battery when stopped, stop map requests
...
Updates #604
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-09 09:36:35 -07:00
Brad Fitzpatrick
dd97111d06
backoff: update to Go style, document a bit, make 30s explicit
...
Also, bit of behavior change: on non-nil err but expired context,
don't reset the consecutive failure count. I don't think the old
behavior was intentional.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-09 09:36:26 -07:00
Brad Fitzpatrick
696020227c
tailcfg, control/controlclient: support delta-encoded netmaps
...
Should greatly reduce bandwidth for large networks (including our
hello.ipn.dev node).
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-07 21:49:49 -07:00
Brad Fitzpatrick
5590daa97d
control/controlclient: reset timeout timer on non-keepalive map updates
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-06 21:30:17 -07:00
Brad Fitzpatrick
41c4560592
control/controlclient: remove unused NetworkMap.UAPI method
...
And remove last remaining use of wgcfg.ToUAPI in a test's debug
output; replace it with JSON.
2020-08-06 10:30:18 -07:00
Brad Fitzpatrick
6298018704
control/controlclient: print disco keys NetworkMap diffs (debug change only)
...
NetworkMap text diffs being empty were currently used to short-circuit
calling magicsock's SetNetworkMap (via Engine.SetNetworkMap), but that
went away in c7582dc2
(0.100.0-230)
Prior to c7582dc2
(notably, in 0.100.0-225 and below, down to
0.100.0), a change in only disco key (as when a node restarts) but
without endpoint changes (as would happen for a client not behind a
NAT with random ports) could result in a "netmap diff: (none)" being
printed, as well as Engine.SetNetworkMap being skipped, leading to
broken discovery endpoints.
c7582dc2
fixed the Engine.SetNetworkMap skippage.
This change fixes the "netmap diff: (none)" print so we'll actually see when a peer
restarts with identical endpoints but a new discovery key.
2020-08-03 10:03:01 -07:00
Dmytro Shynkevych
28e52a0492
all: dns refactor, add Proxied and PerDomain flags from control ( #615 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-31 16:27:09 -04:00
Dmytro Shynkevych
c7582dc234
ipn: fix netmap change tracking and dns map generation ( #609 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-28 21:47:23 -04:00
Brad Fitzpatrick
91d95dafd2
control/controlclient: remove an 'unexpected' log that no longer is
...
Fixes #611
2020-07-28 15:13:34 -07:00
Brad Fitzpatrick
b77d752623
control/controlclient: populate OSVersion on Windows
2020-07-27 21:46:07 -07:00
Brad Fitzpatrick
cd21ba0a71
tailcfg, control/controlclient: add GoArch, populate OSVersion on Linux
2020-07-27 21:14:28 -07:00
Brad Fitzpatrick
be3ca5cbfd
control/controlclient: remove unused, slow, often-not-what-you-want NetworkMap.Equal
2020-07-25 19:36:39 -07:00
Brad Fitzpatrick
05a79d79ae
control/controlclient: rewrite, test NetworkMap.ConciseDiffFrom
...
It stood out a lot in hello.ipn.dev's profiles for generating a lot of
garbage (and thus GC CPU).
2020-07-23 10:50:06 -07:00
Brad Fitzpatrick
3b0514ef6d
control/controlclient: rename uflags, give it a type, remove dead code
2020-07-23 08:38:14 -07:00
Brad Fitzpatrick
32ecdea157
control/controlclient: generate wireguard config w/o WgQuick text indirection
2020-07-23 08:30:09 -07:00
Dmytro Shynkevych
d361511512
control/controlclient: eliminate race in loginGoal access.
...
This code is currently racy due to an incorrect assumption
that goal is never modified in-place, so does not require extra locking.
This change makes the assumption correct.
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-15 13:04:44 -04:00
Brad Fitzpatrick
96994ec431
control/controlclient: fix a couple more data races
2020-07-09 11:42:43 -07:00
Brad Fitzpatrick
a8b95571fb
ipn, control/controlclient: fix some data races
...
More remain.
Fixes tailscale/corp#432
2020-07-08 16:51:17 -07:00
Brad Fitzpatrick
c9089c82e8
control/controlclient, tailcfg: turn active route discovery on by default
...
Updates #483
2020-07-03 13:55:33 -07:00
Brad Fitzpatrick
57e8931160
control/controlclient: fix copy/paste-o in debug knob accessor
...
Introduced in a975e86bb8
.
Only affected TS_DEBUG_* env users.
2020-07-02 10:51:23 -07:00
Brad Fitzpatrick
6233fd7ac3
control/controlclient: don't truncate AuthURL in log
...
It's useful to copy/paste directly from there, without using tailscale up.
If it's truncated for some specific reason, it doesn't say why.
2020-07-02 09:45:08 -07:00
Brad Fitzpatrick
a975e86bb8
wgengine/magicsock: add new endpoint type used for discovery-supporting peers
...
This adds a new magicsock endpoint type only used when both sides
support discovery (that is, are advertising a discovery
key). Otherwise the old code is used.
So far the new code only communicates over DERP as proof that the new
code paths are wired up. None of the actually discovery messaging is
implemented yet.
Support for discovery (generating and advertising a key) are still
behind an environment variable for now.
Updates #483
2020-06-29 13:59:54 -07:00
Brad Fitzpatrick
72bfea2ece
control/controlclient: remove IPv6 opt-out environment variable
...
It was temporary and 3 months has elapsed without problems.
2020-06-29 09:03:00 -07:00
Brad Fitzpatrick
b8edb7a5e9
control/controlclient: add Debug field to NetworkMap
...
As part of disabling background STUN packets when idle, we want an
emergency override switch to turn it back on, in case it interacts
poorly in the wild. We'll send that via control, but we'll want to
plumb it down to magicsock via NetworkMap.
Updates tailscale/corp#320
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-06-25 19:14:24 -07:00
Brad Fitzpatrick
36e9cb948f
control/controlclient: cut down some NetworkMap stringification & diff allocations
...
And start of tests.
2020-06-24 15:00:02 -07:00
Brad Fitzpatrick
894e3bfc96
control/controlclient: trim /32 suffix a bit more succinctly
2020-06-24 14:24:32 -07:00
Brad Fitzpatrick
53fb25fc2f
all: generate discovery key, plumb it around
...
Not actually used yet.
Updates #483
2020-06-19 12:12:00 -07:00
David Anderson
0ecaf7b5ed
control/controlclient: make netmap generation use rate-limited logger.
2020-06-18 23:24:44 +00:00
David Anderson
401e2ec307
control/controlclient: delete unused function.
2020-06-18 23:20:01 +00:00
Dmytro Shynkevych
c12d87c54b
Fix concurrency issues in controlclient, ipn, types/logger ( #456 )
...
Signed-Off-By: Dmytro Shynkevych <dmytro@tailscale.com>
2020-06-15 19:04:12 -04:00