View | Details | Raw Unified | Return to bug 295030 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java (-3 / +16 lines)
Lines 241-249 Link Here
241
				// Only do this if platform service exists
241
				// Only do this if platform service exists
242
				if (proxyService != null && proxyService.isProxiesEnabled()) {
242
				if (proxyService != null && proxyService.isProxiesEnabled()) {
243
					// Setup via proxyService entry
243
					// Setup via proxyService entry
244
					URI target = new URI(directoryOrFile.toExternalForm());
244
					IProxyData selectedProxy = null;
245
					final IProxyData[] proxies = proxyService.select(target);
245
					final IProxyData socksProxy = proxyService.getProxyData(IProxyData.SOCKS_PROXY_TYPE);
246
					IProxyData selectedProxy = selectProxyFromProxies(target.getScheme(), proxies);
246
					if (socksProxy != null && socksProxy.getHost() != null) {
247
						// [bugzilla 295030] If the user has a SOCKS proxy
248
						// configured, use it regardless of the target's URI
249
						// scheme. The reason is that regardless of any factors,
250
						// we always use a SOCKS socket implementation and it
251
						// will always attempt to use the SOCKS server if one is
252
						// configured. If we're inconsistent here, things will
253
						// go awry at connect time.
254
						selectedProxy = socksProxy;
255
					} else {
256
						URI target = new URI(directoryOrFile.toExternalForm());
257
						final IProxyData[] proxies = proxyService.select(target);
258
						selectedProxy = selectProxyFromProxies(target.getScheme(), proxies);
259
					}
247
					if (selectedProxy != null) {
260
					if (selectedProxy != null) {
248
						proxy = new Proxy(((selectedProxy.getType().equalsIgnoreCase(IProxyData.SOCKS_PROXY_TYPE)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP), new ProxyAddress(selectedProxy.getHost(), selectedProxy.getPort()), selectedProxy.getUserId(), selectedProxy.getPassword());
261
						proxy = new Proxy(((selectedProxy.getType().equalsIgnoreCase(IProxyData.SOCKS_PROXY_TYPE)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP), new ProxyAddress(selectedProxy.getHost(), selectedProxy.getPort()), selectedProxy.getUserId(), selectedProxy.getPassword());
249
					}
262
					}

Return to bug 295030