summaryrefslogtreecommitdiffhomepage
path: root/control/controlclient
AgeCommit message (Collapse)AuthorFilesLines
2020-09-15control/controlclient: don't accept /32 routes without --accept-routesBrad Fitzpatrick1-1/+24
Fixes tailscale/corp#500 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-09-15control/controlclient: add TS_DEBUG_MAPRESPONSE to dump all MapResponsesBrad Fitzpatrick1-0/+7
I'm always adding this by hand during development. Time to check it in.
2020-09-15control/controlclient: report Synology "distro" + its version to controlBrad Fitzpatrick1-1/+11
2020-09-14net/netns: add windows support.David Anderson1-5/+0
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-13control/controlclient: deal with localized 'Version' string getting Windows ↵Brad Fitzpatrick1-2/+6
version
2020-08-26tshttpproxy, controlclient, derphttp, logpolicy: send Negotiate auth to proxiesBrad Fitzpatrick1-0/+1
For Windows only, and only when built with Tailscale's Go tree. Updates tailscale/corp#583
2020-08-20tailcfg, wgengine, controlclient: add control-side gating of lazy WG configBrad Fitzpatrick1-5/+21
2020-08-20control/controlclient, wgengine/filter: extract parsePacketFilter to … (#696)chungdaniel2-113/+3
control/controlclient, wgengine/filter: extract parsePacketFilter to new constructor in wgengine/filter Signed-off-by: chungdaniel <daniel@tailscale.com>
2020-08-18net/tshttpproxy: new package, support WPAD/PAC proxies on WindowsBrad Fitzpatrick1-0/+2
Updates tailscale/corp#553 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-17tailcfg, controlclient, magicsock: add control feature flag to enable DRPOBrad Fitzpatrick1-2/+19
Updates #150
2020-08-17control/controlclient: don't crash on invalid filter CIDR from serverBrad Fitzpatrick2-0/+46
Fixes #691
2020-08-09control/controlclient: use less battery when stopped, stop map requestsBrad Fitzpatrick1-9/+66
Updates #604 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-09backoff: update to Go style, document a bit, make 30s explicitBrad Fitzpatrick1-2/+2
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-07tailcfg, control/controlclient: support delta-encoded netmapsBrad Fitzpatrick2-0/+195
Should greatly reduce bandwidth for large networks (including our hello.ipn.dev node). Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-06control/controlclient: reset timeout timer on non-keepalive map updatesBrad Fitzpatrick1-9/+11
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-08-06control/controlclient: remove unused NetworkMap.UAPI methodBrad Fitzpatrick1-15/+0
And remove last remaining use of wgcfg.ToUAPI in a test's debug output; replace it with JSON.
2020-08-03control/controlclient: print disco keys NetworkMap diffs (debug change only)Brad Fitzpatrick2-2/+76
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-07-31all: dns refactor, add Proxied and PerDomain flags from control (#615)Dmytro Shynkevych2-8/+28
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-28ipn: fix netmap change tracking and dns map generation (#609)Dmytro Shynkevych3-3/+28
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-28control/controlclient: remove an 'unexpected' log that no longer isBrad Fitzpatrick1-1/+1
Fixes #611
2020-07-27control/controlclient: populate OSVersion on WindowsBrad Fitzpatrick1-0/+26
2020-07-27tailcfg, control/controlclient: add GoArch, populate OSVersion on LinuxBrad Fitzpatrick3-0/+103
2020-07-25control/controlclient: remove unused, slow, often-not-what-you-want ↵Brad Fitzpatrick1-21/+0
NetworkMap.Equal
2020-07-23control/controlclient: rewrite, test NetworkMap.ConciseDiffFromBrad Fitzpatrick2-63/+300
It stood out a lot in hello.ipn.dev's profiles for generating a lot of garbage (and thus GC CPU).
2020-07-23control/controlclient: rename uflags, give it a type, remove dead codeBrad Fitzpatrick1-29/+15
2020-07-23control/controlclient: generate wireguard config w/o WgQuick text indirectionBrad Fitzpatrick1-66/+53
2020-07-15control/controlclient: eliminate race in loginGoal access.Dmytro Shynkevych1-4/+5
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-09control/controlclient: fix a couple more data racesBrad Fitzpatrick1-1/+3
2020-07-08ipn, control/controlclient: fix some data racesBrad Fitzpatrick1-1/+1
More remain. Fixes tailscale/corp#432
2020-07-03control/controlclient, tailcfg: turn active route discovery on by defaultBrad Fitzpatrick1-15/+22
Updates #483
2020-07-02control/controlclient: fix copy/paste-o in debug knob accessorBrad Fitzpatrick1-1/+1
Introduced in a975e86bb8a42f0be9faf16067ee55a6da55d767. Only affected TS_DEBUG_* env users.
2020-07-02control/controlclient: don't truncate AuthURL in logBrad Fitzpatrick1-1/+1
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-06-29wgengine/magicsock: add new endpoint type used for discovery-supporting peersBrad Fitzpatrick2-21/+72
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-29control/controlclient: remove IPv6 opt-out environment variableBrad Fitzpatrick1-12/+1
It was temporary and 3 months has elapsed without problems.
2020-06-25control/controlclient: add Debug field to NetworkMapBrad Fitzpatrick3-21/+69
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-24control/controlclient: cut down some NetworkMap stringification & diff ↵Brad Fitzpatrick2-3/+45
allocations And start of tests.
2020-06-24control/controlclient: trim /32 suffix a bit more succinctlyBrad Fitzpatrick1-4/+1
2020-06-19all: generate discovery key, plumb it aroundBrad Fitzpatrick1-0/+4
Not actually used yet. Updates #483
2020-06-18control/controlclient: make netmap generation use rate-limited logger.David Anderson1-8/+9
2020-06-18control/controlclient: delete unused function.David Anderson1-8/+0
2020-06-15Fix concurrency issues in controlclient, ipn, types/logger (#456)Dmytro Shynkevych1-6/+10
Signed-Off-By: Dmytro Shynkevych <dmytro@tailscale.com>
2020-06-12log/logheap: change to POST to a URL instead of loggingBrad Fitzpatrick1-1/+1
It's too big to log.
2020-06-01net/netns: move SOCKS dialing to netns for nowBrad Fitzpatrick1-1/+1
This lets control & logs also use SOCKS dials. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-05-29control/controlclient: use netns package to dial connections.David Anderson1-0/+3
Signed-off-by: David Anderson <danderson@tailscale.com>
2020-05-28Revert "control/controlclient: use "getprop net.hostname" for Android hostname"Brad Fitzpatrick1-23/+1
This reverts commit afb9c6a6abc9fa5a26200cc36d1ffc947b8b9e89. Doesn't work. See: https://github.com/tailscale/tailscale/issues/409#issuecomment-635241550 Looks pretty dire: https://medium.com/capital-one-tech/how-to-get-an-android-device-nickname-d5eab12f4ced Updates #409
2020-05-27control/controlclient: use "getprop net.hostname" for Android hostnameBrad Fitzpatrick1-1/+23
Updates #409
2020-05-27control/controlclient: move auto_test back to corp repo.David Anderson3-1373/+69
It can't run without corp stuff anyway, and makes it harder to refactor the control server.
2020-05-27control/controlclient: move direct_test back to corp repo.David Anderson1-384/+0
It can only be built with corp deps anyway, and having it split from the control code makes our lives harder. Signed-off-by: David Anderson <danderson@tailscale.com>
2020-05-25tailcfg: add MapResponse.Debug mechanism to trigger logging heap pprofBrad Fitzpatrick1-0/+4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-05-23all: make client use server-provided DERP map, add DERP region supportBrad Fitzpatrick2-0/+12
Instead of hard-coding the DERP map (except for cmd/tailscale netcheck for now), get it from the control server at runtime. And make the DERP map support multiple nodes per region with clients picking the first one that's available. (The server will balance the order presented to clients for load balancing) This deletes the stunner package, merging it into the netcheck package instead, to minimize all the config hooks that would've been required. Also fix some test flakes & races. Fixes #387 (Don't hard-code the DERP map) Updates #388 (Add DERP region support) Fixes #399 (wgengine: flaky tests) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>