Documentation ¶
Index ¶
- func Interface(name string, opts ...g.Option) *nodes.WireGuardInterface
- func Peer(pk crypto.Key, opts ...nodes.WireGuardPeerOption) *nodes.WireGuardPeer
- type Address
- type AllowedIP
- type Endpoint
- type ListenPort
- type PeerSelector
- type PersistentKeepaliveInterval
- type PresharedKey
- type PrivateKey
- type PublicKey
- type SetupKernelInterface
- type WriteConfigFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Peer ¶
func Peer(pk crypto.Key, opts ...nodes.WireGuardPeerOption) *nodes.WireGuardPeer
Types ¶
type Address ¶
func AddressIPv4 ¶
func (Address) Apply ¶
func (addr Address) Apply(i *nodes.WireGuardInterface)
type AllowedIP ¶
AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer.
func AllowedIPStr ¶
func AllowedIPv4 ¶
func (AllowedIP) Apply ¶
func (aip AllowedIP) Apply(p *nodes.WireGuardPeer)
type Endpoint ¶
Endpoint specifies the endpoint of this peer entry, if not nil.
func (Endpoint) Apply ¶
func (ep Endpoint) Apply(p *nodes.WireGuardPeer)
type ListenPort ¶
type ListenPort int
func (ListenPort) Apply ¶
func (lp ListenPort) Apply(i *nodes.WireGuardInterface)
type PeerSelector ¶
type PeerSelector nodes.WireGuardPeerSelectorFunc
var ( FullMeshPeers PeerSelector = func(_, _ *nodes.WireGuardInterface) bool { return true } NoPeers PeerSelector = func(_, _ *nodes.WireGuardInterface) bool { return false } )
func (PeerSelector) Apply ¶
func (ps PeerSelector) Apply(i *nodes.WireGuardInterface)
type PersistentKeepaliveInterval ¶
PersistentKeepaliveInterval specifies the persistent keepalive interval for this peer, if not nil.
A non-nil value of 0 will clear the persistent keepalive interval.
func (PersistentKeepaliveInterval) Apply ¶
func (pki PersistentKeepaliveInterval) Apply(p *nodes.WireGuardPeer)
type PresharedKey ¶
PresharedKey specifies a peer's pre-shared key configuration, if not nil.
A non-nil, zero-value Key will clear the pre-shared key.
func (PresharedKey) Apply ¶
func (pk PresharedKey) Apply(p *nodes.WireGuardPeer)
type PrivateKey ¶
func (PrivateKey) Apply ¶
func (pk PrivateKey) Apply(i *nodes.WireGuardInterface)
type PublicKey ¶
PublicKey specifies the public key of this peer. PublicKey is a mandatory field for all PeerConfigs.
func (PublicKey) Apply ¶
func (pk PublicKey) Apply(p *nodes.WireGuardPeer)
type SetupKernelInterface ¶
type SetupKernelInterface bool
func (SetupKernelInterface) Apply ¶
func (ski SetupKernelInterface) Apply(i *nodes.WireGuardInterface)
type WriteConfigFile ¶
type WriteConfigFile bool
func (WriteConfigFile) Apply ¶
func (wcf WriteConfigFile) Apply(i *nodes.WireGuardInterface)
Click to show internal directories.
Click to hide internal directories.