wg

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WireGuardHandler

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

WireGuardHandler provides an interface to the WireGuard client.

func NewWireGuardHandler

func NewWireGuardHandler() (*WireGuardHandler, error)

New initializes a new WireGuardHandler.

No parameters. Returns a pointer to a WireGuardHandler and an error.

func (*WireGuardHandler) SetKey

func (wg *WireGuardHandler) SetKey(interfaceName, peerPublicKey, pskString string) error

SetKey sets the preshared key for a WireGuard device.

Parameters: - interfaceName: the name of the WireGuard interface. - peerPublicKey: the public key of the peer. - pskString: the preshared key as a string.

Returns: - error: an error if any occurred during the process.

Jump to

Keyboard shortcuts

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