Implemented P2P traffic encryption.
Changed serialization format of P2P messages. Refactored P2P network code.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use std::net::IpAddr;
|
||||
use std::num;
|
||||
|
||||
use mio::Token;
|
||||
use rand::Rng;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
use thread_priority::*;
|
||||
@@ -116,13 +115,6 @@ pub fn is_yggdrasil(addr: &IpAddr) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Gets new token from old token, mutating the last
|
||||
pub fn next(current: &mut Token) -> Token {
|
||||
let next = current.0;
|
||||
current.0 += 1;
|
||||
Token(next)
|
||||
}
|
||||
|
||||
/// Checks if this record has IP from Yggdrasil network
|
||||
/// https://yggdrasil-network.github.io
|
||||
pub fn is_yggdrasil_record(record: &DnsRecord) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user