Make the project compatible with rust-stable

pull/16/head
Frank Denis 5 years ago
parent 40cb8bfd41
commit a6fb79a2b2

@ -22,6 +22,7 @@ derivative = "1.0.3"
dnsstamps = "0.1.2"
env_logger = { version="0.7.1", default-features = false, features = ["humantime"] }
futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] }
ipext = "0.1.0"
jemallocator = "0.3.2"
libsodium-sys-stable="1.18.2"
log = { version = "0.4.8", features = ["std", "release_max_level_debug"] }

@ -36,7 +36,7 @@ In this package, the example configuration file can be found in `/usr/share/doc/
### Option 2: compilation from source code
The proxy uses recent features of the Rust compiler, and currently requires rust-nightly.
The proxy uses recent features of the Rust compiler, and requires rust >= 1.0.39 or rust-nightly.
Rust can installed with:

@ -2,6 +2,7 @@ use crate::errors::*;
use crate::*;
use byteorder::{BigEndian, ByteOrder};
use ipext::IpExt;
use siphasher::sip128::Hasher128;
use std::hash::Hasher;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
@ -43,7 +44,7 @@ pub async fn handle_anonymized_dns(
#[cfg(feature = "metrics")]
globals.varz.anonymized_queries.inc();
ensure!(ip.is_global(), "Forbidden upstream address");
ensure!(IpExt::is_global(&ip), "Forbidden upstream address");
ensure!(
!globals.anonymized_dns_blacklisted_ips.contains(&ip),
"Blacklisted upstream IP"

@ -2,7 +2,6 @@
#![allow(clippy::type_complexity)]
#![allow(clippy::cognitive_complexity)]
#![allow(dead_code)]
#![feature(ip)]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

Loading…
Cancel
Save