tun

package
v1.14.0-beta.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInbound

func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.TunInboundOptions) (adapter.Inbound, error)

func RegisterInbound

func RegisterInbound(registry *inbound.Registry)

Types

type Inbound

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

func (*Inbound) Close

func (t *Inbound) Close() error

func (*Inbound) InterfaceUpdated

func (t *Inbound) InterfaceUpdated()

func (*Inbound) JudgeFlow

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

func (*Inbound) NewConnectionEx

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

func (*Inbound) NewDNSPacket

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

func (*Inbound) NewPacketConnectionEx

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

func (*Inbound) Start

func (t *Inbound) Start(stage adapter.StartStage) error

func (*Inbound) Tag

func (t *Inbound) Tag() string

func (*Inbound) Type

func (t *Inbound) Type() string

Jump to

Keyboard shortcuts

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