Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 49790 - Proxy settings should not be buried in Update
Summary: Proxy settings should not be buried in Update
Status: RESOLVED DUPLICATE of bug 88017
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-09 15:24 EST by Bob Foster CLA
Modified: 2006-01-16 15:27 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Foster CLA 2004-01-09 15:24:17 EST
Currently, when (and if) the update plug-in is loaded, it calls the site manager
to set the proxy settings from its private preferences. The site manager, in
turn, sets the global System properties. There is a way to remove these System
property settings, but it is not used.

If I am not mistaken, it seems that if the user opens the Update perspective or
opens the preference page having to do with proxies, the System properties will
be set and the proxy server will be used for all http connections. Otherwise,
the System properties won't be set and the server won't be used. From the
perspective of other plug-ins making http connections, this behavior is random.

From first principles, if a configuration parameter has system-wide impact it
should be a general Eclipse feature, not confined to an optional plug-in, and
its behavior should be deterministic. Any proxy settings should be usable for
http pages loaded from Help or by any other plug-in.

Secondly, it seems wrong that the current update manager code will blithely
override any System properties set on the command line.

When a user of my plug-in reports that Update's proxy settings don't work for my
http connections, what am I to tell them? To open the Update proxy preferences
first? To specify the properties on the Eclipse command line, but be sure to use
the same values in the update settings, as update will clobber the command line
settings if it is ever used? As I said, random.

This is related to bug 30815, but that seems headed in the direction of the
Absolutely Perfect Proxy Solution including authentication, which makes it a
down-the-road feature request. This is a bug. Update should not behave the way
it does - update should not have anything at all to do with proxy settings - and
it should be fixed before it gets any worse (some other plug-in provides its own
proxy preferences page).
Comment 1 Dorian Birsan CLA 2004-01-09 15:50:02 EST
Bob, in 3.0 update will try to first use the settings passed on the eclipse 
command line, so it will not override anything. However, if the user changes 
them in the update preference page then they can set on System.

It would be nice to have a generic, common networking plugin that other 
plugins would use, but right now nothing is in the plans.

Help cannot use the proxy settings, because the client is the swt browser 
widget, and they pick up proxy settings differently. It would be nice if java 
could tap into system specific settins for proxies.

Comment 2 Bob Foster CLA 2004-01-09 16:23:17 EST
Thanks for the info. Checking the command line system properties would be an
improvement.

Common network plug-in aside, something still needs to be done to ensure that
the proxy preferences are set reliably during startup and not just if the user
happens to trigger loading the update plug-in.
Comment 3 Bob Foster CLA 2004-01-12 06:29:40 EST
A user advises me that the old way (below) of setting the proxy info via the
command line no longer works.

 -vmargs -DproxySet=true -DproxyHost=<proxy_name>-DproxyPort=<proxy_port>

(I don't have a proxy server to test this with myself so I am relying on a user
report.)

The same user reports that merely activating the update plug-in is not enough to
get the proxy settings available for non-update connections. (I'm not sure why,
looking at the code.)

Please tell me how users can set up Eclipse so proxy servers work with other
plug-ins. Thanks.

Comment 4 Dorian Birsan CLA 2004-01-12 16:03:05 EST
I think the proper parameter names (at least according to java) are:
 
 -vmargs -Dhttp.proxyHost=<proxy_name> -Dhttp.proxyPort=<proxy_port>
Comment 5 Bob Foster CLA 2004-01-12 18:18:18 EST
Yes, thanks. But according to the same user, this did not work, either.
Comment 6 Michael Spoonauer CLA 2004-03-08 14:54:24 EST
How can I prevent proxy settings that are established in the "Install/Update" 
preferences from being used when trying to validate and connect to required 
libraries' Javadoc locations, which are internal to our network?  Could a 
group of "ignore" address suffixes be added to the preferences page?

Thanks,
Mike  
Comment 7 Dorian Birsan CLA 2004-03-09 22:08:32 EST
Bob: 

I went through the debugger and I can see the proxy system properties 
correctly set. I don't have a proxy site to test, but at least we're doing 
what java specs. It would be good if your user can provide more details.

Mike:

The only workround I know of is to save the proxy system properties before 
doing your validation, and set them back to orginal values after done. Note 
this could also be a workaround for the original bug report.
Comment 8 Dorian Birsan CLA 2004-06-04 15:49:49 EDT
This is support that should be provided by core or by some other "commons" 
plugin. Moving to Core for comments.
Comment 9 Markus Milleder CLA 2004-10-22 07:55:50 EDT
Tested with 3.0.1 and the SWT samples from the Welcome page:
The syntax in #3 works, and seems to do the same as setting the proxy in the
Update prefs. The syntax in #4 needs a http.proxySet, then Eclipse picks it up
as well. http.nonProxyHosts is documented to allow specifying exceptions, but I
can't test whether Eclipse honors it.

Just setting the proxy in the prefs is not enough to be able to download the
samples (maybe because I am behind an authenticating proxy, don't have a simple
proxy to test).

If you are behind an authenticating proxy, you need to start Update and open a
site once to enter your un/pw, then downloading the examples works.
Comment 10 David Williams CLA 2005-09-13 13:02:31 EDT
see also bug 88017 for related request and discussion. 
Comment 11 John Arthorne CLA 2006-01-16 14:22:20 EST

*** This bug has been marked as a duplicate of 88017 ***