httpproxy

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Name string = "httpproxy"
View Source
var Version string = "unkown"

Functions

func ShowVersion

func ShowVersion()

Types

type HttpProxy added in v0.4.0

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

func NewHttpProxy added in v0.4.0

func NewHttpProxy(u *url.URL, d proxy.Dialer) (*HttpProxy, error)

func (*HttpProxy) Dial added in v0.4.0

func (hp *HttpProxy) Dial(network, addr string) (c net.Conn, err error)

type ProxyContextDialer added in v0.4.2

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

func NewProxyContextDialer added in v0.4.2

func NewProxyContextDialer(d proxy.Dialer) ProxyContextDialer

func (ProxyContextDialer) DialContext added in v0.4.2

func (d ProxyContextDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

*

  • from golang.org/x/net/proxy.dialContext

type Server

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

func NewServer

func NewServer(address string, opts ...ServerOption) (*Server, error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) ListenAndServeTLS added in v0.3.0

func (s *Server) ListenAndServeTLS(certFile, keyFile string) error

func (*Server) Serve added in v0.3.0

func (s *Server) Serve(l net.Listener)

type ServerOption added in v0.4.2

type ServerOption interface {
	// contains filtered or unexported methods
}

func WithConnectTimeout added in v0.4.2

func WithConnectTimeout(timeout time.Duration) ServerOption

func WithProxy added in v0.4.2

func WithProxy(addr string) ServerOption

Jump to

Keyboard shortcuts

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