Now the client will use any free port instead of fixed one.
Some checks failed
gitea/Frida/pipeline/head There was a failure building this commit
Some checks failed
gitea/Frida/pipeline/head There was a failure building this commit
modified: src/client.rs modified: src/server.rs
This commit is contained in:
parent
7e9d5803e5
commit
3fa76d6127
@ -343,7 +343,7 @@ pub mod desktop {
|
|||||||
.up();
|
.up();
|
||||||
|
|
||||||
info!("SSS: {:?}", &self.client_config.server.endpoint);
|
info!("SSS: {:?}", &self.client_config.server.endpoint);
|
||||||
let sock = UdpSocket::bind("0.0.0.0:25565").await.unwrap();
|
let sock = UdpSocket::bind(("0.0.0.0", 0)).await.unwrap();
|
||||||
sock.connect(&self.client_config.server.endpoint).await.unwrap();
|
sock.connect(&self.client_config.server.endpoint).await.unwrap();
|
||||||
|
|
||||||
let dev = tun2::create_as_async(&config).unwrap();
|
let dev = tun2::create_as_async(&config).unwrap();
|
||||||
|
@ -150,7 +150,6 @@ pub async fn server_mode(server_config: ServerConfiguration, s_interface: Option
|
|||||||
let ip = IpAddr::V4(Ipv4Addr::new(buf[16], buf[17], buf[18], buf[19]));
|
let ip = IpAddr::V4(Ipv4Addr::new(buf[16], buf[17], buf[18], buf[19]));
|
||||||
let mp = addrs_cl.lock().await;
|
let mp = addrs_cl.lock().await;
|
||||||
if let Some(peer) = mp.get(&ip) {
|
if let Some(peer) = mp.get(&ip) {
|
||||||
|
|
||||||
let aes = Aes256Gcm::new(&peer.shared_secret.into());
|
let aes = Aes256Gcm::new(&peer.shared_secret.into());
|
||||||
let nonce = Aes256Gcm::generate_nonce(&mut OsRng);
|
let nonce = Aes256Gcm::generate_nonce(&mut OsRng);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user