Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCertCache ¶
func NewCertCache() *certCache
func NewChunkedWriter ¶ added in v0.8.0
func NewChunkedWriter(w io.Writer) io.WriteCloser
NewChunkedWriter returns a new chunkedWriter that translates writes into HTTP "chunked" format before writing them to w. Closing the returned chunkedWriter sends the final 0-length chunk that marks the end of the stream but does not send the final CRLF that appears after trailers; trailers and the last CRLF must be written separately.
NewChunkedWriter is not needed by normal applications. The http package adds chunking automatically if handlers don't set a Content-Length header. Using newChunkedWriter inside a handler would result in double chunking or chunking with a Content-Length length, both of which are wrong.
func NewTLSCache ¶ added in v0.3.0
func NewTLSCache() *tlsCache
Types ¶
type CA ¶
type CA struct { Certificate *x509.Certificate PrivateKey crypto.PrivateKey // contains filtered or unexported fields }
func (*CA) FindOrCreateCert ¶
func (c *CA) FindOrCreateCert(host string) (*tls.Certificate, error)
type EnvProxy ¶ added in v0.2.0
type EnvProxy struct { }
EnvProxy is a Proxy implmentation using standard environment variables.
type FlushAfterChunkWriter ¶ added in v0.8.0
FlushAfterChunkWriter signals from the caller of NewChunkedWriter that each chunk should be followed by a flush. It is used by the http.Transport code to keep the buffering behavior for headers and trailers, but flush out chunks aggressively in the middle for request bodies which may be generated slowly. See Issue 6574.
type PACProxy ¶ added in v0.2.0
type PACProxy struct { URL string OverridePACProxy string // contains filtered or unexported fields }
PACProxy is a Proxy implementation using pac file.
type Proxy ¶ added in v0.2.0
Proxy has a role to find an upstream proxy.
func NewProxy ¶ added in v0.2.0
func NewProxy(config *ServerConfig) Proxy
NewProxy returns new Proxy. If pacURL isn't empty, returns PACProxy.
type Server ¶
type Server struct { ServerConfig // contains filtered or unexported fields }
func NewServer ¶
func NewServer(config *ServerConfig) *Server
func (*Server) VerifyCertificate ¶ added in v0.2.0
VerifyCertificate verify the peer certificate with Apple's requirements for trusted certificates. See https://support.apple.com/en-in/HT210176