connector should set bind addrs correctly (#696)

This commit is contained in:
Sijie.Sun
2025-03-19 10:47:43 +08:00
committed by GitHub
parent 81490d0662
commit b46a200f8d
14 changed files with 97 additions and 44 deletions

View File

@@ -547,7 +547,8 @@ impl WgTunnelListener {
#[async_trait]
impl TunnelListener for WgTunnelListener {
async fn listen(&mut self) -> Result<(), super::TunnelError> {
let addr = check_scheme_and_get_socket_addr::<SocketAddr>(&self.addr, "wg")?;
let addr =
check_scheme_and_get_socket_addr::<SocketAddr>(&self.addr, "wg", IpVersion::Both)?;
let socket2_socket = socket2::Socket::new(
socket2::Domain::for_address(addr),
socket2::Type::DGRAM,