mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 10:11:33 +00:00
protocols/autonat: Export DEFAULT_PROTOCOL_NAME
(#2717)
This commit is contained in:
committed by
GitHub
parent
cb3784a8b3
commit
e2bef93bd7
@ -1,3 +1,7 @@
|
||||
# 0.4.1
|
||||
|
||||
- Export `DEFAULT_PROTOCOL_NAME`.
|
||||
|
||||
# 0.4.0
|
||||
|
||||
- Update to `libp2p-core` `v0.33.0`.
|
||||
|
@ -3,7 +3,7 @@ name = "libp2p-autonat"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
description = "NAT and firewall detection for libp2p"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
authors = ["David Craven <david@craven.ch>", "Elena Frank <elena.frank@protonmail.com>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
|
@ -27,7 +27,7 @@ pub use self::{
|
||||
Behaviour, Config, Event, InboundProbeError, InboundProbeEvent, NatStatus,
|
||||
OutboundProbeError, OutboundProbeEvent, ProbeId,
|
||||
},
|
||||
protocol::ResponseError,
|
||||
protocol::{ResponseError, DEFAULT_PROTOCOL_NAME},
|
||||
};
|
||||
pub use libp2p_request_response::{InboundFailure, OutboundFailure};
|
||||
|
||||
|
@ -29,9 +29,12 @@ use std::{convert::TryFrom, io};
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct AutoNatProtocol;
|
||||
|
||||
/// The protocol name used for negotiating with multistream-select.
|
||||
pub const DEFAULT_PROTOCOL_NAME: &[u8] = b"/libp2p/autonat/1.0.0";
|
||||
|
||||
impl ProtocolName for AutoNatProtocol {
|
||||
fn protocol_name(&self) -> &[u8] {
|
||||
b"/libp2p/autonat/1.0.0"
|
||||
DEFAULT_PROTOCOL_NAME
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user