Browse Source
The java.net.ProxySelector is quite a bit different from the one in Eclipse. Eclipse (and the OS) uses "socks" as URI scheme to look up a SOCKS proxy. java.net.ProxySelector needs "socket" as scheme (and internally maps that to "socks" if and when it asks the OS about the proxies). Moreover, java.net.ProxySelector may return unresolved addresses, whereas the Eclipse proxy selector always returns resolved addresses. Fix both by explicitly resolving unresolved proxy addresses and using scheme "socket" in the DefaultProxyDataFactory. Tested manually with the jgit command-line tool using ssh -vvv -D7020 localhost and 3proxy as SOCKS5 proxies on localhost (3proxy with user/password authentication). Start jgit with _JAVA_OPTIONS set to "-DsocksProxyHost=<host> -DsocksProxyPort=<port> -Djava.net.useSystemProxies=false" to test manually. Bug: 548965 Change-Id: Ib81ae8255ac2f9c48268f172e7d8ebb4a792b66d Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>stable-5.5
Thomas Wolf
5 years ago
2 changed files with 6 additions and 2 deletions
Loading…
Reference in new issue