[Pkg-privacy-commits] [txtorcon] 45/49: Imported Upstream version 0.14.0
Ximin Luo
infinity0 at debian.org
Mon Oct 19 13:49:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository txtorcon.
commit 72cd485118040c776c1ee12262be566cc2e2fe15
Merge: b1015c5 1bae6f4
Author: Ximin Luo <infinity0 at debian.org>
Date: Mon Oct 19 15:17:16 2015 +0200
Imported Upstream version 0.14.0
Makefile | 8 +-
PKG-INFO | 74 ++++--------
README.rst | 69 ++++-------
dev-requirements.txt | 1 -
docs/examples.rst | 17 +++
docs/index.rst | 2 +-
docs/releases.rst | 25 +++-
examples/list_circuits.py | 13 ++-
examples/redirect_streams.py | 56 +++++++++
examples/stem_relay_descriptor.py | 38 ++++++
requirements.txt | 1 +
setup.py | 39 +++----
test/test_endpoints.py | 166 +++++++++++++++++++++++++-
test/test_torconfig.py | 2 +-
test/test_torcontrolprotocol.py | 54 ++++++++-
test/test_torinfo.py | 3 +
test/test_torstate.py | 26 ++++-
twisted/plugins/txtorcon_endpoint_parser.py | 1 +
txtorcon.egg-info/PKG-INFO | 74 ++++--------
txtorcon.egg-info/SOURCES.txt | 4 +
txtorcon.egg-info/pbr.json | 1 +
txtorcon.egg-info/requires.txt | 16 +++
txtorcon/__init__.py | 16 ++-
txtorcon/_metadata.py | 6 +
txtorcon/addrmap.py | 7 ++
txtorcon/circuit.py | 19 ++-
txtorcon/endpoints.py | 174 +++++++++++++++++++++++++++-
txtorcon/interface.py | 19 +--
txtorcon/log.py | 7 ++
txtorcon/router.py | 15 ++-
txtorcon/spaghetti.py | 6 +
txtorcon/stream.py | 7 ++
txtorcon/torconfig.py | 36 +++---
txtorcon/torcontrolprotocol.py | 54 +++++----
txtorcon/torinfo.py | 23 ++--
txtorcon/torstate.py | 133 +++++++++++++--------
txtorcon/util.py | 23 +++-
37 files changed, 925 insertions(+), 310 deletions(-)
diff --cc Makefile
index 8e19757,bc7354c..56c8c4e
--- a/Makefile
+++ b/Makefile
@@@ -87,7 -87,7 +87,7 @@@ dist: dist/txtorcon-${VERSION}-py2-none
dist-sigs: dist/txtorcon-${VERSION}-py2-none-any.whl.asc dist/txtorcon-${VERSION}.tar.gz.asc
--sdist: setup.py
++sdist: setup.py
python setup.py sdist
dist/txtorcon-${VERSION}-py2-none-any.whl:
@@@ -100,6 -100,6 +100,10 @@@ dist/txtorcon-${VERSION}.tar.gz.asc: di
gpg --verify dist/txtorcon-${VERSION}.tar.gz.asc || gpg --no-version --detach-sign --armor --local-user meejah at meejah.ca dist/txtorcon-${VERSION}.tar.gz
release:
++ # XXXXXX FIXME warner in #tahoe-lafs says this doesn't work if
++ # you have "dist/blarg.asc" files for some reason .. but I
++ # think it's worked for me before?
++ # https://github.com/pypa/twine/issues/132
twine upload -r pypi -c "txtorcon v${VERSION} tarball" dist/txtorcon-${VERSION}.tar.gz dist/txtorcon-${VERSION}.tar.gz.asc
twine upload -r pypi -c "txtorcon v${VERSION} wheel" dist/txtorcon-${VERSION}-py2-none-any.whl dist/txtorcon-${VERSION}-py2-none-any.whl.asc
diff --cc PKG-INFO
index 9cd2ccb,0000000..2581e2d
mode 100644,000000..100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@@ -1,277 -1,0 +1,251 @@@
+Metadata-Version: 1.1
+Name: txtorcon
- Version: 0.13.0
++Version: 0.14.0
+Summary: Twisted-based Tor controller client, with state-tracking and configuration abstractions.
+Home-page: https://github.com/meejah/txtorcon
+Author: meejah
+Author-email: meejah at meejah.ca
+License: MIT
+Description: README
+ ======
+
+ Documentation at https://txtorcon.readthedocs.org
+
+ .. image:: https://travis-ci.org/meejah/txtorcon.png?branch=master
+ :target: https://www.travis-ci.org/meejah/txtorcon
+
+ .. image:: https://coveralls.io/repos/meejah/txtorcon/badge.png
+ :target: https://coveralls.io/r/meejah/txtorcon
+
+ .. image:: http://api.flattr.com/button/flattr-badge-large.png
+ :target: http://flattr.com/thing/1689502/meejahtxtorcon-on-GitHub
+
+
+ quick start
+ -----------
+
+ For the impatient, there are two quick ways to install this::
+
+ $ pip install txtorcon
+
+ ... or, if you checked out or downloaded the source::
+
+ $ python setup.py install
+
++ ... or, better yet, use a virtualenv and the dev requirements::
++
++ $ virtualenv venv
++ $ ./venv/bin/pip install -e .[dev]
++
++ For OSX, we can install txtorcon with the help of easy_install::
++
++ $ easy_install txtorcon
++
+ To avoid installing, you can just add the base of the source to your
+ PYTHONPATH::
+
+ $ export PYTHONPATH=`pwd`:$PYTHONPATH
+
+ Then, you will want to explore the examples. Try "python
+ examples/stream\_circuit\_logger.py" for instance.
+
+ On Debian testing (jessie), or with wheezy-backports (big thanks to
+ Lunar^ for all his packaging work) you can install easily::
+
+ $ apt-get install python-txtorcon
+
+ You may also like `this asciinema demo <http://asciinema.org/a/5654>`_
+ for an overview.
+
+ Tor configuration
+ -----------------
+
+ You'll want to have the following options on in your ``torrc``::
+
+ CookieAuthentication 1
+ CookieAuthFileGroupReadable 1
+
+ If you want to use unix sockets to speak to tor::
+
+ ControlSocketsGroupWritable 1
+ ControlSocket /var/run/tor/control
+
+ The defaults used by py:meth:`txtorcon.build_local_tor_connection` will
+ find a Tor on ``9051`` or ``/var/run/tor/control``
+
+
+ overview
+ --------
+
+ txtorcon is a Twisted-based asynchronous Tor control protocol
+ implementation. Twisted is an event-driven networking engine written
+ in Python and Tor is an onion-routing network designed to improve
+ people's privacy and anonymity on the Internet.
+
+ The main abstraction of this library is txtorcon.TorControlProtocol
+ which presents an asynchronous API to speak the Tor client protocol in
+ Python. txtorcon also provides abstractions to track and get updates
+ about Tor's state (txtorcon.TorState) and current configuration
+ (including writing it to Tor or disk) in txtorcon.TorConfig, along
+ with helpers to asynchronously launch slave instances of Tor including
+ Twisted endpoint support.
+
+ txtorcon runs all tests cleanly on:
+
+ - Debian "squeeze", "wheezy" and "jessie"
+ - OS X 10.4 (naif)
+ - OS X 10.8 (lukas lueg)
+ - OS X 10.9 (kurt neufeld)
+ - Fedora 18 (lukas lueg)
+ - FreeBSD 10 (enrique fynn) (**needed to install "lsof"**)
+ - RHEL6
+ - Reports from other OSes appreciated.
+
+ If instead you want a synchronous (threaded) Python controller
+ library, check out Stem at https://stem.torproject.org/
+
++
+ quick implementation overview
+ -----------------------------
+
+ txtorcon provides a class to track Tor's current state -- such as
+ details about routers, circuits and streams -- called
+ txtorcon.TorState and an abstraction to the configuration values via
+ txtorcon.TorConfig which provides attribute-style accessors to Tor's
+ state (including making changes). txtorcon.TorState provides
+ txtorcon.Router, txtorcon.Circuit and txtorcon.Stream objects which
+ implement a listener interface so client code may receive updates (in
+ real time) including Tor events.
+
- txtorcon uses **trial for unit-tests** and has 96% test-coverage --
++ txtorcon uses **trial for unit-tests** and has 100% test-coverage --
+ which is not to say I've covered all the cases, but nearly all of the
+ code is at least exercised somehow by the unit tests.
+
- Tor itself is not required to be running for any of the tests. There are
- no integration tests. ohcount claims around 2000 lines of code for the
- core bit; around 4000 including tests. About 37% comments in the
- not-test code.
++ Tor itself is not required to be running for any of the tests. ohcount
++ claims around 2000 lines of code for the core bit; around 4000
++ including tests. About 37% comments in the not-test code.
++
++ There are a few simple integration tests, based on Docker. More are
++ always welcome!
++
+
+ dependencies / requirements
+ ---------------------------
+
+ - `twisted <http://twistedmatrix.com>`_: txtorcon should work with any
- Twisted 11.1.0 or newer. I am working against Twisted 13.2.0 on
- Debian with Python 2.7.6. Twisted 12 works fine as well. Twisted
- does not yet support Python 3.
++ Twisted 11.1.0 or newer. Twisted 15.4.0+ works with Python3, and so
++ does txtorcon (if you find something broken on Py3 please file a bug).
+
+ - `GeoIP <https://www.maxmind.com/app/python>`_: **optional** provides location
+ information for ip addresses; you will want to download GeoLite City
+ from `MaxMind <https://www.maxmind.com/app/geolitecity>`_ or pay them
+ for more accuracy. Or use tor-geoip, which makes this sort-of
+ optional, in that we'll query Tor for the IP if the GeoIP database
+ doesn't have an answer. It also does ASN lookups if you installed that MaxMind database.
+
+ - `python-ipaddr <http://code.google.com/p/ipaddr-py/>`_: **optional**.
+ Google's IP address manipulation code.
+
+ - development: `Sphinx <http://sphinx.pocoo.org/>`_ if you want to build the
+ documentation. In that case you'll also need something called
+ ``python-repoze.sphinx.autointerface`` (at least in Debian) to build
+ the Interface-derived docs properly.
+
+ - development: `coverage <http://nedbatchelder.com/code/coverage/>`_ to
- run the code-coverage metrics
++ run the code-coverage metrics, and Tox
+
+ - optional: GraphViz is used in the tests (and to generate state-machine
+ diagrams, if you like) but those tests are skipped if "dot" isn't
+ in your path
+
+ .. BEGIN_INSTALL
+
+ In any case, on a `Debian <http://www.debian.org/>`_ wheezy, squeeze or
+ Ubuntu system, this should work::
+
+ apt-get install -y python-setuptools python-twisted python-ipaddr python-geoip graphviz tor
+ apt-get install -y python-sphinx python-repoze.sphinx.autointerface python-coverage # for development
+
+ .. END_INSTALL
+
+ Using pip this would be::
+
+ pip install Twisted ipaddr pygeoip
+ pip install GeoIP Sphinx repoze.sphinx.autointerface coverage # for development
+
+ or::
+
+ pip install -r requirements.txt
+ pip install -r dev-requirements.txt
+
+ or for the bare minimum::
+
+ pip install Twisted # will install zope.interface too
+
++
+ documentation
+ -------------
+
+ It is likely that you will need to read at least some of
+ `control-spec.txt <https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt>`_
+ from the torspec git repository so you know what's being abstracted by
+ this library.
+
+ Run "make doc" to build the Sphinx documentation locally, or rely on
+ ReadTheDocs https://txtorcon.readthedocs.org which builds each tagged
+ release and the latest master.
+
+ There is also a directory of examples/ scripts, which have inline
- documentation explaining their use. You may also use pydoc::
-
- pydoc txtorcon.TorControlProtocol
- pydoc txtorcon.TorState
- pydoc txtorcon.TorConfig
-
- ...for the main classes. If you're using TorState, you will also be
- interested in the support classes for it::
-
- pydoc txtorcon.Circuit
- pydoc txtorcon.Stream
- pydoc txtorcon.Router
- pydoc txtorcon.AddrMap
-
- There are also Zope interfaces for some things, if you wish to listen
- for events for your own purposes (the best example of the use of these
- being TorState itself)::
-
- txtorcon.ITorControlProtocol
- txtorcon.IStreamAttacher
- txtorcon.ICircuitListener
- txtorcon.IStreamListener
-
- For launching Tor and Twisted integration, you will want to look at::
-
- txtorcon.launch_tor (in torconfig.py)
- txtorcon.TCPHiddenServiceEndpoint (in torconfig.py)
- txtorcon.TorProtocolFactory (in torcontrolprotocol.py)
- txtorcon.build_tor_connection (in torstate.py)
- txtorcon.build_local_tor_connection (in torstate.py)
-
- IStreamAttacher affects Tor's behaviour, allowing one to customize how
- circuits for particular streams are selected. You can build your own
- circuits via ITorControlProtocol.build\_circuit(). There is an example
- of this called custom\_stream\_attacher.py which builds (or uses)
- circuits exiting in the same country as the address to which the
- stream is connecting.
++ documentation explaining their use.
+
+
+ contact information
+ -------------------
+
+ For novelty value, the Web site (with built documentation and so forth)
+ can be viewed via Tor at http://timaq4ygg2iegci7.onion although the
+ code itself is hosted via git::
+
+ torsocks git clone git://timaq4ygg2iegci7.onion/txtorcon.git
+
+ or::
+
+ git clone git://github.com/meejah/txtorcon.git
+
+ You may contact me via ``meejah at meejah dot ca`` with GPG key
+ `0xC2602803128069A7
+ <http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2602803128069A7>`_
+ or see ``meejah.asc`` in the repository. The fingerprint is ``9D5A
+ 2BD5 688E CB88 9DEB CD3F C260 2803 1280 69A7``.
+
+ It is often possible to contact me as ``meejah`` in #tor-dev on `OFTC
+ <http://www.oftc.net/oftc/>`_ but be patient for replies (I do look at
+ scrollback, so putting "meejah: " in front will alert my client).
+
+ More conventionally, you may get the code at GitHub and documentation
+ via ReadTheDocs:
+
+ - https://github.com/meejah/txtorcon
+ - https://txtorcon.readthedocs.org
+
+ Please do **use the GitHub issue-tracker** to report bugs. Patches,
+ pull-requests, comments and criticisms are all welcomed and
+ appreciated.
+
+Keywords: python,twisted,tor,tor controller
+Platform: UNKNOWN
+Classifier: Framework :: Twisted
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Natural Language :: English
+Classifier: Operating System :: POSIX :: Linux
+Classifier: Operating System :: Unix
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Internet :: Proxy Servers
+Classifier: Topic :: Internet
+Classifier: Topic :: Security
- Requires: Twisted (>=11.1.0)
- Requires: ipaddr (>=2.1.10)
- Requires: zope.interface (>=3.6.1)
diff --cc examples/list_circuits.py
index 3fcec1e,0000000..56f0860
mode 100644,000000..100644
--- a/examples/list_circuits.py
+++ b/examples/list_circuits.py
@@@ -1,20 -1,0 +1,25 @@@
+#!/usr/bin/env python
+
+from twisted.internet.task import react
+from twisted.internet.defer import inlineCallbacks
+import txtorcon
+
- from guppy import hpy
-
+
+ at inlineCallbacks
+def main(reactor):
+ state = yield txtorcon.build_local_tor_connection(reactor)
+ for circuit in state.circuits.values():
+ first_relay = circuit.path[0]
+ print "Circuit {} first hop: {}".format(circuit.id, first_relay.ip)
- print "heap:"
- print hpy().heap()
++# x = yield state.protocol.get_info('desc/id/B69D45E2AC49A81E014425FF6E07C7435C9F89B0')
++# x = yield state.protocol.get_info('desc/id/EAA0E6A2CD95F5AFF46CDF042623DE79C19E028A')
++ x = yield state.protocol.get_info('desc/id/EAA0E6A2CD95F5AFF46CDF042623DE79C19E028A')
++ print x
++
++ if False:
++ from guppy import hpy
++ print "heap:"
++ print hpy().heap()
+
+if __name__ == '__main__':
+ react(main)
diff --cc examples/redirect_streams.py
index 0000000,0000000..94e7e60
new file mode 100644
--- /dev/null
+++ b/examples/redirect_streams.py
@@@ -1,0 -1,0 +1,56 @@@
++#!/usr/bin/env python
++
++from twisted.python import log
++from twisted.internet import reactor, defer
++from zope.interface import implements
++
++import txtorcon
++
++
++class MyAttacher(object):
++ implements(txtorcon.IStreamAttacher)
++
++ def __init__(self, state):
++ # pointer to our TorState object
++ self.state = state
++
++ @defer.inlineCallbacks
++ def attach_stream(self, stream, circuits):
++ """
++ IStreamAttacher API
++ """
++
++ print "XXXX", stream
++ x = yield self.state.protocol.queue_command('REDIRECTSTREAM %s timaq4ygg2iegci7.onion' % stream.id)
++ print "X", x
++
++ defer.returnValue(None)
++# x = yield self.state.protocol.queue_command('ATTACHSTREAM %s 0' % stream.id)
++# print "X", x
++
++
++def do_setup(state):
++ print "Connected to a Tor version", state.protocol.version
++
++ attacher = MyAttacher(state)
++ state.set_attacher(attacher, reactor)
++
++ print "Existing state when we connected:"
++ print "Streams:"
++ for s in state.streams.values():
++ print ' ', s
++
++ print
++ print "General-purpose circuits:"
++ for c in filter(lambda x: x.purpose == 'GENERAL', state.circuits.values()):
++ print ' ', c.id, '->'.join(map(lambda x: x.location.countrycode,
++ c.path))
++
++
++def setup_failed(arg):
++ print "SETUP FAILED", arg
++ reactor.stop()
++
++d = txtorcon.build_local_tor_connection(reactor)
++d.addCallback(do_setup).addErrback(setup_failed)
++reactor.run()
diff --cc txtorcon.egg-info/PKG-INFO
index 9cd2ccb,0000000..2581e2d
mode 100644,000000..100644
--- a/txtorcon.egg-info/PKG-INFO
+++ b/txtorcon.egg-info/PKG-INFO
@@@ -1,277 -1,0 +1,251 @@@
+Metadata-Version: 1.1
+Name: txtorcon
- Version: 0.13.0
++Version: 0.14.0
+Summary: Twisted-based Tor controller client, with state-tracking and configuration abstractions.
+Home-page: https://github.com/meejah/txtorcon
+Author: meejah
+Author-email: meejah at meejah.ca
+License: MIT
+Description: README
+ ======
+
+ Documentation at https://txtorcon.readthedocs.org
+
+ .. image:: https://travis-ci.org/meejah/txtorcon.png?branch=master
+ :target: https://www.travis-ci.org/meejah/txtorcon
+
+ .. image:: https://coveralls.io/repos/meejah/txtorcon/badge.png
+ :target: https://coveralls.io/r/meejah/txtorcon
+
+ .. image:: http://api.flattr.com/button/flattr-badge-large.png
+ :target: http://flattr.com/thing/1689502/meejahtxtorcon-on-GitHub
+
+
+ quick start
+ -----------
+
+ For the impatient, there are two quick ways to install this::
+
+ $ pip install txtorcon
+
+ ... or, if you checked out or downloaded the source::
+
+ $ python setup.py install
+
++ ... or, better yet, use a virtualenv and the dev requirements::
++
++ $ virtualenv venv
++ $ ./venv/bin/pip install -e .[dev]
++
++ For OSX, we can install txtorcon with the help of easy_install::
++
++ $ easy_install txtorcon
++
+ To avoid installing, you can just add the base of the source to your
+ PYTHONPATH::
+
+ $ export PYTHONPATH=`pwd`:$PYTHONPATH
+
+ Then, you will want to explore the examples. Try "python
+ examples/stream\_circuit\_logger.py" for instance.
+
+ On Debian testing (jessie), or with wheezy-backports (big thanks to
+ Lunar^ for all his packaging work) you can install easily::
+
+ $ apt-get install python-txtorcon
+
+ You may also like `this asciinema demo <http://asciinema.org/a/5654>`_
+ for an overview.
+
+ Tor configuration
+ -----------------
+
+ You'll want to have the following options on in your ``torrc``::
+
+ CookieAuthentication 1
+ CookieAuthFileGroupReadable 1
+
+ If you want to use unix sockets to speak to tor::
+
+ ControlSocketsGroupWritable 1
+ ControlSocket /var/run/tor/control
+
+ The defaults used by py:meth:`txtorcon.build_local_tor_connection` will
+ find a Tor on ``9051`` or ``/var/run/tor/control``
+
+
+ overview
+ --------
+
+ txtorcon is a Twisted-based asynchronous Tor control protocol
+ implementation. Twisted is an event-driven networking engine written
+ in Python and Tor is an onion-routing network designed to improve
+ people's privacy and anonymity on the Internet.
+
+ The main abstraction of this library is txtorcon.TorControlProtocol
+ which presents an asynchronous API to speak the Tor client protocol in
+ Python. txtorcon also provides abstractions to track and get updates
+ about Tor's state (txtorcon.TorState) and current configuration
+ (including writing it to Tor or disk) in txtorcon.TorConfig, along
+ with helpers to asynchronously launch slave instances of Tor including
+ Twisted endpoint support.
+
+ txtorcon runs all tests cleanly on:
+
+ - Debian "squeeze", "wheezy" and "jessie"
+ - OS X 10.4 (naif)
+ - OS X 10.8 (lukas lueg)
+ - OS X 10.9 (kurt neufeld)
+ - Fedora 18 (lukas lueg)
+ - FreeBSD 10 (enrique fynn) (**needed to install "lsof"**)
+ - RHEL6
+ - Reports from other OSes appreciated.
+
+ If instead you want a synchronous (threaded) Python controller
+ library, check out Stem at https://stem.torproject.org/
+
++
+ quick implementation overview
+ -----------------------------
+
+ txtorcon provides a class to track Tor's current state -- such as
+ details about routers, circuits and streams -- called
+ txtorcon.TorState and an abstraction to the configuration values via
+ txtorcon.TorConfig which provides attribute-style accessors to Tor's
+ state (including making changes). txtorcon.TorState provides
+ txtorcon.Router, txtorcon.Circuit and txtorcon.Stream objects which
+ implement a listener interface so client code may receive updates (in
+ real time) including Tor events.
+
- txtorcon uses **trial for unit-tests** and has 96% test-coverage --
++ txtorcon uses **trial for unit-tests** and has 100% test-coverage --
+ which is not to say I've covered all the cases, but nearly all of the
+ code is at least exercised somehow by the unit tests.
+
- Tor itself is not required to be running for any of the tests. There are
- no integration tests. ohcount claims around 2000 lines of code for the
- core bit; around 4000 including tests. About 37% comments in the
- not-test code.
++ Tor itself is not required to be running for any of the tests. ohcount
++ claims around 2000 lines of code for the core bit; around 4000
++ including tests. About 37% comments in the not-test code.
++
++ There are a few simple integration tests, based on Docker. More are
++ always welcome!
++
+
+ dependencies / requirements
+ ---------------------------
+
+ - `twisted <http://twistedmatrix.com>`_: txtorcon should work with any
- Twisted 11.1.0 or newer. I am working against Twisted 13.2.0 on
- Debian with Python 2.7.6. Twisted 12 works fine as well. Twisted
- does not yet support Python 3.
++ Twisted 11.1.0 or newer. Twisted 15.4.0+ works with Python3, and so
++ does txtorcon (if you find something broken on Py3 please file a bug).
+
+ - `GeoIP <https://www.maxmind.com/app/python>`_: **optional** provides location
+ information for ip addresses; you will want to download GeoLite City
+ from `MaxMind <https://www.maxmind.com/app/geolitecity>`_ or pay them
+ for more accuracy. Or use tor-geoip, which makes this sort-of
+ optional, in that we'll query Tor for the IP if the GeoIP database
+ doesn't have an answer. It also does ASN lookups if you installed that MaxMind database.
+
+ - `python-ipaddr <http://code.google.com/p/ipaddr-py/>`_: **optional**.
+ Google's IP address manipulation code.
+
+ - development: `Sphinx <http://sphinx.pocoo.org/>`_ if you want to build the
+ documentation. In that case you'll also need something called
+ ``python-repoze.sphinx.autointerface`` (at least in Debian) to build
+ the Interface-derived docs properly.
+
+ - development: `coverage <http://nedbatchelder.com/code/coverage/>`_ to
- run the code-coverage metrics
++ run the code-coverage metrics, and Tox
+
+ - optional: GraphViz is used in the tests (and to generate state-machine
+ diagrams, if you like) but those tests are skipped if "dot" isn't
+ in your path
+
+ .. BEGIN_INSTALL
+
+ In any case, on a `Debian <http://www.debian.org/>`_ wheezy, squeeze or
+ Ubuntu system, this should work::
+
+ apt-get install -y python-setuptools python-twisted python-ipaddr python-geoip graphviz tor
+ apt-get install -y python-sphinx python-repoze.sphinx.autointerface python-coverage # for development
+
+ .. END_INSTALL
+
+ Using pip this would be::
+
+ pip install Twisted ipaddr pygeoip
+ pip install GeoIP Sphinx repoze.sphinx.autointerface coverage # for development
+
+ or::
+
+ pip install -r requirements.txt
+ pip install -r dev-requirements.txt
+
+ or for the bare minimum::
+
+ pip install Twisted # will install zope.interface too
+
++
+ documentation
+ -------------
+
+ It is likely that you will need to read at least some of
+ `control-spec.txt <https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt>`_
+ from the torspec git repository so you know what's being abstracted by
+ this library.
+
+ Run "make doc" to build the Sphinx documentation locally, or rely on
+ ReadTheDocs https://txtorcon.readthedocs.org which builds each tagged
+ release and the latest master.
+
+ There is also a directory of examples/ scripts, which have inline
- documentation explaining their use. You may also use pydoc::
-
- pydoc txtorcon.TorControlProtocol
- pydoc txtorcon.TorState
- pydoc txtorcon.TorConfig
-
- ...for the main classes. If you're using TorState, you will also be
- interested in the support classes for it::
-
- pydoc txtorcon.Circuit
- pydoc txtorcon.Stream
- pydoc txtorcon.Router
- pydoc txtorcon.AddrMap
-
- There are also Zope interfaces for some things, if you wish to listen
- for events for your own purposes (the best example of the use of these
- being TorState itself)::
-
- txtorcon.ITorControlProtocol
- txtorcon.IStreamAttacher
- txtorcon.ICircuitListener
- txtorcon.IStreamListener
-
- For launching Tor and Twisted integration, you will want to look at::
-
- txtorcon.launch_tor (in torconfig.py)
- txtorcon.TCPHiddenServiceEndpoint (in torconfig.py)
- txtorcon.TorProtocolFactory (in torcontrolprotocol.py)
- txtorcon.build_tor_connection (in torstate.py)
- txtorcon.build_local_tor_connection (in torstate.py)
-
- IStreamAttacher affects Tor's behaviour, allowing one to customize how
- circuits for particular streams are selected. You can build your own
- circuits via ITorControlProtocol.build\_circuit(). There is an example
- of this called custom\_stream\_attacher.py which builds (or uses)
- circuits exiting in the same country as the address to which the
- stream is connecting.
++ documentation explaining their use.
+
+
+ contact information
+ -------------------
+
+ For novelty value, the Web site (with built documentation and so forth)
+ can be viewed via Tor at http://timaq4ygg2iegci7.onion although the
+ code itself is hosted via git::
+
+ torsocks git clone git://timaq4ygg2iegci7.onion/txtorcon.git
+
+ or::
+
+ git clone git://github.com/meejah/txtorcon.git
+
+ You may contact me via ``meejah at meejah dot ca`` with GPG key
+ `0xC2602803128069A7
+ <http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2602803128069A7>`_
+ or see ``meejah.asc`` in the repository. The fingerprint is ``9D5A
+ 2BD5 688E CB88 9DEB CD3F C260 2803 1280 69A7``.
+
+ It is often possible to contact me as ``meejah`` in #tor-dev on `OFTC
+ <http://www.oftc.net/oftc/>`_ but be patient for replies (I do look at
+ scrollback, so putting "meejah: " in front will alert my client).
+
+ More conventionally, you may get the code at GitHub and documentation
+ via ReadTheDocs:
+
+ - https://github.com/meejah/txtorcon
+ - https://txtorcon.readthedocs.org
+
+ Please do **use the GitHub issue-tracker** to report bugs. Patches,
+ pull-requests, comments and criticisms are all welcomed and
+ appreciated.
+
+Keywords: python,twisted,tor,tor controller
+Platform: UNKNOWN
+Classifier: Framework :: Twisted
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Natural Language :: English
+Classifier: Operating System :: POSIX :: Linux
+Classifier: Operating System :: Unix
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Internet :: Proxy Servers
+Classifier: Topic :: Internet
+Classifier: Topic :: Security
- Requires: Twisted (>=11.1.0)
- Requires: ipaddr (>=2.1.10)
- Requires: zope.interface (>=3.6.1)
diff --cc txtorcon.egg-info/SOURCES.txt
index 2334e50,0000000..0fa2460
mode 100644,000000..100644
--- a/txtorcon.egg-info/SOURCES.txt
+++ b/txtorcon.egg-info/SOURCES.txt
@@@ -1,106 -1,0 +1,110 @@@
+INSTALL
+LICENSE
+MANIFEST.in
+Makefile
+README.rst
+TODO
+dev-requirements.txt
+meejah.asc
+requirements.txt
+setup.py
+docs/Makefile
+docs/README.rst
+docs/apilinks_sphinxext.py
+docs/conf.py
+docs/examples.rst
+docs/howtos.rst
+docs/index.rst
+docs/introduction.rst
+docs/release-checklist.rst
+docs/releases.rst
+docs/txtorcon-config.rst
+docs/txtorcon-endpoints.rst
+docs/txtorcon-interface.rst
+docs/txtorcon-launching.rst
+docs/txtorcon-protocol.rst
+docs/txtorcon-state.rst
+docs/txtorcon-util.rst
+docs/txtorcon.rst
+docs/walkthrough.rst
+docs/_static/avatar.png
+docs/_static/haiku.css
+docs/_static/logo.png
+docs/_static/logo.svg
+docs/_themes/README
+docs/_themes/alabaster/__init__.py
+docs/_themes/alabaster/_version.py
+docs/_themes/alabaster/about.html
+docs/_themes/alabaster/donate.html
+docs/_themes/alabaster/layout.html
+docs/_themes/alabaster/navigation.html
+docs/_themes/alabaster/support.py
+docs/_themes/alabaster/theme.conf
+docs/_themes/alabaster/static/alabaster.css_t
+docs/_themes/alabaster/static/pygments.css
+examples/attach_streams_by_country.py
+examples/circuit_failure_rates.py
+examples/circuit_for_next_stream.py
+examples/disallow_streams_by_port.py
+examples/dump_config.py
+examples/hello_darkweb.py
+examples/hidden-service-systemd.service
+examples/hidden_echo.py
+examples/launch_tor.py
+examples/launch_tor2web.py
+examples/launch_tor_endpoint.py
+examples/launch_tor_endpoint2.py
+examples/launch_tor_with_hiddenservice.py
+examples/launch_tor_with_simplehttpd.py
+examples/list_circuits.py
+examples/minimal_endpoint.py
+examples/monitor.py
+examples/multiple-socks-ports.py
++examples/redirect_streams.py
+examples/schedule_bandwidth.py
++examples/stem_relay_descriptor.py
+examples/stream_circuit_logger.py
+examples/systemd.service
+examples/tor_info.py
+examples/torflow_path_selection.py
+examples/txtorcon.tac
+examples/webui_server.py
+scripts/asciinema-demo0.py
+test/__init__.py
+test/profile_startup.py
+test/test_addrmap.py
+test/test_circuit.py
+test/test_endpoints.py
+test/test_fsm.py
+test/test_log.py
+test/test_router.py
+test/test_stream.py
+test/test_torconfig.py
+test/test_torcontrolprotocol.py
+test/test_torinfo.py
+test/test_torstate.py
+test/test_util.py
+test/test_util_imports.py
+test/util.py
+twisted/plugins/txtorcon_endpoint_parser.py
+txtorcon/__init__.py
++txtorcon/_metadata.py
+txtorcon/addrmap.py
+txtorcon/circuit.py
+txtorcon/endpoints.py
+txtorcon/interface.py
+txtorcon/log.py
+txtorcon/router.py
+txtorcon/spaghetti.py
+txtorcon/stream.py
+txtorcon/torconfig.py
+txtorcon/torcontrolprotocol.py
+txtorcon/torinfo.py
+txtorcon/torstate.py
+txtorcon/util.py
+txtorcon.egg-info/PKG-INFO
+txtorcon.egg-info/SOURCES.txt
+txtorcon.egg-info/dependency_links.txt
++txtorcon.egg-info/pbr.json
+txtorcon.egg-info/requires.txt
+txtorcon.egg-info/top_level.txt
diff --cc txtorcon.egg-info/pbr.json
index 0000000,0000000..28f25f5
new file mode 100644
--- /dev/null
+++ b/txtorcon.egg-info/pbr.json
@@@ -1,0 -1,0 +1,1 @@@
++{"is_release": false, "git_version": "e0c3ef4"}
diff --cc txtorcon.egg-info/requires.txt
index 1afedf0,61b06e6..e974b69
--- a/txtorcon.egg-info/requires.txt
+++ b/txtorcon.egg-info/requires.txt
@@@ -1,2 -1,14 +1,18 @@@
-## see also dev-requirements.txt to build
-## hmm, travis-ci doesn't like this since we need a GeoIP-dev package
-##GeoIP>=1.2.9
Twisted>=11.1.0
+ ipaddr>=2.1.10
zope.interface>=3.6.1
++txsocksx>=1.13.0
++
++[dev]
++coverage
+ setuptools>=0.8.0
+ Sphinx
+ repoze.sphinx.autointerface>=0.4
+ coveralls
+ wheel
+ twine
+ pyflakes
+ pep8
++mock
++ipaddr
++GeoIP
diff --cc txtorcon/_metadata.py
index 0000000,0000000..45f41ac
new file mode 100644
--- /dev/null
+++ b/txtorcon/_metadata.py
@@@ -1,0 -1,0 +1,6 @@@
++__version__ = '0.14.0'
++__author__ = 'meejah'
++__contact__ = 'meejah at meejah.ca'
++__url__ = 'https://github.com/meejah/txtorcon'
++__license__ = 'MIT'
++__copyright__ = 'Copyright 2012-2015'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/txtorcon.git
More information about the Pkg-privacy-commits
mailing list