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.
Required Methods§
Sourcefn into_tor_addr_dangerously(self) -> Result<TorAddr, TorAddrError>
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.