Documentation
¶
Overview ¶
Package proxy runs an embedded Caddy server that terminates TLS and routes requests by host name to upstream services.
Caddy keeps its state in process-global variables, so a process can run only one Proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// HTTPPort is the port for plain HTTP, which serves ACME challenges and
// redirects to HTTPS.
HTTPPort int
// HTTPSPort is the port the proxy serves HTTPS on.
HTTPSPort int
// Email is the optional contact address for ACME certificates.
Email string
// StorageDir is where certificates are stored. Empty uses Caddy's default.
StorageDir string
// LogFile is the file Caddy logs to. Caddy rotates it itself. Empty
// discards Caddy's logs.
LogFile string
// Cloudflare trusts requests from Cloudflare's edge to carry the client
// IP in CF-Connecting-IP and X-Forwarded-* headers. Requests from other
// addresses are unaffected.
Cloudflare bool
}
Config configures a Proxy.
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is an embedded reverse proxy.
Click to show internal directories.
Click to hide internal directories.