v0.28.0
This commit is contained in:
1 parent
c24bc4279b
commit
3b3f0db377
84 files changed
+2686
-392
No files matched your search
@@ -145,7 +145,8 @@ async fn run(
|
||||
authentication.remove_bootstrap_files().await;
|
||||
}
|
||||
let renewal_observations = store.load_certificate_renewals().await?;
|
||||
let geoip = match rust_proxy::geoip::Database::load(&data_dir.join("geoip")) {
|
||||
let geoip_format = snapshot.envelope.config.geoip_updates.format;
|
||||
let geoip = match rust_proxy::geoip::Database::load_format(&data_dir.join("geoip"), geoip_format) {
|
||||
Ok(database) => std::sync::Arc::new(database),
|
||||
Err(error) => {
|
||||
tracing::warn!(%error, "GeoIP country database unavailable; country allow lists fail closed");
|
||||
@@ -166,7 +167,6 @@ async fn run(
|
||||
geoip,
|
||||
);
|
||||
state.acme.restore_renewals(renewal_observations);
|
||||
state.start_update_check(update_check);
|
||||
// Bind EVERY listener before spawning servers: a missing private IP or
|
||||
// occupied port fails startup atomically, never falling back to 0.0.0.0.
|
||||
let mut public_listeners = Vec::new();
|
||||
@@ -254,6 +254,11 @@ async fn run(
|
||||
} else {
|
||||
None
|
||||
};
|
||||
// Release checks are control-plane best effort only. Start them after every
|
||||
// socket has bound successfully so DNS/network failures can never obscure or
|
||||
// interfere with listener startup failures.
|
||||
state.start_geoip_updates();
|
||||
state.start_update_check(update_check);
|
||||
let shutdown = state.shutdown.clone();
|
||||
let grace = Duration::from_secs(options.shutdown_timeout_secs);
|
||||
let mut tasks = JoinSet::new();
|
||||
@@ -396,35 +401,8 @@ async fn run(
|
||||
} else {
|
||||
println!(" Sign in with your administrator account.");
|
||||
}
|
||||
let certificate_runtime = state.acme.runtime_view();
|
||||
let runtime_pending = matches!(certificate_runtime.status, "checking" | "initializing");
|
||||
let component_state = |available: bool| {
|
||||
if available {
|
||||
"available"
|
||||
} else if runtime_pending {
|
||||
"checking"
|
||||
} else {
|
||||
"unavailable"
|
||||
}
|
||||
};
|
||||
let managed_python_directory = certificate_runtime
|
||||
.managed_directory
|
||||
.clone()
|
||||
.unwrap_or_else(|| data_dir.join("acme-python").to_string_lossy().into_owned());
|
||||
println!(" Source: https://git.linuxiarz.pl/gru/RustProxy");
|
||||
println!(" Packages: https://rustproxy.linuxiarz.pl/");
|
||||
println!(
|
||||
" Python: {} (ACME mode: {}, pip: {}, Certbot: {}; managed env: {})",
|
||||
component_state(certificate_runtime.python),
|
||||
if runtime_pending {
|
||||
"preparing"
|
||||
} else {
|
||||
certificate_runtime.mode
|
||||
},
|
||||
component_state(certificate_runtime.pip),
|
||||
component_state(certificate_runtime.certbot),
|
||||
managed_python_directory
|
||||
);
|
||||
println!(" Data: {}\n Stop: Ctrl+C\n", data_dir.display());
|
||||
if state
|
||||
.active_listeners
|
||||
|
||||
Reference in new issue
Block a user