mirror of
https://github.com/dndx/phantun.git
synced 2025-09-18 05:04:29 +08:00
@@ -402,7 +402,7 @@ impl Stack {
|
||||
/// Connects to the remote end. `None` returned means
|
||||
/// the connection attempt failed.
|
||||
pub async fn connect(&mut self, addr: SocketAddr) -> Option<Socket> {
|
||||
let mut rng = SmallRng::from_entropy();
|
||||
let mut rng = SmallRng::from_os_rng();
|
||||
for local_port in rng.gen_range(32768..=60999)..=60999 {
|
||||
let local_addr = SocketAddr::new(
|
||||
if addr.is_ipv4() {
|
||||
|
Reference in New Issue
Block a user