Bug 19258 - Update Manager does not support Proxy connection
Summary: Update Manager does not support Proxy connection
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Christophe Elek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 19717 21205 21799 22936 27244 (view as bug list)
Depends on: 22108
Blocks:
  Show dependency tree
 
Reported: 2002-06-05 04:10 EDT by Michael Acker CLA
Modified: 2005-06-03 08:25 EDT (History)
15 users (show)

See Also:


Attachments
Proposed plugin to correct the problem (126.69 KB, application/octet-stream)
2002-07-15 14:10 EDT, Laurent Fourrier CLA
no flags Details
Here is a new version of the plugin, see next item (77.08 KB, application/octet-stream)
2002-07-19 12:17 EDT, Laurent Fourrier CLA
no flags Details
ZIP package to use to install instead of previous two ones (62.55 KB, application/x-zip-compressed)
2002-09-07 09:55 EDT, Christophe Elek CLA
no flags Details
Fixes the Netaccess problem with Eclipse Version: 2.1, Build id: 200211151436 (40.56 KB, patch)
2002-12-05 07:05 EST, Selva CLA
no flags Details | Diff
Fixes the proxy login, password access problem (40.56 KB, application/octet-stream)
2003-01-29 07:45 EST, Selva CLA
no flags Details
Simple Java program to test proxy connection - No authentication (4.10 KB, text/plain)
2003-05-26 12:00 EDT, Christophe Elek CLA
no flags Details
Simple Java program to test HTTPProxy (Support java.net.Authentication) (6.08 KB, application/x-zip-compressed)
2003-05-26 17:55 EDT, Christophe Elek CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Acker CLA 2002-06-05 04:10:54 EDT
I could not found a place to specify a proxy for the connection to internet.
I think it is not supported. Most companys don't allow a direct access to 
internet without proxy.
Comment 1 Vlad Klicnik CLA 2002-06-07 13:06:49 EDT
Subject: 
             [update manager tip] Using update manager with a proxy
        Date: 
             Fri, 7 Jun 2002 11:16:03 +0200
        From: 
             "Christophe Avare" <christophe.avare@free.fr>
 Organization: 
             EclipseCorner
  Newsgroups: 
             eclipse.tools




As per bug http://bugs.eclipse.org/bugs/show_bug.cgi?id=19258:
"Update Manager does not support Proxy connection"
this will limit the interest (and tests phase) of the update feature.

As an interim workaround, one can add the following -vmargs when launching
Eclipse:

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

as documented in the JavaWorld Tip 42:
http://www.javaworld.com/javaworld/javatips/jw-javatip42.html

Enjoy!
--
Christophe
Comment 2 Christophe Elek CLA 2002-07-03 14:43:04 EDT
*** Bug 21205 has been marked as a duplicate of this bug. ***
Comment 3 Christophe Elek CLA 2002-07-03 15:26:56 EDT
By looking at the web, it seems that if a java.net.Authenticator is registered,
it should be used if the proxy server requires authentication.

Eclipse install/update uses such an authenticator for password protected sites.
<http://www.javaworld.com/javaworld/javatips/jw-javatip46.html>

Can anybody confirm that even when setting the proxy set host and port at
startupt, no dialog opens when you try to connect to a password protected proxy ?

(sorry I do not have a proxy to test with yet)
Comment 4 Christophe Elek CLA 2002-07-03 15:46:41 EDT
also found following syntax. Never tested. If it doesn't work inside eclipse,
consider this is a bug.

http://proxy.com:port/-_-http://target.com

(notice the -_- )
Comment 5 Christophe Elek CLA 2002-07-09 16:49:03 EDT
Tested authentication with a proxy.
The authenticator code is called and the authentication works. 

It may not work with every proxy.

nevertheless, we ought to fix and provide a place where the user will enter the
proxy server and the port number
Comment 6 Nitin Dahyabhai CLA 2002-07-09 23:15:35 EDT
How about SOCKS support?  As useful as HTTP proxy support is, there're
situations where a SOCKS4 or SOCKS5 server is the only way through a
firewall, and the System properties for SOCKS are different.
Comment 7 Christophe Elek CLA 2002-07-10 10:57:31 EDT
We'll need to work or this too and others

as a workaround, this should work
-vmargs -DsocksProxyHost=[your-socks-server] -DsocksProxyPort=[port]

