http

package
v0.0.0-...-775528f Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: GPL-2.0 Imports: 17 Imported by: 0

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 ReadRequest

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

func SourceAddress

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

func URLSetPath

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

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