diff --git a/crates/core/src/model/addr.rs b/crates/core/src/model/addr.rs index af6abe9..42e6721 100644 --- a/crates/core/src/model/addr.rs +++ b/crates/core/src/model/addr.rs @@ -25,10 +25,19 @@ impl From<&str> for RemoteAddr { } } else { // ipv4 (4 bytes; 32 bits) - Self( - value.parse().unwrap_or("0.0.0.0:1000".parse().unwrap()), - AddrProto::IPV4, - ) + if !value.contains(":1000") { + Self( + format!("{value}:1000") + .parse() + .unwrap_or("0.0.0.0:1000".parse().unwrap()), + AddrProto::IPV4, + ) + } else { + Self( + value.parse().unwrap_or("0.0.0.0:1000".parse().unwrap()), + AddrProto::IPV4, + ) + } } } }