diff options
author | yamanaka | 2003-11-21 02:48:53 -0500 |
---|---|---|
committer | yamanaka | 2003-11-21 02:48:53 -0500 |
commit | b44db246a41a185cbb00115934d3ce04c7b55ebe (patch) | |
tree | bf9debc7f7b0a99805b075a8cc0d9ccdb0c457a3 | |
parent | e4f6e643e3f6ec5930a65edfe1b5235439774d8b (diff) | |
download | eclipse.platform.team-b44db246a41a185cbb00115934d3ce04c7b55ebe.tar.gz eclipse.platform.team-b44db246a41a185cbb00115934d3ce04c7b55ebe.tar.xz eclipse.platform.team-b44db246a41a185cbb00115934d3ce04c7b55ebe.zip |
The authentication for SOCKS5 and HTTP proxy is supported.
-rw-r--r-- | bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/JSchSession.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/JSchSession.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/JSchSession.java index c0de27135..c4a332486 100644 --- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/JSchSession.java +++ b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/ccvs/ssh2/JSchSession.java @@ -85,13 +85,23 @@ class JSchSession{ String _host=store.getString(CVSSSH2PreferencePage.KEY_PROXY_HOST); String _port=store.getString(CVSSSH2PreferencePage.KEY_PROXY_PORT); + boolean useAuth=store.getString(CVSSSH2PreferencePage.KEY_PROXY_AUTH).equals("true"); + String _user=store.getString(CVSSSH2PreferencePage.KEY_PROXY_USER); + String _pass=store.getString(CVSSSH2PreferencePage.KEY_PROXY_PASS); + Proxy proxy=null; String proxyhost=_host+":"+_port; if(_type.equals(CVSSSH2PreferencePage.HTTP)){ proxy=new ProxyHTTP(proxyhost); + if(useAuth){ + ((ProxyHTTP)proxy).setUserPasswd(_user, _pass); + } } else if(_type.equals(CVSSSH2PreferencePage.SOCKS5)){ proxy=new ProxySOCKS5(proxyhost); + if(useAuth){ + ((ProxySOCKS5)proxy).setUserPasswd(_user, _pass); + } } else{ proxy=null; @@ -157,7 +167,6 @@ class JSchSession{ } }); } - private class YesNoPrompt implements Runnable{ private String prompt; private int result; |