Skip to main content

A Python tool for running Tor services on local ports

Project description

Torloc

Torloc runs Tor services on local ports. So you can use many different ip addresses without having to start each service manually.

For Linux, Windows and MacOS.

Installation

pip install torloc

Or download the tarball / git clone and...

python setup.py install

Usage

import torloc

# Several ports
processes = torloc.CreateMany(16)  # threads is 8 by default
ports = processes.ports            # {port: TorProcess}
while not processes.ready:         # Waiting for all ports to be ready
    pass
processes.stop(list(ports.keys())[0])
processes.stop_all()

# One port
process = torloc.TorProcess(49152)
stdout = process.stdout            # file object
stderr = process.stderr            # file object
while not process.ip:              # Waiting for the port to be ready
    pass
process.stop()

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

torloc-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file torloc-1.0.1.tar.gz.

File metadata

  • Download URL: torloc-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

File hashes

Hashes for torloc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 18c66a7eb8e27ed1cbbadd07cc565b7e5cf618f3b05e2c6a52810e07aa55ed6e
MD5 0d0f3f9d1580deb0082cc9f40da9d5af
BLAKE2b-256 737ba0f155833c95f9917e96523a7658682ce3b87055a1478e8ff42e364bd583

See more details on using hashes here.

Supported by

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