fix remove test forgotten code

This commit is contained in:
Σrebe - Romain GERARD 2024-07-20 12:53:33 +02:00
parent bf59c56bf1
commit 5119877592
No known key found for this signature in database
GPG key ID: 7A42B4B97E0332F4
2 changed files with 10 additions and 10 deletions

View file

@ -32,7 +32,7 @@ use std::sync::Arc;
use std::time::Duration;
use std::{fmt, io};
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::net::{TcpStream, UdpSocket};
use tokio::net::TcpStream;
use tokio::select;
use tokio_rustls::rustls::pki_types::{CertificateDer, DnsName, PrivateKeyDer, ServerName};
@ -777,13 +777,6 @@ impl WsClientConfig {
#[tokio::main]
async fn main() {
let args = Wstunnel::parse();
let socket = UdpSocket::bind(SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, 0, 0, 0))
.await
.unwrap();
socket
.connect("[2001:4810:0:3::78]:443".parse::<SocketAddr>().unwrap())
.await
.unwrap();
// Setup logging
let mut env_filter = EnvFilter::builder().parse(&args.log_lvl).expect("Invalid log level");

View file

@ -75,8 +75,15 @@ pub async fn connect(
for (ix, addr) in socket_addrs.into_iter().enumerate() {
let socket = match &addr {
SocketAddr::V4(_) => TcpSocket::new_v4()?,
SocketAddr::V6(_) => TcpSocket::new_v6()?,
SocketAddr::V4(_) => TcpSocket::new_v4(),
SocketAddr::V6(_) => TcpSocket::new_v6(),
};
let socket = match socket {
Ok(s) => s,
Err(err) => {
last_err = Some(err);
continue;
}
};
configure_socket(socket2::SockRef::from(&socket), &so_mark)?;