pub struct InnerLayer {
pub formats: Vec<u32>,
pub intro_auth: Vec<String>,
pub is_single_service: bool,
pub introduction_points: Vec<IntroductionPointV3>,
}Expand description
Inner encryption layer of a v3 hidden service descriptor.
The inner layer contains the actual service configuration and introduction points. It is encrypted within the outer layer.
§Structure
formats: Supported CREATE2 cell formats (typically [2] for ntor)intro_auth: Required authentication methods for introductionis_single_service: Whether this is a single-onion serviceintroduction_points: List of introduction point relays
§Decryption Requirements
To access the inner layer, you must first decrypt:
- The outer
superencryptedblob using the blinded key and subcredential - The inner
encryptedblob using the descriptor cookie (if client auth)
§Single-Onion Services
If is_single_service is true, the service is running in single-onion
mode, which provides lower latency but reduced anonymity for the service.
§Example
let inner = InnerLayer::parse(&decrypted_inner)?;
println!("CREATE2 formats: {:?}", inner.formats);
println!("Single-onion: {}", inner.is_single_service);
println!("Introduction points: {}", inner.introduction_points.len());
for intro in &inner.introduction_points {
println!(" - {:?}", intro.link_specifiers);
}Fields§
§formats: Vec<u32>Supported CREATE2 cell formats (typically [2] for ntor handshake).
intro_auth: Vec<String>Required authentication methods for introduction (e.g., [“ed25519”]).
is_single_service: boolWhether this is a single-onion (non-anonymous) service.
introduction_points: Vec<IntroductionPointV3>List of introduction points for connecting to the service.
Implementations§
Source§impl InnerLayer
impl InnerLayer
Sourcepub fn parse(content: &str) -> Result<Self, Error>
pub fn parse(content: &str) -> Result<Self, Error>
Parses the inner layer from decrypted content.
§Arguments
content- Decrypted inner layer content
§Returns
A parsed InnerLayer on success.
§Errors
Returns Error::Parse if the content is malformed or
introduction points fail to parse.
§Example
// After decrypting both layers
let inner = InnerLayer::parse(&decrypted_content)?;
for intro in inner.introduction_points {
// Connect to introduction points
}Trait Implementations§
Source§impl Clone for InnerLayer
impl Clone for InnerLayer
Source§fn clone(&self) -> InnerLayer
fn clone(&self) -> InnerLayer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more