diff --git a/common/socks5-client-core/src/socks/client.rs b/common/socks5-client-core/src/socks/client.rs index a1ef3f72ef..eb1e2db2f6 100644 --- a/common/socks5-client-core/src/socks/client.rs +++ b/common/socks5-client-core/src/socks/client.rs @@ -507,8 +507,8 @@ impl SocksClient { ); } - SocksCommand::Bind => unimplemented!(), // not handled - SocksCommand::UdpAssociate => unimplemented!(), // not handled + SocksCommand::Bind => return Err(SocksProxyError::BindNotSupported), // not handled + SocksCommand::UdpAssociate => return Err(SocksProxyError::UdpNotSupported), }; Ok(()) diff --git a/common/socks5-client-core/src/socks/types.rs b/common/socks5-client-core/src/socks/types.rs index 964377bdc6..86ea1bbe56 100644 --- a/common/socks5-client-core/src/socks/types.rs +++ b/common/socks5-client-core/src/socks/types.rs @@ -83,6 +83,12 @@ pub enum SocksProxyError { #[from] source: Socks5RequestError, }, + + #[error("SOCKS5 UDP not (yet) supported")] + UdpNotSupported, + + #[error("SOCKS5 BIND not (yet) supported")] + BindNotSupported, } /// DST.addr variant types