From 704167431ac24d97ff6530bbc9d8263c4a81bf19 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Mon, 20 Feb 2023 14:56:24 -0500 Subject: [PATCH] GUACAMOLE-312: Add client-side options for SSH tunneling. --- .../org/apache/guacamole/protocols/rdp.json | 43 ++++++++ .../org/apache/guacamole/protocols/ssh.json | 43 ++++++++ .../apache/guacamole/protocols/telnet.json | 104 ++++++++++++++++++ .../org/apache/guacamole/protocols/vnc.json | 43 ++++++++ .../main/frontend/src/translations/en.json | 53 +++++++++ 5 files changed, 286 insertions(+) diff --git a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json index e26bbb42e0..245b7e19d4 100644 --- a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json +++ b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json @@ -465,6 +465,49 @@ ] }, + { + "name" : "ssh-tunnel", + "fields" : [ + { + "name" : "ssh-tunnel", + "type" : "BOOLEAN", + "options" : [ "true" ] + }, + { + "name" : "ssh-tunnel-host", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-port", + "type" : "NUMERIC" + }, + { + "name" : "ssh-tunnel-host-key", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-username", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-password", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-private-key", + "type" : "MULTILINE" + }, + { + "name" : "ssh-tunnel-passphrase", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-alive-interval", + "type" : "NUMERIC" + } + ] + }, + { "name" : "wol", "fields" : [ diff --git a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/ssh.json b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/ssh.json index 3f27172c88..aad2ac615c 100644 --- a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/ssh.json +++ b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/ssh.json @@ -213,6 +213,49 @@ ] }, + { + "name" : "ssh-tunnel", + "fields" : [ + { + "name" : "ssh-tunnel", + "type" : "BOOLEAN", + "options" : [ "true" ] + }, + { + "name" : "ssh-tunnel-host", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-port", + "type" : "NUMERIC" + }, + { + "name" : "ssh-tunnel-host-key", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-username", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-password", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-private-key", + "type" : "MULTILINE" + }, + { + "name" : "ssh-tunnel-passphrase", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-alive-interval", + "type" : "NUMERIC" + } + ] + }, + { "name" : "wol", "fields" : [ diff --git a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/telnet.json b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/telnet.json index 42640b5ebb..4702a4e8a6 100644 --- a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/telnet.json +++ b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/telnet.json @@ -106,6 +106,110 @@ } ] }, + + { + "name" : "sftp", + "fields" : [ + { + "name" : "enable-sftp", + "type" : "BOOLEAN", + "options" : [ "true" ] + }, + { + "name" : "sftp-hostname", + "type" : "TEXT" + }, + { + "name" : "sftp-port", + "type" : "NUMERIC" + }, + { + "name" : "sftp-host-key", + "type" : "TEXT" + }, + { + "name" : "sftp-username", + "type" : "USERNAME" + }, + { + "name" : "sftp-password", + "type" : "PASSWORD" + }, + { + "name" : "sftp-private-key", + "type" : "MULTILINE" + }, + { + "name" : "sftp-passphrase", + "type" : "PASSWORD" + }, + { + "name" : "sftp-root-directory", + "type" : "TEXT" + }, + { + "name" : "sftp-directory", + "type" : "TEXT" + }, + { + "name" : "sftp-server-alive-interval", + "type" : "NUMERIC" + }, + { + "name" : "sftp-disable-download", + "type" : "BOOLEAN", + "options" : [ "true" ] + }, + { + "name" : "sftp-disable-upload", + "type" : "BOOLEAN", + "options" : [ "true" ] + } + ] + }, + + { + "name" : "ssh-tunnel", + "fields" : [ + { + "name" : "ssh-tunnel", + "type" : "BOOLEAN", + "options" : [ "true" ] + }, + { + "name" : "ssh-tunnel-host", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-port", + "type" : "NUMERIC" + }, + { + "name" : "ssh-tunnel-host-key", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-username", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-password", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-private-key", + "type" : "MULTILINE" + }, + { + "name" : "ssh-tunnel-passphrase", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-alive-interval", + "type" : "NUMERIC" + } + ] + }, { "name" : "typescript", diff --git a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/vnc.json b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/vnc.json index 62c34ac970..2ce8d0bbc4 100644 --- a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/vnc.json +++ b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/vnc.json @@ -219,6 +219,49 @@ } ] }, + + { + "name" : "ssh-tunnel", + "fields" : [ + { + "name" : "ssh-tunnel", + "type" : "BOOLEAN", + "options" : [ "true" ] + }, + { + "name" : "ssh-tunnel-host", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-port", + "type" : "NUMERIC" + }, + { + "name" : "ssh-tunnel-host-key", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-username", + "type" : "TEXT" + }, + { + "name" : "ssh-tunnel-password", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-private-key", + "type" : "MULTILINE" + }, + { + "name" : "ssh-tunnel-passphrase", + "type" : "PASSWORD" + }, + { + "name" : "ssh-tunnel-alive-interval", + "type" : "NUMERIC" + } + ] + }, { "name" : "audio", diff --git a/guacamole/src/main/frontend/src/translations/en.json b/guacamole/src/main/frontend/src/translations/en.json index 5b0ff79945..be06a8496c 100644 --- a/guacamole/src/main/frontend/src/translations/en.json +++ b/guacamole/src/main/frontend/src/translations/en.json @@ -646,6 +646,15 @@ "FIELD_HEADER_SFTP_ROOT_DIRECTORY" : "File browser root directory:", "FIELD_HEADER_SFTP_DISABLE_UPLOAD" : "Disable file upload:", "FIELD_HEADER_SFTP_USERNAME" : "Username:", + "FIELD_HEADER_SSH_TUNNEL" : "Enable SSH tunneling:", + "FIELD_HEADER_SSH_TUNNEL_ALIVE_INTERVAL" : "SSH tunnel keepalive interval:", + "FIELD_HEADER_SSH_TUNNEL_HOST" : "Hostname:", + "FIELD_HEADER_SSH_TUNNEL_HOST_KEY" : "Public host key (Base64):", + "FIELD_HEADER_SSH_TUNNEL_PASSPHRASE" : "Passphrase for private key:", + "FIELD_HEADER_SSH_TUNNEL_PASSWORD" : "Password", + "FIELD_HEADER_SSH_TUNNEL_PORT" : "Port:", + "FIELD_HEADER_SSH_TUNNEL_PRIVATE_KEY" : "Private key:", + "FIELD_HEADER_SSH_TUNNEL_USERNAME" : "Username:", "FIELD_HEADER_STATIC_CHANNELS" : "Static channel names:", "FIELD_HEADER_TIMEZONE" : "Time zone:", "FIELD_HEADER_USERNAME" : "Username:", @@ -717,6 +726,7 @@ "SECTION_HEADER_RECORDING" : "Screen Recording", "SECTION_HEADER_REMOTEAPP" : "RemoteApp", "SECTION_HEADER_SFTP" : "SFTP", + "SECTION_HEADER_SSH_TUNNEL" : "SSH Tunneling", "SECTION_HEADER_WOL" : "Wake-on-LAN (WoL)" }, @@ -753,6 +763,15 @@ "FIELD_HEADER_SFTP_DISABLE_DOWNLOAD" : "Disable file download:", "FIELD_HEADER_SFTP_ROOT_DIRECTORY" : "File browser root directory:", "FIELD_HEADER_SFTP_DISABLE_UPLOAD" : "Disable file upload:", + "FIELD_HEADER_SSH_TUNNEL" : "Enable SSH tunneling:", + "FIELD_HEADER_SSH_TUNNEL_ALIVE_INTERVAL" : "SSH tunnel keepalive interval:", + "FIELD_HEADER_SSH_TUNNEL_HOST" : "Hostname:", + "FIELD_HEADER_SSH_TUNNEL_HOST_KEY" : "Public host key (Base64):", + "FIELD_HEADER_SSH_TUNNEL_PASSPHRASE" : "Passphrase for private key:", + "FIELD_HEADER_SSH_TUNNEL_PASSWORD" : "Password", + "FIELD_HEADER_SSH_TUNNEL_PORT" : "Port:", + "FIELD_HEADER_SSH_TUNNEL_PRIVATE_KEY" : "Private key:", + "FIELD_HEADER_SSH_TUNNEL_USERNAME" : "Username:", "FIELD_HEADER_TERMINAL_TYPE" : "Terminal type:", "FIELD_HEADER_TIMEZONE" : "Time zone ($TZ):", "FIELD_HEADER_TYPESCRIPT_NAME" : "Typescript name:", @@ -809,6 +828,7 @@ "SECTION_HEADER_SESSION" : "Session / Environment", "SECTION_HEADER_TYPESCRIPT" : "Typescript (Text Session Recording)", "SECTION_HEADER_SFTP" : "SFTP", + "SECTION_HEADER_SSH_TUNNEL" : "SSH Tunneling", "SECTION_HEADER_WOL" : "Wake-on-LAN (WoL)" }, @@ -839,6 +859,27 @@ "FIELD_HEADER_RECORDING_NAME" : "Recording name:", "FIELD_HEADER_RECORDING_PATH" : "Recording path:", "FIELD_HEADER_SCROLLBACK" : "Maximum scrollback size:", + "FIELD_HEADER_SFTP_DIRECTORY" : "Default upload directory:", + "FIELD_HEADER_SFTP_DISABLE_DOWNLOAD" : "Disable file download:", + "FIELD_HEADER_SFTP_HOST_KEY" : "Public host key (Base64):", + "FIELD_HEADER_SFTP_HOSTNAME" : "Hostname:", + "FIELD_HEADER_SFTP_SERVER_ALIVE_INTERVAL" : "SFTP keepalive interval:", + "FIELD_HEADER_SFTP_PASSPHRASE" : "Passphrase:", + "FIELD_HEADER_SFTP_PASSWORD" : "Password:", + "FIELD_HEADER_SFTP_PORT" : "Port:", + "FIELD_HEADER_SFTP_PRIVATE_KEY" : "Private key:", + "FIELD_HEADER_SFTP_ROOT_DIRECTORY" : "File browser root directory:", + "FIELD_HEADER_SFTP_DISABLE_UPLOAD" : "Disable file upload:", + "FIELD_HEADER_SFTP_USERNAME" : "Username:", + "FIELD_HEADER_SSH_TUNNEL" : "Enable SSH tunneling:", + "FIELD_HEADER_SSH_TUNNEL_ALIVE_INTERVAL" : "SSH tunnel keepalive interval:", + "FIELD_HEADER_SSH_TUNNEL_HOST" : "Hostname:", + "FIELD_HEADER_SSH_TUNNEL_HOST_KEY" : "Public host key (Base64):", + "FIELD_HEADER_SSH_TUNNEL_PASSPHRASE" : "Passphrase for private key:", + "FIELD_HEADER_SSH_TUNNEL_PASSWORD" : "Password", + "FIELD_HEADER_SSH_TUNNEL_PORT" : "Port:", + "FIELD_HEADER_SSH_TUNNEL_PRIVATE_KEY" : "Private key:", + "FIELD_HEADER_SSH_TUNNEL_USERNAME" : "Username:", "FIELD_HEADER_TERMINAL_TYPE" : "Terminal type:", "FIELD_HEADER_TYPESCRIPT_NAME" : "Typescript name:", "FIELD_HEADER_TYPESCRIPT_PATH" : "Typescript path:", @@ -892,6 +933,8 @@ "SECTION_HEADER_RECORDING" : "Screen Recording", "SECTION_HEADER_TYPESCRIPT" : "Typescript (Text Session Recording)", "SECTION_HEADER_NETWORK" : "Network", + "SECTION_HEADER_SFTP" : "SFTP", + "SECTION_HEADER_SSH_TUNNEL" : "SSH Tunneling", "SECTION_HEADER_WOL" : "Wake-on-LAN (WoL)" }, @@ -938,6 +981,15 @@ "FIELD_HEADER_SFTP_ROOT_DIRECTORY" : "File browser root directory:", "FIELD_HEADER_SFTP_DISABLE_UPLOAD" : "Disable file upload:", "FIELD_HEADER_SFTP_USERNAME" : "Username:", + "FIELD_HEADER_SSH_TUNNEL" : "Enable SSH tunneling:", + "FIELD_HEADER_SSH_TUNNEL_ALIVE_INTERVAL" : "SSH tunnel keepalive interval:", + "FIELD_HEADER_SSH_TUNNEL_HOST" : "Hostname:", + "FIELD_HEADER_SSH_TUNNEL_HOST_KEY" : "Public host key (Base64):", + "FIELD_HEADER_SSH_TUNNEL_PASSPHRASE" : "Passphrase for private key:", + "FIELD_HEADER_SSH_TUNNEL_PASSWORD" : "Password", + "FIELD_HEADER_SSH_TUNNEL_PORT" : "Port:", + "FIELD_HEADER_SSH_TUNNEL_PRIVATE_KEY" : "Private key:", + "FIELD_HEADER_SSH_TUNNEL_USERNAME" : "Username:", "FIELD_HEADER_SWAP_RED_BLUE" : "Swap red/blue components:", "FIELD_HEADER_WOL_BROADCAST_ADDR" : "Broadcast address for WoL packet:", "FIELD_HEADER_WOL_MAC_ADDR" : "MAC address of the remote host:", @@ -995,6 +1047,7 @@ "SECTION_HEADER_RECORDING" : "Screen Recording", "SECTION_HEADER_REPEATER" : "VNC Repeater", "SECTION_HEADER_SFTP" : "SFTP", + "SECTION_HEADER_SSH_TUNNEL" : "SSH Tunneling", "SECTION_HEADER_WOL" : "Wake-on-LAN (WoL)" },