inbound

package
v0.0.0-...-35843ba Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTP

func NewHTTP(request *http.Request, conn net.Conn) *context.HTTPContext

NewHTTP receive normal http request and return HTTPContext

func NewHTTPS

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

NewHTTPS receive CONNECT request and return ConnContext

func NewSocket

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

NewSocket receive TCP inbound and return ConnContext

func RemoveExtraHTTPHostPort

func RemoveExtraHTTPHostPort(req *http.Request)

RemoveExtraHTTPHostPort remove extra host port (example.com:80 --> example.com) It resolves the behavior of some HTTP servers that do not handle host:80 (e.g. baidu.com)

func RemoveHopByHopHeaders

func RemoveHopByHopHeaders(header http.Header)

RemoveHopByHopHeaders remove hop-by-hop header

Types

type PacketAdapter

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

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

func NewPacket

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

NewPacket is PacketAdapter generator

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