Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLocalIP ¶
GetLocalIP gets the non-loopback IP address of this host.
func MakeTestServer ¶
Types ¶
type ProxyHandler ¶
ProxyHandler is a http.Handler that implements a simple HTTP proxy server.
func (*ProxyHandler) Count ¶
func (p *ProxyHandler) Count() int
Count returns the number of requests that have been proxied.
func (*ProxyHandler) Reset ¶
func (p *ProxyHandler) Reset()
Reset sets the counter for proxied requests to zero.
func (*ProxyHandler) ServeHTTP ¶
func (p *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP only accepts the CONNECT verb and will tunnel your connection to the specified host. Also tracks the number of connections that it proxies for debugging purposes.
type TestServerOption ¶
func WithTestServerAddress ¶
func WithTestServerAddress(ip string) TestServerOption
Click to show internal directories.
Click to hide internal directories.