node-http-mitm-proxy
node-http-mitm-proxy copied to clipboard
upgradeReq is undefined
when use MITM proxy against github, it throws exception says ctx.clientToProxyWebSocket.upgradeReq
is undefined and hence "Cannot read property 'url' of undefined"
I think it is to do with upgradeReq no longer exist in websocket 3.0:
https://github.com/websockets/ws/issues/1114
as the version number in package for ws is 3.2.0, I guess it explains why.
it turns out the issue only happen in v0.6.0 tag https://github.com/joeferner/node-http-mitm-proxy/blob/v0.6.0/lib/proxy.js
can you please release a new version with the fix?
Same error here
http-mitm-proxy\lib\proxy.js:583
if (ctx.clientToProxyWebSocket.upgradeReq.url == '' || /^\//.test(ctx.clientToProxyWebSocket.upgradeReq.url)) {
^
TypeError: Cannot read property 'url' of undefined
I get this as well
normanzb I read the linked material and applied "the fix" somewhat blindly. It works on my machine. Can you take a look? (this project may be dead)
@acklenx all you need to do is use the code from master branch of this repository, this is only an issue with v0.6.0, the author marked it with wrong version of ws.