Commit e95784cd authored by Antenore Gatta's avatar Antenore Gatta

Added SSH_OPTIONS_COMPRESSION as an optional setting

parent cd68e0c9
......@@ -537,6 +537,12 @@ remmina_ssh_init_session(RemminaSSH *ssh)
}else {
remmina_log_printf("[SSH] SSH_OPTIONS_STRICTHOSTKEYCHECK does not have a valid value: %d\n", ssh->stricthostkeycheck);
}
rc = ssh_options_set(ssh->session, SSH_OPTIONS_COMPRESSION, ssh->compression);
if (rc == 0) {
remmina_log_printf("[SSH] SSH_OPTIONS_COMPRESSION has been set to: %s\n", ssh->compression);
}else {
remmina_log_printf("[SSH] SSH_OPTIONS_COMPRESSION does not have a valid value: %s\n", ssh->compression);
}
ssh_callbacks_init(ssh->callback);
if (remmina_log_running()) {
......@@ -647,6 +653,8 @@ remmina_ssh_init_from_file(RemminaSSH *ssh, RemminaFile *remminafile)
ssh->hostkeytypes = g_strdup(remmina_file_get_string(remminafile, "ssh_hostkeytypes"));
ssh->proxycommand = g_strdup(remmina_file_get_string(remminafile, "ssh_proxycommand"));
ssh->stricthostkeycheck = remmina_file_get_int(remminafile, "ssh_stricthostkeycheck", 0);
gint c = remmina_file_get_int(remminafile, "ssh_compression", 0);
ssh->compression = (c == 1) ? "yes" : "no";
/* Public/Private keys */
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)
ssh->kex_algorithms = g_strdup(ssh_src->kex_algorithms);
ssh->ciphers = g_strdup(ssh_src->ciphers);
ssh->hostkeytypes = g_strdup(ssh_src->hostkeytypes);
ssh->stricthostkeycheck = ssh_src->stricthostkeycheck;
ssh->compression = ssh_src->compression;
return TRUE;
}
......
......@@ -74,6 +74,7 @@ typedef struct _RemminaSSH {
gchar *hostkeytypes;
gchar *proxycommand;
gint stricthostkeycheck;
const gchar *compression;
gchar *error;
......
......@@ -1004,6 +1004,7 @@ static const RemminaProtocolSetting remmina_ssh_advanced_settings[] =
{ REMMINA_PROTOCOL_SETTING_TYPE_FOLDER, "sshlogfolder", N_("SSH session log folder"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_TEXT, "sshlogname", N_("SSH session log file name"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "sshlogenabled", N_("Enable SSH session logging at exit"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_compression", N_("Enable SSH compression"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "disablepasswordstoring", N_("Disable password storing"), TRUE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_stricthostkeycheck", N_("Strict host key checking"), TRUE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_END, NULL, NULL, FALSE, NULL, NULL }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment