iface

package
v0.0.0-...-f86c782 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIface

func CreateIface(
	i *Iface,
	runelog *runelog.Runelog,
) error

func RemoveIface

func RemoveIface(
	tunname string,
	runelog *runelog.Runelog,
) error

Types

type Iface

type Iface struct {
	// your wireguard interface name
	Tun string
	// your wireguard private key
	WgPrivateKey string
	// your ip
	IP string
	// your cidr range
	CIDR string
	// contains filtered or unexported fields
}

func NewIface

func NewIface(
	tun, wgPrivateKey, ip string,
	cidr string, runelog *runelog.Runelog,
) *Iface

func (*Iface) ConfigureToRemotePeer

func (i *Iface) ConfigureToRemotePeer(
	remotePeerPubKey, remoteip string,
	endpoint *net.UDPAddr,
	keepAlive time.Duration,
	preSharedKey string,
) error

func (*Iface) CreateWithUserSpace

func (i *Iface) CreateWithUserSpace(address string) error

func (*Iface) RemoveRemotePeer

func (i *Iface) RemoveRemotePeer(iface string, remoteip, remotePeerPubKey string) error

Jump to

Keyboard shortcuts

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