Documentation
¶
Index ¶
Constants ¶
View Source
const ( COPY_BUF = 128 * 1024 BAD_REQ_MSG = "Bad Request\n" // Reduced idle pool: the proxy handler makes upstream connections per request, // not persistent keep-alive sessions. 10 total / 2 per host is plenty and // avoids leaking hundreds of idle goroutines/sockets under bursty traffic. TRANSPORT_MAX_IDLE_CONNS = 10 TRANSPORT_MAX_IDLE_CONNS_PER_HOST = 2 TRANSPORT_IDLE_CONN_TIMEOUT = 60 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewSocksServer ¶
Types ¶
type DummySocksResolver ¶
type DummySocksResolver struct{}
type ProxyHandler ¶
type ProxyHandler struct {
// contains filtered or unexported fields
}
func NewProxyHandler ¶
func NewProxyHandler(d dialer.ContextDialer, logger *clog.CondLogger, fakeSNI string) *ProxyHandler
func (*ProxyHandler) HandleRequest ¶
func (s *ProxyHandler) HandleRequest(wr http.ResponseWriter, req *http.Request)
func (*ProxyHandler) HandleTunnel ¶
func (s *ProxyHandler) HandleTunnel(wr http.ResponseWriter, req *http.Request)
func (*ProxyHandler) ServeHTTP ¶
func (s *ProxyHandler) ServeHTTP(wr http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.