pub enum ProxyError {
Show 21 variants
SoftStop {
proxy_protocol: String,
error: String,
},
HardStop {
proxy_protocol: String,
error: String,
},
NoListenerFound(ListenerKey),
ListenerAlreadyPresent,
AddListener(ListenerError),
AddCluster(ListenerError),
ListenerActivation {
address: SocketAddr,
listener_error: ListenerError,
},
WrongInputFrontend {
front: Box<RequestHttpFrontend>,
error: String,
},
AddFrontend(ListenerError),
RemoveFrontend(ListenerError),
AddCertificate(CertificateResolverError),
RemoveCertificate(CertificateResolverError),
ReplaceCertificate(CertificateResolverError),
WrongCertificateFingerprint(FromHexError),
UnsupportedMessage,
Lock(String),
BindToSocket(SocketAddr, ServerBindError),
RegisterListener(Error),
UnactivatedListener,
HstsOnPlainHttp(SocketAddr),
InvalidTcpFrontend {
address: SocketAddr,
reason: String,
},
}Expand description
Returned by the HTTP, HTTPS and TCP proxies
Variants§
SoftStop
HardStop
NoListenerFound(ListenerKey)
Names the listener key: the address, plus %<interface> for a
listener bound to one.
ListenerAlreadyPresent
AddListener(ListenerError)
AddCluster(ListenerError)
ListenerActivation
WrongInputFrontend
AddFrontend(ListenerError)
RemoveFrontend(ListenerError)
AddCertificate(CertificateResolverError)
RemoveCertificate(CertificateResolverError)
ReplaceCertificate(CertificateResolverError)
WrongCertificateFingerprint(FromHexError)
UnsupportedMessage
Lock(String)
BindToSocket(SocketAddr, ServerBindError)
RegisterListener(Error)
UnactivatedListener
HstsOnPlainHttp(SocketAddr)
HSTS (RFC 6797) was attached to a frontend on a plain-HTTP
listener. RFC 6797 §7.2 forbids Strict-Transport-Security on
plaintext-HTTP responses; the worker rejects the request rather
than ship a non-conformant policy. The TOML loader rejects the
same shape at config-load time
(command/src/config.rs::ConfigError::HstsOnPlainHttp); this
arm catches the same misconfiguration when the request reaches
the worker over the IPC channel without going through the TOML
path (e.g. via sozu frontend http add).
InvalidTcpFrontend
A TCP AddTcpFrontend would corrupt this listener’s SNI/ALPN
routing invariants (sozu-proxy/sozu#1279): mixing a no-SNI
catch-all with SNI-scoped routes, an alpn-scoped frontend with no
sni to preread against, or an ALPN protocol / catch-all that
overlaps an existing route on the same (address, sni). TOML
config-load already rejects the same shapes
(command/src/config.rs::ConfigError), but AddTcpFrontend can
also arrive directly over the command socket or via LoadState
replay of a hand-edited/stale state file, bypassing config.rs
entirely — see TcpListener::validate_new_tcp_front
(lib/src/tcp.rs).
Trait Implementations§
Source§impl Debug for ProxyError
impl Debug for ProxyError
Source§impl Display for ProxyError
impl Display for ProxyError
Source§impl Error for ProxyError
impl Error for ProxyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()