summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2020-07-27cmd/cloner, tailcfg: fix nil vs len 0 issues, add tests, use for HostinfocloneBrad Fitzpatrick4-24/+66
Also use go:generate and https://golang.org/s/generatedcode header style.
2020-07-27version: new week, new versionBrad Fitzpatrick1-1/+1
2020-07-27go mod tidyBrad Fitzpatrick2-4/+1
2020-07-27wgengine/magicsock: log better with less spam on transition to stopped stateBrad Fitzpatrick2-6/+20
Required a minor test update too, which now needs a private key to get far enough to test the thing being tested.
2020-07-27derp/derphttp: don't return all nil from dialRegion when STUNOnly nodesBrad Fitzpatrick1-0/+3
2020-07-27tailcfg: generate some Clone methodsDavid Crawshaw2-44/+65
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-07-27cmd/cloner: tool to generate Clone methodsDavid Crawshaw1-0/+264
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-07-25wgengine/magicsock: remove overkill, slow reflect.DeepEqual of NetworkMapBrad Fitzpatrick1-2/+14
No need to allocate or compare all the fields we don't care about.
2020-07-25control/controlclient: remove unused, slow, often-not-what-you-want ↵Brad Fitzpatrick1-21/+0
NetworkMap.Equal
2020-07-25wgengine: add debug knob to disable the watchdog during debuggingBrad Fitzpatrick1-0/+5
It launches goroutines and interferes with panic-based debugging, obscuring stacks.
2020-07-24wgengine/magicsock: refactor twoDevicePing to make stack construction cleaner.David Anderson1-163/+163
Signed-off-by: David Anderson <danderson@tailscale.com>
2020-07-24ipn: add OSVersion, DeviceModel fields to Prefs and propagate to HostinfosElias Naur3-7/+21
Needed for Android. Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-07-24wgengine: configure wireguard peers lazily, as neededBrad Fitzpatrick4-78/+410
wireguard-go uses 3 goroutines per peer (with reasonably large stacks & buffers). Rather than tell wireguard-go about all our peers, only tell it about peers we're actively communicating with. That means we need hooks into magicsock's packet receiving path and tstun's packet sending path to lazily create a wireguard peer on demand from the network map. This frees up lots of memory for iOS (where we have almost nothing left for larger domains with many users). We should ideally do this in wireguard-go itself one day, but that'd be a pretty big change. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-07-24wgengine/magicsock: don't log about disco ping timeouts if we have a working ↵Brad Fitzpatrick1-6/+16
address Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-07-24go.mod: bump wireguard-goBrad Fitzpatrick2-1/+3
2020-07-24wgengine/tstun: move sync.Pool to package globalBrad Fitzpatrick1-12/+9
sync.Pools should almost always be packate globals, even though in this case we only have exactly 1 TUN device anyway, so it matters less. Still, it's unusual to see a Pool that's not a package global, so move it.
2020-07-23cmd/tailscaled: always flush logs properlyDmytro Shynkevych1-31/+63
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-23cmd/tailscale: rename use-dns to accept-dnsDmytro Shynkevych1-3/+3
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-23cmd/tailscale: add corpDNS flagDmytro Shynkevych1-0/+3
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-23wgengine/router: support legacy resolvconfDmytro Shynkevych1-2/+57
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
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-23tailcfg: optimize Node.Equal allocs a bitBrad Fitzpatrick1-5/+39
Noticed while working on something else.
2020-07-23control/controlclient: rename uflags, give it a type, remove dead codeBrad Fitzpatrick2-36/+22
2020-07-23control/controlclient: generate wireguard config w/o WgQuick text indirectionBrad Fitzpatrick1-66/+53
2020-07-22cmd/tailscale: default to not reporting daemon versionBrad Fitzpatrick1-1/+1
That's what I meant to do when I added "tailscale version" but apparently I didn't.
2020-07-22wgengine/router: don't use 88 or 8888 as table/rule numbers.David Anderson2-40/+55
We originally picked those numbers somewhat at random, but with the idea that 8 is a traditionally lucky number in Chinese culture. Unfortunately, "88" is also neo-nazi shorthand language. Use 52 instead, because those are the digits above the letters "TS" (tailscale) on a qwerty keyboard, so we're unlikely to collide with other users. 5, 2 and 52 are also pleasantly culturally meaningless. Signed-off-by: David Anderson <danderson@tailscale.com>
2020-07-22ipn: load hostname in Start.Dmytro Shynkevych1-0/+3
This prevents hostname being forced to os.Hostname despite override when control is contacted for the first time after starting tailscaled. Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-22ipn: remove unused parameter to func LoadPrefs, fix godoc subjectBrad Fitzpatrick2-5/+4
2020-07-22wgengine/router: fix router_test to match the new marks.David Anderson1-16/+16
Signed-off-by: David Anderson <danderson@tailscale.com>
2020-07-22wgengine/router: switch packet marks to avoid conflict with Weave Net.David Anderson2-3/+3
Signed-off-by: David Anderson <danderson@tailscale.com>
2020-07-21tempfork: add lite fork of net/http/pprof w/o html/template or reflectBrad Fitzpatrick3-0/+386
2020-07-21cmd/tailscale: add "version" subcommandBrad Fitzpatrick2-1/+76
Fixes #448 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-07-20version: new week, new versionBrad Fitzpatrick1-1/+1
2020-07-20tailcfg: add Hostinfo.OSVersion, DeviceModelBrad Fitzpatrick2-1/+4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-07-20safesocket: gofmtBrad Fitzpatrick1-3/+3
gofmt differences between versions :(
2020-07-20safesocket: support connecting to Mac TCP server from within App SandboxBrad Fitzpatrick2-22/+67
2020-07-19metrics: add LabelMap.GetFloatBrad Fitzpatrick1-0/+7
2020-07-18wgengine/magicsock: fix typo in commentv0.100.0-153Brad Fitzpatrick1-1/+1
2020-07-18wgengine/magicsock: reduce log verbosity of discovery messagesBrad Fitzpatrick1-28/+72
Don't log heartbeat pings & pongs. Track the reason for pings and then only log the ping/pong traffic if it was for initial path discovery.
2020-07-18go.sum: updateBrad Fitzpatrick1-0/+2
2020-07-18go.mod: bump netaddr.Dmytro Shynkevych2-8/+3
Closes #567. Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-18wgengine/router: use better NetworkManager APIDmytro Shynkevych2-58/+47
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-17Use LittleEndian for correct byte order on DNS IPsEduardo Kienetz1-1/+1
Nameserver IP 10.11.12.13 would otherwise get written to resolv.conf as 13.12.11.10, as was happening on my client. Signed-off-by: Eduardo Kienetz <eduardo@kienetz.com>
2020-07-16derp: fix atomic padding on 32-bit againBrad Fitzpatrick1-1/+6
Broken by earlier OnlyDisco addition.
2020-07-16wgengine/magicsock: run test DERP in mode where only disco packets allowedBrad Fitzpatrick3-3/+29
So we don't accidentally pass a NAT traversal test by having DERP pick up our slack when we really just wanted DERP as an OOB messaging channel.
2020-07-16github/workflows: add go vet ./... stepBrad Fitzpatrick1-0/+3
2020-07-16all: fix vet warningsBrad Fitzpatrick6-11/+20
2020-07-16wgengine/magicsock: update comment, fix earlier commitBrad Fitzpatrick1-10/+10
https://github.com/tailscale/tailscale/commit/891898525c12630b0f896cb9142ff5274e07afc2 had a continue that meant the didCopy synchronization never ran. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-07-16wgengine/magicsock: gofmtBrad Fitzpatrick1-2/+2
2020-07-16wgengine/magicsock: time.Sleep -> time.AfterDmytro Shynkevych1-1/+1
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>