--- library/sshtunnel/sshtunnel.py.orig 2017-02-17 16:27:57.271285052 +0900 +++ library/sshtunnel/sshtunnel.py 2017-02-17 17:41:33.057209841 +0900 @@ -291,11 +291,16 @@ self._client.set_missing_host_key_policy(WarningPolicy()) else: self._client.set_missing_host_key_policy(StoreIfConfirmedPolicy()) + if 'proxycommand' in opts: + self._proxy = paramiko.ProxyCommand(opts['proxycommand']) + else: + self._proxy = None has_key = bool(self._keyfile) self._client.connect(self._server[0], self._server[1], username=self._username, key_filename=self._keyfile, password=self._password, - look_for_keys=has_key, allow_agent=has_key) + look_for_keys=has_key, allow_agent=has_key, sock=self._proxy) + except paramiko.BadHostKeyException, exc: self.notify_exception_error('ERROR',format_bad_host_exception(exc, '%s\ssh\known_hosts' % mforms.App.get().get_user_data_folder() if platform.system().lower() == "windows" else "~/.ssh/known_hosts file")) return False