Comment 8 Christophe Elek CLA 2002-07-10 15:29:26 EDT
*** Bug 19717 has been marked as a duplicate of this bug. ***
Comment 9 Laurent Fourrier CLA 2002-07-15 14:10:21 EDT
Created attachment 1697 [details]
Proposed plugin to correct the problem
Comment 10 Laurent Fourrier CLA 2002-07-15 14:14:57 EDT
The proposed plugin org.eclipse.netaccess can be used for the update manager, 
but also for other plugins needing net access (in fact, I felt the need using 
allTheNews).
Comment 11 Laurent Fourrier CLA 2002-07-19 12:17:09 EDT
Created attachment 1716 [details]
Here is a new version of the plugin, see next item
Comment 12 Laurent Fourrier CLA 2002-07-19 12:18:17 EDT
The new version of the proposed plugin do not longer manage authentification.
Instead, it relies completely on the standard java mechanism.
Comment 13 Vlad Klicnik CLA 2002-07-23 08:35:08 EDT
*** Bug 21799 has been marked as a duplicate of this bug. ***
Comment 14 Christophe Elek CLA 2002-07-30 09:00:44 EDT
IBM Application developer provides an HTTP proxy preference page for WebServices
connection.
It also provides an Authenticator.
If Install/Update Authenticator is registered before the IBM Authenticator, User
cannot connect to some proxy server from WebServices.
If the IBM Authenticator is registered before the Eclipse/Install/Update one,
user cannot access password protected update sites.

Will insvestigate with core about using the WebDav/FTP authenticator framework.
Investigate JDK 1.4 Authenticator Framework.
Comment 15 Laurent Fourrier CLA 2002-07-31 05:04:45 EDT
Obviously, (at least to me), the net proxies parameters should not be dependant 
on Install/Update, nor WebServices, nor WebDav. They should be managed at a 
relatively low level by Eclipse. Authentication is a problem, as many plugins 
have started managing it, and the jvm know of only one default authenticator. I 
think that authentication should also be managed at a low level, perhaps 
independently from proxy configuration (proxy authentication being a special 
case of authentication). Of course, it represent some work, and some rework for 
at least three plugin. But I'm sure some common reusable solution is to be 
searched.
Comment 16 Christophe Elek CLA 2002-08-28 12:26:59 EDT
*** Bug 22936 has been marked as a duplicate of this bug. ***
Comment 17 Christophe Elek CLA 2002-09-07 09:55:19 EDT
Created attachment 1950 [details]
ZIP package to use to install instead of previous two ones
Comment 18 Peter Manahan CLA 2002-10-11 09:52:51 EDT
What's the current status of this? It works? It doesn't but there is a work
around? What?

I knew about the Authenticator issues with the password sites but this one is
news to me. Expect a push for an workaround or an efix (which the user won't be
able to download cause he is behind a firewall :-) Of which many customers are.

I agree that the since the JVM only accepts 1 authenticator that eclipse
therefore should provide some services in this area for use by other plugins.

Comment 19 Nathaniel Talbott CLA 2002-11-21 19:05:24 EST
I was using the attached NetAccess plugin with M2 because it would prompt me 
for a username and password... however, on M3 it fails to do this. The proxy 
settings I specify ARE being used, because I get a 407 error, however I am no 
longer prompted to enter my username and password as I was under M2.

Two questions: 

1. How can I use an authenticating proxy under M3?
2. What is the longterm plan for proxy support in Eclipse?
Comment 20 Dejan Glozic CLA 2002-11-27 10:33:21 EST
*** Bug 27244 has been marked as a duplicate of this bug. ***
Comment 21 Selva CLA 2002-12-05 07:05:44 EST
Created attachment 2667 [details]
Fixes the Netaccess problem with Eclipse Version: 2.1, Build id: 200211151436

Added the missing authenticator part to the latest zip to take proxy username
and password. Checked in my box with Eclipse Version: 2.1, Build id:
200211151436, works fine.
Comment 22 Christophe Elek CLA 2003-01-20 08:45:38 EST
Action Taken: Authenticator issue fixed in builds > 20030115 
Comment 23 Christophe Elek CLA 2003-01-23 08:59:28 EST
Action taken: Implemented simple HTTP proxy conection. 
Action Plan: test
Comment 24 Ed Burnette CLA 2003-01-23 10:09:00 EST
Is NetAccess going to be incorporated into Eclipse?
Comment 25 Christophe Elek CLA 2003-01-23 10:10:46 EST
It is possible, we will have to review the code in details. So far nobody who is
using it complained :-)
Comment 26 Selva CLA 2003-01-29 07:45:05 EST
Created attachment 3210 [details]
Fixes the proxy login, password access problem

