RFR: 8368157: DefaultProxySelector should handle ws/wss protocol like the http/https protocol

Daniel Fuchs dfuchs at openjdk.org
Mon Feb 23 17:01:27 UTC 2026


On Mon, 23 Feb 2026 16:24:38 GMT, EunHyunsu <duke at openjdk.org> wrote:

> DefaultProxySelector.select() returns DIRECT for ws/wss URIs even when proxy properties are set. Since WebSocket tunnels over HTTP/HTTPS, ws/wss should use the same proxy settings.              
>                                                                                                                                                                                                     
> This normalizes ws to http and wss to https at the top of select(), matching what OpeningHandshake already does internally. Same fix applied to ProxySelector.of(). Javadoc and net-properties.html updated.

Hi, I do not understand what problem this PR is trying to solve. The code that makes the underlying HTTP request to obtain a ws/wss connection should be responsible for obtaining an HTTP proxy for that request. That's what the java.net.http implementation of websocket does, and I do not see a need for modifying the default proxy selector.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29882#issuecomment-3946009425


More information about the net-dev mailing list