inbound

package
v0.0.0-...-d0ac596 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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, source net.Addr, conn net.Conn, additions ...Addition) *context.ConnContext

NewHTTP receive normal http request and return HTTPContext

func NewHTTPS

func NewHTTPS(request *http.Request, conn net.Conn, additions ...Addition) *context.ConnContext

NewHTTPS receive CONNECT request and return ConnContext

func NewInner

func NewInner(conn net.Conn, address string) *context.ConnContext

func NewPacket

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

NewPacket is PacketAdapter generator

func NewSocket

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

NewSocket receive TCP inbound and return ConnContext

func SetMPTCP

func SetMPTCP(open bool)

func SetTfo

func SetTfo(open bool)

Types

type Addition

type Addition func(metadata *C.Metadata)

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 (Addition) Apply

func (a Addition) Apply(metadata *C.Metadata)

type PacketAdapter

type PacketAdapter struct {
	C.UDPPacket
	// contains filtered or unexported fields
}

PacketAdapter is a UDP Packet adapter for socks/redir/tun

func (*PacketAdapter) Metadata

func (s *PacketAdapter) Metadata() *C.Metadata

Metadata returns destination metadata

Jump to

Keyboard shortcuts

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