-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
Fix WebSockets in proxy
package
#6
Comments
Why don't you use github.com/gorilla/websocket ? |
AFAIK, that package is for managing WS conns with a client, I'm not sure if it helps with MITM proxying between a client and a server. But if you have ideas on how to implement it in the |
I can give it a try you want. |
I've made it in a working state. see github.com/ubogdan/hetty . Please let me know where does the websocket communication should be stored since we have requests and responses. |
websocket.go may require a rewrite since it's very messy at this time. The returning header may be important since websocket has a text protocol and a binary protocol. see: gorilla/websocket as reference |
Wow, nice! I'll have a look later this week, but quickly thinking about it: we probably need to first make some changes to the I'll circle back later this week to propose how to fit it in, OK? |
OK. Take your time. |
Not sure if these are suitable for MITM, but maybe https://github.com/koding/websocketproxy and https://github.com/yhat/wsutil/blob/master/wsutil.go can be helpful to look into. |
@dstotijn |
I agree, viewing and editing individual web socket messages would be completely in scope, appropriate, and useful. |
@dstotijn I guess there is no update for the interceptor module or a place where I can connect the WebSocket decoder in order to store the communication into the database. |
Proxying WebSockets (e.g. the upgrade process and handling frames) is not working at all. Should check if it's feasible with
httputil.ReverseProxy
and what the solution can be.The text was updated successfully, but these errors were encountered: