Giter VIP home page Giter VIP logo

pytorctl's Introduction

                         TorCtl Python Bindings


TorCtl is a python Tor controller with extensions to support path
building and various constraints on node and path selection, as well as
statistics gathering.

Apps can hook into the TorCtl package at whatever level they wish.

The lowest level of interaction is to use the TorCtl module
(TorCtl/TorCtl.py). Typically this is done by importing TorCtl.TorCtl
and creating a TorCtl.Connection and extending from TorCtl.EventHandler.
This class receives Tor controller events packaged into python classes
from a TorCtl.Connection.

The next level up is to use the TorCtl.PathSupport module. This is done
by importing TorCtl.PathSupport and instantiating or extending from
PathSupport.PathBuilder, which itself extends from TorCtl.EventHandler.
This class handles circuit construction and stream attachment subject to
policies defined by PathSupport.NodeRestrictor and
PathSupport.PathRestrictor implementations.

If you are interested in gathering statistics, you can instead
instantiate or extend from StatsSupport.StatsHandler, which is
again an event handler with hooks to record statistics on circuit
creation, stream bandwidth, and circuit failure information.

All of these modules are pydoced. For more detailed information than
the above overview, you can do:

# pydoc TorCtl.TorCtl
# pydoc TorCtl.PathSupport
# pydoc TorCtl.StatsSupport

There is a minimalistic example of usage of the basic TorCtl.Connection
and TorCtl.EventHandler in run_example() in TorCtl/TorCtl.py.
Other components also have unit tests at the end of their source files.

For more extensive examples of the PathSupport and StatsSupport
interfaces, see the TorFlow project at git url:

git clone git://git.torproject.org/git/torflow.git

pytorctl's People

Contributors

aaronsw avatar atagar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.