wireguard

package module
v0.0.0-...-d6a8de4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGVisorNotIncluded = E.New(`gVisor is not included in this build, rebuild with -tags with_gvisor`)

Functions

This section is empty.

Types

type ClientBind

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

func NewClientBind

func NewClientBind(ctx context.Context, errorHandler E.Handler, dialer N.Dialer, isConnect bool, connectAddr netip.AddrPort, reserved [3]uint8) *ClientBind

func (*ClientBind) BatchSize

func (c *ClientBind) BatchSize() int

func (*ClientBind) Close

func (c *ClientBind) Close() error

func (*ClientBind) Open

func (c *ClientBind) Open(port uint16) (fns []conn.ReceiveFunc, actualPort uint16, err error)

func (*ClientBind) ParseEndpoint

func (c *ClientBind) ParseEndpoint(s string) (conn.Endpoint, error)

func (*ClientBind) Reset

func (c *ClientBind) Reset()

func (*ClientBind) ResetReservedForEndpoint

func (c *ClientBind) ResetReservedForEndpoint()

func (*ClientBind) Send

func (c *ClientBind) Send(bufs [][]byte, ep conn.Endpoint) error

func (*ClientBind) SetConnectAddr

func (c *ClientBind) SetConnectAddr(connectAddr netip.AddrPort)

func (*ClientBind) SetMark

func (c *ClientBind) SetMark(mark uint32) error

func (*ClientBind) SetReservedForEndpoint

func (c *ClientBind) SetReservedForEndpoint(destination netip.AddrPort, reserved [3]byte)

type Device

type Device interface {
	tun.Device
	N.Dialer
	Start() error
	Inet4Address() netip.Addr
	Inet6Address() netip.Addr
}

func NewStackDevice

func NewStackDevice(localAddresses []netip.Prefix, mtu uint32) (Device, error)

type Endpoint

type Endpoint netip.AddrPort

func (Endpoint) ClearSrc

func (e Endpoint) ClearSrc()

func (Endpoint) DstIP

func (e Endpoint) DstIP() netip.Addr

func (Endpoint) DstToBytes

func (e Endpoint) DstToBytes() []byte

func (Endpoint) DstToString

func (e Endpoint) DstToString() string

func (Endpoint) SrcIP

func (e Endpoint) SrcIP() netip.Addr

func (Endpoint) SrcToString

func (e Endpoint) SrcToString() string

Jump to

Keyboard shortcuts

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