mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 00:31:35 +00:00
Configurable multistream-select protocol. Add V1Lazy variant. (#1245)
Make the multistream-select protocol (version) configurable on transport upgrades as well as for individual substreams. Add a "lazy" variant of multistream-select 1.0 that delays sending of negotiation protocol frames as much as possible but is only safe to use under additional assumptions that go beyond what is required by the multistream-select v1 specification.
This commit is contained in:
@ -42,7 +42,7 @@ const SHA_256: &str = "SHA256";
|
||||
const SHA_512: &str = "SHA512";
|
||||
|
||||
pub(crate) const DEFAULT_AGREEMENTS_PROPOSITION: &str = "P-256,P-384";
|
||||
pub(crate) const DEFAULT_CIPHERS_PROPOSITION: &str = "AES-128,AES-256,TwofishCTR";
|
||||
pub(crate) const DEFAULT_CIPHERS_PROPOSITION: &str = "NULL"; // "AES-128,AES-256,TwofishCTR";
|
||||
pub(crate) const DEFAULT_DIGESTS_PROPOSITION: &str = "SHA256,SHA512";
|
||||
|
||||
/// Return a proposition string from the given sequence of `KeyAgreement` values.
|
||||
|
@ -31,7 +31,7 @@
|
||||
//! # fn main() {
|
||||
//! use futures::Future;
|
||||
//! use libp2p_secio::{SecioConfig, SecioOutput};
|
||||
//! use libp2p_core::{PeerId, Multiaddr, identity};
|
||||
//! use libp2p_core::{PeerId, Multiaddr, identity, upgrade};
|
||||
//! use libp2p_core::transport::Transport;
|
||||
//! use libp2p_mplex::MplexConfig;
|
||||
//! use libp2p_tcp::TcpConfig;
|
||||
@ -41,7 +41,7 @@
|
||||
//!
|
||||
//! // Create a `Transport`.
|
||||
//! let transport = TcpConfig::new()
|
||||
//! .upgrade()
|
||||
//! .upgrade(upgrade::Version::V1)
|
||||
//! .authenticate(SecioConfig::new(local_keys.clone()))
|
||||
//! .multiplex(MplexConfig::default());
|
||||
//!
|
||||
|
Reference in New Issue
Block a user