All Projects → meejah → Txtorcon

meejah / Txtorcon

Licence: mit
Twisted-based asynchronous Tor control protocol implementation. Includes unit-tests, examples, state-tracking code and configuration abstraction.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Txtorcon

Tor2web
Tor2web is an HTTP proxy software that enables access to Tor Hidden Services by mean of common web browsers
Stars: ✭ 531 (+146.98%)
Mutual labels:  tor, twisted, privacy
Onionbrowser
An open-source, privacy-enhancing web browser for iOS, utilizing the Tor anonymity network
Stars: ✭ 1,702 (+691.63%)
Mutual labels:  tor, privacy
Youtube Local
browser-based client for watching Youtube anonymously and with greater page performance
Stars: ✭ 112 (-47.91%)
Mutual labels:  tor, privacy
Docker Tor Hiddenservice Nginx
Easily setup a hidden service inside the Tor network
Stars: ✭ 145 (-32.56%)
Mutual labels:  tor, privacy
Tinytor
A tiny Tor client implementation (in pure python).
Stars: ✭ 80 (-62.79%)
Mutual labels:  tor, privacy
Onionr
Private Decentralized Communication Network 🎭 🧅
Stars: ✭ 84 (-60.93%)
Mutual labels:  tor, privacy
Unityfx.async
Asynchronous operations (promises) for Unity3d.
Stars: ✭ 143 (-33.49%)
Mutual labels:  async, async-programming
Ffck
🦊 & 🧅 hardening
Stars: ✭ 72 (-66.51%)
Mutual labels:  tor, privacy
Upribox
Usable Privacy Box
Stars: ✭ 153 (-28.84%)
Mutual labels:  tor, privacy
Magicpad
MagicPad is an encryption suite for beginners. It is designed to be run standalone via the browser or executable (Electron).
Stars: ✭ 174 (-19.07%)
Mutual labels:  tor, privacy
Online Privacy Test Resource List
Privacy Online Test and Resource Compendium (POTARC) 🕵🏻
Stars: ✭ 185 (-13.95%)
Mutual labels:  tor, privacy
Wahay
an easy-to-use, secure and decentralized conference call application (this repository is a mirror of an internal work repository)
Stars: ✭ 79 (-63.26%)
Mutual labels:  tor, privacy
Walletwasabi
Open-source, non-custodial, privacy focused Bitcoin wallet for Windows, Linux, and Mac. Built-in Tor, CoinJoin, and coin control features.
Stars: ✭ 1,197 (+456.74%)
Mutual labels:  tor, privacy
Archtorify
Transparent proxy through Tor for Arch Linux OS
Stars: ✭ 100 (-53.49%)
Mutual labels:  tor, privacy
Hiddenvm
HiddenVM — Use any desktop OS without leaving a trace.
Stars: ✭ 1,183 (+450.23%)
Mutual labels:  tor, privacy
Asynquence
Asynchronous flow control (promises, generators, observables, CSP, etc)
Stars: ✭ 1,737 (+707.91%)
Mutual labels:  async, async-programming
Arsenic
Async WebDriver implementation for asyncio and asyncio-compatible frameworks
Stars: ✭ 209 (-2.79%)
Mutual labels:  async, twisted
Nipe
An engine to make Tor network your default gateway
Stars: ✭ 1,032 (+380%)
Mutual labels:  tor, privacy
Nowallet
This project is a secure Bitcoin brainwallet app written in Python.
Stars: ✭ 52 (-75.81%)
Mutual labels:  tor, privacy
Tascalate Concurrent
Implementation of blocking (IO-Bound) cancellable java.util.concurrent.CompletionStage and related extensions to java.util.concurrent.ExecutorService-s
Stars: ✭ 144 (-33.02%)
Mutual labels:  async, async-programming

.. _NOTE: see docs/index.rst for the starting-point .. _ALSO: https://txtorcon.readthedocs.org for rendered docs

.. image:: https://travis-ci.org/meejah/txtorcon.png?branch=main :target: https://www.travis-ci.org/meejah/txtorcon :alt: travis

.. image:: https://coveralls.io/repos/meejah/txtorcon/badge.png :target: https://coveralls.io/r/meejah/txtorcon :alt: coveralls

.. image:: http://codecov.io/github/meejah/txtorcon/coverage.svg?branch=main :target: http://codecov.io/github/meejah/txtorcon?branch=main :alt: codecov

.. image:: https://readthedocs.org/projects/txtorcon/badge/?version=stable :target: https://txtorcon.readthedocs.io/en/stable :alt: ReadTheDocs

.. image:: https://readthedocs.org/projects/txtorcon/badge/?version=latest :target: https://txtorcon.readthedocs.io/en/latest :alt: ReadTheDocs

.. image:: https://landscape.io/github/meejah/txtorcon/main/landscape.svg?style=flat :target: https://landscape.io/github/meejah/txtorcon/main :alt: Code Health

txtorcon

Ten Thousand Feet

txtorcon is an implementation of the control-spec <https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt>_ for Tor <https://www.torproject.org/>_ using the Twisted_ networking library for Python <http://python.org/>_.

This is useful for writing utilities to control or make use of Tor in event-based Python programs. If your Twisted program supports endpoints (like twistd does) your server or client can make use of Tor immediately, with no code changes. Start your own Tor or connect to one and get live stream, circuit, relay updates; read and change config; monitor events; build circuits; create onion services; etcetera (ReadTheDocs <https://txtorcon.readthedocs.org>_).

Some Possibly Motivational Example Code

download <examples/readme.py>_ (also python2 style <examples/readme2.py>_)

.. code:: python

from twisted.internet.task import react
from twisted.internet.defer import inlineCallbacks, ensureDeferred
from twisted.internet.endpoints import UNIXClientEndpoint

import treq
import txtorcon


async def main(reactor):
    tor = await txtorcon.connect(
        reactor,
        UNIXClientEndpoint(reactor, "/var/run/tor/control")
    )

    print("Connected to Tor version {}".format(tor.version))

    url = u'https://www.torproject.org:443'
    print(u"Downloading {}".format(repr(url)))
    resp = await treq.get(url, agent=tor.web_agent())

    print(u"   {} bytes".format(resp.length))
    data = await resp.text()
    print(u"Got {} bytes:\n{}\n[...]{}".format(
        len(data),
        data[:120],
        data[-120:],
    ))

    print(u"Creating a circuit")
    state = await tor.create_state()
    circ = await state.build_circuit()
    await circ.when_built()
    print(u"  path: {}".format(" -> ".join([r.ip for r in circ.path])))

    print(u"Downloading meejah's public key via above circuit...")
    config = await tor.get_config()
    resp = await treq.get(
        u'https://meejah.ca/meejah.asc',
        agent=circ.web_agent(reactor, config.socks_endpoint(reactor)),
    )
    data = await resp.text()
    print(data)


@react
def _main(reactor):
    return ensureDeferred(main(reactor))

Try It Now On Debian/Ubuntu

For example, serve some files via an onion service (aka hidden service):

.. code-block:: shell-session

$ sudo apt-get install --install-suggests python3-txtorcon
$ twistd -n web --port "onion:80" --path ~/public_html

Read More

All the documentation starts in docs/index.rst <docs/index.rst>. Also hosted at txtorcon.rtfd.org <https://txtorcon.readthedocs.io/en/latest/>.

You'll want to start with the introductions <docs/introduction.rst>_ (hosted at RTD <https://txtorcon.readthedocs.org/en/latest/introduction.html>_).

.. _Twisted: https://twistedmatrix.com/trac

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].