Skip to content

Instantly share code, notes, and snippets.

@hyuunnn
Created October 1, 2018 05:20
Show Gist options
  • Save hyuunnn/20519e551971afbf417791111b950121 to your computer and use it in GitHub Desktop.
Save hyuunnn/20519e551971afbf417791111b950121 to your computer and use it in GitHub Desktop.
# root$ tor
# Oct 01 13:57:48.308 [notice] Opening Socks listener on 127.0.0.1:9050
import requests
proxies = {
'http': 'socks5h://localhost:9050',
'https': 'socks5h://localhost:9050'
}
def main():
url = 'http://httpbin.org/ip'
response = requests.get(url, proxies=proxies)
print(response.text)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment