pub struct TunnelQuery {
pub port: u16,
pub identity: bool,
}Expand description
?port=<n>[&identity=true] — the guest port to relay to, and whether to prove identity.
Fields§
§port: u16The guest port. Dialled on 127.0.0.1 only.
0 parses and is refused after the upgrade with close::BAD_PORT, rather than
rejected as a parse error: a caller who named it gets a reason naming the port
instead of a 400 that could equally mean a missing parameter.
identity: boolWhether to run a Noise KK handshake before relaying any bytes.
On this struct rather than in a second query type because one route has one query
contract, and the schema is generated from exactly that: a separate type would need a
second extractor and would not appear in docs/schema.json at all.
Absent means false, which is what keeps every layer-2 client working unchanged. True
against a VM launched without a seed is refused with close::NO_IDENTITY rather than
silently downgraded — a caller who asked to verify identity and got an unverified
tunnel would believe a proof it never received. See super::identity for what the
handshake proves and its honest limit.
Trait Implementations§
Source§impl Debug for TunnelQuery
impl Debug for TunnelQuery
Source§impl Default for TunnelQuery
impl Default for TunnelQuery
Source§impl<'de> Deserialize<'de> for TunnelQuery
impl<'de> Deserialize<'de> for TunnelQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for TunnelQuery
impl JsonSchema for TunnelQuery
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more