-
Notifications
You must be signed in to change notification settings - Fork 967
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
Is there a chance to use a http/https proxy in proxy.js? #60
Comments
Hi Cliff, sorry for the delay in responding. Proxy support isn't not something that I think I could implement any time soon. But if you want to put in the work, I'd be interested to see what you come up with and would consider merging it in. |
If anyone wants to implement
data.remoteRequest = request(options)
data.remoteRequest.on('response', function(remoteResponse) {
data.remoteResponse = remoteResponse;
data.remoteRequest.on('error', next);
proxyResponse(data)
}) Seems to be working with minimal changes to the file. This gives you the option to add a Gist: https://gist.github.com/pepzwee/7dabaec9c3273a94f099e44a4e49e224 |
I think that data.remoteRequest.on('error', next); Should be data.remoteResponse.on('error', next); |
Ah, my bad. 😰 Yeah, it should be |
Cool. I like keeping the core of the library fairly low-level, but if you want to send a PR to make that part configurable, and then maybe an example that shows how to use It could be something like a And then if |
I checked unblocker/lib/proxy.js, and this module used http and https library to send real request.
It's a little hard to integrate proxy feature.
Maybe you could think about using request library to send request?
So that the proxy feature can be easily integrated.
The text was updated successfully, but these errors were encountered: