wireguard

package
v1.11.0-alpha.23 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: GPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEndpoint

func NewEndpoint(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.WireGuardEndpointOptions) (adapter.Endpoint, error)

func RegisterEndpoint

func RegisterEndpoint(registry *endpoint.Registry)

func RegisterOutbound

func RegisterOutbound(registry *outbound.Registry)

Types

type Endpoint

type Endpoint struct {
	endpoint.Adapter
	// contains filtered or unexported fields
}

func (*Endpoint) Close

func (w *Endpoint) Close() error

func (*Endpoint) DialContext

func (w *Endpoint) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*Endpoint) InterfaceUpdated

func (w *Endpoint) InterfaceUpdated()

func (*Endpoint) ListenPacket

func (w *Endpoint) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*Endpoint) NewConnectionEx

func (w *Endpoint) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc)

func (*Endpoint) NewPacketConnectionEx

func (w *Endpoint) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc)

func (*Endpoint) PrepareConnection

func (w *Endpoint) PrepareConnection(network string, source M.Socksaddr, destination M.Socksaddr) error

func (*Endpoint) Start

func (w *Endpoint) Start(stage adapter.StartStage) error

type Outbound

type Outbound struct {
	outbound.Adapter
	// contains filtered or unexported fields
}

func (*Outbound) Close

func (o *Outbound) Close() error

func (*Outbound) DialContext

func (o *Outbound) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*Outbound) InterfaceUpdated

func (o *Outbound) InterfaceUpdated()

func (*Outbound) ListenPacket

func (o *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*Outbound) Start

func (o *Outbound) Start(stage adapter.StartStage) error

Jump to

Keyboard shortcuts

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