diff --git a/crates/shadowsocks-service/src/local/redir/sys/mod.rs b/crates/shadowsocks-service/src/local/redir/sys/mod.rs index 7cb39d74af3b..15c6c7efe4c6 100644 --- a/crates/shadowsocks-service/src/local/redir/sys/mod.rs +++ b/crates/shadowsocks-service/src/local/redir/sys/mod.rs @@ -24,16 +24,16 @@ where result } -#[cfg(windows)] -pub fn set_ipv6_only(socket: &S, ipv6_only: bool) -> io::Result<()> -where - S: std::os::windows::io::AsRawSocket, -{ - use std::os::windows::io::{FromRawSocket, IntoRawSocket}; - - let handle = socket.as_raw_socket(); - let sock = unsafe { Socket::from_raw_socket(handle) }; - let result = sock.set_only_v6(ipv6_only); - sock.into_raw_socket(); - result -} +// #[cfg(windows)] +// pub fn set_ipv6_only(socket: &S, ipv6_only: bool) -> io::Result<()> +// where +// S: std::os::windows::io::AsRawSocket, +// { +// use std::os::windows::io::{FromRawSocket, IntoRawSocket}; +// +// let handle = socket.as_raw_socket(); +// let sock = unsafe { Socket::from_raw_socket(handle) }; +// let result = sock.set_only_v6(ipv6_only); +// sock.into_raw_socket(); +// result +// } diff --git a/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs b/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs index 721315b290a8..0cb931920684 100644 --- a/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs +++ b/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs @@ -101,6 +101,7 @@ impl UdpInboundWrite for UdpRedirInboundWriter { // then we should always use IPv6 sockets for sending IPv4 packets. static SUPPORT_IPV6_TRANSPARENT: AtomicBool = AtomicBool::new(true); + #[allow(unused_mut)] let mut addr = match *remote_addr { Address::SocketAddress(sa) => { if SUPPORT_IPV6_TRANSPARENT.load(Ordering::Relaxed) {