Documentation
¶
Overview ¶
Package proxy is Zelie's web front door. It terminates HTTPS, gets certificates automatically, and forwards each domain to the container that serves it. It runs as its own unprivileged process so the panel can restart or update without dropping a single site.
Index ¶
Constants ¶
View Source
const ( TLSACME = "acme" // certificates from Let's Encrypt TLSSelfSigned = "self-signed" // for machines no certificate authority can reach // TLSTunnel is for a proxy behind a Cloudflare Tunnel: Cloudflare holds // the certificates, and the proxy serves plain HTTP on a loopback port // that only the tunnel's connector reaches. TLSTunnel = "tunnel" )
TLS modes.
Variables ¶
This section is empty.
Functions ¶
func ValidDomain ¶
ValidDomain reports whether h, in lower case, is a domain name the proxy can route.
Types ¶
type Addrs ¶
type Addrs struct {
HTTP string // e.g. ":80"
HTTPS string // e.g. ":443"; empty behind a tunnel
Socket string // control socket for the panel
}
Addrs says where the proxy listens.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client changes the proxy's configuration over its control socket.
type Config ¶
type Config struct {
TLS string `json:"tls"`
Email string `json:"email,omitempty"` // for the certificate authority
Panel string `json:"panel,omitempty"` // host name the panel answers on
Routes []Route `json:"routes"`
}
Config is everything the proxy serves. It is always replaced as a whole.
type Proxy ¶
type Proxy struct {
StateDir string
PanelSocket string // Unix socket the panel listens on
Log *slog.Logger
// contains filtered or unexported fields
}
Proxy serves the configured routes. Apply swaps in a new configuration without dropping open connections.
Click to show internal directories.
Click to hide internal directories.