Skip to main content

Module address

Module address 

Source
Expand description

Types and traits for converting objects to addresses which Tor can connect to.

Re-exportsΒ§

use crate::StreamPrefs; πŸ”’
use crate::err::ErrorDetail; πŸ”’
use std::fmt::Display; πŸ”’
use std::net::IpAddr; πŸ”’
use std::net::Ipv4Addr; πŸ”’
use std::net::Ipv6Addr; πŸ”’
use std::net::SocketAddr; πŸ”’
use std::net::SocketAddrV4; πŸ”’
use std::net::SocketAddrV6; πŸ”’
use std::str::FromStr; πŸ”’
use thiserror::Error; πŸ”’
use tor_basic_utils::StrExt; πŸ”’
use tor_error::ErrorKind; πŸ”’
use tor_error::HasKind; πŸ”’
use tor_hscrypto::pk::HSID_ONION_SUFFIX; πŸ”’
use tor_hscrypto::pk::HsId; πŸ”’

StructsΒ§

TorAddr
An address object that you can connect to over the Tor network.

EnumsΒ§

Host πŸ”’
A host that Tor can connect to: either a hostname or an IP address.
ResolveInstructions πŸ”’
How to resolve this Tor host address into IP address(es)
StreamInstructions πŸ”’
How to make a stream to this TorAddr?
TorAddrError
An error created while making or using a TorAddr.

TraitsΒ§

DangerouslyIntoTorAddr
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.
IntoTorAddr
An object that can be converted to a TorAddr with a minimum of risk.

FunctionsΒ§

is_globally_reachable_unicast πŸ”’
Return true if addr is a globally reachable unicast address.
is_shared πŸ”’
Returns true if this address is part of the Shared Address Space defined in IETF RFC 6598 (100.64.0.0/10).
is_valid_hostname πŸ”’
Check whether hostname is a valid hostname or not.