summaryrefslogtreecommitdiffhomepage
path: root/ipn/prefs.go
diff options
context:
space:
mode:
authorClaire Wang <claire@tailscale.com>2024-03-27 15:45:02 -0400
committerClaire Wang <claire@tailscale.com>2024-04-03 15:24:58 -0400
commit78c36f53fee9f03eff7ef09ada79662424db8a15 (patch)
tree8dba65a6f67d4d8ef1b29d6845ed70ac02def2e3 /ipn/prefs.go
parent92d3f64e95dc7b33fb19f03223d5ba4aa3331d8c (diff)
downloadtailscale-enable-exit-node-dst-logs.tar.xz
tailscale-enable-exit-node-dst-logs.zip
exit node dst wipenable-exit-node-dst-logs
Diffstat (limited to 'ipn/prefs.go')
-rw-r--r--ipn/prefs.go62
1 files changed, 35 insertions, 27 deletions
diff --git a/ipn/prefs.go b/ipn/prefs.go
index ef81cd08b..4d0947a47 100644
--- a/ipn/prefs.go
+++ b/ipn/prefs.go
@@ -109,6 +109,9 @@ type Prefs struct {
// routed directly or via the exit node.
ExitNodeAllowLANAccess bool
+ // ExitDestinationFlowLogs indicates whether exit node destination is recorded in network flow logs.
+ ExitDestinationFlowLogs bool
+
// CorpDNS specifies whether to install the Tailscale network's
// DNS configuration, if it exists.
CorpDNS bool
@@ -274,33 +277,34 @@ type AppConnectorPrefs struct {
type MaskedPrefs struct {
Prefs
- ControlURLSet bool `json:",omitempty"`
- RouteAllSet bool `json:",omitempty"`
- AllowSingleHostsSet bool `json:",omitempty"`
- ExitNodeIDSet bool `json:",omitempty"`
- ExitNodeIPSet bool `json:",omitempty"`
- ExitNodeAllowLANAccessSet bool `json:",omitempty"`
- CorpDNSSet bool `json:",omitempty"`
- RunSSHSet bool `json:",omitempty"`
- RunWebClientSet bool `json:",omitempty"`
- WantRunningSet bool `json:",omitempty"`
- LoggedOutSet bool `json:",omitempty"`
- ShieldsUpSet bool `json:",omitempty"`
- AdvertiseTagsSet bool `json:",omitempty"`
- HostnameSet bool `json:",omitempty"`
- NotepadURLsSet bool `json:",omitempty"`
- ForceDaemonSet bool `json:",omitempty"`
- EggSet bool `json:",omitempty"`
- AdvertiseRoutesSet bool `json:",omitempty"`
- NoSNATSet bool `json:",omitempty"`
- NetfilterModeSet bool `json:",omitempty"`
- OperatorUserSet bool `json:",omitempty"`
- ProfileNameSet bool `json:",omitempty"`
- AutoUpdateSet AutoUpdatePrefsMask `json:",omitempty"`
- AppConnectorSet bool `json:",omitempty"`
- PostureCheckingSet bool `json:",omitempty"`
- NetfilterKindSet bool `json:",omitempty"`
- DriveSharesSet bool `json:",omitempty"`
+ ControlURLSet bool `json:",omitempty"`
+ RouteAllSet bool `json:",omitempty"`
+ AllowSingleHostsSet bool `json:",omitempty"`
+ ExitDestinationFlowLogsSet bool `json:",omitempty"`
+ ExitNodeIDSet bool `json:",omitempty"`
+ ExitNodeIPSet bool `json:",omitempty"`
+ ExitNodeAllowLANAccessSet bool `json:",omitempty"`
+ CorpDNSSet bool `json:",omitempty"`
+ RunSSHSet bool `json:",omitempty"`
+ RunWebClientSet bool `json:",omitempty"`
+ WantRunningSet bool `json:",omitempty"`
+ LoggedOutSet bool `json:",omitempty"`
+ ShieldsUpSet bool `json:",omitempty"`
+ AdvertiseTagsSet bool `json:",omitempty"`
+ HostnameSet bool `json:",omitempty"`
+ NotepadURLsSet bool `json:",omitempty"`
+ ForceDaemonSet bool `json:",omitempty"`
+ EggSet bool `json:",omitempty"`
+ AdvertiseRoutesSet bool `json:",omitempty"`
+ NoSNATSet bool `json:",omitempty"`
+ NetfilterModeSet bool `json:",omitempty"`
+ OperatorUserSet bool `json:",omitempty"`
+ ProfileNameSet bool `json:",omitempty"`
+ AutoUpdateSet AutoUpdatePrefsMask `json:",omitempty"`
+ AppConnectorSet bool `json:",omitempty"`
+ PostureCheckingSet bool `json:",omitempty"`
+ NetfilterKindSet bool `json:",omitempty"`
+ DriveSharesSet bool `json:",omitempty"`
}
type AutoUpdatePrefsMask struct {
@@ -475,6 +479,9 @@ func (p *Prefs) pretty(goos string) string {
if p.ShieldsUp {
sb.WriteString("shields=true ")
}
+ if p.ExitDestinationFlowLogs {
+ sb.WriteString("exitdestinationflowlogs=true ")
+ }
if p.ExitNodeIP.IsValid() {
fmt.Fprintf(&sb, "exit=%v lan=%t ", p.ExitNodeIP, p.ExitNodeAllowLANAccess)
} else if !p.ExitNodeID.IsZero() {
@@ -545,6 +552,7 @@ func (p *Prefs) Equals(p2 *Prefs) bool {
p.ExitNodeID == p2.ExitNodeID &&
p.ExitNodeIP == p2.ExitNodeIP &&
p.ExitNodeAllowLANAccess == p2.ExitNodeAllowLANAccess &&
+ p.ExitDestinationFlowLogs == p2.ExitDestinationFlowLogs &&
p.CorpDNS == p2.CorpDNS &&
p.RunSSH == p2.RunSSH &&
p.RunWebClient == p2.RunWebClient &&