-
Notifications
You must be signed in to change notification settings - Fork 233
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
add proxy support to connect #105
Conversation
bin/wscat
Outdated
@@ -145,6 +146,9 @@ program | |||
'Enable slash commands for control frames ' + | |||
'(/ping, /pong, /close [code [, reason]])' | |||
) | |||
.option( | |||
'--proxy <[protocol://]host[:port]>', | |||
'Use proxy on given port (--connect only).') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should ideally specify that the proxy must be a HTTP/HTTPS proxy that support the CONNECT
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added that to the comment flag info.
package.json
Outdated
@@ -19,6 +19,7 @@ | |||
"license": "MIT", | |||
"dependencies": { | |||
"commander": "~3.0.0", | |||
"https-proxy-agent": "^2.2.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this does not work on Node.js >= 10.0.0, see TooTallNate/proxy-agents#73,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. We might need to wait until that gets merged in?
Unless you can think of a workaround?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we should wait.
@enriquegh |
@lpinca updated the https-proxy-agent version and verified it works on 10.9.0 and 10.16.3 |
Thank you. |
fixes #54
Adds a new --proxy flag that will implement an https-proxy-agent and use the proxy specified.
Used this to test if my proxy could handle WebSocket connections and worked like a charm.
Thought I'd do a PR for this since there was some interest at some point.