Last Comment Bug 233811 - Proxy: Changing socks needs restart
: Proxy: Changing socks needs restart
Status: RESOLVED WORKSFORME
: helpwanted
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: x86 Windows 2000
: P3 minor with 1 vote (vote)
: mozilla1.8beta2
Assigned To: Darin Fisher
: benc
: Patrick McManus [:mcmanus]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-11 01:21 PST by sudhir jain
Modified: 2005-03-21 19:27 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description sudhir jain 2004-02-11 01:21:03 PST
User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

While mozilla is running, if I change the socks proxy, mozilla still tries to
use the old proxy. I have to restart mozilla for the new setting to have effect.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Matthias Versen [:Matti] 2004-02-11 04:59:45 PST
-> Networking
Comment 2 benc 2004-02-11 16:15:54 PST
Do you get errors or feedback when you configure socks and try to connect BEFORE
your application restart?
Comment 3 sudhir jain 2004-02-11 23:34:23 PST
(In reply to comment #2)
> Do you get errors or feedback when you configure socks and try to connect BEFORE
> your application restart?

No, If I change socks proxy (without restart), it still tries to connect to the
old socks proxy without any message (error or feedback).
Comment 4 benc 2004-02-13 23:17:53 PST
Sudhir: okay. can you try one more thing for me (I don't have access to a socks
server anymore)...

If you simply configure the socks entry to a server that doesn't exist
(socks=127.0.0.2, port=1080) or a server that is not running (socks=127.0.0.1,
port=1080), do you get error mesages for each config (I'm assuming you are not
running a local socks server...)
Comment 5 sudhir jain 2004-02-16 22:30:55 PST
I changed my socks server to 127.0.0.1 (I am not running any local socks
server), I get this alert
The connection was refused when attempting to contact the proxy server you have
configured. Please check your proxy settings and try again.
Comment 6 benc 2004-06-11 09:29:12 PDT
CONFIRMED:
Mozilla 1.7fc3, Mac OS X 10.3.4.

There are actually two, related problems.

1- If you change from one socks server to another, you have to at least go
offline, online before the change takes effect, sometimes (worked about 50/50
for me).

2- If you go to a SOCKS proxy that requires authh, SOCKS basically dies and will
not work until your exit the profile. See big 122752.
Comment 7 Darin Fisher 2004-06-15 09:44:50 PDT
We need to forcibly toggle the browser offline/online after the proxy settings
are changed.  Otherwise, we end up with old keep-alive connections using the old
proxy settings.

This should be a fairly trivial thing to fix if someone wants to help out. 
There's already a nsIObserver for the proxy settings.
Comment 8 Malcolm Smith 2004-06-16 20:14:39 PDT
(In reply to comment #7)
> We need to forcibly toggle the browser offline/online after the proxy settings
> are changed.  Otherwise, we end up with old keep-alive connections using the old
> proxy settings.
> 
> This should be a fairly trivial thing to fix if someone wants to help out. 
> There's already a nsIObserver for the proxy settings.

I'm a little bit troubled by this explanation.  I've been testing my patch to
bug 134105, and have encountered some of these issues.  I've been testing with
my SOCKS server (see http://yallara.cs.rmit.edu.au/~malsmith/products/antinat/
), with feedback on.

This reports connections as they arrive, what SOCKS commands are executed, and
when a connection leaves.  My patch modifies the conversation between Mozilla
and the SOCKS server, and can *only* be changed for a new connection (a
kept-alive connection doesn't need to reconnect to SOCKS.)  Antinat's output
shows that new connections are being made, using the old settings.  So if it is
a keep-alive, it's internal reuse within Mozilla rather than reuse of a
connected socket.


Comment 9 Darin Fisher 2004-06-16 21:14:56 PDT
Malcolm: Good to know, thanks!
Comment 10 Malcolm Smith 2004-06-16 21:51:03 PDT
One other tidbit - changing from SOCKS4 to SOCKS5 or vice-versa does not need a
restart.  Mozilla picks up this setting correctly, even for destination hosts
that have been used recently.

I'm using Moz 1.8a1.
Comment 11 Darin Fisher 2004-06-17 09:43:34 PDT
I tested this with a trunk build, and I saw Mozilla picking up the proxy setting
changes dynamically.  I'm not sure how to proceed other than to recommend that
you provide a HTTP log.  Please see this URL for instructions:

  http://www.mozilla.org/projects/netlib/http/http-debugging.html

thanks!
Comment 12 Darin Fisher 2005-03-21 19:27:50 PST
WORKSFORME.  please reopen if you can reproduce the problem, and provide a HTTP
log per my previous instructions when you do.

Note You need to log in before you can comment on or make changes to this bug.