wireguard

package
v0.2.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenPort int
	AllowedIPs []net.IPNet
	Protocol   string
}

type TunDevice

type TunDevice struct {
	// base
	wire.BaseWire
	// contains filtered or unexported fields
}

tun device to interface with goose

func NewTunDevice

func NewTunDevice() (*TunDevice, error)

func (*TunDevice) Address

func (t *TunDevice) Address() net.IP

func (*TunDevice) BatchSize

func (t *TunDevice) BatchSize() int

func (*TunDevice) Close

func (t *TunDevice) Close() error

func (*TunDevice) Decode

func (t *TunDevice) Decode(msg *message.Message) error

Decode

func (*TunDevice) Encode

func (t *TunDevice) Encode(msg *message.Message) error

Encode

func (*TunDevice) Endpoint

func (t *TunDevice) Endpoint() string

func (*TunDevice) Events

func (t *TunDevice) Events() <-chan tun.Event

func (*TunDevice) File

func (t *TunDevice) File() *os.File

func (*TunDevice) MTU

func (t *TunDevice) MTU() (int, error)

func (*TunDevice) Name

func (t *TunDevice) Name() (string, error)

func (*TunDevice) Read

func (t *TunDevice) Read(bufs [][]byte, sizes []int, offset int) (n int, err error)

func (*TunDevice) Write

func (t *TunDevice) Write(bufs [][]byte, offset int) (int, error)

type WGWireManager

type WGWireManager struct {
	wire.BaseWireManager
}

wireguard-wire manager

func (*WGWireManager) Dial

func (m *WGWireManager) Dial(endpoint string) error

create a wireguard server then register it as a goose wire

func (*WGWireManager) Protocol

func (m *WGWireManager) Protocol() string

Jump to

Keyboard shortcuts

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