Skip to content

Commit

Permalink
change listen loopback_only
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeguglielmo committed Oct 30, 2023
1 parent 786ac5f commit a64beec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dht-cache/src/domolibp2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ pub async fn start(
};

// Listen on all interfaces and whatever port the OS assigns.
swarm.listen_on("/ip4/0.0.0.0/tcp/0".parse()?)?;
if !loopback_only {
swarm.listen_on("/ip4/0.0.0.0/tcp/0".parse()?)?;
} else {
swarm.listen_on("/ip4/127.0.0.1/tcp/0".parse()?)?;
}

Ok(swarm)
}
Expand Down

0 comments on commit a64beec

Please sign in to comment.