We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6348e93 + 66419b4 commit 511e94aCopy full SHA for 511e94a
1 file changed
src/lib.rs
@@ -306,6 +306,11 @@ impl From<SocketAddr> for TrustedPeer {
306
pub struct Socks5Proxy(SocketAddr);
307
308
impl Socks5Proxy {
309
+ /// Define a non-standard Socks5 proxy to connect to.
310
+ pub fn new(socket_addr: impl Into<SocketAddr>) -> Self {
311
+ Self(socket_addr.into())
312
+ }
313
+
314
/// Connect to the default local Socks5 proxy hosted at `127.0.0.1:9050`.
315
pub const fn local() -> Self {
316
Socks5Proxy(SocketAddr::new(
0 commit comments