httpupstream

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package httpupstream extends proxy with HTTP and HTTPS proxies support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPProxyDialerFromURL

func HTTPProxyDialerFromURL(u *url.URL, next proxy.Dialer) (d proxy.Dialer, err error)

HTTPProxyDialerFromURL creates an instance of proxy.Dialer from an http:// or https:// URL.

Types

type HTTPProxyDialer

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

HTTPProxyDialer implement proxy.Dialer and proxy.ContextDialer and adds HTTP and HTTPS proxies support.

func NewHTTPProxyDialer

func NewHTTPProxyDialer(
	address string,
	tls bool,
	userinfo *url.Userinfo,
	next proxy.Dialer,
) (d *HTTPProxyDialer)

NewHTTPProxyDialer creates a new instance of *HTTPProxyDialer.

func (*HTTPProxyDialer) Dial

func (d *HTTPProxyDialer) Dial(network, address string) (conn net.Conn, err error)

Dial implements the proxy.Dialer interface for *HTTPProxyDialer.

func (*HTTPProxyDialer) DialContext

func (d *HTTPProxyDialer) DialContext(
	ctx context.Context,
	network string,
	address string,
) (conn net.Conn, err error)

DialContext implements the proxy.ContextDialer interface for *HTTPProxyDialer.

Jump to

Keyboard shortcuts

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