Skip to main content

xtor

xtor is a simple tool for managing Tor instances.

Installation

  • Linux

    • sudo apt-get install tor
    • sudo apt-get install obfs4proxy
  • Windows

    • Download and install Tor Expert Bundle
      • https://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-x86_64.tar.gz
      • https://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-i686.tar.gz

Then install the python package:

pip install xtor

Usage

from xtor import Tor

tor = Tor.startTor(
    port=9052,
    control_port=9053,
    host="127.0.0.1",
    password="passw0rd",
    init_msg_handler=print,
    path="/usr/bin/tor", # optional, primarily for windows
)

with tor:
  print(tor.ip)
  print(tor.client.get("https://api.ipify.org").text)


# connect to an existing tor instance

tor = Tor(
    port=9052,
    control_port=9053,
    host="127.0.0.1",
    password="passw0rd",
)

with tor:
  print(tor.ip)
  print(tor.client.get("https://api.ipify.org").text)
  tor.new_identity(wait=True) # get a new identity and wait for it to be ready (new ip)
  print(tor.ip)

CLI

xtor --help

Metadata

Release files for xtor 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xtor 0.4.3
File Size Uploaded
xtor-0.4.3.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xtor 0.4.3
File Interpreter ABI Platform
xtor-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / xtor-0.4.3.tar.gz

Download URL xtor-0.4.3.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4483fd38ae273116263e33364f6da37d16add3c8486c37d2eb2980200c3315e0
BLAKE2b-256 checksum
How to use checksums
cd1a5d276cb0663f1843f4a90cc8ef5251f46f63d925646719947ef06a4b489f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.7.3 Linux/5.15.77-amd64-desktop

Release files / xtor-0.4.3-py3-none-any.whl

Download URL xtor-0.4.3-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c9cf70d786402b417606933fdf72c4bfceabc90efa1f22846f7ba82173db458
BLAKE2b-256 checksum
How to use checksums
455a9c22fa96a01d9e7c6f2c43d4a753cc80ab36c6a446e4424ef2fa40ce5c7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.7.3 Linux/5.15.77-amd64-desktop

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page