Documentation ¶
Overview ¶
Package autocfg handles initial auto-configuration of new interfaces and peers
Index ¶
- Variables
- type Interface
- func (i *Interface) AddAddresses(pk crypto.Key) error
- func (i *Interface) Close() error
- func (i *Interface) ConfigureWireGuard() error
- func (i *Interface) DetectMTU() (mtu int, err error)
- func (i *Interface) OnInterfaceModified(ci *daemon.Interface, old *wg.Interface, mod daemon.InterfaceModifier)
- func (i *Interface) OnPeerAdded(p *daemon.Peer)
- func (i *Interface) OnPeerRemoved(_ *daemon.Peer)
- func (i *Interface) RemoveAddresses(pk crypto.Key) error
- func (i *Interface) Start() error
Constants ¶
This section is empty.
Variables ¶
View Source
var Get = daemon.RegisterFeature(New, 10) //nolint:gochecknoglobals
Functions ¶
This section is empty.
Types ¶
type Interface ¶
func (*Interface) ConfigureWireGuard ¶
ConfigureWireGuard configures the WireGuard device using the configuration provided by the user. Missing settings such as a private key or listen port are automatically generated/allocated.
func (*Interface) DetectMTU ¶
DetectMTU find a suitable MTU for the tunnel interface. The algorithm is the same as used by wg-quick:
The MTU is automatically determined from the endpoint addresses or the system default route, which is usually a sane choice.
func (*Interface) OnInterfaceModified ¶
func (*Interface) OnPeerAdded ¶
func (*Interface) OnPeerRemoved ¶
Click to show internal directories.
Click to hide internal directories.