Bug 55006 - Add http proxy support for ClientEndpoint using system properties [PATCH]
Summary: Add http proxy support for ClientEndpoint using system properties [PATCH]
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.x-trunk
Hardware: PC All
: P2 enhancement with 1 vote (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-22 11:04 UTC by Niki Dokovski
Modified: 2015-11-23 22:21 UTC (History)
1 user (show)



Attachments
patch in WsWebSocketContainer (4.98 KB, patch)
2013-05-22 11:04 UTC, Niki Dokovski
Details | Diff
patch in WsWebSocketContainer, LocalString.properties (7.54 KB, patch)
2013-06-12 04:42 UTC, Niki Dokovski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Niki Dokovski 2013-05-22 11:04:02 UTC
Currently there is no support for utilization of http proxy for ClientEndpoints. Here is a patch that illustrates the usage of http(s).proxy(Host)(Port) system properties. A request for improvement in WebSocket JSR 356 can be found here https://java.net/jira/browse/WEBSOCKET_SPEC-202
Comment 1 Niki Dokovski 2013-05-22 11:04:26 UTC
Created attachment 30310 [details]
patch in WsWebSocketContainer
Comment 2 Mark Thomas 2013-05-30 14:34:09 UTC
I'd like to wait for some indication of which way the WebSocket EG is going to head on this before starting any implementation.

Generally, I dislike using system properties for any kind of configuration.
Comment 3 Konstantin Kolinko 2013-06-03 12:13:21 UTC
(In reply to Mark Thomas from comment #2)
> Generally, I dislike using system properties for any kind of configuration.

I do as well.

How about using ClientEndpointConfig.getUserProperties() to pass those?
Comment 4 Niki Dokovski 2013-06-12 04:42:43 UTC
Created attachment 30426 [details]
patch in WsWebSocketContainer, LocalString.properties

This is a patch in WsWebSocketContainer based on ProxySelector proposed by Mark, Still the patch doesn't address how the http proxy settings are specified. It just iterates over ProxySelector.getDefault(). The discussion in the JSR 356 EG should define the mechanism for describing the proxy per ClientEndpoint
Comment 5 Mark Thomas 2015-11-23 22:21:51 UTC
Thanks for the patch. I used it as a basis for the fix that has been applied to 9.0.x (for 9.0.0.M2 onwards), 8.0.x (for 8.0.30 onwards) and 7.0.x (for 7.0.66 onwards).