Documentation ¶
Overview ¶
package proxy provides the implementations of the client and server proxies
Index ¶
Constants ¶
View Source
const ( X_LANTERN_PUBLIC_IP = "X-LANTERN-PUBLIC-IP" // Client's public IP as seen by the proxy HR = "--------------------------------------------------------------------------------" )
Variables ¶
This section is empty.
Functions ¶
func DumpHeaders ¶
DumpHeaders logs the given headers (request or response).
Types ¶
type ProxyConfig ¶
type ProxyConfig struct { ShouldDumpHeaders bool // whether or not to dump headers of requests and responses Addr string // listen address in form of host:port ReadTimeout time.Duration // (optional) timeout for read ops WriteTimeout time.Duration // (optional) timeout for write ops TLSConfig *tls.Config // (optional) TLS configuration for inbound connections, if nil then DEFAULT_TLS_SERVER_CONFIG is used }
ProxyConfig encapsulates common proxy configuration
Click to show internal directories.
Click to hide internal directories.