Skip to main content

ptadapter

ptadapter is a Python 3 package that interfaces with Pluggable Transports.

Pluggable Transports (PT) are originally created for Tor as a modular, interchangeable (pluggable) method of tunneling and obfuscating network traffic (transport). This design makes PTs useful not only for Tor, but many other use cases where traffic obfuscation is desired. Learn more about Pluggable Transports at the dedicated website, https://www.pluggabletransports.info/

This package implements Version 1 of the Pluggable Transport specifications (relevant specs can be found in the specifications directory). Version 2 of the specs is in development: refer to the website linked above for progress.

(This package also implements Tor's Extended ORPort protocol, which can be optionally used to receive server connections from PTs.)

This package REQUIRES Python 3.7 or higher. It has no 3rd-party dependencies.

What's Included

This package implements several Python classes that execute and communicate with a PT subprocess, allowing connections to be made through the PT as a client, or received as a server. The code is built on top of asyncio, and uses the familiar StreamReader and StreamWriter for connections.

Also included is a ready-made tool that can run PTs as a standalone tunnel. No coding is necessary to use this.

What's Required

  • Python 3.7 or above.
  • The Pluggable Transport to be used, as an executable program. This may be installed from the repository, built from source, extracted from the Tor Browser Bundle, etc.

How to get this package

This package is now uploaded to PyPI, so install it the usual way:

pip install ptadapter

If you don't want to install, you could also clone this repository or download a source package, and put the ptadapter directory in the working directory or somewhere in your PYTHONPATH.

How to use PTs in you own Python program

Start with the Developer Guide page in the Documentation.

How to create a standalone PT tunnel

If the package is installed via pip, an entry script called ptadapter is created, so run the command below to see usage:

ptadapter --help

Otherwise, run:

python -m ptadapter --help

A configuration file should be provided to the script. The console script guide page in the Documentation includes an example config file with detailed comments; the example config file can also be found in this repository.

Metadata

Release files for ptadapter 3.0.1

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

Source distribution (sdist)

Source distribution for ptadapter 3.0.1
File Size Uploaded Provenance
ptadapter-3.0.1.tar.gz 32.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 65.9 kB

Release files / ptadapter-3.0.1.tar.gz

Download URL ptadapter-3.0.1.tar.gz
Size 32.2 kB
Tags Source
SHA-256 checksum
How to use checksums
910d6e102726f005ae0d073f1acc2905bab5a0d3e6b43cecb86a3834fae0fd78
BLAKE2b-256 checksum
How to use checksums
f8aacab2742d759e3e7205b9627f1cc3912d47dc920b0a73c2d29acde53dad5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / ptadapter-3.0.1-py3-none-any.whl

Download URL ptadapter-3.0.1-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a00b578552f6fb9e141f551ef01a98258ad80220a2757b9e28597f851fe80a5
BLAKE2b-256 checksum
How to use checksums
e7da2c65d9148afd577b8e54eb825e3fedf6e049d0e08c993f88704e97a41095
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Security for ptadapter 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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