I am trying to connect to TOR's localhost loopback and send data through it. The address I am using is:
127.0.0.1:9050
I am using the following script to do this:
import requesocks, requests
session = requesocks.session()
session.proxies = {'http': 'socks5://127.0.0.1:9050',
'https': 'socks5://127.0.0.1:9050'}
print session.get("https://api.ipify.org?format=json").json()
It is supposed to retrieve my IP and print it. However, it gives the following error:
Max retries exceeded with url: https://api.ipify.org/?format=json
I can verify that TOR is up and running. What could be the problem raising this exception?