Skip to main content

A Python tool for running Tor services on local ports

Project description


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.


pip install torloc

Or download the tarball / git clone and...

python install


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

# 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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for torloc, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size torloc-1.0.1.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page