Trait arti_client::DangerouslyIntoTorAddr

source ·
pub trait DangerouslyIntoTorAddr {
    // Required method
    fn into_tor_addr_dangerously(self) -> Result<TorAddr, TorAddrError>;
}
Expand description

An object that can be converted to a TorAddr, but which it might be risky to get in the first place if you’re hoping for anonymity.

For example, you can use this trait to convert a SocketAddr into a TorAddr, and it’s safe to do that conversion. But where did you get the SocketAddr in the first place? If it comes from a local DNS lookup, then you have leaked the address you were resolving to your DNS resolver, and probably your ISP.

See also: the TorAddr documentation.

Required Methods§

source

fn into_tor_addr_dangerously(self) -> Result<TorAddr, TorAddrError>

Try to make a TorAddr to represent connecting to self.

By calling this function, the caller asserts that self was obtained from some secure, private mechanism, and not from a local DNS lookup or something similar.

Implementations on Foreign Types§

source§

impl DangerouslyIntoTorAddr for (IpAddr, u16)

source§

impl DangerouslyIntoTorAddr for (Ipv4Addr, u16)

source§

impl DangerouslyIntoTorAddr for (Ipv6Addr, u16)

source§

impl DangerouslyIntoTorAddr for SocketAddr

source§

impl DangerouslyIntoTorAddr for SocketAddrV4

source§

impl DangerouslyIntoTorAddr for SocketAddrV6

source§

impl<T: DangerouslyIntoTorAddr + Clone> DangerouslyIntoTorAddr for &T

Implementors§