route

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendInboundContext

func AppendInboundContext(ctx context.Context, inboundContext *InboundContext) context.Context

Types

type Func

type Func func(ctx *InboundContext) N.Dialer

Func returns a dialer according to ctx. If match the rule, it will return a not-nil N.Dialer.

func Lan

func Lan(dialer N.Dialer) Func

Lan matches destination is Lan.

func UdpDnsPort

func UdpDnsPort(dialer N.Dialer) Func

UdpDnsPort matches destination is UDP DNS port (53).

type InboundContext

type InboundContext struct {
	Network             string
	Source, Destination M.Socksaddr
}

func InboundContextFrom

func InboundContextFrom(ctx context.Context) *InboundContext

Jump to

Keyboard shortcuts

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