Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sml2h3/pytorctl
My TorCtl repository
https://github.com/sml2h3/pytorctl
Last synced: about 1 month ago
JSON representation
My TorCtl repository
- Host: GitHub
- URL: https://github.com/sml2h3/pytorctl
- Owner: sml2h3
- License: other
- Created: 2016-12-29T20:13:47.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2012-03-03T21:40:29.000Z (over 12 years ago)
- Last Synced: 2023-03-04T15:38:41.956Z (over 1 year ago)
- Language: Python
- Homepage: http://inspirated.com/
- Size: 301 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
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
# pydoc PathSupport
# pydoc StatsSupportThere is a minimalistic example of usage of the basic TorCtl.Connection
and TorCtl.EventHandler in run_example() in TorCtl.py in this directory.
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