Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing proxy configuration support in WebSocket API #202

Open
glassfishrobot opened this issue May 17, 2013 · 8 comments
Open

Missing proxy configuration support in WebSocket API #202

glassfishrobot opened this issue May 17, 2013 · 8 comments
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Milestone

Comments

@glassfishrobot
Copy link

Currently there is no spec defined mechanism for providing proxy configurations when ClientEndpoint is behind a http proxy. There are multiple variations of implementations but still such configuration could be interfaced in spec defined way so that connectToServer methods in WebSocketContainer respect that.

Affected Versions

[1.0]

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by nickytd

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
markt_asf said:
java.net.ProxySelector looks to be the best way to do this at the moment. It is pluggable and falls back to the system properties.

The main question is should the URI passed to it be ws/wss or http/https?

ws/wss
Pros - allows different proxies to be used for web socket and http connections
Cons - not currently supported by ProxySelector

http/https
Cons - does not allow for different proxies for web socket and http
Pros - currently supported by ProxySelector

There is currently no way to differentiate between a "scheme not supported" response and an explicit "don't use a proxy for that scheme" response. Differentiation between the two would require a custom ProxySelector.

I'm leaning towards ws/wss and requiring a custom ProxySelector as that allows for a clear distinction between WebSocket and HTTP traffic.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
markt_asf said:
Having had 2+ years to reflect on this and to see how proxies have developed I've changed my mind on this. Using the http proxy settings for WebSocket should be fine.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
nickytd said:
Is there a related discussion on the JSR spec group?

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
markt_asf said:
No. This is just my personal opinion and what I intend to implement for Tomcat.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
nickytd said:
+1 I think I should have a patch somewhere using java.net.ProxySelector if I remember correctly ...

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA WEBSOCKET_SPEC-202

@glassfishrobot
Copy link
Author

@markt-asf markt-asf added API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one Jakarta EE 10 and removed Priority: Major Type: Improvement labels May 14, 2020
@markt-asf markt-asf added this to the backlog milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Projects
None yet
Development

No branches or pull requests

2 participants