Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions protocols/autonat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ libp2p-yamux = { path = "../../muxers/yamux" }
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"]

[[example]]
name = "client"
path = "examples/autonat_client.rs"

[[example]]
name = "server"
path = "examples/autonat_server.rs"
1 change: 1 addition & 0 deletions protocols/autonat/examples/autonat_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ impl Behaviour {
refresh_interval: Duration::from_secs(30),
boot_delay: Duration::from_secs(5),
throttle_server_period: Duration::ZERO,
only_global_ips: false,
..Default::default()
},
),
Expand Down
5 changes: 4 additions & 1 deletion protocols/autonat/examples/autonat_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ impl Behaviour {
)),
auto_nat: autonat::Behaviour::new(
local_public_key.to_peer_id(),
autonat::Config::default(),
autonat::Config {
only_global_ips: false,
..Default::default()
},
),
}
}
Expand Down