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>
When auto-update setting in local Prefs is unset, apply the tailnet
default value from control. This only happens once, when we apply the
default (or when the user manually overrides it), tailnet default no
longer affects the node.
Updates #16244
Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This updates all source files to use a new standard header for copyright
and license declaration. Notably, copyright no longer includes a date,
and we now use the standard SPDX-License-Identifier header.
This commit was done almost entirely mechanically with perl, and then
some minimal manual fixes.
Updates #6865
Signed-off-by: Will Norris <will@tailscale.com>
Add in UPnP portmapping, using goupnp library in order to get the UPnP client and run the
portmapping functions. This rips out anywhere where UPnP used to be in portmapping, and has a
flow separate from PMP and PCP.
RELNOTE=portmapper now supports UPnP mappings
Fixes#682
Updates #2109
Signed-off-by: julianknodt <julianknodt@gmail.com>