From 89956002f8bb93522f2734afe167fa5d958f4127 Mon Sep 17 00:00:00 2001 From: thermionic Date: Wed, 23 Nov 2022 16:04:50 +0000 Subject: [PATCH 1/2] Added tcp proxy for CIRA to HAProxy config --- docs/Example configs/haproxy-with-sni-sample.cfg | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/Example configs/haproxy-with-sni-sample.cfg b/docs/Example configs/haproxy-with-sni-sample.cfg index a1f23cad..456c7466 100644 --- a/docs/Example configs/haproxy-with-sni-sample.cfg +++ b/docs/Example configs/haproxy-with-sni-sample.cfg @@ -20,6 +20,17 @@ backend sni-back use-server gitlabSNI if gitlab-sni use-server mc-SNI if mc-sni server mc-SNI 10.1.1.10:1443 send-proxy-v2-ssl-cn + +frontend cira-tcp-front + bind 10.1.1.10:4433 + mode tcp + option tcplog + tcp-request inspect-delay 5s + default_backend mc-cira-back + +backend cira-tcp-back + mode tcp + server mc-cira 10.1.1.30:4433 frontend mc-front-HTTPS mode http From 4e24783662f9a795e66279fc818cccd13b800fcc Mon Sep 17 00:00:00 2001 From: Gary Kim Date: Thu, 24 Nov 2022 00:59:42 -0500 Subject: [PATCH 2/2] Fix xterm in shared terminals --- views/sharing-mobile.handlebars | 8 +++++++- views/sharing.handlebars | 12 +++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/views/sharing-mobile.handlebars b/views/sharing-mobile.handlebars index e2ad0125..a2744bbf 100644 --- a/views/sharing-mobile.handlebars +++ b/views/sharing-mobile.handlebars @@ -1670,7 +1670,13 @@ return obj; } - function tunnelUpdate(data) { if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } } + function tunnelUpdate(data) { + if (xterm.writeUtf8) { + if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } + } else { + if (typeof data == 'string') { xterm.write(data); } else { xterm.write(new Uint8Array(data)); } + } + } function sshTunnelUpdate(data) { if (typeof data == 'string') { diff --git a/views/sharing.handlebars b/views/sharing.handlebars index 4208d680..99db6d95 100644 --- a/views/sharing.handlebars +++ b/views/sharing.handlebars @@ -393,7 +393,7 @@ } function deskAdjust() { - if ((xxcurrentView == 12) && (terminal != null) && (xtermfit != null)) { xtermfit.fit(); } // Terminal + if ((xxcurrentView == 12) && (terminal != null) && (xtermfit != null)) { xtermfit.fit(); } // Terminal QS('fileArea4')['height'] = 'calc(100vh - ' + (90 + Q('fileArea2').clientHeight) + 'px)'; // Files var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth; var deskH = Q('Desk').height, deskW = Q('Desk').width; @@ -1405,7 +1405,13 @@ return obj; } - function tunnelUpdate(data) { if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } } + function tunnelUpdate(data) { + if (xterm.writeUtf8) { + if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } + } else { + if (typeof data == 'string') { xterm.write(data); } else { xterm.write(new Uint8Array(data)); } + } + } // Send the new terminal size to the agent function xTermSendResize() { @@ -1567,7 +1573,7 @@ // // Files - // + // function setupFiles() { // Setup the files tab