JDK-8368157 : DefaultProxySelector should handle ws/wss protocol like the http/https protocol
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2025-09-19
  • Updated: 2025-10-17
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
When calling the a proxy selector with an ws/wss uri it should return the http/https proxies configured, as the ws/wss protocol does build up on a http/https connection. The current DefaultProxySelector implementation does not handle this at all, so ws/wss uris will never return a proxy.

e.g. these should return the same proxy infos, as both will connect using https
ProxySelector.getDefault().select(URI.create("https://www.openjdk.com"));
ProxySelector.getDefault().select(URI.create("wss://www.openjdk.com"));