2020-10-19 17:46:30 +00:00
|
|
|
// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2021-09-15 17:05:34 +00:00
|
|
|
// Code generated by the following command; DO NOT EDIT.
|
|
|
|
// tailscale.com/cmd/cloner -type Prefs
|
2020-10-19 17:46:30 +00:00
|
|
|
|
|
|
|
package ipn
|
|
|
|
|
|
|
|
import (
|
2020-12-24 20:33:55 +00:00
|
|
|
"inet.af/netaddr"
|
2021-01-21 01:24:16 +00:00
|
|
|
"tailscale.com/tailcfg"
|
2021-02-05 23:23:01 +00:00
|
|
|
"tailscale.com/types/persist"
|
2021-02-04 21:12:42 +00:00
|
|
|
"tailscale.com/types/preftype"
|
2020-10-19 17:46:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Clone makes a deep copy of Prefs.
|
|
|
|
// The result aliases no memory with the original.
|
|
|
|
func (src *Prefs) Clone() *Prefs {
|
|
|
|
if src == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
dst := new(Prefs)
|
|
|
|
*dst = *src
|
|
|
|
dst.AdvertiseTags = append(src.AdvertiseTags[:0:0], src.AdvertiseTags...)
|
|
|
|
dst.AdvertiseRoutes = append(src.AdvertiseRoutes[:0:0], src.AdvertiseRoutes...)
|
|
|
|
if dst.Persist != nil {
|
2021-02-05 23:23:01 +00:00
|
|
|
dst.Persist = new(persist.Persist)
|
2020-10-19 17:46:30 +00:00
|
|
|
*dst.Persist = *src.Persist
|
|
|
|
}
|
|
|
|
return dst
|
|
|
|
}
|
|
|
|
|
2021-09-15 17:05:34 +00:00
|
|
|
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
2020-10-19 17:46:30 +00:00
|
|
|
var _PrefsNeedsRegeneration = Prefs(struct {
|
2021-04-08 22:56:51 +00:00
|
|
|
ControlURL string
|
|
|
|
RouteAll bool
|
|
|
|
AllowSingleHosts bool
|
|
|
|
ExitNodeID tailcfg.StableNodeID
|
|
|
|
ExitNodeIP netaddr.IP
|
|
|
|
ExitNodeAllowLANAccess bool
|
|
|
|
CorpDNS bool
|
|
|
|
WantRunning bool
|
2021-04-30 07:56:11 +00:00
|
|
|
LoggedOut bool
|
2021-04-08 22:56:51 +00:00
|
|
|
ShieldsUp bool
|
|
|
|
AdvertiseTags []string
|
|
|
|
Hostname string
|
|
|
|
OSVersion string
|
|
|
|
DeviceModel string
|
|
|
|
NotepadURLs bool
|
|
|
|
ForceDaemon bool
|
|
|
|
AdvertiseRoutes []netaddr.IPPrefix
|
|
|
|
NoSNAT bool
|
|
|
|
NetfilterMode preftype.NetfilterMode
|
2021-04-17 04:01:29 +00:00
|
|
|
OperatorUser string
|
2021-04-08 22:56:51 +00:00
|
|
|
Persist *persist.Persist
|
2020-10-19 17:46:30 +00:00
|
|
|
}{})
|