Skip to content

Commit

Permalink
#1646: explicitly disable compression, make window-size and timeout c…
Browse files Browse the repository at this point in the history
…onfigurable via env var

git-svn-id: https://xpra.org/svn/Xpra/trunk@19946 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 22, 2018
1 parent 92d66ea commit b904d54
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ def paramiko_connect_to(display_desc, opts, debug_cb, ssh_connect_failed):
from paramiko import SSHException, Transport, Agent, RSAKey, PasswordRequiredException
from paramiko.hostkeys import HostKeys
transport = Transport(sock)
transport.use_compression(False)
log("SSH transport %s", transport)
try:
transport.start_client()
Expand Down Expand Up @@ -1318,9 +1319,13 @@ def auth_password():
cmd += " "
cmd += " ".join("\"%s\"" % x for x in display_as_args)

log("trying to open SSH session")
#see https://github.com/paramiko/paramiko/issues/175
#WINDOW_SIZE = 2097152
WINDOW_SIZE = envint("XPRA_SSH_WINDOW_SIZE", 2**27-1)
TIMEOUT = envint("XPRA_SSH_TIMEOUT", 60)
log("trying to open SSH session, window-size=%i, timeout=%i", WINDOW_SIZE, TIMEOUT)
try:
chan = transport.open_session(window_size=None, max_packet_size=0, timeout=60)
chan = transport.open_session(window_size=WINDOW_SIZE, max_packet_size=0, timeout=TIMEOUT)
chan.set_name("run-xpra")
except SSHException as e:
log("open_session", exc_info=True)
Expand Down

0 comments on commit b904d54

Please sign in to comment.