Uploaded the previous patch wrongly as text MIME type. Had to do a new upload
as octet-stream since the system does not allow changing the MIME type of an
already uploaded file.
Comment 27 Ed Burnette CLA 2003-01-29 09:44:55 EST
I have a suggestion - if it's not going in 2.1 then make netaccess a 
sourceforge project and bump its version number whenever it is changed. 
Another possibility would be make it an official add-on like the webdav/ftp 
package. Getting it from attachments to a bug report is just odd. I strongly 
suggest just putting it (or something like it) in 2.1 however because it's 
tiny, unobtrusive, and everyone behind a firewall needs it to use update 
manager.
Comment 28 Christophe Elek CLA 2003-01-29 10:14:55 EST
Action Taken: HTTP proxy support should be in 2.1
Comment 29 Christophe Elek CLA 2003-02-03 08:26:00 EST
Simple HTTP proxy. 
Bug considered fixed.
Added laurent as a contributor.
Test in M5
Comment 30 Ed Burnette CLA 2003-02-03 10:07:07 EST
I saw this appear in recent integration builds and it is welcome, but I have 
questions about it. It seems to be directly tied to the update manager (it's 
on the update manager preference page). NetAccess was global and other plugins 
(like the news reader) could use that setting. So the first question is: Is 
the update manager proxy setting really only for the update manager or is it 
global as well? The second question is: What about proxies for non-http 
requests? Finally: We use proxy-auto-config files in our browsers, would 
support for that be appropriate in Eclipse?
Comment 31 Christophe Elek CLA 2003-02-03 10:10:57 EST
Ed,
1) it is global although I agree a different page would be better
2) we do not support non-http proxy yet.
3) we do not support proxy-auto-config yet

This specific bug has been fixed (as it solves the problem it was open for)
but.... lots still need to be done.
I will open a different feature request. Please add yourself if you are interested.
Comment 32 Christophe Elek CLA 2003-02-03 10:15:14 EST
Opened bug 30815 as a feature request
Comment 33 Laurent Fourrier CLA 2003-02-03 14:46:55 EST
I didn't see it in the integration builds (cause I stay for the time being in
2.0.2), but I'd like to remind you of some points:
At first, UpdateManager was not my goal when I first developped what became
NetAccess. It was AllTheNews. But my solution for AllTheNews was transposable to
answer the bug in NetAccess. So, I think NetAccess should not be tied to
UpdateManeger. Because of the working of java, NetAccess work by setting the
(only one) default manager.For it to work, all plugins must rely on it and not
try to set it themselves. Another reason to not integrate it fully in
UpdateManager is that, as providing a general service to plugins, NetAccess need
to be loaded very early in the startup process. So the smaller the plugin, the
less time it need to load. 
As for interpreting proxy-auto-config files, it is far more easy in a browser
with a javascript interpreter that in a small plug-in. I don't feel like to have
to load fesi or rhino (if they are licence compatible) just to parse a small
script. But I know some admins are sufficiently creative that we need the big
tool here. (And ideally, I think the user should be able to override auto proxy,
at least for some host like localhost and 127.0.0.1, that, if not taken care of
by the administrator, ends up in the default.
Comment 34 Christophe Elek CLA 2003-02-04 06:18:34 EST
we all agree on #1. This bug is only to fix the HTTP proxy issue. There is more
to do...
for #2 (auto proxy) it was once suggested to look for OS API (like Win32 API)
Please use bug 30815 to elaborate on this subject
Comment 35 Christophe Elek CLA 2003-05-26 12:00:23 EDT
Created attachment 4965 [details]
Simple Java program to test proxy connection - No authentication

This is a simple Java Program to run outside of Eclipse to determine if the
problem  is in Eclipse or in the proxy configuration
Comment 36 Christophe Elek CLA 2003-05-26 17:55:39 EDT
Created attachment 4970 [details]
Simple Java program to test HTTPProxy (Support java.net.Authentication)

Download the zip file 
Unzip it in a temporary directory
Open a command prompt window
Go to the directory where you unzipped the file
Type "java -cp . TestProxy"
Answer the questions the program will ask you
Comment 37 Raj CLA 2005-06-03 08:25:50 EDT
Is the authorization this still unresolved ?
There is no option for setting the username & password for the proxy & it still 
gives 407 error when tryng install/upgrade.


(In reply to comment #36)
> Created an attachment (id=4970) [edit]
> Simple Java program to test HTTPProxy (Support java.net.Authentication)
> Download the zip file 
> Unzip it in a temporary directory
> Open a command prompt window
> Go to the directory where you unzipped the file
> Type "java -cp . TestProxy"
> Answer the questions the program will ask you