Pump up default timeout from 5 to 10s

This commit is contained in:
Lonami Exo
2018-06-17 11:46:56 +02:00
parent d18ee9ecc5
commit 226c35ff8f
5 changed files with 10 additions and 14 deletions

View File

@@ -1,8 +1,7 @@
import os
from datetime import timedelta
from .tcpfull import ConnectionTcpFull
from .tcpabridged import ConnectionTcpAbridged
from .tcpfull import ConnectionTcpFull
from ...crypto import AESModeCTR
@@ -12,8 +11,8 @@ class ConnectionTcpObfuscated(ConnectionTcpAbridged):
every message with a randomly generated key using the
AES-CTR mode so the packets are harder to discern.
"""
def __init__(self, *, loop, proxy=None, timeout=timedelta(seconds=5)):
super().__init__(loop=loop, proxy=proxy, timeout=timeout)
def __init__(self, *, loop, timeout, proxy=None):
super().__init__(loop=loop, timeout=timeout, proxy=proxy)
self._aes_encrypt, self._aes_decrypt = None, None
self.read = lambda s: self._aes_decrypt.encrypt(self.conn.read(s))
self.write = lambda d: self.conn.write(self._aes_encrypt.encrypt(d))