Commit Graph

7256 Commits (5018683d58acec6fe5166ae7d4decd9023fe75cb)
 

Author SHA1 Message Date
David Anderson c7e2fcd517 Dockerfile: install iptables in the container.
We need iptables to make subnet routing work. Without it,
Tailscale mostly works, but subnet routing mysteriously doesn't.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Brad Fitzpatrick fd1aa4f7f6 wgengine/magicsock: add a reSTUN method
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
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>
5 years ago
Brad Fitzpatrick e06ca40650 wgengine, magicsock, derp: misc cleanups, docs
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
David Crawshaw a23a0d9c9f tailcfg: add RegisterRequest.Copy
Add some docs while I'm here.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
5 years ago
David Anderson 47da432991 ipn: handle advertised routes provided by frontend.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
wardn 5d79530caa wgengine: create freebsd-specific implementation
Signed-off-by: wardn <wardn@users.noreply.github.com>
5 years ago
Dave Anderson a0af5655a8
Merge pull request #67 from tailscale/danderson/adv-routes
ipn: add AdvertiseRoutes to Prefs.
5 years ago
David Anderson e0c35723a8 ipn: add documentation to the Prefs struct.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 59ba2e6316 ipn: implement Prefs.Equals efficiently.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
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>
5 years ago
Tobias Klauser 4d09316f9a wgengine/monitor: use RTMGRP_* consts from x/sys/unix
Bump golang.org/x/sys/unix to get the RTMGRP_* consts and use them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
5 years ago
David Anderson a5b84fa921 ipn: add AdvertiseRoutes to Prefs.
This is a prelude to supporting relaynode's --routes in
tailscaled. The daemon needs to remembers routes to
advertise, and the CLI needs to be able to change the
set of advertised routes. Prefs is the thing used for
both of these.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Brad Fitzpatrick 769e25e37b derp: use new types/key package
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
David Anderson a70a91521b ipn: print the packet filter setting in prefs.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 62fb652eef cmd/tailscaled: run off internal state autonomously.
With this change, tailscaled can be restarted and reconnect
without interaction from `tailscale`, and `tailscale` is merely
there to provide login assistance and adjust preferences.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Brad Fitzpatrick 997678f540 wgengine/monitor: make Close not block forever on Linux
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
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>
5 years ago
wardn 09fbae01a9 tailcfg: don't panic on node equal check
Signed-off-by: wardn <wardn@users.noreply.github.com>
5 years ago
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>
5 years ago
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>
5 years ago
Brad Fitzpatrick 9dbc52bb5b go.mod: fix wireguard-go dep
Fixes #59

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
Brad Fitzpatrick 2896be60db Move "logger" package to under types, now that we have it.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
David Anderson dec5d64593 ipn/ipnserver: remove Options.AllowQuit.
It was previously used by the MacOS client, but it now does
something different. ipnserver should never obey a client's
request to exit.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Brad Fitzpatrick c393f0bfae Dockerfile: optimize incremental build a bit, copy all binaries to output
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
Brad Fitzpatrick 747c7d7ce2 types/empty: add Message, stop using mysterious *struct{}
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
David Anderson 4796f6fd67 cmd/tailscale: document pump().
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 47820db381 cmd/tailscale{,d}: rename main file.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Brad Fitzpatrick 587c3fcac4 control/controlclient, wgengine/magicsock: misc cleanups
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
wardn 58ce50389e wgengine: build for freebsd
Signed-off-by: wardn <wardn@users.noreply.github.com>
5 years ago
Brad Fitzpatrick fbfe474492 logpolicy: add some docs
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
David Anderson de0239375a logtail/filch: use x/sys/unix instead of syscall.
In particular, the Dup2 syscall is not defined in the syscall
package on arm64, but is defined in x/sys/unix.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson a416d10e85 Remove the explicit security redirect.
Github makes one of those automatically based on SECURITY.md.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson f96e9a123d Add issue templates and redirects.
"New issues" will now suggest templates for bugs and
feature requests. Support requests get directed to
support@tailscale.com, and security reports to
security@tailscale.com.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 5f45b7c765 ipn: make LocalBackend.loadStateWithLock easier to follow.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 96fd8b4230 ipn: adjust backend docs a bit more.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 73c0a2bee2 Improve documentation in backend.go.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson b0f5751a76 cmd/tailscale: remove statekey for now.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson f51293a2c7 Lint fixes.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 5bc632271b Introduce a state store to LocalBackend.
The store is passed-in by callers of NewLocalBackend and
ipnserver.Run, but currently all callers are hardcoded to
an in-memory store. The store is unused.

Signed-Off-By: David Anderson <dave@natulte.net>
5 years ago
David Anderson 21280ca2d1 Make ipn.Options.Prefs a pointer.
This is a prelude to making it truly optional, once state
management has moved into the backend. For now though, it's
still required. This change is just isolating the bubbling-up
of the pointerification into other layers.

Signed-Off-By: David Anderson <dave@natulte.net>
5 years ago
David Anderson f6f154193f Remove LoginFlags from Backend options.
- It was only used in one currently-unused client.
- It's an imperative command, not a configuration setting.
- The LoginFlags stuff in controlclient feels like it needs
  a refactor anyway.

I'll put this logic back once ipnd owns its state and Backend
commands reflect that.

Signed-Off-By: David Anderson <dave@natulte.net>
5 years ago
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>
5 years ago
wardn 2cafbd74c7 monitor: refactor for architecture-specific connection implementations
Signed-off-by: wardn <wardn@users.noreply.github.com>
5 years ago
David Crawshaw aa73b7972c Merge branch 'master' of github.com:tailscale/tailscale into HEAD 5 years ago
Brad Fitzpatrick c773abde77 wgengine: fix nil pointer deref crash from earlier change
Fixes #45
5 years ago
David Crawshaw 3bf9d53d40 Merge branch 'master' of github.com:tailscale/tailscale into HEAD 5 years ago
David Crawshaw a631466587 cmd/tsshd: empty file for windows build
Signed-off-by: David Crawshaw <david@zentus.com>
5 years ago
David Crawshaw cbfef0c8b7 Merge branch 'master' of github.com:tailscale/tailscale into HEAD 5 years ago
evalexpr e5481f33d3 meta: cross-compile tests for other geese
For now this is just darwin/windows, but we'll eventually add support
for {free,open}bsd

Signed-off-by: evalexpr <wilkinsphysics@gmail.com>
5 years ago