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")

# 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.0.tar.gz (14.3 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.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ps_torproxy-0.1.0.tar.gz
  • Upload date:
  • Size: 14.3 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.0.tar.gz
Algorithm Hash digest
SHA256 646518f6f34928b8f8aa1dd102c080eeaae330cdf7e0f3b167a28f26f1786469
MD5 c9929d6858b2f90273ec670128582aa0
BLAKE2b-256 bee06f13325b76b6a502863e779fa9e37496762c262ea6c5ccd3507d791bafa1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ps_torproxy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05ad41d8214f5e90694f8643015479802ac51b2944434918d021fca2bd657d23
MD5 9d1770536671bb57f9ad9256bdf035f2
BLAKE2b-256 04298198416e9b88f54dc5fa9d4a63624961b3dc4a08681c4db9e0b93b317c0a

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