You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/types
Simon Law f8c9f1aca7
cmd/tailscale: get command for printing settings
For symmetry, `tailscale get` is the complement of `tailscale set`.
For every `tailscale set --SETTING`, there is now a corresponding
`tailscale get SETTING`.

While users were able to use `tailscale debug --prefs | jq .SETTING`
to extract their settings, this requires an external tool. To add
insult to injury, the names of the settings don’t always match the
keys in the JSON. For example, the `accept-dns` setting is called
`.CorpDNS`. And `advertise-exit-node` is just user-hostile.

This patch also contains tests that try to keep `getSettings` aligned
with the `setFlagSet` and `upFlagSet` flags for the `set` and `up`
commands, respectively. As a happy side-effect, this also checks that
the default values of these flags are consistent with the actual
default settings.

Closes: #2130

Signed-off-by: Simon Law <sfllaw@sfllaw.ca>
8 months ago
..
appctype appc,ipn/ipnlocal,types/appctype: implement control provided routes 2 years ago
bools types/bools: fix doc typo (#15021) 10 months ago
dnstype cmd/viewer,all: consistently use "read-only" instead of "readonly" 11 months ago
empty all: update copyright and license headers 3 years ago
flagtype all: update copyright and license headers 3 years ago
iox types/iox: add function types for Reader and Writer (#14366) 12 months ago
ipproto all: use Go 1.22 range-over-int 2 years ago
key types/key: use tlpub: in error message (#13707) 1 year ago
lazy types/lazy: fix flaky TestDeferAfterDo 11 months ago
logger all: use Go 1.22 range-over-int 2 years ago
logid types/logid: add Add method (#12478) 1 year ago
netlogtype all: update copyright and license headers 3 years ago
netmap control/controlclient,tailcfg:types: remove MaxKeyduration from NetMap 10 months ago
nettype wgengine/magicsock, types/nettype, etc: finish ReadFromUDPAddrPort netip migration 3 years ago
opt cmd/tailscale: get command for printing settings 8 months ago
persist types/persist: remove Persist.LegacyFrontendPrivateMachineKey 10 months ago
prefs all: statically enforce json/v2 interface satisfaction (#15154) 9 months ago
preftype cmd/tailscaled,*: add start of configuration file support 2 years ago
ptr all: update copyright and license headers 3 years ago
result types/result, util/lineiter: add package for a result type, use it 1 year ago
structs all: update copyright and license headers 3 years ago
tkatype types/tkatype: add test for MarshaledSignature's JSON format 2 years ago
views types/views: make SliceEqualAnyOrder also do short slice optimization 10 months ago