http

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: GPL-2.0 Imports: 19 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleConnection

func HandleConnection(ctx context.Context, conn net.Conn, reader *std_bufio.Reader, authenticator *auth.Authenticator, handler Handler, metadata M.Metadata) 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 Handler

type Handler = N.TCPConnectionHandler

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