-
-
Notifications
You must be signed in to change notification settings - Fork 277
Description
Both the core & the periphery daemons have their listening address hardcoded at 0.0.0.0. Only the port number to listen on is configurable. The unfortunate effect is that they only listen on IPv4, not IPv6, no matter whether the host has IPv6 configured or not.
Please add support for listening on IPv6, too, or at least for making the listening address configurable. Note that the equivalent of 0.0.0.0 in IPv4 is :: in IPv6, which if used together with a port number must be written as [::]:port so that the address part :: can be distinguished from the address/port separator :. Please note further that listening on :: will effectively listen on both IPv6 & IPv4 on some OSes (Linux) while only listening on IPv6 on others (Windows, if I'm not mistaken).
Hardcoded addresses:
- in core: https://github.com/moghtech/komodo/blob/main/bin/core/src/main.rs#L86
- in periphery: https://github.com/moghtech/komodo/blob/main/bin/periphery/src/main.rs#L31
Hardcoded IPv6 "listen on every interface, every address" would look like this:
let socket_addr =
SocketAddr::from_str(&format!("[::]:{}", core_config().port))
.context("failed to parse socket addr")?;Thanks for considering.