Anorov / PySocks

A SOCKS proxy client and wrapper for Python.
Other
1.23k stars 258 forks source link

HTTPS: No Server Certificate Verification #98

Open wonkodv opened 6 years ago

wonkodv commented 6 years ago

Compared to http.client.HTTPSClient, SocksiPyConnectionS misses the following in its connect method:

        if not self._context.check_hostname and self._check_hostname:
            try:
                ssl.match_hostname(self.sock.getpeercert(), server_hostname)
            except Exception:
                self.sock.shutdown(socket.SHUT_RDWR)
                self.sock.close()
                raise
Anorov commented 6 years ago

Thanks. Would you be willing to submit a pull request?