Simon Law 9d5411b92c
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>
2025-03-15 01:52:56 -07:00
..
2025-02-13 16:12:00 -08:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00