def __init__(self, name, config): _MultiplexingProxy.__init__(self, name, config) self._proxyAddress = self['address'] self._proxyPort = self['port'] self._username = self['username'] self._keepAlive = self['keepalive'] self._serverFingerprintRSA = self['rsaFingerprint'] self._serverFingerprintECDSA = self['ecdsaFingerprint'] self._cipher = self['cipher'] self._hmac = self['hmac'] self._timeout = self['timeout'] self._parentSocks5Proxy = self['parentSocks5Proxy'] if self._parentSocks5Proxy is not None: self._parentSocks5Proxy = _addressParse(self._parentSocks5Proxy, defaultPort=1080) try: self._privateKey = _paramiko.ECDSAKey.from_private_key_file(self['privateKey']) except: try: self._privateKey = _paramiko.RSAKey.from_private_key_file(self['privateKey']) except: raise ValueError(u'Not a valid ECDSA or RSA private key file: "' + self['privateKey'] + u'"') self._monitorThread = None
def __init__(self, name, config): _Proxy.__init__(self, name, config) self._proxyAddress = _addressParse(self['address'], defaultPort=1080)