mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
ipn/ipnlocal, util/syspolicy: make run exit node a preference option
Previously, the "RunExitNode" policy merely controlled the visibility of the "run as exit node" menu item, not the setting itself. This migrates that setting to a preference option named "AdvertiseExitNode". Updates ENG-2138 Change-Id: Ia6a125beb6b4563d380c6162637ce4088f1117a0 Signed-off-by: Adrian Dewhurst <adrian@tailscale.com>
This commit is contained in:

committed by
Adrian Dewhurst

parent
21958d2934
commit
86aa0485a6
@@ -1274,6 +1274,11 @@ var preferencePolicies = []preferencePolicyInfo{
|
||||
get: func(p ipn.PrefsView) bool { return p.AutoUpdate().Apply },
|
||||
set: func(p *ipn.Prefs, v bool) { p.AutoUpdate.Apply = v },
|
||||
},
|
||||
{
|
||||
key: syspolicy.EnableRunExitNode,
|
||||
get: func(p ipn.PrefsView) bool { return p.AdvertisesExitNode() },
|
||||
set: func(p *ipn.Prefs, v bool) { p.SetAdvertiseExitNode(v) },
|
||||
},
|
||||
}
|
||||
|
||||
// applySysPolicy overwrites configured preferences with policies that may be
|
||||
|
Reference in New Issue
Block a user