diff --git a/privaxy/Cargo.toml b/privaxy/Cargo.toml index a4b0de1..d278a05 100644 --- a/privaxy/Cargo.toml +++ b/privaxy/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "privaxy" description = "Next generation tracker and advertisement blocker" -version = "0.6.0" +version = "0.6.0-rc.1" edition = "2021" authors = [ "Pierre Barre ", diff --git a/privaxy/debian/postinst b/privaxy/debian/postinst index 09fd351..70f5be2 100755 --- a/privaxy/debian/postinst +++ b/privaxy/debian/postinst @@ -4,7 +4,7 @@ if ! id -u privaxy >/dev/null 2>&1 ; then useradd -r -d /etc/privaxy -s /usr/sbin/nologin privaxy - mkdir -p /etc/privaxy + mkdir -pm 750 /etc/privaxy chown privaxy:privaxy /etc/privaxy fi diff --git a/privaxy/src/server/blocker_utils.rs b/privaxy/src/server/blocker_utils.rs index 283b4bb..c431e05 100644 --- a/privaxy/src/server/blocker_utils.rs +++ b/privaxy/src/server/blocker_utils.rs @@ -21,6 +21,7 @@ static NON_EMPTY_LINE_RE: Lazy = Lazy::new(|| Regex::new(r#"\S"#).unwrap( pub struct ResourceProperties { pub name: String, pub alias: Vec, + #[allow(dead_code)] pub data: Option, } use base64::{engine::general_purpose, Engine}; diff --git a/privaxy/src/server/configuration/updater.rs b/privaxy/src/server/configuration/updater.rs index 563235a..522da0f 100644 --- a/privaxy/src/server/configuration/updater.rs +++ b/privaxy/src/server/configuration/updater.rs @@ -67,17 +67,22 @@ impl ConfigurationUpdater { let adblock_requester_clone = self.adblock_requester.clone(); let http_client_clone = self.http_client.clone(); - - tokio::spawn(async move { - Self::filters_updater( - configuration, - adblock_requester_clone, - http_client_clone, - ) - .await; - }); + let (abort_handle, abort_registration) = AbortHandle::new_pair(); + self.filters_updater_abort_handle = abort_handle; + let filters_updater = Abortable::new( + async move { + Self::filters_updater( + configuration, + adblock_requester_clone, + http_client_clone.clone(), + ) + .await + }, + abort_registration, + ); log::info!("Applied new configuration"); + tokio::spawn(filters_updater); } }); } diff --git a/privaxy/src/server/web_gui/settings/ca_certificate.rs b/privaxy/src/server/web_gui/settings/ca_certificate.rs index 74d7183..f7c14a0 100644 --- a/privaxy/src/server/web_gui/settings/ca_certificate.rs +++ b/privaxy/src/server/web_gui/settings/ca_certificate.rs @@ -89,6 +89,10 @@ async fn put_ca_certificates( .send(configuration.clone()) .await .unwrap(); + drop(_guard); + + notify_reload.notify_waiters(); + Ok(Box::new( Response::builder() diff --git a/privaxy/src/server/web_gui/settings/network.rs b/privaxy/src/server/web_gui/settings/network.rs index de984ed..56296bd 100644 --- a/privaxy/src/server/web_gui/settings/network.rs +++ b/privaxy/src/server/web_gui/settings/network.rs @@ -1,5 +1,4 @@ use super::get_error_response; -use crate::configuration; use crate::configuration::NetworkConfig; use crate::web_gui::with_configuration_save_lock; use crate::web_gui::with_configuration_updater_sender;