node-http-mitm-proxy
node-http-mitm-proxy copied to clipboard
onWebsocketUpgrade callback support
According to the docs of the ws library, the recommended way to implement authenticated websockets is by registering a listener for the 'upgrade' event on the ws server (see the docs.
To follow the already implemented pattern in this proxy, I propose adding a onWebsocketUpgrade method which can be used to register such an authentication method.
I'll be happy to do the PR for this if it makes sense to the maintainers.