inbound

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAdditions

func ApplyAdditions(metadata *C.Metadata, additions ...Addition)

func Listen

func Listen(network, address string) (net.Listener, error)

func ListenContext

func ListenContext(ctx context.Context, network, address string) (net.Listener, error)

func NewHTTP

func NewHTTP(target socks5.Addr, srcConn net.Conn, conn net.Conn, additions ...Addition) (net.Conn, *C.Metadata)

NewHTTP receive normal http request and return HTTPContext

func NewHTTPS

func NewHTTPS(request *http.Request, conn net.Conn, additions ...Addition) (net.Conn, *C.Metadata)

NewHTTPS receive CONNECT request and return ConnContext

func NewPacket

func NewPacket(target socks5.Addr, packet C.UDPPacket, source C.Type, additions ...Addition) (C.UDPPacket, *C.Metadata)

NewPacket is PacketAdapter generator

func NewSocket

func NewSocket(target socks5.Addr, conn net.Conn, source C.Type, additions ...Addition) (net.Conn, *C.Metadata)

NewSocket receive TCP inbound and return ConnContext

func SetMPTCP

func SetMPTCP(open bool)

func SetSkipAuthPrefixes

func SetSkipAuthPrefixes(prefixes []netip.Prefix)

func SetTfo

func SetTfo(open bool)

func SkipAuthPrefixes

func SkipAuthPrefixes() []netip.Prefix

func SkipAuthRemoteAddr

func SkipAuthRemoteAddr(addr net.Addr) bool

func SkipAuthRemoteAddress

func SkipAuthRemoteAddress(addr string) bool

Types

type Addition

type Addition func(metadata *C.Metadata)

func WithDstAddr

func WithDstAddr(addr net.Addr) Addition

func WithInAddr

func WithInAddr(addr net.Addr) Addition

func WithInName

func WithInName(name string) Addition

func WithInUser

func WithInUser(user string) Addition

func WithSpecialProxy

func WithSpecialProxy(specialProxy string) Addition

func WithSpecialRules

func WithSpecialRules(specialRules string) Addition

func WithSrcAddr

func WithSrcAddr(addr net.Addr) Addition

Jump to

Keyboard shortcuts

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