Skip to main content

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 sudo access
  • apt package 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.3.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ps_torproxy-0.1.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file ps_torproxy-0.1.3.tar.gz.

File metadata

  • Download URL: ps_torproxy-0.1.3.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.7

File hashes

Hashes for ps_torproxy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4428d8f660a8c402703b20813b81adc2d97f94d8002915f177692a17c3373af1
MD5 3ba3879a230601f937756cd1ed438452
BLAKE2b-256 7992e46e2968554dbf847c472cb9db8f14fc049c9fb844fec2914830c25cbdf9

See more details on using hashes here.

File details

Details for the file ps_torproxy-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ps_torproxy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.7

File hashes

Hashes for ps_torproxy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0fae92498f3a71655c80c36cfb35afb0f1f5fa5784ca52f2ec35861796cd73e9
MD5 2ed774ed84551f43c2b2356163ba8fd8
BLAKE2b-256 833ab4b845387c169dd7641d631f3c6c49fd4a42d3319c0259918410a0fc3131

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page