-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config.socks_endpoint fails when having multiple endpoints #345
Comments
Can you also please include the version of Tor being used? |
I have installed latest Tor from their official repository. My OS is Ubuntu 20.04 LTS. https://2019.www.torproject.org/docs/debian.html.en Latest Tor version there is 0.4.3.5-1~focal+1 (amd64) |
From the code, it looks like unix-sockets should work but I think that "space, and then more options" part in your config will make it sad. (I wonder how paths with spaces in them are handled? Probably quotes) |
Also, thanks for the detailed report! |
I think refactoring |
I can fix it with my suggested approach and try to cover previous versions using a container to make tests. Do you think that there will be more parts involved with this issue? |
I haven't had time to try this exact setup yet -- one thing that does look odd is the "double lists" in the |
If you want to attempt a fix, that would be great! Personally, I try to avoid regular-expressions but also sometimes they are the right option :) |
Could you please show me the |
It's kind of just doing "dumb matching", so if you did |
The With the benefit of hindsight, that whole API might not be the best approach especially for an async thing .. but at the time I was thinking to save people from |
So, I think the value should be |
Hi,
I have been running some simple examples for performing http requests with txtorcon and treq. Even a simple script has errors:
But I get a
builtins.AttributeError: 'list' object has no attribute 'startswith'
error.I have noticed that the issue is because of the
config.socks_endpoint(reactor)
. When calling that method, I haveself.SocksPort = _ListWrapper[['unix:/run/tor/socks WorldWritable', '9050']]
, which is a list of list. Then, when that method is calling the_endpoint_from_socksport_line
things get even worst, as we are passing a list instead of a socket endpoint.I have tor service listening on port 9050 (and 9051 for control), and also in unix socket
/run/tor/socks
(and/run/tor/control
for control).A super ugly and nonsense patch to fix it is just to go to
_endpoint_from_socksport_line
method and force thesocks_config
argument (which is a list) to get the second value (which is '9050'). If I try the first value (which is 'unix:/run/tor/socks WorldWritable'), I will get an error too.The text was updated successfully, but these errors were encountered: