Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpsHandler ¶
Types ¶
type Handler ¶
Handler is a function that processes an incoming client connection.
func ServerFrontHandler ¶
ServerFrontHandler returns a Handler that terminates incoming TLS using certFile/keyFile, then forwards to p.BackendAddr using the configured fingerprint.
type LocalCA ¶
type LocalCA struct {
// contains filtered or unexported fields
}
LocalCA is a self-signed CA used to issue per-host certificates for MitM TLS interception in client-front mode.
func GenerateCA ¶
GenerateCA creates a fresh in-memory self-signed CA.
func LoadOrGenerateCA ¶
LoadOrGenerateCA loads the CA from certPath + keyPath. If the files do not exist, it generates a new CA and writes it to those paths. Pass empty strings to get an ephemeral in-memory CA.
type Proxy ¶
type Proxy struct {
ListenAddr string
BackendAddr string // server-front: backend host:port
CAPool *x509.CertPool
Fingerprint fingerprint.TLSApplier
LocalCA *LocalCA // client-front: MitM CA for TLS interception
// contains filtered or unexported fields
}
func (*Proxy) RegisterHandler ¶
RegisterHandler adds a handler to the proxy.
Click to show internal directories.
Click to hide internal directories.