|
|
|
@ -62,7 +62,7 @@ use futures::prelude::*;
|
|
|
|
|
use globals::*;
|
|
|
|
|
use parking_lot::Mutex;
|
|
|
|
|
use parking_lot::RwLock;
|
|
|
|
|
#[cfg(not(target_family = "windows"))]
|
|
|
|
|
#[cfg(target_family = "unix")]
|
|
|
|
|
use privdrop::PrivDrop;
|
|
|
|
|
use rand::prelude::*;
|
|
|
|
|
use siphasher::sip128::SipHasher13;
|
|
|
|
@ -481,7 +481,7 @@ fn bind_listeners(
|
|
|
|
|
Ok(sockets)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(not(target_family = "windows"))]
|
|
|
|
|
#[cfg(target_family = "unix")]
|
|
|
|
|
fn privdrop(config: &Config) -> Result<(), Error> {
|
|
|
|
|
let mut pd = PrivDrop::default();
|
|
|
|
|
if let Some(user) = &config.user {
|
|
|
|
@ -516,7 +516,7 @@ fn privdrop(config: &Config) -> Result<(), Error> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(not(target_family = "unix"))]
|
|
|
|
|
fn set_limits(config: &Config) -> Result<(), Error> {
|
|
|
|
|
fn set_limits(_config: &Config) -> Result<(), Error> {
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -604,7 +604,7 @@ fn main() -> Result<(), Error> {
|
|
|
|
|
runtime_builder.thread_name("encrypted-dns-");
|
|
|
|
|
let runtime = runtime_builder.build()?;
|
|
|
|
|
|
|
|
|
|
#[cfg(not(target_family = "windows"))]
|
|
|
|
|
#[cfg(target_family = "unix")]
|
|
|
|
|
privdrop(&config)?;
|
|
|
|
|
|
|
|
|
|
let key_cache_capacity = config.dnscrypt.key_cache_capacity;
|
|
|
|
|