mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-16 02:45:41 +00:00
Fix IPv6 TCP tunnel display formatting (#1980)
Normalize composite tunnel display values before rendering peer and debug output so IPv6 tunnel types no longer append `6` to the port. - Preserve prefixes like `txt-` while converting tunnel schemes to their IPv6 form. - Recover malformed values such as `txt-tcp://...:110106` into `txt-tcp6://...:11010`. - Reuse the normalized remote address display in CLI debug output.
This commit is contained in:
@@ -538,6 +538,9 @@ impl WgTunnelListener {
|
||||
remote_addr: Some(
|
||||
build_url_from_socket_addr(&addr.to_string(), "wg").into(),
|
||||
),
|
||||
resolved_remote_addr: Some(
|
||||
build_url_from_socket_addr(&addr.to_string(), "wg").into(),
|
||||
),
|
||||
}),
|
||||
));
|
||||
if let Err(e) = conn_sender.send(tunnel) {
|
||||
@@ -685,6 +688,9 @@ impl WgTunnelConnector {
|
||||
tunnel_type: "wg".to_owned(),
|
||||
local_addr: Some(super::build_url_from_socket_addr(&local_addr, "wg").into()),
|
||||
remote_addr: Some(addr_url.into()),
|
||||
resolved_remote_addr: Some(
|
||||
super::build_url_from_socket_addr(&addr.to_string(), "wg").into(),
|
||||
),
|
||||
}),
|
||||
Some(Box::new(wg_peer)),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user