Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 102654 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java (-13 / +11 lines)
Lines 396-427 Link Here
396
			}
396
			}
397
397
398
			if (jschSession == null) {
398
			if (jschSession == null) {
399
399
				boolean useProxy = CVSProviderPlugin.getPlugin().isUseProxy();
400
				boolean useProxy = store.getString(ISSHContants.KEY_PROXY).equals("true"); //$NON-NLS-1$
401
                Proxy proxy = null;
400
                Proxy proxy = null;
402
				if (useProxy) {
401
				if (useProxy) {
403
					String _type = store.getString(ISSHContants.KEY_PROXY_TYPE);
402
					String _type = CVSProviderPlugin.getPlugin().getProxyType();
404
					String _host = store.getString(ISSHContants.KEY_PROXY_HOST);
403
					String _host = CVSProviderPlugin.getPlugin().getProxyHost();
405
					String _port = store.getString(ISSHContants.KEY_PROXY_PORT);
404
					String _port = CVSProviderPlugin.getPlugin().getProxyPort();
406
405
407
					boolean useAuth = store.getString(ISSHContants.KEY_PROXY_AUTH).equals("true"); //$NON-NLS-1$
406
					boolean useAuth = CVSProviderPlugin.getPlugin().isUseProxyAuth();
408
					String _user = ""; //$NON-NLS-1$
407
					String _user = ""; //$NON-NLS-1$
409
					String _pass = ""; //$NON-NLS-1$
408
					String _pass = ""; //$NON-NLS-1$
410
					
409
					
411
					// Retrieve username and password from keyring.
410
					// Retrieve username and password from keyring.
412
					Map map = Platform.getAuthorizationInfo(CVSSSH2PreferencePage.FAKE_URL, "proxy", CVSSSH2PreferencePage.AUTH_SCHEME); //$NON-NLS-1$
411
					if(useAuth){
413
				    if(map!=null){
412
						_user=CVSProviderPlugin.getPlugin().getProxyUser();
414
				      _user=(String) map.get(ISSHContants.KEY_PROXY_USER);
413
						_pass=CVSProviderPlugin.getPlugin().getProxyPassword();
415
				      _pass=(String) map.get(ISSHContants.KEY_PROXY_PASS);
414
					}
416
				    }
417
415
418
					String proxyhost = _host + ":" + _port; //$NON-NLS-1$
416
					String proxyhost = _host + ":" + _port; //$NON-NLS-1$
419
					if (_type.equals(ISSHContants.HTTP)) {
417
					if (_type.equals(CVSProviderPlugin.PROXY_TYPE_HTTP)) {
420
						proxy = new ProxyHTTP(proxyhost);
418
						proxy = new ProxyHTTP(proxyhost);
421
						if (useAuth) {
419
						if (useAuth) {
422
							((ProxyHTTP) proxy).setUserPasswd(_user, _pass);
420
							((ProxyHTTP) proxy).setUserPasswd(_user, _pass);
423
						}
421
						}
424
					} else if (_type.equals(ISSHContants.SOCKS5)) {
422
					} else if (_type.equals(CVSProviderPlugin.PROXY_TYPE_SOCKS5)) {
425
						proxy = new ProxySOCKS5(proxyhost);
423
						proxy = new ProxySOCKS5(proxyhost);
426
						if (useAuth) {
424
						if (useAuth) {
427
							((ProxySOCKS5) proxy).setUserPasswd(_user, _pass);
425
							((ProxySOCKS5) proxy).setUserPasswd(_user, _pass);
(-)src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2PreferencePage.java (-2 / +2 lines)
Lines 114-124 Link Here
114
    TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
114
    TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
115
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_19); 
115
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_19); 
116
    tabItem.setControl(createGeneralPage(tabFolder));
116
    tabItem.setControl(createGeneralPage(tabFolder));
117
117
/*
118
    tabItem = new TabItem(tabFolder, SWT.NONE);
118
    tabItem = new TabItem(tabFolder, SWT.NONE);
119
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_20); 
119
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_20); 
120
    tabItem.setControl(createProxyPage(tabFolder));
120
    tabItem.setControl(createProxyPage(tabFolder));
121
121
*/
122
    tabItem = new TabItem(tabFolder, SWT.NONE);
122
    tabItem = new TabItem(tabFolder, SWT.NONE);
123
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_21); 
123
    tabItem.setText(CVSSSH2Messages.CVSSSH2PreferencePage_21); 
124
    tabItem.setControl(createKeyManagementPage(tabFolder));
124
    tabItem.setControl(createKeyManagementPage(tabFolder));

Return to bug 102654