Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPPool ¶
type IPPool struct {
// contains filtered or unexported fields
}
IPPool allows to generate IPv6 address from a /64 subnet
type Mgr ¶
type Mgr struct {
// contains filtered or unexported fields
}
Mgr is manager of the Gateway4To6
func (*Mgr) AddPeer ¶
func (m *Mgr) AddPeer(user, pubKey string) (PeerConfig, error)
AddPeer addd a peer identified by pubkey to the wireguard network The peer address is allocated from the manager pool and returned to the caller
func (*Mgr) RemovePeer ¶
RemovePeer removes a peer identified by pubkey from the wireguard network
type Peer ¶
type Peer struct { PublicKey string `json:"public_key"` Endpoint string `json:"endpoint"` AllowedIPs []string `json:"allowed_ips"` }
Peer is a wireguard peer
type PeerConfig ¶
PeerConfig is the wireguard configuration elements returns to the user he can use it to create its wg config
Click to show internal directories.
Click to hide internal directories.