Documentation ΒΆ
Index ΒΆ
- Constants
- func AfterWallClock(d time.Duration) <-chan time.Time
- func ListLocations(ctx context.Context, cfg *Config) error
- func ListProxies(ctx context.Context, cfg *Config) error
- func Run(ctx context.Context, cfg *Config) error
- type AuthProvider
- type CondLogger
- func (cl *CondLogger) Critical(s string, v ...interface{}) error
- func (cl *CondLogger) Debug(s string, v ...interface{}) error
- func (cl *CondLogger) Error(s string, v ...interface{}) error
- func (cl *CondLogger) Info(s string, v ...interface{}) error
- func (cl *CondLogger) Log(verb int, format string, v ...interface{}) error
- func (cl *CondLogger) Warning(s string, v ...interface{}) error
- type Config
- type ContextDialer
- type Dialer
- type FakeSNIDialer
- type LogWriter
- type ProxyDialer
- type ProxyHandler
- type Resolver
- type ResolvingDialer
Constants ΒΆ
View Source
const ( CRITICAL = 50 ERROR = 40 WARNING = 30 INFO = 20 DEBUG = 10 NOTSET = 0 )
View Source
const ( DOT = 0x2e DNS_CACHE_SIZE_LIMIT = 1024 )
View Source
const ( PROXY_CONNECT_METHOD = "CONNECT" PROXY_HOST_HEADER = "Host" PROXY_AUTHORIZATION_HEADER = "Proxy-Authorization" )
View Source
const ( COPY_BUF = 128 * 1024 WALLCLOCK_PRECISION = 1 * time.Second )
View Source
const ( DEFAULT_CLIENT_AUTH_SECRET = "952b4412f002315aa50751032fcaab03" ASSUMED_PROXY_PORT uint16 = 443 )
View Source
const BAD_REQ_MSG = "Bad Request\n"
View Source
const MAX_LOG_QLEN = 128
View Source
const QUEUE_SHUTDOWN_TIMEOUT = 500 * time.Millisecond
Variables ΒΆ
This section is empty.
Functions ΒΆ
Types ΒΆ
type AuthProvider ΒΆ
type AuthProvider func() string
type CondLogger ΒΆ
type CondLogger struct {
// contains filtered or unexported fields
}
func NewCondLogger ΒΆ
func NewCondLogger(logger *log.Logger, verbosity int) *CondLogger
func (*CondLogger) Critical ΒΆ
func (cl *CondLogger) Critical(s string, v ...interface{}) error
func (*CondLogger) Debug ΒΆ
func (cl *CondLogger) Debug(s string, v ...interface{}) error
func (*CondLogger) Error ΒΆ
func (cl *CondLogger) Error(s string, v ...interface{}) error
func (*CondLogger) Info ΒΆ
func (cl *CondLogger) Info(s string, v ...interface{}) error
func (*CondLogger) Log ΒΆ
func (cl *CondLogger) Log(verb int, format string, v ...interface{}) error
func (*CondLogger) Warning ΒΆ
func (cl *CondLogger) Warning(s string, v ...interface{}) error
type ContextDialer ΒΆ
type FakeSNIDialer ΒΆ
type FakeSNIDialer struct {
// contains filtered or unexported fields
}
func NewFakeSNIDialer ΒΆ
func NewFakeSNIDialer(caPool *x509.CertPool, sni string, nextDialer ContextDialer) *FakeSNIDialer
func (*FakeSNIDialer) DialTLSContext ΒΆ
type LogWriter ΒΆ
type LogWriter struct {
// contains filtered or unexported fields
}
func NewLogWriter ΒΆ
type ProxyDialer ΒΆ
type ProxyDialer struct {
// contains filtered or unexported fields
}
func NewProxyDialer ΒΆ
func NewProxyDialer(getAddress func() (address, tlsServerName string), sni string, auth AuthProvider, caPool *x509.CertPool, nextDialer ContextDialer) *ProxyDialer
func ProxyDialerFromURL ΒΆ
func ProxyDialerFromURL(u *url.URL, next ContextDialer) (*ProxyDialer, error)
func (*ProxyDialer) DialContext ΒΆ
type ProxyHandler ΒΆ
type ProxyHandler struct {
// contains filtered or unexported fields
}
func NewProxyHandler ΒΆ
func NewProxyHandler(dialer ContextDialer, logger *CondLogger, refreshC chan<- struct{}, refreshPath 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)
type ResolvingDialer ΒΆ
type ResolvingDialer struct {
// contains filtered or unexported fields
}
func NewResolvingDialer ΒΆ
func NewResolvingDialer(resolverAddress string, timeout time.Duration, next ContextDialer, logger *CondLogger) (*ResolvingDialer, error)
func (*ResolvingDialer) Dial ΒΆ
func (d *ResolvingDialer) Dial(network, address string) (net.Conn, error)
func (*ResolvingDialer) DialContext ΒΆ
Source Files ΒΆ
Click to show internal directories.
Click to hide internal directories.