mirror of
https://github.com/dndx/phantun.git
synced 2025-04-02 18:19:30 +08:00
parent
62f0278c1a
commit
333c6dd059
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user