inbound

package
v0.0.0-...-17b02d1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SupportNamedPipe = false

Variables

This section is empty.

Functions

func AllowedIPs

func AllowedIPs() []netip.Prefix

func ApplyAdditions

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

func DisAllowedIPs

func DisAllowedIPs() []netip.Prefix

func IsRemoteAddrDisAllowed

func IsRemoteAddrDisAllowed(addr net.Addr) bool

func Listen

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

func ListenContext

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

func ListenNamedPipe

func ListenNamedPipe(path string) (net.Listener, error)

func MPTCP

func MPTCP() bool

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 Placeholder

func Placeholder(metadata *C.Metadata)

func SetAllowedIPs

func SetAllowedIPs(prefixes []netip.Prefix)

func SetDisAllowedIPs

func SetDisAllowedIPs(prefixes []netip.Prefix)

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

func Tfo

func Tfo() bool

Types

type Addition

type Addition func(metadata *C.Metadata)

func WithDSCP

func WithDSCP(dscp uint8) Addition

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