Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ impl From<SocketAddr> for TrustedPeer {
pub struct Socks5Proxy(SocketAddr);

impl Socks5Proxy {
/// Define a non-standard Socks5 proxy to connect to.
pub fn new(socket_addr: impl Into<SocketAddr>) -> Self {
Self(socket_addr.into())
}

/// Connect to the default local Socks5 proxy hosted at `127.0.0.1:9050`.
pub const fn local() -> Self {
Socks5Proxy(SocketAddr::new(
Expand Down
Loading