Closed Bug 65583 Opened 24 years ago Closed 23 years ago

SOCKS - SOCKS V4 not supported


(Core :: Networking, enhancement)

Windows 98
Not set





(Reporter: rupshall, Assigned: smeredith)



(Keywords: relnote)


(8 files, 1 obsolete file)

From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
BuildID:    2001010901

i cannot get a connection with a socks 4 proxy, when i dialup and use a direct 
connection it works fine
it did work at one time but now it dosn't

Reproducible: Always
Steps to Reproduce:
1.start mozilla

Actual Results:  I get an alert window telling me operation timed out

Expected Results:  connected to

I don't know what happened, it always worked and now it dosn't, I tried 
uninstalling and reinstalling but it still dosn't allow me to connected.

MSIE and Netscape both work with the same proxy but mozilla fails.
Robert, is this the same as bug 48357?
It appears to be similar, although I can't get any connections at all, so I 
don't think its a problem with banners or anything.

The funny think is, this was working.
Reporter have you tried creating a new profile with the latest nightlies? Does
that fix the problem?
Marking INVALID due to lack of response. Reopen if we get more information about
the problem.
Closed: 24 years ago
Resolution: --- → INVALID
Simple, we do not support socks 4 proxy, see bug 50679.
I don't have a socks 4 ONLY proxy, but if someone could put a detailed
description of the error message, I'd certainly appreciate it.

This bug report is the same problem as in bug 50679, but it is newer and has
different symptoms.

In exchange, I can assure you Mozilla won't work with your existing proxy server:
marking verified, since it's documented.
QA to me

I'm un-duping this from bug 50679 because that bug focuses on correcting the 
prefs UI.

This bug gives a clear description of SOCKS V4 not working, which is a 
distinct, but related issue that needs a specific test (even things that don't 
work require effort...)

I'll be writing a test case, setting a milestone, and verifying.

If someone wants to fix this, please create a new bug with a milestone or 
QA Contact: tever → benc
Resolution: INVALID → ---
Summary: cannot get connection with socks 4 proxy → SOCKS - SOCKS V4 not supported
setting bug status to New
Ever confirmed: true
Target Milestone: --- → Future
Keywords: relnote
I've got both Mozilla 0.9.1 and Netscape 6.1 Preview (based on Mozilla) and they 
both fail to operate with SOCKS4-5.

I'm 99% sure its something to do with hardcoded timeouts for sending SYN 
handshake over the WAN.

I'm running a socks5 server on local machine - so when I set Mozilla to use port 1080 - everything is fine, and it goes through.

But if I set a different server IP somewhere in the Internet - it spits up
a "Connection refused" box.

A firewall shows that Mozilla tries to connect to remote socks server
(asking me to Allow or Block the connection). 
But seems like either the protocol implementation is completely messed
(wrong IP headers), or it exits too fast before the connection is


Mozilla 0.8.x (earlier this year)
Mozilla 0.9.1
Netscape 6.0
Netscape 6.1 Preview

My machine is running Windows 2000 SP1 + Netscape 4.6
(most stable product ever done by Netscape =)
SOCKS V4 will never work, because we do not handshake in the proper format.

SOCKS V5 is supported, but is not working well. Please look to:

bug 48357 (Sometimes doesn't work for some people)

bug 74546 (Never works for some people)

This bug is pretty much a placeholder for the relnote that needs to be written.
*** Bug 85582 has been marked as a duplicate of this bug. ***
I am working on a SOCKS 4 implementation.
Assignee: neeti → smeredith
If you can put a target that would be great.

Also, do you know who is going to qa this?
Keywords: nsenterprise
Severity: blocker → enhancement
I have a SOCKS 4 implementation. It consists of 4 new files, a patch, and
changes to 2 Mac project files. I am attaching the patch, and the new files

You'll need to add the .idl files to netwerk/macbuild/netwerkIDL.mcp
and you'll need to add the .cpp file to netwerk/macbuild/netwerk.mcp to build on
This also fixes a few SOCKS 5 problems, including a fix to make it work on the
Mac. There is a new preference, network.proxy.socks_version, which can be "4" or
"5". There is no UI to set this peference yet, and I will add a defect to track
It looks like you're diffing against an old version of the tree - you have
.GetUnicode -> .get changes, as well as my chnages to get socks to work from
last week.

Also, http needs a single "should we send proxy-style requests?" bit. I hacked
in the socks chnages, and I was planning on discussing this with darin when he
gets back next week, as part of working out the API changes to fix bug 89500. If
you want to fix that bug as well, feel free to take it from me.
Added "patch" and "review" keywords.
Added bug 90989 to track the UI part of this.
Keywords: patch, review
Blocks: 92002
the patch looks fine to me w/ the exception of some few indentation problems...
just give it a thorough once over before checking in please.

r=bbaetz, assuming its been tested on mac/windows/linux.
I took another glance over these files and realized that you are referencing
nsIProxy which is a depracated interface.  Is there a reason why you need to
use it (er.. derive from it)?
I basically copied from nsISOCKSSocketInfo, the existing SOCKS 5 class, which
derives from it also.
This has been checked in. Set network.proxy.socks_version to 4 if you want to
use a SOCKS 4 server.

Closed: 24 years ago23 years ago
Resolution: --- → FIXED
Looks like this checkin may have suffered an integration problem. I am 
This is my fault; I didn't check in the patch to nsHttpConnection.h. I made it
locally, but then very carefully took the list of changed files from steve's
email, which didn't include this. Oops.

Untested patch coming up - Steve, can you test and review? darin, can I get an rs?
Attached patch oopsSplinter Review
While that should have been part of the checkin (r=smeredith on that patch), it
doesn't fix the problem I am seeing. It's something along similar lines though,
because if I hard-code the SOCKS 4 code to the SOCKS 5 layer, it works fine.
That indicates to me that the SOCKS 4 code is OK, but there is a problem hooking
it up. To see the problem, try A few of the frames show "Invalid
URL" on the first load or on a reload.

Still investigating.
Resolution: FIXED → ---
OK, I'll look into it.
Looks like this problem is related to recently changed bug 87407. If I set 
network.http.keep-alive to false, then SOCKS 4 works properly again. 
Sorry: make that bug 87047.
This time the mistake was mine. Bbaetz's last patch DID fix the problem I was
seeing--I had failed to apply it correctly. It's all good now.
Closed: 23 years ago23 years ago
Resolution: --- → FIXED

"SOCKS V4 is not supported in this release. SOCKS V5 is supported, Netscape will
attempt to make a SOCKS V5 connection to the server in your settings. If your
server supports only SOCKS V4, you will not be able to connect."
reassigning bug to myself
QA Contact: benc → trix
changing QA contact to
QA Contact: trix → lrg
If this is fixed, it really should be verified and put in the new features
section of the relnotes...
WFM with 2001102603 win Win32 with a socks4 proxy to test with.
Blocks: 48357
Attached patch OKa (obsolete) — Splinter Review
Attachment #118145 - Attachment is obsolete: true
Attached file hong
You need to log in before you can comment on or make changes to this bug.