mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-25 09:23:48 +01:00
fdb7c9b995
On high latency links, the PING/PONG round trip triggered by fullness checking could kill the bandwidth. Disabling it could result in >10x bandwidth increase in some setups where the existing latency is already high and the available bandwidth is also high.
28 lines
791 B
Python
28 lines
791 B
Python
import sys, zlib
|
|
|
|
z = zlib.decompressobj()
|
|
mainmod = sys.modules[__name__]
|
|
while 1:
|
|
name = sys.stdin.readline().strip()
|
|
if name:
|
|
nbytes = int(sys.stdin.readline())
|
|
if verbosity >= 2:
|
|
sys.stderr.write('server: assembling %r (%d bytes)\n'
|
|
% (name, nbytes))
|
|
content = z.decompress(sys.stdin.read(nbytes))
|
|
exec compile(content, name, "exec")
|
|
|
|
# FIXME: this crushes everything into a single module namespace,
|
|
# then makes each of the module names point at this one. Gross.
|
|
assert(name.endswith('.py'))
|
|
modname = name[:-3]
|
|
mainmod.__dict__[modname] = mainmod
|
|
else:
|
|
break
|
|
|
|
verbose = verbosity
|
|
no_fullness = no_fullness0
|
|
sys.stderr.flush()
|
|
sys.stdout.flush()
|
|
main()
|