Documentation ¶
Overview ¶
Package proxy ... TODO(ro) 2017-10-03 add cactus (c)
Package proxy ... TODO(ro) 2017-10-03 add cactus (c)
Index ¶
Constants ¶
View Source
const ( // DefaultMaxSize is the maximum size we'll proxy. DefaultMaxSize = 5 * 1024 * 1024 // DefaultMaxRedirects is the maximum # of redirects we'll follow. DefaultMaxRedirects = 10 // DefaultRequestTimeout is the request timeout for the client. DefaultRequestTimeout = 4 * time.Second // DefaultServerName is a name to set our client and Via header to. DefaultServerName = "bepress/camo" //DefaultKABE is the default keepalives setting for Backends. DefaultKABE = false //DefaultKAFE is the default keepalives setting for Frontends. DefaultKAFE = false )
Variables ¶
View Source
var ErrFilteredAddress = errors.New("invalid host: filtered host address")
ErrFilteredAddress is an error to be used when we need to detect that an error is of this specific type in order to determine the response code.
View Source
var FilteredIPNetworks = []string{
"127.0.0.0/8",
"169.254.0.0/16",
"224.0.0.0/24",
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"::1/128",
"fe80::/10",
"fec0::/10",
"fc00::/7",
"::ffff:0:0/96",
}
FilteredIPNetworks contains networks to reject. All special addresses initially.
View Source
var OnExitFlushLoop func()
OnExitFlushLoop is a callback set by tests to detect the state of the flushLoop() goroutine.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct { BufferPool httputil.BufferPool CheckUnicast bool Decoder decoder.Decoder Filter *filter.CIDRFilter FlushInterval time.Duration LookupIP ResolverFunc MaxRedirects int MaxSize int64 RedirFunc func(*http.Request, []*http.Request) error RequestTimeout time.Duration ServerName string Transport http.RoundTripper // TODO(ro) 2017-10-02 Do we really care? DisableKeepAlivesBE bool DisableKeepAlivesFE bool // contains filtered or unexported fields }
Proxy implements the handler for proxying assets.
Click to show internal directories.
Click to hide internal directories.