Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-17 Thread Navin Francis
On Mon, Apr 15, 2013 at 8:01 AM, Nick Mathewson wrote: > Tor isn't multithreaded like that. Its main thread uses an asynchonous > event loop. > Ah, I see. I'd make a command queue structure that any thread could use to > asynchronously send commands to the main thread, so that the only > change

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-15 Thread Nick Mathewson
On Mon, Apr 15, 2013 at 1:37 AM, Navin Francis wrote: > I thought Tor already had some level of locking since multiple applications > can connect to it at the same time via SOCKS. I completely agree about > replacing the macros though. Tor isn't multithreaded like that. Its main thread uses an as

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-14 Thread Navin Francis
On Sat, Apr 13, 2013 at 10:42 AM, wac wrote: > > Hi Navis: > > Good to hear you built it. I have a working library with a defined API but > is not re-entrant. It can connect with a server over Tor circuits and > transmit/receive data but nothing is re-entrant at all. So the same Tor > thread must

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-14 Thread wac
Hi Nick: I changed from libTor to libtor as Tor is a registered trademark but lowercase tor is not. I already paid for the domain and to make sure people knows is a library to use the Tor network. To name that sort like Silvertunnel is actually a deformation caused by fear of this policy that

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-13 Thread Fabio Pietrosanti (naif)
On 4/13/13 10:05 PM, Nick Mathewson wrote: > > > > On Apr 13, 2013 1:42 PM, "wac" > wrote: > > > > > >> > > > Seems you want to put your hands at it so that makes two of us. > You don't need to do what I already did. I am preparing the > environment to move towards

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-13 Thread Nick Mathewson
> On Apr 13, 2013 1:42 PM, "wac" wrote: > > > >> > > Seems you want to put your hands at it so that makes two of us. You don't need to do what I already did. I am preparing the environment to move towards team mode. Check the website http://libtor.org. This name is likely to be a problem with our

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-13 Thread Fabio Pietrosanti (naif)
On 4/13/13 7:42 PM, wac wrote: > Seems you want to put your hands at it so that makes two of us. You don't > need to do what I already did. I am preparing the environment to move towards > team mode. Check the website http://libtor.org. In any case remember all of > this to make it solid is not

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-13 Thread wac
Hi Navis: Good to hear you built it. I have a working library with a defined API but is not re-entrant. It can connect with a server over Tor circuits and transmit/receive data but nothing is re-entrant at all. So the same Tor thread must be used for all of that ATM. I can fetch webpages like

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-11 Thread Navin Francis
I managed to build it with MSVC after tinkering with the code a little. Did you guys make any progress in making tor a library? It seems like I can directly call functions like handle_getinfo_helper in control.c to control tor. //application_main.cpp //Application that starts tor in a new thread i

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-04 Thread Navin Francis
Hi Waldo, I tried to build using your project and I think most of the Tor code works but I am not sure how to add all the libraries. Can they be built from the IDE? Can you also run "tree /f >files.txt" in your source folder and attach the file. That way, I can make sure I have the same files as

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-02 Thread Navin Francis
Hi Waldo: It seems like like we are trying to do almost exactly the same thing :) You also mentioned that you got Tor working as a visual studio project. I was trying to do this myself, but its really a PITA since the Tor configuration does not generate a visual studio project and the VC++ librar

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-02 Thread Fabio Pietrosanti (naif)
On 4/2/13 12:09 AM, Nick Mathewson wrote: > > My preferred approach for applications that want to include their own > Tor would be to have a library (perhaps based on Torsocks) that > handles making connections over Tor, plus maybe another library that > would find a running Tor or launch one as ne

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-01 Thread wac
Hi Nick: > * Using process isolation to isolate Tor from its controllers makes it > easier to tell Tor bugs from controller bugs > * Using process isolation to isolate Tor from its controllers can also > make it easier to secure each of the two domains properly against bugs > in the other, e

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-01 Thread Nick Mathewson
On Mon, Apr 1, 2013 at 4:17 PM, Navin Francis wrote: > Are there any existing applications that embed tor in this manner? This is pretty much unsupported for the reasons discussed in https://lists.torproject.org/pipermail/tor-dev/2010-November/002141.html and https://lists.torproject.org/pip

Re: [tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-01 Thread Fabio Pietrosanti (naif)
On 4/1/13 10:17 PM, Navin Francis wrote: > I am making a small application that always uses tor to communicate. I > have embedded tor into the application by compiling and linking the > tor source code along with my own code and calling tor's main() from > within my own main(). To send data, tor ha

[tor-dev] Embedding tor in an application and using tor without opening a port

2013-04-01 Thread Navin Francis
I am making a small application that always uses tor to communicate. I have embedded tor into the application by compiling and linking the tor source code along with my own code and calling tor's main() from within my own main(). To send data, tor has to open a port on the machine and my applicatio