A simple way to run your any python service over tor using tor-proxy.
Project description
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.
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
- Import with
from tor_proxy import tor_proxy
. - 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
tor_proxy-0.0.1-py3-none-any.whl
(11.7 kB
view details)
File details
Details for the file tor_proxy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: tor_proxy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5212e0cfd2460bd6a519f5523c6c90297075b31d2781b95118e8320592013bf7 |
|
MD5 | aaad6cb4a53031caa7f8a55bb8f17bdc |
|
BLAKE2b-256 | fd9f089810935d8f9a1357960ac5f0e5f8e5e322f7b7493747671528f3fcb60b |