Brad Fitzpatrick
3181bbb8e4
cmd/tailscale: make file cp send files via tailscaled localapi
...
So Taildrop sends work even if the local tailscaled is running in
netstack mode, as it often is on Synology, etc.
Updates #2179 (which is primarily about receiving, but both important)
Change-Id: I9bd1afdc8d25717e0ab6802c7cf2f5e0bd89a3b2
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-11-30 11:47:27 -08:00
Brad Fitzpatrick
675f9cd199
cmd/tailscale/cli: add, use log.Fatalf indirection for js/wasm
...
Updates #3157
Change-Id: I97a4962a44bd36313ff68388e3de0d852a8fa869
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-10-27 15:19:52 -07:00
Brad Fitzpatrick
5df7ac70d6
cmd/tailscale/cli: add Stdout, Stderr and output through them
...
So js/wasm can override where those go, without implementing
an *os.File pipe pair, etc.
Updates #3157
Change-Id: I14ba954d9f2349ff15b58796d95ecb1367e8ba3a
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-10-27 14:53:46 -07:00
Brad Fitzpatrick
75de4e9cc2
cmd/tailscale/cli: don't ExitOnError on js/wasm
...
An os.Exit brings down the whole wasm module.
Updates #3157
Change-Id: I3daa97fd854715b901f3dbb04b57d841576b60b1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-10-27 13:59:12 -07:00
Josh Bleecher Snyder
865d8c0d23
cmd: upgrade to ffcli v3
...
None of the breaking changes from v2 to v3 are relevant to us.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2021-09-14 13:21:55 -07:00
Brad Fitzpatrick
7bfd4f521d
cmd/tailscale: fix "tailscale ip $self-host-hostname"
...
And in the process, fix the related confusing error messages from
pinging your own IP or hostname.
Fixes #2803
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-09-07 11:57:23 -07:00
David Crawshaw
297b3d6fa4
staticcheck.conf: turn off noisy lint errors
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com >
2021-06-18 15:48:20 -07:00
Brad Fitzpatrick
80a4052593
cmd/tailscale, wgengine, tailcfg: don't assume LastSeen is present [mapver 20]
...
Updates #2107
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-06-11 08:41:16 -07:00
Josh Bleecher Snyder
25df067dd0
all: adapt to opaque netaddr types
...
This commit is a mishmash of automated edits using gofmt:
gofmt -r 'netaddr.IPPort{IP: a, Port: b} -> netaddr.IPPortFrom(a, b)' -w .
gofmt -r 'netaddr.IPPrefix{IP: a, Port: b} -> netaddr.IPPrefixFrom(a, b)' -w .
gofmt -r 'a.IP.Is4 -> a.IP().Is4' -w .
gofmt -r 'a.IP.As16 -> a.IP().As16' -w .
gofmt -r 'a.IP.Is6 -> a.IP().Is6' -w .
gofmt -r 'a.IP.As4 -> a.IP().As4' -w .
gofmt -r 'a.IP.String -> a.IP().String' -w .
And regexps:
\w*(.*)\.Port = (.*) -> $1 = $1.WithPort($2)
\w*(.*)\.IP = (.*) -> $1 = $1.WithIP($2)
And lots of manual fixups.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com >
2021-05-16 14:52:00 -07:00
Brad Fitzpatrick
ca65c6cbdb
cmd/tailscale: make 'file cp' have better error messages on bad targets
...
Say when target isn't owned by current user, and when target doesn't
exist in netmap.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-05-03 10:33:55 -07:00
Brad Fitzpatrick
1e6d512bf0
cmd/tailscale: improve file cp error message in macOS GUI version
...
Fixes tailscale/corp#1684
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-04-28 08:35:55 -07:00
Brad Fitzpatrick
8554694616
cmd/tailscale: add 'tailscale file get' subcommand
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-04-27 15:28:50 -07:00
Brad Fitzpatrick
cafa037de0
cmd/tailscale/cli: rename 'tailscale push' to 'tailscale file cp'
...
And reverse order, require final colon, and support multiple files.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2021-04-27 13:58:56 -07:00