Documentation ¶
Index ¶
- func GenerateKey(dir string) (wgtypes.Key, error)
- func LoadKey(dir string) (wgtypes.Key, error)
- type Peer
- type Wireguard
- func (w *Wireguard) Attrs() *netlink.LinkAttrs
- func (w *Wireguard) Configure(privateKey string, listentPort int, peers []*Peer) error
- func (w *Wireguard) Device() (*wgtypes.Device, error)
- func (w *Wireguard) SetAddr(cidr string) error
- func (w *Wireguard) Type() string
- func (w *Wireguard) UnsetAddr(cidr string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
GenerateKey generates a new private key. If key already exists in that location, that key is returned instead.
Types ¶
type Wireguard ¶
type Wireguard struct {
// contains filtered or unexported fields
}
Wireguard is a netlink.Link of type wireguard
func (*Wireguard) Device ¶
Device returns the detail of the configuration of the wireguard interface
Click to show internal directories.
Click to hide internal directories.