Discussion:
[Twisted-Python] txtorcon 0.14.0
meejah
2015-09-27 06:26:16 UTC
Permalink
I'm happy to announce txtorcon 0.14.0. Changes:

* IStreamAttacher handling was missing None and DO_NOT_ATTACH cases if a Deferred was returned.
* add .is_built Deferred to txtorcon.Circuit that gets callback()'d when the circuit becomes BUILT
* David Stainton ported his "tor:" endpoint parser so now both client
and server endpoints are supported. This means **any** Twisted
program using endpoints can use Tor as a client. For example, to
connect to txtorcon's Web site: ep =
clientFromString("tor:timaq4ygg2iegci7.onion:80"). (In the future,
I'd like to automatically launch Tor if required, too).
* Python3 fixes from Isis Lovecruft (note: needs Twisted 15.4.0+)

You can download the release from PyPI or GitHub (or of course "pip
install txtorcon"):

https://pypi.python.org/pypi/txtorcon/0.14.0
https://github.com/meejah/txtorcon/releases/tag/v0.14.0

Releases are also available from the hidden service:

http://timaq4ygg2iegci7.onion/txtorcon-0.14.0.tar.gz
http://timaq4ygg2iegci7.onion/txtorcon-0.14.0.tar.gz.asc
http://timaq4ygg2iegci7.onion/txtorcon-0.14.0-py2-none-any.whl
http://timaq4ygg2iegci7.onion/txtorcon-0.14.0-py2-none-any.whl.asc

You can verify the sha256sum of both by running the following 4 lines
in a shell wherever you have the files downloaded:

cat <<EOF | sha256sum --check
d44be978dd9521f22333edea49789fe7e19c4bea9a02d63e6ec826d08fb571d1 dist/txtorcon-0.14.0-py2-none-any.whl
a2d0fae65da015840bb392ffc4fd63918168edb6b634941f6b8aa843b338edbf dist/txtorcon-0.14.0.tar.gz
EOF

thanks,
meejah
Glyph Lefkowitz
2015-09-29 04:04:33 UTC
Permalink
Post by meejah
* David Stainton ported his "tor:" endpoint parser so now both client
and server endpoints are supported. This means **any** Twisted
program using endpoints can use Tor as a client. For example, to
connect to txtorcon's Web site: ep =
clientFromString("tor:timaq4ygg2iegci7.onion:80"). (In the future,
I'd like to automatically launch Tor if required, too).
Hooray! Once again, txtorcon blazes the trail in making use of Twisted's extensibility :-). Thanks for setting this example!

Could you use any help auto-launching Tor?

-glyph
meejah
2015-09-29 05:20:11 UTC
Permalink
Post by Glyph Lefkowitz
Could you use any help auto-launching Tor?
This would actually be a fairly straightforward bit of refactoring,
mostly -- the "server-side" endpoints ("onion:...") already do
auto-launch Tor, and there are some @staticmethods to directly create
TCPHiddenServiceEndpoints attached to existing or launched Tor
instances.

If anyone would like to help, that'd be great; the enhancement ticket
for the "tor:..." endpoints is:

https://github.com/meejah/txtorcon/issues/128

Anything unclear can be discussed there.

Note that currently the usual strategy for "onion:" endpoints is to
launch a new Tor instance because of permissions "reasons" -- for the
"tor:" type endpoints, any running Tor that has a valid SOCKS port
should work, so that should be the preferred strategy *unless*
.get_global_tor() has ever been called, in which case that Tor instance
should be used.

I'm usually idling in #tor-dev on OFTC if anyone wants to take a try at
this :)

Thanks!
meejah
meejah
2015-10-25 21:05:06 UTC
Permalink
Post by meejah
* add .is_built Deferred to txtorcon.Circuit that gets callback()'d
when the circuit becomes BUILT
This had a bug in it. I give you 0.14.1:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There was a subtle bug with the Circuit.is_built API introduced in
0.14.0, necessitating this release.

I've also changed the API (with backwards-compatibility for now) to a
method-call that returns a Deferred: Circuit.when_built()

You can download the release from PyPI or GitHub (or of course "pip
install txtorcon"):

https://pypi.python.org/pypi/txtorcon/0.14.1
https://github.com/meejah/txtorcon/releases/tag/v0.14.1

Releases are also available from the hidden service:

http://timaq4ygg2iegci7.onion/txtorcon-0.14.1.tar.gz
http://timaq4ygg2iegci7.onion/txtorcon-0.14.1.tar.gz.asc
http://timaq4ygg2iegci7.onion/txtorcon-0.14.1-py2-none-any.whl
http://timaq4ygg2iegci7.onion/txtorcon-0.14.1-py2-none-any.whl.asc

You can verify the sha256sum of both by running the following 4 lines
in a shell wherever you have the files downloaded:

cat <<EOF | sha256sum --check
073d303a2905b70a9434beb18a5d657ddcf9933422393f36e4b3a670d8d59619 txtorcon-0.14.1-py2-none-any.whl
446ceeb73ba775d990cafb9340b2f9475dc795914e515b574433f8e5b00b0e15 txtorcon-0.14.1.tar.gz
EOF

thanks,
meejah

Loading...