Categorygithub.com/sleeyax/connectproxy
modulepackage
0.0.0-20210220000306-66a262e8359c
Repository: https://github.com/sleeyax/connectproxy.git
Documentation: pkg.go.dev

# README

ConnectProxy

Small Go library to use CONNECT-speaking proxies standalone or with the proxy library.

GoDoc

Please see the godoc for more details.

This library is written to make connecting through proxies easier. It unashamedly steals from https://gist.github.com/jim3ma/3750675f141669ac4702bc9deaf31c6b, but adds a nice and simple interface.

For legal use only.

Domain Fronting

To make it easier to have a different SNI name and Host: header, a separate SNI name may be specified when registering the proxy. See the GeneratorWithConfig documentation for more details.

Examples

The godoc has a couple of examples. Also, in the examples directory there is an example program.

# Packages

No description provided by the author

# Functions

GeneratorWithConfig is like NewWithConfig, but is suitable for passing to proxy.RegisterDialerType while maintaining configuration options.
New returns a proxy.Dialer given a URL specification and an underlying proxy.Dialer for it to make network requests.
NewWithConfig is like New, but allows control over various options.
RegisterDialerFromURL is a convenience wrapper around proxy.RegisterDialerType, which registers the given URL as a for the schemes "http" and/or "https", as controlled by registerHTTP and registerHTTPS.

# Structs

Config allows various parameters to be configured.

# Type aliases

ErrorConnectionTimeout is returned if the connection through the proxy server was not able to be made before the configured timeout expired.
ErrorUnsupportedScheme is returned if a scheme other than "http" or "https" is used.