wireguard

package
v0.0.0-...-78b8bb9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WgClient

type WgClient struct {
	// contains filtered or unexported fields
}

func NewWgClient

func NewWgClient(iface string) (*WgClient, error)

func (*WgClient) FindPeerByRemoteIP

func (wg *WgClient) FindPeerByRemoteIP(remoteIP string) (string, error)

returns peer's public key

func (*WgClient) GetInterfacePublicKey

func (c *WgClient) GetInterfacePublicKey() (string, error)

func (*WgClient) GetPeers

func (c *WgClient) GetPeers() ([]wgtypes.Peer, error)

func (*WgClient) SetListenPort

func (wg *WgClient) SetListenPort(listenPort int) error

func (*WgClient) SetPeerRemotePort

func (wg *WgClient) SetPeerRemotePort(peerPubKey string, remoteIP string, remotePort int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL