We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b739726 commit a9ab0faCopy full SHA for a9ab0fa
src/connect.rs
@@ -1294,7 +1294,13 @@ mod socks {
1294
.next();
1295
if let Some(new_target) = maybe_new_target {
1296
log::trace!("socks local dns resolved {new_target:?}");
1297
- host = new_target.ip().to_string();
+ // If the resolved IP is IPv6, wrap it in brackets for URI formatting
1298
+ let ip = new_target.ip();
1299
+ if ip.is_ipv6() {
1300
+ host = format!("[{}]", ip);
1301
+ } else {
1302
+ host = ip.to_string();
1303
+ }
1304
}
1305
1306
0 commit comments