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

Uploaded Source

Supported by

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