Skip to content Skip to sidebar Skip to footer

How To Connect To .onion Sites Using Python Aiohttp?

I am trying to connect to a .onion site using python. I have tor running on port 9050 and I am getting the following error: Traceback (most recent call last): File '/Users/jan

Solution 1:

By default it appears to be using the local DNS resolver to asynchronously resolve hostnames. When using requests socks5h you are getting DNS resolution over SOCKS (Tor).

Adding rdns=True appears to work for .onion addresses:

connector = SocksConnector.from_url('socks5://localhost:9050', rdns=True)

Post a Comment for "How To Connect To .onion Sites Using Python Aiohttp?"