tor-proxy

A simple way to run your any python service over tor using tor-proxy.


Keywords
flask, tor, onion, stem, hacktoberfest2022, http-proxy, onion-service, proxy, proxy-server, proxychains, python, python3, tor-proxy, tor-socks-proxy
License
MIT
Install
pip install tor-proxy==0.0.1

Documentation

Tor-Proxy

Run your any python service over tor using tor-proxy.It doesn’t interfere with other tor processes on your computer, so you can use the Tor Browser or the system tor on their own.

PyPI version Downloads Downloads Python 3.6

Disclaimer:-

Use it only for educational purpose.

Features

  • No need root permission
  • Multiple instances

Compatability

Python 3.6+ is required.

Installation

pip install tor-proxy

Quickstart

  1. Import with from tor_proxy import tor_proxy .
  2. call function tor_proxy() , store as variable and give it as port argument in proxies.
# tor_proxy_example.py
from tor_proxy import tor_proxy
import requests

port = tor_proxy()

http_proxy  = f"socks5h://127.0.0.1:{port}"
https_proxy = f"socks5h://127.0.0.1:{port}"

proxies = { 
              "http"  : http_proxy, 
              "https" : https_proxy, 
            }

url = "https://api.ipify.org"

r = requests.get(url, proxies=proxies)

print(r.text)

Credit :- onionshare