Skip to content

Commit

Permalink
fix crlf, updater
Browse files Browse the repository at this point in the history
  • Loading branch information
joshrmcdaniel committed Jul 4, 2024
1 parent 93471cb commit 0c18cb9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion privaxy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion privaxy/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions privaxy/src/server/blocker_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ static NON_EMPTY_LINE_RE: Lazy<Regex> = Lazy::new(|| Regex::new(r#"\S"#).unwrap(
pub struct ResourceProperties {
pub name: String,
pub alias: Vec<String>,
#[allow(dead_code)]
pub data: Option<String>,
}
use base64::{engine::general_purpose, Engine};
Expand Down
23 changes: 14 additions & 9 deletions privaxy/src/server/configuration/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
}
Expand Down
4 changes: 4 additions & 0 deletions privaxy/src/server/web_gui/settings/ca_certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion privaxy/src/server/web_gui/settings/network.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 0c18cb9

Please sign in to comment.