Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#246 closed defect (fixed)

add Tor client plugin

Reported by: dawuud Owned by:
Priority: major Milestone: 0.12.1
Component: network Version: 0.9.1
Keywords: tor Cc:

Description

Much like ticket #242, this ticket aims to create a foolscap client transport plugin. The Tor client plugin should be highly configurable yet work with a best effort if the user supplies zero parameters. It could potentially launch tor if a tor binary is present in the path... or use the system tor if a socks or control port is specified.

Change History (14)

comment:1 Changed 9 years ago by dawuud

Component: unknownnetwork
Keywords: tor added
Milestone: undecided0.9.2

comment:2 Changed 9 years ago by dawuud

Furthermore this plugin could eventually share state with a server plugin... so that the same tor process is used for both plugins.

comment:3 Changed 9 years ago by Brian Warner

Milestone: 0.10.00.11.0

the logging fixes (#244) take priority, pushing this out a release

comment:4 Changed 9 years ago by Brian Warner

Milestone: 0.11.00.12.0

Milestone renamed

comment:5 Changed 9 years ago by dawuud

here's my latest dev branch containing a socks client plugin for foolscap: https://github.com/daira/foolscap/commits/tor-client-plugin.2

i've tested it with the corresponding dev branch in tahoe-lafs as documented in https://tahoe-lafs.org/trac/tahoe-lafs/ticket/517#comment:68

daira has reviewed it... perhaps further review or merge?

comment:6 Changed 9 years ago by dawuud

Resolution: duplicate
Status: newclosed

closing this ticket; use https://foolscap.lothar.com/trac/ticket/242 intead

comment:7 Changed 9 years ago by dawuud

Resolution: duplicate
Status: closedreopened

oh i see. more than just socks; we want detection of tor, auto-launch, best effort to find a socks or control port etc. sounds good to me. I guess we should do this after first getting a simple socks client plugin working in #242.

comment:8 Changed 8 years ago by Brian Warner

BTW, I'm going to change the API of IConnectionHintHandler.hint_to_endpoint to allow it to return a Deferred (that fires with a tuple of (endpoint, host)) instead of requiring it to return synchronously, so this Tor handler can try to connect/launch Tor before returning the endpoint.

comment:9 Changed 8 years ago by Brian Warner

Hey, could you take a look at https://github.com/warner/foolscap/pull/27 and see what you think? Probably not ready to merge, but maybe y'all can give me some hints.

comment:10 Changed 8 years ago by Brian Warner

Milestone: 0.12.00.13.0

Moving these tickets from 0.12 to 0.13, since we need 0.12 out quickly to resolve #263

comment:11 Changed 8 years ago by Brian Warner

The Tor branch is looking good: I've got manual tests working for all the expected use cases. I'm not certain about the API yet, but I think I'll land it tonight and then fix things up more before the release.

comment:13 Changed 8 years ago by Brian Warner

Resolution: fixed
Status: reopenedclosed

I renamed the API functions a bit, to try for a bit more consistency. I'm still undecided about whether to ask for a 'reactor' argument in the handler functions.. we can't use it now, but things could be a bit cleaner if the internal function always set up the SOCKS proxy endpoint when the handler was first created, and then there are some functions (like default) which would really like to build that Endpoint before passing it into the common class, and *that* would need a reactor.

But, I think it'll work for now, so I'm going to close this.

comment:14 Changed 8 years ago by Brian Warner

Milestone: 0.13.00.12.1
Note: See TracTickets for help on using tickets.