Go to file
Brad Fitzpatrick febdac0499 tstime: write Parse3339 parse that doesn't use time.Parse
It doesn't allocate and it's half the time of time.Parse (which
allocates), and 2/3rds the time of time.ParseInLocation (which
doesn't).

Go with a UTC time:

BenchmarkGoParse3339/Z-8                 2200995               534 ns/op               0 B/op          0 allocs/op
BenchmarkGoParse3339/Z-8                 2254816               554 ns/op               0 B/op          0 allocs/op
BenchmarkGoParse3339/Z-8                 2159504               522 ns/op               0 B/op          0 allocs/op

Go allocates with a "-08:00" suffix instead of ending in "Z":

BenchmarkGoParse3339/TZ-8                1276491               884 ns/op             144 B/op          3 allocs/op
BenchmarkGoParse3339/TZ-8                1355858               942 ns/op             144 B/op          3 allocs/op
BenchmarkGoParse3339/TZ-8                1385484               911 ns/op             144 B/op          3 allocs/op

Go doesn't allocate if you use time.ParseInLocation, but then you need
to parse the string to find the location anyway, so might as well go
all the way (below).

BenchmarkGoParse3339InLocation-8         1912254               597 ns/op               0 B/op          0 allocs/op
BenchmarkGoParse3339InLocation-8         1980043               612 ns/op               0 B/op          0 allocs/op
BenchmarkGoParse3339InLocation-8         1891366               612 ns/op               0 B/op          0 allocs/op

Parsing RFC3339 ourselves, UTC:

BenchmarkParse3339/Z-8                   3889220               307 ns/op               0 B/op          0 allocs/op
BenchmarkParse3339/Z-8                   3718500               309 ns/op               0 B/op          0 allocs/op
BenchmarkParse3339/Z-8                   3621231               303 ns/op               0 B/op          0 allocs/op

Parsing RFC3339 ourselves, with timezone (w/ *time.Location fetched
from sync.Map)

BenchmarkParse3339/TZ-8                  3019612               418 ns/op               0 B/op          0 allocs/op
BenchmarkParse3339/TZ-8                  2921618               401 ns/op               0 B/op          0 allocs/op
BenchmarkParse3339/TZ-8                  3031671               408 ns/op               0 B/op          0 allocs/op

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-04-06 08:19:17 -07:00
.github github: add license check to CI. 2020-03-17 21:34:44 -07:00
atomicfile scripts: add a license header checker. 2020-03-17 21:34:44 -07:00
cmd tsweb: rename Handler to ReturnHandler 2020-04-05 13:16:36 -07:00
control/controlclient controlclient: do not send duplicate hostinfo/netinfo 2020-04-02 13:12:29 +11:00
derp derp/derpmap: add derp5 (Sydney) to prod map. 2020-04-05 18:55:29 -07:00
ipn ipn, ipn/policy: filter portlist to a short list of "interesting" ports 2020-04-01 10:03:44 -07:00
logpolicy logpolicy: log on dials, add knob to force HTTP/1 for log uploads 2020-04-04 14:46:41 -07:00
logtail logtail: don't send a User-Agent 2020-04-05 13:16:56 -07:00
metrics metrics: add a LabelMap type for variables with 1 label dimension. 2020-03-04 13:22:50 -08:00
net cmd/tailscale: add status subcommand 2020-03-27 20:34:36 -07:00
netcheck derp, netcheck: make tests listen on localhost only 2020-03-30 11:29:08 -07:00
paths paths: use /var/db for state on BSDs, and /var/run for sockets. 2020-03-03 17:49:31 -08:00
portlist portlist: ignore ports bound to localhost 2020-03-17 20:55:45 -07:00
ratelimit Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
safesocket safesocket: gofmt 2020-03-30 11:23:18 -07:00
scripts scripts: add a license header checker. 2020-03-17 21:34:44 -07:00
stun stun, stunner: clarify an error log message more 2020-03-15 22:19:45 -07:00
stunner stunner: fix data race. 2020-03-25 23:11:22 -07:00
syncs syncs: add new package for extra sync types 2020-03-12 11:13:33 -07:00
tailcfg tailcfg: clarify Hostinfo.OS doc 2020-04-01 09:27:35 -07:00
tempfork/osexec Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
testy testy: make safe for concurrent use. 2020-03-27 03:05:34 -07:00
tstime tstime: write Parse3339 parse that doesn't use time.Parse 2020-04-06 08:19:17 -07:00
tsweb tsweb: add some Benchmarks 2020-04-05 13:16:36 -07:00
types types/key: make Public implement TextMarshaler, TextUnmarshaler 2020-03-27 13:03:35 -07:00
version version: move runtime.OS to tailscale OS mapping func to version 2020-04-01 08:50:56 -07:00
wgengine wgengine: unexport some windows funcs 2020-04-05 08:23:53 -07:00
.gitattributes .gitattributes: add a smudge filter for go.mod. 2020-02-19 20:02:02 -05:00
.gitignore cmd/relaynode: drop local --acl-file in favour of central packet filter. 2020-02-20 00:15:43 -05:00
AUTHORS Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
CODE_OF_CONDUCT.md Add a code of conduct. 2020-02-10 22:16:30 -08:00
Dockerfile Dockerfile: add some usage docs, bump to Go 1.14 2020-04-06 07:57:47 -07:00
LICENSE Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
PATENTS Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
README.md Dockerfile: add some usage docs, bump to Go 1.14 2020-04-06 07:57:47 -07:00
SECURITY.md Add a SECURITY.md for vulnerability reports. 2020-02-11 10:26:41 -08:00
go.mod cmd/tailscale: add status subcommand 2020-03-27 20:34:36 -07:00
go.sum cmd/tailscale: add status subcommand 2020-03-27 20:34:36 -07:00

README.md

Tailscale

https://tailscale.com

Private WireGuard® networks made easy

Overview

This repository contains all the open source Tailscale code. It currently includes the Linux client.

The Linux client is currently cmd/relaynode, but will soon be replaced by cmd/tailscaled.

Using

We serve packages for a variety of distros at https://pkgs.tailscale.com .

Building

go install tailscale.com/cmd/tailscale{,d}

We only guarantee to support the latest Go release and any Go beta or release candidate builds (currently Go 1.14) in module mode. It might work in earlier Go versions or in GOPATH mode, but we're making no effort to keep those working.

Bugs

Please file any issues about this code or the hosted service on the issue tracker.

Contributing

under_construction.gif

PRs welcome, but we are still working out our contribution process and tooling.

We require Developer Certificate of Origin Signed-off-by lines in commits.

About Us

We are apenwarr, bradfitz, crawshaw, danderson, dfcarney, from Tailscale Inc. You can learn more about us from our website.

WireGuard is a registered trademark of Jason A. Donenfeld.