preparation work for udp association

This commit is contained in:
Σrebe - Romain GERARD 2024-01-06 20:10:03 +01:00
parent 7ac89276bd
commit 23a38fced0
No known key found for this signature in database
GPG key ID: 7A42B4B97E0332F4
5 changed files with 75 additions and 7 deletions

View file

@ -22,6 +22,7 @@ use jsonwebtoken::TokenData;
use once_cell::sync::Lazy;
use parking_lot::Mutex;
use crate::socks5::Socks5Protocol;
use crate::tunnel::tls_reloader::TlsReloader;
use crate::udp::UdpStream;
use tokio::io::{AsyncRead, AsyncWrite};
@ -104,7 +105,7 @@ async fn run_tunnel(
}
LocalProtocol::ReverseSocks5 => {
#[allow(clippy::type_complexity)]
static SERVERS: Lazy<Mutex<HashMap<(Host<String>, u16), mpsc::Receiver<(TcpStream, (Host, u16))>>>> =
static SERVERS: Lazy<Mutex<HashMap<(Host<String>, u16), mpsc::Receiver<(Socks5Protocol, (Host, u16))>>>> =
Lazy::new(|| Mutex::new(HashMap::with_capacity(0)));
let local_srv = (Host::parse(&jwt.claims.r)?, jwt.claims.rp);