IntroductionPointV2

Struct IntroductionPointV2 

Source
pub struct IntroductionPointV2 {
    pub identifier: String,
    pub address: String,
    pub port: u16,
    pub onion_key: Option<String>,
    pub service_key: Option<String>,
    pub intro_authentication: Vec<(String, String)>,
}
Expand description

Introduction point for a version 2 hidden service.

An introduction point is a Tor relay that acts as an intermediary between clients and the hidden service. Clients connect to introduction points to establish a rendezvous with the service.

§Fields

  • identifier: Base32-encoded hash of the introduction point’s identity key
  • address: IPv4 address where the introduction point is reachable
  • port: Port number for the introduction point
  • onion_key: RSA public key for encrypting the introduction
  • service_key: RSA public key for the hidden service at this point
  • intro_authentication: Optional authentication data as (type, data) pairs

§Security

Introduction points do not know the hidden service’s actual location. They only relay encrypted introduction requests.

§Example

// Introduction points are typically parsed from a descriptor
let desc = HiddenServiceDescriptorV2::parse(content)?;
let intro_points = desc.introduction_points()?;

for point in intro_points {
    println!("Introduction point: {} at {}:{}",
             point.identifier, point.address, point.port);
}

Fields§

§identifier: String

Base32-encoded hash of the introduction point’s identity key.

§address: String

IPv4 address of the introduction point relay.

§port: u16

Port number where the introduction point is listening.

§onion_key: Option<String>

RSA public key for encrypting introduction requests (PEM format).

§service_key: Option<String>

RSA public key for the hidden service at this introduction point (PEM format).

§intro_authentication: Vec<(String, String)>

Authentication data as (auth_type, auth_data) pairs for establishing connections.

Trait Implementations§

Source§

impl Clone for IntroductionPointV2

Source§

fn clone(&self) -> IntroductionPointV2

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IntroductionPointV2

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for IntroductionPointV2

Source§

fn eq(&self, other: &IntroductionPointV2) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for IntroductionPointV2

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.