http

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: GPL-3.0 Imports: 14 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPDialer

func NewHTTPDialer(s string, d proxy.Dialer) (proxy.Dialer, error)

NewHTTPDialer returns a http proxy dialer.

func NewHTTPServer

func NewHTTPServer(s string, p proxy.Proxy) (proxy.Server, error)

NewHTTPServer returns a http proxy server.

Types

type HTTP

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

HTTP struct.

func NewHTTP

func NewHTTP(s string, d proxy.Dialer, p proxy.Proxy) (*HTTP, error)

NewHTTP returns a http proxy.

func (*HTTP) Addr

func (s *HTTP) Addr() string

Addr returns forwarder's address.

func (*HTTP) Dial

func (s *HTTP) Dial(network, addr string) (net.Conn, error)

Dial connects to the address addr on the network net via the proxy.

func (*HTTP) DialUDP

func (s *HTTP) DialUDP(network, addr string) (pc net.PacketConn, writeTo net.Addr, err error)

DialUDP connects to the given address via the proxy.

func (*HTTP) ListenAndServe

func (s *HTTP) ListenAndServe()

ListenAndServe listens on server's addr and serves connections.

func (*HTTP) Serve

func (s *HTTP) Serve(c net.Conn)

Serve serves a connection.

Jump to

Keyboard shortcuts

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