[ ijbswa-Bugs-3459781 ] No connection (socks4a regression in 3.0.18)
SourceForge.net <[email protected]>
| Newsgroups | gmane.comp.web.privoxy.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #3459781, was opened at 2011-12-14 16:31 Message generated for change (Comment added) made by fabiankeil You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=111118&aid=3459781&group_id=11118 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: qqqqqw (qqqqqw) >Assigned to: Fabian Keil (fabiankeil) >Summary: No connection (socks4a regression in 3.0.18) Initial Comment: I use Privoxy with Tor and i have upgraded to Privoxy 3.0.18 (from 3.0.17). Then i have modified config.txt (i add forward-socks4a / localhost:9050 . and enable debug 1, 1024, 4096 and 8192). After the upgrade i can see the url requests in Privoxy window, but Privoxy don't send the requests to Tor. I think that the problem is Privoxy because if i return to Privoxy 3.0.17 i have no problem (i'm writing with Privoxy 3.0.17). I use Privoxy from years, but i can not understand what is the problem, maybe a new configuration in Privoxy 3.0.18? Is some day that i see in config.txt for a problem, but nothing. Please help me ---------------------------------------------------------------------- >Comment By: Fabian Keil (fabiankeil) Date: 2011-12-20 11:05 Message: Thanks for the logfile, qqqqqw. Like Lee, I was able to reproduce the problem, too. This is clearly a regression and I'm not sure how it slipped through testing. While anybody should be using socks5, it would be nice if the socks4 code would work anyway. The whole "else if (!data_is_available(sfd, csp->config->socket_timeout))" block is at the wrong location, it belongs below the "else if (write_socket(sfd, (char *)c, csiz))" block because otherwise the server has nothing to respond to and the connection will timeout. Either I put the block at the wrong place from the beginning and didn't test or use the socks4 code at all, or I originally put it at the right place and tested it, but then somehow messed up the merging in git when resolving conflicts. Somehow I prefer the second version ... ---------------------------------------------------------------------- Comment By: qqqqqw (qqqqqw) Date: 2011-12-18 09:52 Message: My Privoxy log when i try to connect to http://sourceforge.net with this debug enable debug 1 debug 2 debug 4 debug 8 debug 128 debug 256 debug 512 debug 1024 debug 4096 debug 8192 debug 32768 2011-12-18 19:11:43.899 000005dc Info: Privoxy version 3.0.18 2011-12-18 19:11:43.899 000005dc Info: Program name: C:\Programmi\Privoxy\privoxy.exe 2011-12-18 19:11:43.909 000005dc Info: Loading filter file: .\default.filter 2011-12-18 19:11:43.929 000005dc Info: Loading filter file: .\user.filter 2011-12-18 19:11:43.929 000005dc Info: Loading actions file: .\match-all.action 2011-12-18 19:11:43.940 000005dc Info: Loading actions file: .\default.action 2011-12-18 19:11:43.980 000005dc Info: Loading actions file: .\user.action 2011-12-18 19:11:44.010 000005dc Info: Loading actions file: .\user2.action 2011-12-18 19:11:44.100 000005dc Connect: Initialized 100 socket slots. 2011-12-18 19:11:44.110 000005dc Info: Listening on port 8118 on IP address 127.0.0.1 2011-12-18 19:11:44.120 000005dc Connect: Listening for new connections ... 2011-12-18 19:11:54.915 000005dc Connect: accepted connection from 127.0.0.1 on socket 164 2011-12-18 19:11:54.955 000005dc Connect: Listening for new connections ... 2011-12-18 19:11:55.015 00000730 Received: from socket 164: GET http://sourceforge.net/ HTTP/1.1\x0d\x0aUser-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60\x0d\x0aHost: sourceforge.net\x0d\x0aAccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\x0d\x0aAccept-Language: en\x0d\x0aAccept-Encoding: gzip, deflate\x0d\x0aProxy-Connection: Keep-Alive\x0d\x0a\x0d\x0a 2011-12-18 19:11:55.045 00000730 Header: scan: GET http://sourceforge.net/ HTTP/1.1 2011-12-18 19:11:55.055 00000730 Header: scan: User-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 2011-12-18 19:11:55.055 00000730 Header: scan: Host: sourceforge.net 2011-12-18 19:11:55.055 00000730 Header: scan: Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 2011-12-18 19:11:55.066 00000730 Header: scan: Accept-Language: en 2011-12-18 19:11:55.066 00000730 Header: scan: Accept-Encoding: gzip, deflate 2011-12-18 19:11:55.076 00000730 Header: scan: Proxy-Connection: Keep-Alive 2011-12-18 19:11:55.086 00000730 Header: crumble crunched: Proxy-Connection: Keep-Alive! 2011-12-18 19:11:55.086 00000730 Header: Crunching Accept-Language! 2011-12-18 19:11:55.086 00000730 Connect: Complete client request received. 2011-12-18 19:11:55.086 00000730 Header: New HTTP Request-Line: GET / HTTP/1.1 2011-12-18 19:11:55.086 00000730 Request: sourceforge.net/ 2011-12-18 19:11:55.086 00000730 Connect: to sourceforge.net 2011-12-18 19:11:55.116 00000730 Connect: Connected to localhost[127.0.0.1]:9050. 2011-12-18 19:13:55.659 00000730 Connect: socks4_connect: SOCKS4 negotiation got aborted by the server 2011-12-18 19:13:55.719 00000730 Crunch: Forwarding failed: http://sourceforge.net/ 127.0.0.1 - - [18/Dec/2011:19:13:55 +0100] "GET http://sourceforge.net/ HTTP/1.1" 503 8057 2011-12-18 19:13:55.789 000005dc Connect: accepted connection from 127.0.0.1 on socket 188 2011-12-18 19:13:55.799 000005dc Connect: Listening for new connections ... 2011-12-18 19:13:55.889 00000368 Received: from socket 188: GET http://config.privoxy.org/error-favicon.ico HTTP/1.1\x0d\x0aUser-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60\x0d\x0aHost: config.privoxy.org\x0d\x0aAccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\x0d\x0aAccept-Language: en\x0d\x0aAccept-Encoding: gzip, deflate\x0d\x0aConnection: Keep-Alive\x0d\x0a\x0d\x0a 2011-12-18 19:13:55.989 00000368 Header: scan: GET http://config.privoxy.org/error-favicon.ico HTTP/1.1 2011-12-18 19:13:55.999 00000368 Header: scan: User-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 2011-12-18 19:13:56.009 00000368 Header: scan: Host: config.privoxy.org 2011-12-18 19:13:56.019 00000368 Header: scan: Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 2011-12-18 19:13:56.039 00000368 Header: scan: Accept-Language: en 2011-12-18 19:13:56.039 00000368 Header: scan: Accept-Encoding: gzip, deflate 2011-12-18 19:13:56.049 00000368 Header: scan: Connection: Keep-Alive 2011-12-18 19:13:56.059 00000368 Header: Keeping the client header 'Connection: Keep-Alive' around. The server connection will be kept alive if possible. 2011-12-18 19:13:56.070 00000368 Header: Crunching Accept-Language! 2011-12-18 19:13:56.070 00000368 Connect: Complete client request received. 2011-12-18 19:13:56.080 00000368 Header: New HTTP Request-Line: GET /error-favicon.ico HTTP/1.1 2011-12-18 19:13:56.100 00000368 Crunch: CGI Call: http://config.privoxy.org/error-favicon.ico 127.0.0.1 - - [18/Dec/2011:19:13:56 +0100] "GET http://config.privoxy.org/error-favicon.ico HTTP/1.1" 200 198 2011-12-18 19:13:56.150 00000368 Connect: Waiting for the next client request on socket 188. No server socket to keep open. 2011-12-18 19:13:57.151 00000368 Connect: No additional client request received in time on socket 188. ---------------------------------------------------------------------- Comment By: Lee (ler762) Date: 2011-12-18 08:40 Message: Well! I can duplicate the problem using privoxy.exe from the released privoxy-3.0.18.zip I can find only one place in the code that produces the message "SOCKS4 negotiation got aborted by the server" and I've got it commented out in my version of privoxy. Fabian, my line 811 in gateway.c is else if ( 0 && (!data_is_available(sfd, csp->config->socket_timeout)) ) /* LR : skip call to data_is_available */ Remember our discussion about speeding up privoxy and how removing the call to data_is_available helped? I haven't noticed any problems with that block of code commented out & I'm guessing that it makes privoxy a tad faster not doing the extra work. thoughts? Lee ---------------------------------------------------------------------- Comment By: Fabian Keil (fabiankeil) Date: 2011-12-18 06:32 Message: Please increase the debug level using the directives described at: http://www.privoxy.org/user-manual/contact.html#CONTACT-BUGS and attach a log excerpt that shows a complete failed request. It might also help to check Tor's log file for complaints. ---------------------------------------------------------------------- Comment By: qqqqqw (qqqqqw) Date: 2011-12-17 12:53 Message: Thank you Lee I'm on Win xp and i have try with Opera 11.60 and Internet explorer 6, no IPv6 If in Privoxy 3.0.17 directory i replace only privoxy.exe with 3.0.18, this don't work (in Opera and in IE). So is not a config problem But good news If in config.txt in Privoxy 3.0.18 directory i change forward-socks4a / localhost:9050 . to forward-socks5 / localhost:9050 . Privoxy WORKS Yes, if i ONLY change 4a with 5, works (if i rechange 5 with 4a DON'T works) So in my opinion is a bug in Privoxy, i have not other explanation. (If you can't duplicate the problem, you can say me some test to track the problem, if you want) ---------------------------------------------------------------------- Comment By: Lee (ler762) Date: 2011-12-17 08:09 Message: I still can't duplicate the problem :( What OS and browser are you using? Does your machine have IPv6 enabled? Can you try changing forward-socks4a / localhost:9050 . to forward-socks5 / localhost:9050 . and see if that makes any difference? Both forward-socks4a and forward-socks5 work for me, but it's an easy test to try.. If that doesn't fix it, go back to 3.0.17, get privoxy-3.0.18.zip from sourceforge and extract only privoxy.exe from the zip file to your privoxy 3.0.17 directory. That will show if it's privoxy or something in the 3.0.18 config file[s] that isn't working with tor Lee ---------------------------------------------------------------------- Comment By: qqqqqw (qqqqqw) Date: 2011-12-15 01:37 Message: Thank you Ler In show status i have forward-socks4a / localhost:9050 . I copy and paste my config show in http://config.privoxy.org/show-status The following options were given in the config file: forward-socks4a / localhost:9050 . forward 192.168.0.*:80 . user-manual ./doc/user-manual/ confdir . logdir . actionsfile match-all.action actionsfile default.action actionsfile user.action actionsfile user2.action filterfile default.filter filterfile user.filter debug 1 debug 1024 debug 4096 debug 8192 debug 128 listen-address 127.0.0.1:8118 toggle 1 enable-remote-toggle 0 enable-remote-http-toggle 0 enable-edit-actions 0 enforce-blocks 0 buffer-limit 4096 forwarded-connect-retries 1 accept-intercepted-requests 0 allow-cgi-request-crunching 0 split-large-forms 0 keep-alive-timeout 5 socket-timeout 300 I want to underline a thing that i have not said before: If i forward through Privoxy 3.0.18 and Tor is close i get immediately the following error: "Privoxy was unable to socks4a-forward your request https://sourceforge.net:443/ through localhost: No error" If i forward through Privoxy 3.0.18 and Tor is open i get after some time (not immediately) the following error: "Privoxy was unable to socks4a-forward your request https://sourceforge.net:443/ through localhost: SOCKS4 negotiation got aborted by the server" So Privoxy can see if Tor is open or close, but don't send correctly the request because if i put Privoxy 3.0.17 all work fine. My problemm is that i don't understant why this problem is only with 3.0.18 and what cause the problem. ---------------------------------------------------------------------- Comment By: Lee (ler762) Date: 2011-12-14 23:30 Message: I just tried privoxy 3.0.18 with tor & it works for me Start privoxy 3.0.18, and browse to http://config.privoxy.org/show-status Scroll down a bit and there's a section that starts off with The following options were given in the config file: make sure there's a "forward-socks4a / 127.0.0.1:9050 . " line there. If not, right click on the privoxy taskbar icon & left click on Edit... / Main Configuration. That should start notepad to edit your privoxy 3.0.18 config file. Add a "forward-socks4a / 127.0.0.1:9050 . " line after the user-manual ./doc/user-manual/ line. Lee ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=111118&aid=3459781&group_id=11118 ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev