http

package
v0.6.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: GPL-2.0 Imports: 20 Imported by: 53

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleConnection deprecated

func HandleConnection(ctx context.Context, conn net.Conn, reader *std_bufio.Reader, authenticator *auth.Authenticator,

	handler N.TCPConnectionHandler, metadata M.Metadata,
) error

Deprecated: Use HandleConnectionEx instead.

func HandleConnectionEx

func HandleConnectionEx(ctx context.Context, conn net.Conn, reader *std_bufio.Reader, authenticator *auth.Authenticator,

	handler N.TCPConnectionHandler, handlerEx N.TCPConnectionHandlerEx, source M.Socksaddr, onClose N.CloseHandlerFunc,
) error

func ParseBasicAuth added in v0.2.16

func ParseBasicAuth(auth string) (username, password string, ok bool)

func ReadRequest

func ReadRequest(b *bufio.Reader) (req *http.Request, err error)

func SourceAddress

func SourceAddress(request *http.Request) M.Socksaddr

func URLSetPath added in v0.2.3

func URLSetPath(u *url.URL, p string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options Options) *Client

func (*Client) DialContext

func (c *Client) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*Client) ListenPacket

func (c *Client) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

type Options added in v0.2.3

type Options struct {
	Dialer   N.Dialer
	Server   M.Socksaddr
	Username string
	Password string
	Path     string
	Headers  http.Header
}

Jump to

Keyboard shortcuts

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