-
Bug
-
Resolution: Fixed
-
P4
-
6u30
-
b53
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084574 | emb-9 | Sean Coffey | P4 | Resolved | Fixed | team |
JDK-8086807 | 8u65 | Sean Coffey | P4 | Resolved | Fixed | b01 |
JDK-8073873 | 8u60 | Sean Coffey | P4 | Resolved | Fixed | b06 |
JDK-8074779 | 8u51 | Sean Coffey | P4 | Resolved | Fixed | b03 |
JDK-8074129 | 8u45 | Sean Coffey | P4 | Resolved | Fixed | b10 |
JDK-8138151 | emb-8u65 | Unassigned | P4 | Resolved | Fixed | b01 |
JDK-8074654 | emb-8u60 | Sean Coffey | P4 | Resolved | Fixed | team |
JDK-8074628 | emb-8u51 | Sean Coffey | P4 | Resolved | Fixed | team |
JDK-8074444 | emb-8u47 | Sean Coffey | P4 | Resolved | Fixed | team |
JDK-8073973 | 7u85 | Sean Coffey | P4 | Resolved | Fixed | b02 |
JDK-8074128 | 7u80 | Sean Coffey | P4 | Resolved | Fixed | b12 |
Exception in thread "main" java.net.SocketException: Unknown proxy type : HTTP
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:395)
at java.net.Socket.connect(Socket.java:578)
at java.net.Socket.connect(Socket.java:527)
at java.net.Socket.<init>(Socket.java:423)
at java.net.Socket.<init>(Socket.java:240)
.......
This issue has been reported on several forums and sites:
http://www.coderanch.com/t/580126/JNLP-Web-Start/java/SocketException-Unknown-proxy-type-HTTP
https://forums.oracle.com/forums/thread.jspa?threadID=2385257
http://stackoverflow.com/questions/2175742/connecting-with-different-proxies-to-specific-addresses
Minimal testcase to demonstrate the problem:
-------------
public class BadProxySelector {
public static void main(String[] args) throws Exception {
ProxySelector oldSelector = ProxySelector.getDefault();
ProxySelector.setDefault(new HTTPProxySelector());
try {
try (ServerSocket ss = new ServerSocket(0);
Socket s1 = new Socket(ss.getInetAddress(), ss.getLocalPort());
Socket s2 = ss.accept()) {
}
} finally {
ProxySelector.setDefault(oldSelector);
}
}
// always returns bogus HTTP proxies
private static class HTTPProxySelector extends ProxySelector {
@Override
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {}
@Override
public List<Proxy> select(URI uri) {
List<Proxy> proxies = new ArrayList<>();
proxies.add(new Proxy(Proxy.Type.HTTP,
new InetSocketAddress("localhost", 56789)));
proxies.add(new Proxy(Proxy.Type.HTTP,
new InetSocketAddress("localhost", 56784)));
return proxies;
}
}
}
-------------
- backported by
-
JDK-8073873 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8073973 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8074128 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8074129 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8074444 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8074628 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8074654 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8074779 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8084574 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8086807 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
-
JDK-8138151 Socket impls should ignore unsupported proxy types rather than throwing
- Resolved
- duplicates
-
JDK-8062305 Socket.connect() throws SocketException: Unknown proxy type : HTTP
- Closed