diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2018-10-23 20:55:10 +0000 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-01-02 15:12:16 +0200 |
commit | 659a4f06d46a0e8e4f391eda3b6d86f2ab6e4db9 (patch) | |
tree | f33207b1bf0355076b244b161b2bb093c8840c34 /src/rust | |
parent | 70e9245f6feecceee96f0ea8d426e1a5a6fc9b8d (diff) | |
download | tor-659a4f06d46a0e8e4f391eda3b6d86f2ab6e4db9.tar.gz tor-659a4f06d46a0e8e4f391eda3b6d86f2ab6e4db9.zip |
Circuit padding ProtoVer plumbing.
This helps us to determine if a middle node can pad to us or not.
Co-authored-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/rust')
-rw-r--r-- | src/rust/protover/protover.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs index 8624afeafa..0b2a78c210 100644 --- a/src/rust/protover/protover.rs +++ b/src/rust/protover/protover.rs @@ -46,6 +46,7 @@ pub enum Protocol { LinkAuth, Microdesc, Relay, + Padding, } impl fmt::Display for Protocol { @@ -73,6 +74,7 @@ impl FromStr for Protocol { "LinkAuth" => Ok(Protocol::LinkAuth), "Microdesc" => Ok(Protocol::Microdesc), "Relay" => Ok(Protocol::Relay), + "Padding" => Ok(Protocol::Padding), _ => Err(ProtoverError::UnknownProtocol), } } @@ -163,7 +165,8 @@ pub(crate) fn get_supported_protocols_cstr() -> &'static CStr { Link=1-5 \ LinkAuth=3 \ Microdesc=1-2 \ - Relay=1-2" + Relay=1-2 \ + Padding=1" ) } else { cstr!( @@ -176,7 +179,8 @@ pub(crate) fn get_supported_protocols_cstr() -> &'static CStr { Link=1-5 \ LinkAuth=1,3 \ Microdesc=1-2 \ - Relay=1-2" + Relay=1-2 \ + Padding=1" ) } } |