Skip to content
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

Better error messages and debugging information.... #11

Open
Elite opened this issue Jun 22, 2024 · 2 comments
Open

Better error messages and debugging information.... #11

Elite opened this issue Jun 22, 2024 · 2 comments

Comments

@Elite
Copy link

Elite commented Jun 22, 2024

I successfully used TrevorProxy on one of my servers, but on the second server with same provider having the same networking setup but using Ubuntu instead of Debian I am not able to connect and get this error:

trevorproxy subnet -s XXX:YYY::/64 -i enp129s0f0
[DEBUG] ip route add local XXX:YYY::/64 dev enp129s0f0
[INFO] Listening on socks5://127.0.0.1:1080

But:

curl -v --proxy socks5://127.0.0.1:1080 -6 api64.ipify.org
* Closing connection 0
curl: (7) Couldn't connect to server

From this it looks like the proxy server is not running as no connection request is logged by the server, I have checked that firewall and it seems the proxy is listening correctly.

lsof -i :1080
COMMAND      PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
trevorpro 159845 root    4u  IPv4 296659      0t0  TCP localhost:socks (LISTEN)

So, the question is how to get more information where is this failing?

@simone1999
Copy link

Hi, I was facing the same issue. It turns out that you need to remove the -6 flag un the curl command. This is a workaround, but it would be great if someone could investigate what is the root of this. Likely it's sth. quite simple.

@cubernetes
Copy link

cubernetes commented Aug 2, 2024

IPv4 mapped IPv6 addresses seem to work. curl -6 seems to expect every address to be IPv6, so you'll have to use this:
curl --proxy socks5://[::ffff:127.0.0.1]:1080 -6 api64.ipify.org

This does give me the following the trevorproxy log output:

[DEBUG] ip route add local WWW:XXXX:YYYY:ZZZZ::/64 dev wlan0
[INFO] Listening on socks5://127.0.0.1:1080
[DEBUG] Accepting connection from 127.0.0.1:53138
[DEBUG] Address type == IPv6
[DEBUG] Destination address: 2a00:1450:401b:801::200e (note: google.com)
[DEBUG] 10 matches address family (10), randomizing source address
[INFO] Using random source address: WWW:XXXX:YYYY:ZZZZ:6bf9:3ef9:b577:d0f5

However, after some time it eventually gives:

[ERROR] Error in reply: Traceback (most recent call last):
  File "/home/tosuman/repos/trevorproxy/env/lib/python3.12/site-packages/trevorproxy/lib/socks.py", line 139, in handle
    remote.connect((address, port))
TimeoutError: [Errno 110] Connection timed out

I tried different hosts, but it just doesn't seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants