Opened 6 years ago

Closed 5 years ago

#9695 closed defect (worksforme)

torsocks with server_type = 5 doesn't work with tor 0.2.4.17-rc-1~d70.wheezy+1

Reported by: cypherpunks Owned by:
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

After upgrading to 0.2.4.17-rc-1~d70.wheezy+1, torsocks (1.2-3 from wheezy) stopped working. It says "Need a password in torsocks.conf or $TORSOCKS_PASSWORD to authenticate with" and tor logs this:

Sep 07 19:26:18.000 [warn] Socks5 username/password version 71 not recognized; rejecting.
Sep 07 19:26:18.000 [warn] Fetching socks handshake failed. Closing.

Worse, while failing, it appears to send 10 bytes of data to the client (or maybe this is a curl bug?).

$ usewithtor curl -v 1.1.1.1 | xxd
* About to connect() to 1.1.1.1 port 80 (#0)
*   Trying 1.1.1.1...
19:29:17 libtorsocks(20833): Need a password in torsocks.conf or $TORSOCKS_PASSWORD to authenticate with  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0* connected
* getpeername() failed with errno 107: Transport endpoint is not connected
* Connected to 1.1.1.1 (1.1.1.1) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.26.0
> Host: 1.1.1.1
> Accept: */*
> 
* additional stuff not fine transfer.c:1037: 0 0
{ [data not shown]
* Increasing bytecount by 10 from hbuflen
* nread <= 0, server closed connection, bailing
100    20    0    20    0     0     19      0 --:--:--  0:00:01 --:--:-- 20000
* Connection #0 to host 1.1.1.1 left intact
* Closing connection #0
0000000: 0501 0001 0000 0000 0000                 ..........

(it does the same thing with a real or fake IP)

Child Tickets

Change History (3)

comment:1 Changed 6 years ago by cypherpunks

Summary: torsocks doesn't work with 0.2.4.17-rc-1~d70.wheezy+1torsocks with server_type = 5 doesn't work with tor 0.2.4.17-rc-1~d70.wheezy+1

Ah, I think I set my server_type = 5 some time ago for some reason I forget now (default is 4). After commenting out that line in torsocks.conf, usewithtor works again. (But it did work with server_type = 5 on 0.2.3.whatever.wheezy.has)

comment:2 Changed 6 years ago by nickm

Component: - Select a componentTor
Keywords: tor-client added
Milestone: Tor: 0.2.4.x-final

I wonder if this could be related to our fix for bug #8879 . I also wonder if this is a Torsocks bug.

comment:3 Changed 5 years ago by nickm

Resolution: worksforme
Status: newclosed

Analysis and help from dgoulet have confirmed that this is indeed a bug in Torsocks 1. dgoulet's new and improved torsocks should fix this.

Note: See TracTickets for help on using tickets.