wireguard

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: GPL-2.0 Imports: 20 Imported by: 5

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)

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) ListenPacket

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

func (*Endpoint) ListenPacketWithDestination added in v1.12.24

func (w *Endpoint) ListenPacketWithDestination(ctx context.Context, destination M.Socksaddr) (net.PacketConn, netip.Addr, 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) NewDirectRouteConnection added in v1.13.0

func (w *Endpoint) NewDirectRouteConnection(metadata adapter.InboundContext, routeContext tun.DirectRouteContext, timeout time.Duration) (tun.DirectRouteDestination, error)

func (*Endpoint) NewPacketConnectionEx

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

func (*Endpoint) PreferredAddress added in v1.13.0

func (w *Endpoint) PreferredAddress(address netip.Addr) bool

func (*Endpoint) PreferredDomain added in v1.13.0

func (w *Endpoint) PreferredDomain(domain string) bool

func (*Endpoint) PrepareConnection

func (w *Endpoint) PrepareConnection(network string, source M.Socksaddr, destination M.Socksaddr, routeContext tun.DirectRouteContext, timeout time.Duration) (tun.DirectRouteDestination, error)

func (*Endpoint) Start

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

Jump to

Keyboard shortcuts

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