-
-
Notifications
You must be signed in to change notification settings - Fork 938
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
Proxy support #79
Comments
I created a module for this, but didn't get the tests passing IIRC. I'll try finishing it asap. |
I've run into two great packages now that use @kevva is there anything I can do to help with your module? |
Yup, haven't been able to check if it's working correctly though. |
Is not working (as mentioned in other issue). Several companies don't have an actual "proxy" but rather, an HTTPS inspection point somewhere down the line. (Like, in my case, "Check Point Firewall"). This requires some self-signed certs to work and it definitely causes some issues by default with npm and other package managers. npm is easily solved with "strict-ssl=false". Curl has a flag for it as well. download worked great before whatever tweaks were made a few weeks ago. @kevva's fix probably did help those that have "real" proxies. I'm not a network admin, so I'm probably messing some of this lingo up. I did speak with my network guys here, though, and after a few days of research, this is where we landed. Hopefully this helps somehow. |
If you look at https://github.com/koichik/node-tunnel, do you see something there that might fix it? |
I immediately had the same thought after I saw your caw. Unfortunately, I don't see anything there. If I have some time, I'm going to look at npm and what exactly strict-ssl is doing. Even without an actual proxy, that config is the difference between working and not working. |
@sindresorhus Tears of joy here.
The workaround for I think your tunnel-agent is working good for traditional proxies. I wager this can be closed now. I'm certain there were people having my exact issue here, so hopefully this will help. |
Progress? |
This reverts commit c2d24c2. Unfortunately got does not have good [proxy support][1] which was missed during review. [1]: sindresorhus/got#79
This reverts commit c2d24c2. Unfortunately got does not have good [proxy support][1] which was missed during review. Fixes sass#1458 [1]: sindresorhus/got#79
This reverts commit c2d24c2. Unfortunately got does not have good [proxy support][1] which was missed during review. Fixes #1458 [1]: sindresorhus/got#79
New thread about adding proxy support to Node.js core: nodejs/node#8381 (Vote/comment please) |
fwiw, the node yeoman generator is also experiencing this issue: trailsjs/generator-node#1. Is there a patch available? |
Until this is fixed in Node, a workaround for Linux/BSD/macOS is to use proxychains-ng. You'll need your proxy server's IP address and port:
- which should be added to the end of
Then you're all set:
|
What do you guys think of https://github.com/stevenvachon/auto-tunnel before I publish? |
Is there any differences from https://github.com/kevva/caw? Could really use a PR if you notice anything that can be improved upon. |
@kevva I can see that @stevenvachon's |
|
What's the recommended way to use |
|
This allows the user to pass optional options through to the `got` instance. For instance, users can now connect via proxies. Here is an example using [`caw`](https://github.com/kevva/caw), as further described in [sindresorhus/got#435](sindresorhus/got#435 (comment)) and originally brought up in [sindresorhus/got#79](sindresorhus/got#79). ```js import Cloudflare from 'cloudflare': import caw from 'caw'; const cf = new Cloudflare({ email: '[email protected]', key: '<your API key here>', gotOptions: { agent: caw({ protocol: 'https' }) // Cloudflare API is HTTPS only } }); ```
NPM works fine with --https-proxy and --proxy, so its only logical that all modules built on top of it support this basic mechanism. I had a situation using npm with proxy where another module was using your module to build its depenedecies... well that did not work at all. I ended up fixing the issue with a workaround. So maybe this needs a another look as "A nicer interface to the built-in http module" (from your readme) is a big call if basic http modules functions are not replicated... thats just my 2cents |
Got is not built on top of npm.
The Node.js core |
Closing this as I don't see us adding native proxy support. It's just too complicated and would bloat Got. It can already be done by the user by following this recipe. |
Previous issue #7. I couldn't care less about this, but it's useful to have a place to refer people that open issues elsewhere.
A good PR would be accepted, but won't happen from my part.
I would prefer for the solution to be an external module
got
can just depend on as I don't want to have to maintain it. Maybe https://github.com/mikeal/tunnel-agent.I strongly believe this is something that should be a part of Node.js and not every module doing HTTP.
+1
this issue if you agree: nodejs/node#8381The text was updated successfully, but these errors were encountered: