wireguard

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: GPL-2.0 Imports: 22 Imported by: 9

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) AttachReturn added in v1.14.0

func (w *Endpoint) AttachReturn(returnPath tun.Return) error

func (*Endpoint) Close

func (w *Endpoint) Close() error

func (*Endpoint) DetachReturn added in v1.14.0

func (w *Endpoint) DetachReturn(returnPath tun.Return) 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(ctx context.Context)

func (*Endpoint) JudgeFlow added in v1.14.0

func (w *Endpoint) JudgeFlow(network uint8, source netip.AddrPort, destination netip.AddrPort, firstPacket []byte) tun.FlowVerdict

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) NewDNSPacket added in v1.14.0

func (w *Endpoint) NewDNSPacket(payload []byte, source M.Socksaddr, destination M.Socksaddr, writer N.PacketWriter)

func (*Endpoint) NewPacketConnectionEx

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

func (*Endpoint) PortAddresses added in v1.14.0

func (w *Endpoint) PortAddresses() (netip.Addr, netip.Addr)

func (*Endpoint) PortMTU added in v1.14.0

func (w *Endpoint) PortMTU() uint32

func (*Endpoint) PreMatchFlow added in v1.14.0

func (w *Endpoint) PreMatchFlow(network string, destination netip.Addr) adapter.PreMatchAction

func (*Endpoint) PreferredAddress added in v1.13.0

func (w *Endpoint) PreferredAddress(metadata *adapter.InboundContext, address netip.Addr) bool

func (*Endpoint) PreferredDomain added in v1.13.0

func (w *Endpoint) PreferredDomain(metadata *adapter.InboundContext, domain string) bool

func (*Endpoint) Start

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

func (*Endpoint) WritePackets added in v1.14.0

func (w *Endpoint) WritePackets(packets [][]byte) error

Jump to

Keyboard shortcuts

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