same port to rule that out

This commit is contained in:
Daniel Karzel 2021-06-11 15:47:22 +10:00 committed by Thomas Eizinger
parent dede7b38f9
commit 6fd36dbeb5
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
2 changed files with 3 additions and 1 deletions

View file

@ -78,7 +78,7 @@ impl Transport for TorConfig {
let onion_bytes = key.public().get_onion_address().get_raw_bytes();
let onion_port = onion.port();
let localhost_tcp_random_port_addr = "/ip4/127.0.0.1/tcp/0"
let localhost_tcp_random_port_addr = format!("/ip4/127.0.0.1/tcp/{}", onion_port).as_str()
.parse()
.expect("always a valid multiaddr");

View file

@ -83,6 +83,8 @@ impl AuthenticatedConnectionExt for AuthenticatedConn<tokio::net::TcpStream, Asy
onion_port: u16,
local_port: u16,
) -> Result<(), Error> {
println!("Adding ephemeral service, onion port {}, local port {}", onion_port, local_port);
self.add_onion_v3(
&key,
false,