summaryrefslogtreecommitdiffhomepage
path: root/util
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10util/dnsname: normalize leading dots in ToFQDN.David Anderson2-2/+6
Fixes #1888. Signed-off-by: David Anderson <dave@natulte.net>
2021-04-23util/cmpver: move into OSS from corp repo.David Anderson2-0/+202
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-04-23ipn/ipnlocal: add file sharing to windows shellAleksandar Pesic2-0/+120
Updates: tailscale/winmin#33 Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
2021-04-15control/controlclient: only use a single DNS label as the hostname.David Anderson1-0/+8
Fixes #971 Signed-off-by: David Anderson <danderson@tailscale.com>
2021-04-10util/dnsname: add FQDN type, use throughout codebase.David Anderson2-24/+229
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-04-01net/dns/resolver: teach the forwarder to do per-domain routing.David Anderson1-0/+9
Given a DNS route map, the forwarder selects the right set of upstreams for a given name. Signed-off-by: David Anderson <danderson@tailscale.com>
2021-03-18logpolicy: set log target on windows based on a registry key (#1542)Christine Dodrill2-0/+44
Signed-off-by: Christine Dodrill <xe@tailscale.com>
2021-02-27util/systemd: explicitly check for os.ErrNotExist from sdnotifyMatt Layher1-7/+4
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-02-26util/winutil: make it actually compileBrad Fitzpatrick1-1/+4
Helps to use the right GOOS after refactoring, sigh. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-02-26util/winutil: add little Windows utility packageBrad Fitzpatrick1-0/+21
Code from Alex Brainman, split out of another change. I changed it to a comma-ok return and tweaked the docs a bit.
2021-02-18dnsname,tailcfg: add hostname sanitation logic to node display names (#1304)Sonia Appasamy2-3/+186
Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2021-02-10wgengine/magicsock: increase legacy ping timeout againJosh Bleecher Snyder1-0/+13
I based my estimation of the required timeout based on locally observed behavior. But CI machines are worse than my local machine. 16s was enough to reduce flakiness but not eliminate it. Bump it up again. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-01-27tailcfg: update node display name fields and methods (#1207)Sonia Appasamy2-26/+0
Signed-off-by: Sonia Appasamy <sonia@tailscale.com> Consolidates the node display name logic from each of the clients into tailcfg.Node. UI clients can use these names directly, rather than computing them independently.
2021-01-25tailcfg, controlclient: add DisplayName field to tailcfg.Node and populate ↵Sonia Appasamy2-0/+26
it from controlclient (#1191) Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2021-01-10cmd/tailscale: change formatting of "tailscale status"Brad Fitzpatrick2-0/+47
* show DNS name over hostname, removing domain's common MagicDNS suffix. only show hostname if there's no DNS name. but still show shared devices' MagicDNS FQDN. * remove nerdy low-level details by default: endpoints, DERP relay, public key. They're available in JSON mode still for those who need them. * only show endpoint or DERP relay when it's active with the goal of making debugging easier. (so it's easier for users to understand what's happening) The asterisks are gone. * remove Tx/Rx numbers by default for idle peers; only show them when there's traffic. * include peers' owner login names * add CLI option to not show peers (matching --self=true, --peers= also defaults to true) * sort by DNS/host name, not public key * reorder columns
2020-12-17util/systemd: don't log warnings when not running under systemdBrad Fitzpatrick1-1/+7
It caused our integration tests to fail, which prohibit logging to os.Stderr for test cleanliness reasons.
2020-12-15ipn/ipnserver: enable systemd-notify supportChristine Dodrill3-0/+99
Addresses #964 Still to be done: - Figure out the correct logging lines in util/systemd - Figure out if we need to slip the systemd.Status function anywhere else - Log util/systemd errors? (most of the errors are of the "you cannot do anything about this, but it might be a bad idea to crash the program if it errors" kind) Assistance in getting this over the finish line would help a lot. Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: rename the nonlinux file to appease the magic Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: fix package name Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: fix review feedback from @mdlayher Signed-off-by: Christine Dodrill <me@christine.website> cmd/tailscale{,d}: update depaware manifests Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: use sync.Once instead of func init Signed-off-by: Christine Dodrill <me@christine.website> control/controlclient: minor review feedback fixes Signed-off-by: Christine Dodrill <me@christine.website> {control,ipn,systemd}: fix review feedback Signed-off-by: Christine Dodrill <me@christine.website> review feedback fixes Signed-off-by: Christine Dodrill <me@christine.website> ipn: fix sprintf call Signed-off-by: Christine Dodrill <me@christine.website> ipn: make staticcheck less sad Signed-off-by: Christine Dodrill <me@christine.website> ipn: print IP address in connected status Signed-off-by: Christine Dodrill <me@christine.website> ipn: review feedback Signed-off-by: Christine Dodrill <me@christine.website> final fixups Signed-off-by: Christine Dodrill <me@christine.website>
2020-11-19util/jsonutil: new packageJosh Bleecher Snyder3-0/+172
The cornerstone API is a more memory-efficient Unmarshal. The savings come from re-using a json.Decoder. BenchmarkUnmarshal-8 4016418 288 ns/op 8 B/op 1 allocs/op BenchmarkStdUnmarshal-8 4189261 283 ns/op 184 B/op 2 allocs/op It also includes a Bytes type to reduce allocations when unmarshalling a non-hex-encoded JSON string into a []byte. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-11-19util/lineread: add docs to ReaderJosh Bleecher Snyder1-0/+5
In particular, point out how to stop reading and detect it on the other side. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-11-17util/endian: add Native variable to get the platform's native binary.ByteOrderBrad Fitzpatrick2-0/+10
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-11-16util/racebuild: add package to export a race-is-enabled constBrad Fitzpatrick3-0/+25
2020-11-14util/endian: add package with const for whether platform is big endianBrad Fitzpatrick3-0/+26
2020-10-02util/uniq: add new packageJosh Bleecher Snyder2-0/+153
This makes it easy to compact slices that contain duplicate elements by sorting and then uniqing. This is an alternative to constructing an intermediate map and then extracting elements from it. It also provides more control over equality than using a map key does. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-11util/pidowner: add missing copyright headerBrad Fitzpatrick1-0/+4
2020-09-11util/pidowner: add two missing copyright headersBrad Fitzpatrick2-0/+8
2020-09-11util/pidowner: new package to map from process ID to its user IDBrad Fitzpatrick5-0/+146
2020-07-06util/lineread: add little package to read lines from files/ReadersBrad Fitzpatrick1-0/+33