udpnat

package
v0.6.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-2.0 Imports: 12 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectBackWriter

type DirectBackWriter struct {
	Source N.PacketConn
	Nat    N.PacketConn
}

func (*DirectBackWriter) Upstream

func (w *DirectBackWriter) Upstream() any

func (*DirectBackWriter) WritePacket

func (w *DirectBackWriter) WritePacket(buffer *buf.Buffer, addr M.Socksaddr) error

type Handler deprecated

type Handler interface {
	N.UDPConnectionHandler
	E.Handler
}

Deprecated: Use N.UDPConnectionHandler instead.

type Service

type Service[K comparable] struct {
	// contains filtered or unexported fields
}

func New deprecated

func New[K comparable](maxAge int64, handler Handler) *Service[K]

Deprecated: Use NewEx instead.

func NewEx

func NewEx[K comparable](maxAge int64, handler N.UDPConnectionHandlerEx) *Service[K]

func (*Service[T]) NewContextPacket deprecated

func (s *Service[T]) NewContextPacket(ctx context.Context, key T, buffer *buf.Buffer, metadata M.Metadata, init func(natConn N.PacketConn) (context.Context, N.PacketWriter))

Deprecated: Use NewPacketConnectionEx instead.

func (*Service[T]) NewContextPacketEx

func (s *Service[T]) NewContextPacketEx(ctx context.Context, key T, buffer *buf.Buffer, source M.Socksaddr, destination M.Socksaddr, init func(natConn N.PacketConn) (context.Context, N.PacketWriter))

func (*Service[T]) NewPacket deprecated

func (s *Service[T]) NewPacket(ctx context.Context, key T, buffer *buf.Buffer, metadata M.Metadata, init func(natConn N.PacketConn) N.PacketWriter)

Deprecated: use NewPacketEx instead.

func (*Service[T]) NewPacketDirect deprecated

func (s *Service[T]) NewPacketDirect(ctx context.Context, key T, conn N.PacketConn, buffer *buf.Buffer, metadata M.Metadata)

Deprecated: don't use

func (*Service[T]) NewPacketEx

func (s *Service[T]) NewPacketEx(ctx context.Context, key T, buffer *buf.Buffer, source M.Socksaddr, destination M.Socksaddr, init func(natConn N.PacketConn) N.PacketWriter)

func (*Service[T]) WriteIsThreadUnsafe

func (s *Service[T]) WriteIsThreadUnsafe()

Jump to

Keyboard shortcuts

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