show TCP/UDP/IPv6 in tooltip (#12613)

* add punch type log

Signed-off-by: 21pages <sunboeasy@gmail.com>

* show TCP/UDP/IPv6 in tooltip

Signed-off-by: 21pages <sunboeasy@gmail.com>

* Skip udp punch if udp nat port is 0

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2025-08-11 16:13:31 +08:00
committed by GitHub
parent 77064cc2f8
commit a0659a277a
14 changed files with 156 additions and 52 deletions

View File

@@ -117,6 +117,13 @@ class Header: Reactor.Component {
icon_conn = svg_insecure_relay;
title_conn = translate("Relayed and unencrypted connection");
}
var stream_type = this.stream_type;
if (stream_type == "Relay") {
stream_type = "TCP";
}
if (stream_type) {
title_conn += " (" + stream_type + ")";
}
var title = get_id();
if (pi.hostname) title += "(" + pi.username + "@" + pi.hostname + ")";
if ((pi.displays || []).length == 0) {
@@ -695,10 +702,11 @@ function startChat() {
chatbox = view.window(params);
}
handler.setConnectionType = function(secured, direct) {
handler.setConnectionType = function(secured, direct, stream_type) {
header.update({
secure_connection: secured,
direct_connection: direct,
stream_type: stream_type,
});
}