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

Download files

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

Source Distribution

xtor-0.4.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xtor-0.4.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file xtor-0.4.3.tar.gz.

File metadata

  • Download URL: xtor-0.4.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.7.3 Linux/5.15.77-amd64-desktop

File hashes

Hashes for xtor-0.4.3.tar.gz
Algorithm Hash digest
SHA256 4483fd38ae273116263e33364f6da37d16add3c8486c37d2eb2980200c3315e0
MD5 750a9ddef39728adc67eb45e3afefbc5
BLAKE2b-256 cd1a5d276cb0663f1843f4a90cc8ef5251f46f63d925646719947ef06a4b489f

See more details on using hashes here.

File details

Details for the file xtor-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: xtor-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.7.3 Linux/5.15.77-amd64-desktop

File hashes

Hashes for xtor-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3c9cf70d786402b417606933fdf72c4bfceabc90efa1f22846f7ba82173db458
MD5 fdd6c64089a98e80a0125b8f521ae034
BLAKE2b-256 455a9c22fa96a01d9e7c6f2c43d4a753cc80ab36c6a446e4424ef2fa40ce5c7f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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