A simple Python wrapper to install, manage, and route traffic through Tor
Project description
ps-torproxy
A simple Python library to install, manage, and route HTTP traffic through the Tor network.
Installation
pip install ps_torproxy
Prerequisites
- Linux (Debian-based) with
sudoaccess aptpackage manager
Usage
from ps_torproxy import TorProxy
proxy = TorProxy()
# Check if traffic is going through Tor
print(proxy.check_proxy()) # True
# Get current exit IP
print(proxy.get_current_ip())
# Get a new identity (new IP)
proxy.renew_identity()
# Make a safe GET request with retries
response = proxy.safe_get("https://example.com")
# Cleanup when done
proxy.cleanup()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ps_torproxy-0.1.1.tar.gz
(14.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ps_torproxy-0.1.1.tar.gz.
File metadata
- Download URL: ps_torproxy-0.1.1.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8eff42aa7cae0ce32990bfd1014fd4cbd9403b8eb73e7dfcb449e3ca3a1622ab
|
|
| MD5 |
36b66d4eb8a4c9f40f88337b2fe9b8e1
|
|
| BLAKE2b-256 |
16660a126a3aaef2db4196f8502670e7c4097dd3f16b01d239b7a6aac2e1a8f8
|
File details
Details for the file ps_torproxy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ps_torproxy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc09552527e42ca43d914eb7375e8e2de55a86384a931200d71e43400378adba
|
|
| MD5 |
4b74972756f69caad7c6608a1ee9c421
|
|
| BLAKE2b-256 |
f6e728a4b856a06410d514801c32ba058dba88978c6069e75af19b062c9d0ceb
|