refactort
This commit is contained in:
parent
1d8cdb5e93
commit
78097f4006
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -3340,9 +3340,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "signature"
|
name = "signature"
|
||||||
version = "1.4.0"
|
version = "1.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788"
|
checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
@ -3667,7 +3667,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-socks"
|
name = "tokio-socks"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
source = "git+https://github.com/fufesou/tokio-socks#83e9e9202b85b887999375e4d86e437e33d0535c"
|
source = "git+https://github.com/fufesou/tokio-socks#63e27388e4d569316945c1c24353010d86f342a6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"either",
|
"either",
|
||||||
|
@ -32,6 +32,7 @@ lazy_static::lazy_static! {
|
|||||||
}
|
}
|
||||||
static SHOULD_EXIT: AtomicBool = AtomicBool::new(false);
|
static SHOULD_EXIT: AtomicBool = AtomicBool::new(false);
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct RendezvousMediator {
|
pub struct RendezvousMediator {
|
||||||
addr: TargetAddr<'static>,
|
addr: TargetAddr<'static>,
|
||||||
host: String,
|
host: String,
|
||||||
@ -40,18 +41,6 @@ pub struct RendezvousMediator {
|
|||||||
last_id_pk_registry: String,
|
last_id_pk_registry: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clone for RendezvousMediator {
|
|
||||||
fn clone(&self) -> Self {
|
|
||||||
Self {
|
|
||||||
addr: self.addr.to_owned(),
|
|
||||||
host: self.host.clone(),
|
|
||||||
host_prefix: self.host_prefix.clone(),
|
|
||||||
rendezvous_servers: self.rendezvous_servers.clone(),
|
|
||||||
last_id_pk_registry: self.last_id_pk_registry.clone(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl RendezvousMediator {
|
impl RendezvousMediator {
|
||||||
pub async fn start_all() {
|
pub async fn start_all() {
|
||||||
let mut nat_tested = false;
|
let mut nat_tested = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user