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")
# Make an unsafe GET request (SSL verification disabled) with retries
response = proxy.unsafe_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.2.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.2.tar.gz.
File metadata
- Download URL: ps_torproxy-0.1.2.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 |
f171a297ad4d5a5276fb34c6ab6d3b65429c52e89832be852bd333b038a8964b
|
|
| MD5 |
0f868f8097c5c14bb2708b968d790634
|
|
| BLAKE2b-256 |
b9c3c9a6479f4899b9a7f9d92e47c81e8bd8a165f039f45b991d78dc89e846ea
|
File details
Details for the file ps_torproxy-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ps_torproxy-0.1.2-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 |
983472ecd716686134cdbaa3e77731279b935bfca29fdf4add834f485655d2eb
|
|
| MD5 |
d62f48947cd626d60be93b4d701dfcd2
|
|
| BLAKE2b-256 |
1d8e116a80d8076f708731d2a76641d095b23eed53644df94470bb52c6dbf3e6
|