mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 16:24:37 +03:00
add reverse proxying websocket connections
if we recognize that a request for a WebForward is trying to turn the connection into a websocket, we forward it to the backend and check if the backend understands the websocket request. if so, we pass back the upgrade response and get out of the way, copying bytes between the two. we do log the total amount of bytes read from the client and written to the client. if the backend doesn't respond with a websocke response, or an invalid one, we respond with a regular non-websocket response. and we log details about the failed connection, should help with debugging and any bug reports. we don't try to parse the websocket framing, that's between the client and the backend. we could try to parse it, in part to protect the backend from bad frames, but it would be a lot of work and could be brittle in the face of extensions. this doesn't yet handle websocket connections when a http proxy is configured. we'll implement it when someone needs it. we do recognize it and fail the connection. for issue #25
This commit is contained in:
10
rfc/index.md
10
rfc/index.md
@ -297,6 +297,16 @@ and many more, see http://sieve.info/documents
|
||||
9157 Revised IANA Considerations for DNSSEC
|
||||
9276 Guidance for NSEC3 Parameter Settings
|
||||
|
||||
# HTTP
|
||||
|
||||
2616 Hypertext Transfer Protocol -- HTTP/1.1
|
||||
7230 Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing
|
||||
9110 HTTP Semantics
|
||||
|
||||
# Websockets
|
||||
|
||||
6455 The WebSocket Protocol
|
||||
|
||||
# More
|
||||
|
||||
3339 Date and Time on the Internet: Timestamps
|
||||
|
Reference in New Issue
Block a user