Skip to content

Commit e95784c

Browse files
committed
Added SSH_OPTIONS_COMPRESSION as an optional setting
1 parent cd68e0c commit e95784c

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

remmina/src/remmina_ssh.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,12 @@ remmina_ssh_init_session(RemminaSSH *ssh)
537537
}else {
538538
remmina_log_printf("[SSH] SSH_OPTIONS_STRICTHOSTKEYCHECK does not have a valid value: %d\n", ssh->stricthostkeycheck);
539539
}
540+
rc = ssh_options_set(ssh->session, SSH_OPTIONS_COMPRESSION, ssh->compression);
541+
if (rc == 0) {
542+
remmina_log_printf("[SSH] SSH_OPTIONS_COMPRESSION has been set to: %s\n", ssh->compression);
543+
}else {
544+
remmina_log_printf("[SSH] SSH_OPTIONS_COMPRESSION does not have a valid value: %s\n", ssh->compression);
545+
}
540546

541547
ssh_callbacks_init(ssh->callback);
542548
if (remmina_log_running()) {
@@ -647,6 +653,8 @@ remmina_ssh_init_from_file(RemminaSSH *ssh, RemminaFile *remminafile)
647653
ssh->hostkeytypes = g_strdup(remmina_file_get_string(remminafile, "ssh_hostkeytypes"));
648654
ssh->proxycommand = g_strdup(remmina_file_get_string(remminafile, "ssh_proxycommand"));
649655
ssh->stricthostkeycheck = remmina_file_get_int(remminafile, "ssh_stricthostkeycheck", 0);
656+
gint c = remmina_file_get_int(remminafile, "ssh_compression", 0);
657+
ssh->compression = (c == 1) ? "yes" : "no";
650658

651659
/* Public/Private keys */
652660
s = (ssh_privatekey ? g_strdup(ssh_privatekey) : remmina_ssh_find_identity());
@@ -680,7 +688,7 @@ remmina_ssh_init_from_ssh(RemminaSSH *ssh, const RemminaSSH *ssh_src)
680688
ssh->kex_algorithms = g_strdup(ssh_src->kex_algorithms);
681689
ssh->ciphers = g_strdup(ssh_src->ciphers);
682690
ssh->hostkeytypes = g_strdup(ssh_src->hostkeytypes);
683-
ssh->stricthostkeycheck = ssh_src->stricthostkeycheck;
691+
ssh->compression = ssh_src->compression;
684692

685693
return TRUE;
686694
}

remmina/src/remmina_ssh.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ typedef struct _RemminaSSH {
7474
gchar *hostkeytypes;
7575
gchar *proxycommand;
7676
gint stricthostkeycheck;
77+
const gchar *compression;
7778

7879
gchar *error;
7980

remmina/src/remmina_ssh_plugin.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,7 @@ static const RemminaProtocolSetting remmina_ssh_advanced_settings[] =
10041004
{ REMMINA_PROTOCOL_SETTING_TYPE_FOLDER, "sshlogfolder", N_("SSH session log folder"), FALSE, NULL, NULL },
10051005
{ REMMINA_PROTOCOL_SETTING_TYPE_TEXT, "sshlogname", N_("SSH session log file name"), FALSE, NULL, NULL },
10061006
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "sshlogenabled", N_("Enable SSH session logging at exit"), FALSE, NULL, NULL },
1007+
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_compression", N_("Enable SSH compression"), FALSE, NULL, NULL },
10071008
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "disablepasswordstoring", N_("Disable password storing"), TRUE, NULL, NULL },
10081009
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_stricthostkeycheck", N_("Strict host key checking"), TRUE, NULL, NULL },
10091010
{ REMMINA_PROTOCOL_SETTING_TYPE_END, NULL, NULL, FALSE, NULL, NULL }

0 commit comments

Comments
 (0)