diff --git a/g3proxy/src/escape/direct_fixed/udp_relay/recv.rs b/g3proxy/src/escape/direct_fixed/udp_relay/recv.rs index 1e62d380..0274a8ee 100644 --- a/g3proxy/src/escape/direct_fixed/udp_relay/recv.rs +++ b/g3proxy/src/escape/direct_fixed/udp_relay/recv.rs @@ -25,6 +25,7 @@ use g3_io_ext::{AsyncUdpRecv, UdpRelayRemoteError, UdpRelayRemoteRecv}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use g3_io_ext::{RecvMsgHdr, UdpRelayPacket, UdpRelayPacketMeta}; use g3_types::net::UpstreamAddr; @@ -103,6 +104,7 @@ where target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( inner: &mut T, @@ -160,6 +162,7 @@ where target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, diff --git a/g3proxy/src/escape/direct_fixed/udp_relay/send.rs b/g3proxy/src/escape/direct_fixed/udp_relay/send.rs index e6ed691c..79c5173b 100644 --- a/g3proxy/src/escape/direct_fixed/udp_relay/send.rs +++ b/g3proxy/src/escape/direct_fixed/udp_relay/send.rs @@ -29,6 +29,7 @@ use g3_io_ext::{AsyncUdpSend, UdpRelayRemoteError, UdpRelayRemoteSend}; target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] use g3_io_ext::{SendMsgHdr, UdpRelayPacket}; use g3_resolver::{ResolveError, ResolveLocalError}; @@ -285,6 +286,7 @@ where target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_send_packets( inner: &mut T, @@ -341,6 +343,7 @@ where target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/g3proxy/src/escape/proxy_socks5/udp_relay/recv.rs b/g3proxy/src/escape/proxy_socks5/udp_relay/recv.rs index b9cce1cf..87fcc556 100644 --- a/g3proxy/src/escape/proxy_socks5/udp_relay/recv.rs +++ b/g3proxy/src/escape/proxy_socks5/udp_relay/recv.rs @@ -29,6 +29,7 @@ use g3_io_ext::{AsyncUdpRecv, UdpRelayRemoteError, UdpRelayRemoteRecv}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use g3_io_ext::{RecvMsgHdr, UdpRelayPacket, UdpRelayPacketMeta}; use g3_socks::v5::UdpInput; @@ -135,6 +136,7 @@ where target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, diff --git a/g3proxy/src/escape/proxy_socks5/udp_relay/send.rs b/g3proxy/src/escape/proxy_socks5/udp_relay/send.rs index 820f0949..d2f80fa1 100644 --- a/g3proxy/src/escape/proxy_socks5/udp_relay/send.rs +++ b/g3proxy/src/escape/proxy_socks5/udp_relay/send.rs @@ -26,6 +26,7 @@ use g3_io_ext::{AsyncUdpSend, UdpRelayRemoteError, UdpRelayRemoteSend}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use g3_io_ext::{SendMsgHdr, UdpRelayPacket}; use g3_socks::v5::SocksUdpHeader; @@ -86,6 +87,7 @@ where target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/g3proxy/src/serve/socks_proxy/task/udp_associate/recv.rs b/g3proxy/src/serve/socks_proxy/task/udp_associate/recv.rs index 20a3bfea..2268d9eb 100644 --- a/g3proxy/src/serve/socks_proxy/task/udp_associate/recv.rs +++ b/g3proxy/src/serve/socks_proxy/task/udp_associate/recv.rs @@ -27,6 +27,7 @@ use g3_io_ext::{AsyncUdpRecv, UdpRelayClientError, UdpRelayClientRecv}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use g3_io_ext::{RecvMsgHdr, UdpRelayPacket, UdpRelayPacketMeta}; use g3_socks::v5::UdpInput; @@ -242,6 +243,7 @@ where target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, diff --git a/g3proxy/src/serve/socks_proxy/task/udp_associate/send.rs b/g3proxy/src/serve/socks_proxy/task/udp_associate/send.rs index 994660fa..8cc95c76 100644 --- a/g3proxy/src/serve/socks_proxy/task/udp_associate/send.rs +++ b/g3proxy/src/serve/socks_proxy/task/udp_associate/send.rs @@ -26,6 +26,7 @@ use g3_io_ext::{AsyncUdpSend, UdpRelayClientError, UdpRelayClientSend}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use g3_io_ext::{SendMsgHdr, UdpRelayPacket}; use g3_socks::v5::SocksUdpHeader; @@ -83,6 +84,7 @@ where target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/g3proxy/src/serve/socks_proxy/task/udp_connect/recv.rs b/g3proxy/src/serve/socks_proxy/task/udp_connect/recv.rs index f98e2ee5..61074caa 100644 --- a/g3proxy/src/serve/socks_proxy/task/udp_connect/recv.rs +++ b/g3proxy/src/serve/socks_proxy/task/udp_connect/recv.rs @@ -27,6 +27,7 @@ use g3_io_ext::{AsyncUdpRecv, UdpCopyClientError, UdpCopyClientRecv}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use g3_io_ext::{RecvMsgHdr, UdpCopyPacket, UdpCopyPacketMeta}; use g3_socks::v5::UdpInput; @@ -168,6 +169,7 @@ where target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, diff --git a/g3proxy/src/serve/socks_proxy/task/udp_connect/send.rs b/g3proxy/src/serve/socks_proxy/task/udp_connect/send.rs index 86e59607..4d9766f0 100644 --- a/g3proxy/src/serve/socks_proxy/task/udp_connect/send.rs +++ b/g3proxy/src/serve/socks_proxy/task/udp_connect/send.rs @@ -25,6 +25,7 @@ use g3_io_ext::{AsyncUdpSend, UdpCopyClientError, UdpCopyClientSend}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use g3_io_ext::{SendMsgHdr, UdpCopyPacket}; use g3_socks::v5::UdpOutput; @@ -81,6 +82,7 @@ where target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/lib/g3-io-ext/src/udp/copy/client.rs b/lib/g3-io-ext/src/udp/copy/client.rs index c4b2738d..445f9fbb 100644 --- a/lib/g3-io-ext/src/udp/copy/client.rs +++ b/lib/g3-io-ext/src/udp/copy/client.rs @@ -26,6 +26,7 @@ use thiserror::Error; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use super::UdpCopyPacket; @@ -63,6 +64,7 @@ pub trait UdpCopyClientRecv { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, @@ -86,6 +88,7 @@ pub trait UdpCopyClientSend { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/lib/g3-io-ext/src/udp/copy/mod.rs b/lib/g3-io-ext/src/udp/copy/mod.rs index ab648df2..cac77b39 100644 --- a/lib/g3-io-ext/src/udp/copy/mod.rs +++ b/lib/g3-io-ext/src/udp/copy/mod.rs @@ -157,6 +157,7 @@ impl UdpCopyRecv for ClientRecv<'_, T> { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, @@ -194,6 +195,7 @@ impl UdpCopyRecv for RemoteRecv<'_, T> { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, @@ -256,6 +258,7 @@ impl UdpCopySend for ClientSend<'_, T> { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_send_packets( &mut self, @@ -288,6 +291,7 @@ impl UdpCopySend for RemoteSend<'_, T> { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/lib/g3-io-ext/src/udp/copy/remote.rs b/lib/g3-io-ext/src/udp/copy/remote.rs index 5cf2bb78..abe06d7f 100644 --- a/lib/g3-io-ext/src/udp/copy/remote.rs +++ b/lib/g3-io-ext/src/udp/copy/remote.rs @@ -26,6 +26,7 @@ use thiserror::Error; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use super::UdpCopyPacket; @@ -63,6 +64,7 @@ pub trait UdpCopyRemoteRecv { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, @@ -86,6 +88,7 @@ pub trait UdpCopyRemoteSend { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/lib/g3-io-ext/src/udp/ext/unix.rs b/lib/g3-io-ext/src/udp/ext/unix.rs index 1109b9b0..bb60db9c 100644 --- a/lib/g3-io-ext/src/udp/ext/unix.rs +++ b/lib/g3-io-ext/src/udp/ext/unix.rs @@ -230,6 +230,7 @@ impl UdpSocketExt for UdpSocket { target_os = "netbsd", target_os = "openbsd", target_os = "illumos", + target_os = "solaris", ))] let flags: SendFlags = SendFlags::DONTWAIT | SendFlags::NOSIGNAL; #[cfg(target_os = "macos")] @@ -266,6 +267,7 @@ impl UdpSocketExt for UdpSocket { target_os = "netbsd", target_os = "openbsd", target_os = "illumos", + target_os = "solaris", ))] let flags: SendFlags = SendFlags::DONTWAIT | SendFlags::NOSIGNAL; #[cfg(target_os = "macos")] diff --git a/lib/g3-io-ext/src/udp/recv.rs b/lib/g3-io-ext/src/udp/recv.rs index ad49d3ec..524b21df 100644 --- a/lib/g3-io-ext/src/udp/recv.rs +++ b/lib/g3-io-ext/src/udp/recv.rs @@ -31,6 +31,7 @@ use tokio::time::{Instant, Sleep}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use super::RecvMsgHdr; use crate::limit::{DatagramLimitAction, DatagramLimiter}; @@ -52,6 +53,7 @@ pub trait AsyncUdpRecv { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_batch_recvmsg( &mut self, @@ -219,6 +221,7 @@ where target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_batch_recvmsg( &mut self, diff --git a/lib/g3-io-ext/src/udp/relay/client.rs b/lib/g3-io-ext/src/udp/relay/client.rs index 48949ba2..63aed0a4 100644 --- a/lib/g3-io-ext/src/udp/relay/client.rs +++ b/lib/g3-io-ext/src/udp/relay/client.rs @@ -28,6 +28,7 @@ use g3_types::net::UpstreamAddr; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use super::UdpRelayPacket; @@ -67,6 +68,7 @@ pub trait UdpRelayClientRecv { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, @@ -91,6 +93,7 @@ pub trait UdpRelayClientSend { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/lib/g3-io-ext/src/udp/relay/mod.rs b/lib/g3-io-ext/src/udp/relay/mod.rs index b11b878f..b9e0d39a 100644 --- a/lib/g3-io-ext/src/udp/relay/mod.rs +++ b/lib/g3-io-ext/src/udp/relay/mod.rs @@ -175,6 +175,7 @@ impl UdpRelayRecv for ClientRecv<'_, T> { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, @@ -213,6 +214,7 @@ impl UdpRelayRecv for RemoteRecv<'_, T> { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, @@ -275,6 +277,7 @@ impl UdpRelaySend for ClientSend<'_, T> { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_send_packets( &mut self, diff --git a/lib/g3-io-ext/src/udp/relay/remote.rs b/lib/g3-io-ext/src/udp/relay/remote.rs index 24fe576c..aaf888bc 100644 --- a/lib/g3-io-ext/src/udp/relay/remote.rs +++ b/lib/g3-io-ext/src/udp/relay/remote.rs @@ -71,6 +71,7 @@ pub trait UdpRelayRemoteRecv { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv_packets( &mut self, diff --git a/lib/g3-io-ext/src/udp/send.rs b/lib/g3-io-ext/src/udp/send.rs index be7a22c6..f2cda22c 100644 --- a/lib/g3-io-ext/src/udp/send.rs +++ b/lib/g3-io-ext/src/udp/send.rs @@ -31,6 +31,7 @@ use tokio::time::{Instant, Sleep}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use super::SendMsgHdr; use crate::limit::{DatagramLimitAction, DatagramLimiter}; @@ -59,6 +60,7 @@ pub trait AsyncUdpSend { target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_batch_sendmsg( &mut self, @@ -286,6 +288,7 @@ where target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_batch_sendmsg( &mut self, diff --git a/lib/g3-io-ext/src/udp/split.rs b/lib/g3-io-ext/src/udp/split.rs index 3f05cc42..b5859888 100644 --- a/lib/g3-io-ext/src/udp/split.rs +++ b/lib/g3-io-ext/src/udp/split.rs @@ -32,6 +32,7 @@ use super::{AsyncUdpRecv, AsyncUdpSend, UdpSocketExt}; target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] use super::{RecvMsgHdr, SendMsgHdr}; @@ -107,6 +108,7 @@ impl AsyncUdpSend for SendHalf { target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] fn poll_batch_sendmsg( &mut self, @@ -160,6 +162,7 @@ impl AsyncUdpRecv for RecvHalf { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_batch_recvmsg( &mut self, diff --git a/lib/g3-socks/src/v5/quic.rs b/lib/g3-socks/src/v5/quic.rs index e5ae0621..a73c1c83 100644 --- a/lib/g3-socks/src/v5/quic.rs +++ b/lib/g3-socks/src/v5/quic.rs @@ -240,6 +240,7 @@ impl AsyncUdpSocket for Socks5UdpSocket { target_os = "netbsd", target_os = "openbsd", target_os = "macos", + target_os = "solaris", ))] fn poll_recv( &self, @@ -284,7 +285,7 @@ impl AsyncUdpSocket for Socks5UdpSocket { } } - #[cfg(any(windows, target_os = "dragonfly"))] + #[cfg(any(windows, target_os = "dragonfly", target_os = "illumos"))] fn poll_recv( &self, cx: &mut Context, diff --git a/lib/g3-udpdump/src/stream/sink.rs b/lib/g3-udpdump/src/stream/sink.rs index 25cbc3a9..4666acb7 100644 --- a/lib/g3-udpdump/src/stream/sink.rs +++ b/lib/g3-udpdump/src/stream/sink.rs @@ -53,6 +53,7 @@ impl Sinker { target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", + target_os = "solaris", ))] async fn send_udp(&self, packets: &[Vec]) -> io::Result<()> { use g3_io_ext::{SendMsgHdr, UdpSocketExt}; @@ -88,7 +89,7 @@ impl Sinker { Ok(()) } - #[cfg(any(windows, target_os = "dragonfly"))] + #[cfg(any(windows, target_os = "dragonfly", target_os = "illumos"))] async fn send_udp(&self, packets: &[Vec]) -> io::Result<()> { for pkt in packets { self.socket.send(pkt.as_slice()).await?;