mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-04 10:05:42 +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:
@@ -214,6 +214,9 @@ fn get_tunnel_for_client(conn: Arc<Connection>) -> impl Tunnel {
|
||||
tunnel_type: "ring".to_owned(),
|
||||
local_addr: Some(build_url_from_socket_addr(&conn.client.id.into(), "ring").into()),
|
||||
remote_addr: Some(build_url_from_socket_addr(&conn.server.id.into(), "ring").into()),
|
||||
resolved_remote_addr: Some(
|
||||
build_url_from_socket_addr(&conn.server.id.into(), "ring").into(),
|
||||
),
|
||||
}),
|
||||
)
|
||||
}
|
||||
@@ -226,6 +229,9 @@ fn get_tunnel_for_server(conn: Arc<Connection>) -> impl Tunnel {
|
||||
tunnel_type: "ring".to_owned(),
|
||||
local_addr: Some(build_url_from_socket_addr(&conn.server.id.into(), "ring").into()),
|
||||
remote_addr: Some(build_url_from_socket_addr(&conn.client.id.into(), "ring").into()),
|
||||
resolved_remote_addr: Some(
|
||||
build_url_from_socket_addr(&conn.client.id.into(), "ring").into(),
|
||||
),
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user