<div dir="ltr"><div>Dear Matt Traudt,</div><div><br></div><div>Thank you for your answer.</div><div><br></div><div>Three remarks:</div><div>1) I only found your answer coincidentally when I googled for LSAG + WOT. It would have been very nice if you had let me know that you answered.</div><div>2) Your answer sort of only repeats what is already written on Overflow. Since that was unhelpful to me, I had asked the question your answer refers to.</div><div>3) Your answer leaves out all the critical bits. Just to name the very first, which caused the beginning of this conversation: The proxy did not work because in windows the command "tor.exe" does nothing unless using the expert bundle. Now, play a game and try to find the download link for the expert bundle. I have lots of other things that leave me puzzled but it would be unsuitable to post them publicly. Please feel invited to get in touch if you want to have a discussion on certain things that appear to me as dramatic design flaws.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 11. Aug. 2022 um 17:13 Uhr schrieb Martin Neuenhofen <<a href="mailto:martinneuenhofen@googlemail.com">martinneuenhofen@googlemail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sorry to bother again.<br></div><div>An equally good solution to replacing<span style="font-family:monospace"><br><i>client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>client_socket.connect(ip,port)</i></span>

</div><div>with a TOR solution could be via a command line interface: os.system("torsocketprogram -send 123.45.67.89 9000 filename.bytes") and 
os.system("torsocketprogram -recv
 123.45.67.89 9000

 filename.bytes").</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 11. Aug. 2022 um 11:27 Uhr schrieb Martin Neuenhofen <<a href="mailto:martinneuenhofen@googlemail.com" target="_blank">martinneuenhofen@googlemail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Tor Developers,<br><br>in my application, a client connects to a server via:<span style="font-family:monospace"><br><i>client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>client_socket.connect(ip,port)</i></span><br><br><div>I want to replace these two lines to create a client_socket whose IP address cannot be seen by the server. The application is e-polling.<br></div><div><br></div><div>I looked into</div><div><ul><li>torpy (too many timeouts),</li><li>socks (requires too much external configuration),</li><li>and I have tor installed (unknown how to use from within python).<br></li></ul></div>I just need a replacement for the two-liner code above.<br><div><br></div><div><b>The ideal solution:</b> is device & OS agnostic, portable, uses no peripherals or configuration (i.e., just one pip package to install), and works reliably.</div><div>Thus, the below torpy solution would have been ideal if it had worked reliably:<br></div><span style="font-family:monospace"></span><div><span style="font-family:monospace"><i>from torpy import TorClient # pip install torpy<br></i></span></div><div><span style="font-family:monospace"><i>class Torsocket:</i></span></div><div><span style="font-family:monospace"></span></div><span style="font-family:monospace"><i>    def __init__(self,ip,port):<br>        self.mgr1    = TorClient()<br>        self.tor     = type(self.mgr1).__enter__(self.mgr1)<br>        self.mgr2    = self.tor.create_circuit(3)<br>        self.circuit = type(self.mgr2).__enter__(self.mgr2)<br>        self.mgr3    = self.circuit.create_stream((ip,port))<br>        self.socket  = type(self.mgr3).__enter__(self.mgr3)<br>    def send(self,data):<br>        self.socket.send(data)<br>    def recv(self,size):<br>        return self.socket.recv(size)<br>    def __del__(self):<br>        for bla in [self.mgr3,self.mgr2,self.mgr1]: type(bla).__exit__(bla, None, None, None)</i></span><br><br>It replaces the two-liner from the beginning with the below one-liner<i><br><span style="font-family:monospace">client_socket = Torsocket(*server_data.server_address)</span></i><br><br><div>My questions/requests:<br>- Is torpy connected to the real tor network (or is it a little toy twin)? If it is the real tor network then I will close this issue and open another one.</div><div>- Are practical solutions available to my problem already?, and which of them works best for user-friendliness?<br></div><div>- Can a pip package for a torsocket be made, as described above? i.e., something like torpy, but connecting to the real network?<br></div><div>- Can I offer anything so that the ideal solution would be crafted and packaged?*</div><div><br></div><div>*) If it helps, I could tell a lot about my project and how I believe it is significant and will be for the greater good of people. It is a fully implemented 1000LOC LSAG+WOT decentral P2P e-polling program with GUI that shall return trust and sovereignty into the people's hands. The only missing bit is a reliable tor connection.<br></div></div>
</blockquote></div>
</blockquote></div>