0.34.6_repo_cleanup
This commit is contained in:
1 parent
ce1a90397c
commit
133d2f0f91
273 files changed
+5969
-6926
No files matched your search
@@ -36,8 +36,6 @@ pub struct Config {
|
||||
pub geoip_updates: crate::geoip::UpdateSettings,
|
||||
#[serde(default)]
|
||||
pub listeners: crate::settings::Listeners,
|
||||
/// Legacy/default HTTP/2 lifecycle limits for listeners that do not yet
|
||||
/// persist an explicit `binding.http2_settings` object.
|
||||
#[serde(default)]
|
||||
pub http2: crate::settings::Http2Connections,
|
||||
#[serde(default)]
|
||||
@@ -112,20 +110,14 @@ pub struct Backend {
|
||||
pub address_allowlist: Vec<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub tls_ca_pem: Option<String>,
|
||||
/// Optional DNS name used for TLS SNI and certificate hostname verification.
|
||||
/// TCP/DNS connection targeting remains pinned to `url`.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub tls_server_name: Option<String>,
|
||||
/// Verify the HTTPS backend certificate chain and server identity.
|
||||
/// Disabled by default for reverse-proxy compatibility; enable explicitly when required.
|
||||
#[serde(default)]
|
||||
pub tls_verify: bool,
|
||||
pub id: String,
|
||||
pub url: String,
|
||||
#[serde(default)]
|
||||
pub allow_private: bool,
|
||||
/// Explicitly allow a backend that resolves to a local RustProxy listener.
|
||||
/// This can expose the control plane or create a proxy loop and is off by default.
|
||||
#[serde(default)]
|
||||
pub accept_local_listener_risk: bool,
|
||||
#[serde(default)]
|
||||
@@ -136,12 +128,8 @@ pub struct Backend {
|
||||
pub enum UpstreamProtocol {
|
||||
#[default]
|
||||
Http1,
|
||||
/// Legacy value `http2`: HTTPS uses ALPN H2/H1, HTTP uses H2C prior knowledge.
|
||||
/// Retain its 0.32.2 meaning when loading unchanged saved configurations.
|
||||
Http2,
|
||||
/// HTTPS negotiates H2/H1; plaintext uses H1 without H2C probing.
|
||||
Auto,
|
||||
/// New explicit mode `h2`: require H2 for HTTPS and H2C for cleartext.
|
||||
H2,
|
||||
}
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -159,7 +147,6 @@ pub struct Update {
|
||||
pub struct ValidationPolicy {
|
||||
pub tls_addr: Option<SocketAddr>,
|
||||
pub cert_dir: Option<PathBuf>,
|
||||
/// Resolved runtime data directory. Exposed only through authenticated admin status.
|
||||
pub data_dir: Option<PathBuf>,
|
||||
pub proxy_addr: SocketAddr,
|
||||
pub admin_addr: SocketAddr,
|
||||
@@ -170,21 +157,14 @@ pub struct CompiledBackend {
|
||||
pub client: crate::upstream::ProxyClient,
|
||||
pub websocket_client: crate::upstream::ProxyClient,
|
||||
pub id: String,
|
||||
/// Configured network origin used by raw TCP probes and policy checks.
|
||||
pub origin: String,
|
||||
/// HTTP request origin. For HTTPS this may carry a separate verified TLS name.
|
||||
pub request_origin: String,
|
||||
/// Parsed once at configuration publish; reused for every upstream request.
|
||||
pub request_origin_uri: http::Uri,
|
||||
pub host_header: HeaderValue,
|
||||
pub preserve_host: bool,
|
||||
pub protocol: UpstreamProtocol,
|
||||
/// Whether backend TLS certificate chain/name verification is enabled.
|
||||
/// Retained in the compiled snapshot for failure diagnostics only.
|
||||
pub tls_verify: bool,
|
||||
pub accept_local_listener_risk: bool,
|
||||
/// True only when this backend URL names the configured administration socket
|
||||
/// directly. Used by the guarded control-plane reverse-proxy path.
|
||||
pub targets_admin_listener: bool,
|
||||
}
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -208,7 +188,6 @@ pub struct CompiledRoute {
|
||||
pub frontend: Option<Arc<CompiledFrontend>>,
|
||||
pub pool: Option<Arc<crate::balance::Pool>>,
|
||||
pub cache: Option<bool>,
|
||||
/// Vhost-local stable location ID (`main` for the main source).
|
||||
pub name: String,
|
||||
pub id: String,
|
||||
pub internal: bool,
|
||||
@@ -237,10 +216,8 @@ pub struct CompiledFrontend {
|
||||
pub websocket_rfc8441: bool,
|
||||
pub websocket_rfc9220: bool,
|
||||
pub force_ssl: bool,
|
||||
/// Optional quick www/non-www canonical redirect (from, to).
|
||||
pub www_redirect: Option<(String, String)>,
|
||||
pub forward_client_ip: bool,
|
||||
/// HTTPS target port used by Force SSL redirects. Port 443 wins when multiple TLS ports are selected.
|
||||
pub https_redirect_port: Option<u16>,
|
||||
pub http2_enabled: bool,
|
||||
pub http3_enabled: bool,
|
||||
@@ -264,7 +241,6 @@ pub struct CompiledFrontend {
|
||||
pub acl_profile_id: Option<String>,
|
||||
pub profile_acl: Option<CompiledAcl>,
|
||||
pub profile_country_access: crate::rate_limit::CountryAccess,
|
||||
/// All Vhost profile scopes, checked before the inline ACL.
|
||||
pub profile_policies: Vec<crate::acl::ProfileAccess>,
|
||||
pub acl: Option<CompiledAcl>,
|
||||
pub headers: CompiledHeaders,
|
||||
@@ -295,7 +271,6 @@ pub struct Snapshot {
|
||||
pub tls: Option<Arc<rustls::ServerConfig>>,
|
||||
pub envelope: Envelope,
|
||||
routes: HashMap<String, Vec<Arc<CompiledRoute>>>,
|
||||
/// Main vhost backend fallback, kept separate from user Custom locations.
|
||||
fallbacks: HashMap<String, Vec<Arc<CompiledRoute>>>,
|
||||
redirects: HashMap<String, Vec<Arc<crate::redirect::CompiledHost>>>,
|
||||
not_found_hosts: HashMap<String, Vec<Arc<crate::not_found::CompiledHost>>>,
|
||||
@@ -305,7 +280,6 @@ pub struct Snapshot {
|
||||
}
|
||||
impl std::fmt::Debug for Snapshot {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
// QUIC crypto has no Debug implementation; never format private keys.
|
||||
f.debug_struct("Snapshot")
|
||||
.field("revision", &self.envelope.revision)
|
||||
.field("listeners", &self.listeners)
|
||||
|
||||
Reference in new issue
Block a user