-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 #224
Comments
The proxy must only be enabled for the request, if the request URL does not match the proxy exceptions |
Hi @helloanoop, Your are too fast with implementing. We should set the global env variables and use https://github.com/Rob--W/proxy-from-env/blob/master/index.js#L24 to check need for proxy, as axios is doing. It's a pity that the proxy login can't be done via environment variables. So we have to do something in the code and can't delegate the whole proxy work. |
Hey @mirkogolze !
I feel we should support it at both levels.
Yup agreed. We can provide flags to pass proxy config via cli arguments.
If I understand you correctly, you need to use proxy only for one request in the collection right? I think we can support a
Yes 😄, This was a bit rushed. Need to slow down. |
For me, the current proxy support does not work. But Bruno currently creates a GET request which results in an error page from the proxy. Edit: seems to be a library issue: Edit2: it works now thanks to #374 |
Hi @helloanoop, |
I think it can be cool to have also the ability to use OS proxy configuration (in windows is possible to set a proxy system wide, that most of the applications ignore :D ) |
We may be limited now by axios There is still a possibility of Bruno automatically reading OS proxy configuration and passing it on to axios. If it works, we can also provide a toggle to use os proxy configuration. |
https://www.npmjs.com/package/get-proxy-settings Normally under linux you should just honor env vars http_proxy, https_proxy, no_proxy (easy). UPDATE from axios npm page:
It seems that axios already honor env vars. |
I found an issue with Node.js + axios concerning Proxy, HTTPS and proper HTTP Injecting e.g. As I observed the same errors and timeouts in Bruno I got in my own Node.js scripts, I suspect Bruno is also missing such a layer for Proxy + HTTPS. I still have to switch to Insomnia for such edge cases. This is not a complaint - more a feature request/raising awareness - because I'd like to move completely to Bruno as soon as possible and it probably doesn't just affect me. :-) |
Hi @Tilogorn, |
Hi @mirkogolze with "my scripts" I was rereferring to a completely different Node.js project that I am developing where I encountered problems with axios connecting to the outside https-world. My company proxy always returned 502/Read Error (Squid). It got fixed by using As I wanted to execute the same requests in Bruno that I did via code in my project, I set everything up - also the Bruno proxy settings - but I got the same 502/Read Error as ealier in Node.js before injecting Now that you showed me that you already use I am now at a point where my custom Node.js scripts work but Bruno with the same setup does not and I am not sure how to debug that further. |
When you have time you could try that out with Bruno. You could switch to |
It would be nice, if ProxySettings on CollectionLevel can use Environment Variable ? This would easy switch between different proxyServers in different Setups ? |
Hi, bruno looks very promising but I currently can't get it to work from behind my corporate proxy. I've tried adding the proxy configuration to global or collection settings but all of my requests time out. |
You can try to look into the dev tools inside Bruno and see if the console is logging something. |
Thanks for the quick reply. The console shows two errors directly on startup
I'm not sure if that can explain anything. |
I am running into the same error on startup. It's actually blocking me from making https requests where the certificate is invalid even with SSL verification off. This is a huge bug that needs to get fixed ASAP |
OK, I hadn't explored the HTTPS angle. Here are some new findings: GET http://example.com and https://example.com time out from behind my corporate proxy with the proxy configuration. GET http://example.com works from behind my corporate proxy if I disable the proxy configuration (it shouldn't). Is Bruno using the underlying system proxy configuration? GET https://example.com gives me a 502 "Connection reset by peer" with proxy disabled |
No. There is no system configuration used.
|
Can we not save the proxy password in the bruno.json file? |
I need to not go through the proxy to be able to reach the services, I've used this configuration to disable the proxy for Bruno:
But its does not work! Any Idea about how can I set up Bruno to not go through proxy correctly? |
axios is using the environment variables HTTP_PROXY and HTTPS_PROXY, if present. Please check if the are set on your machine globally. |
Yes they are set globally on my machine along with no_proxy variable. |
Hi, to add on to this issue, there is a problem with the CLI and also unexpected (maybe?) default proxy behavior. CLI: Default behavior question: |
@mleziva Agree that we need to make changes in CLI to keep it upto date with how the app treats proxy settings. Can you create a new issue specifically for the CLI? |
User should be able to use proxy at the collection level and app level
Tasks
bruno.json
Below is the axios config to use proxy
The text was updated successfully, but these errors were encountered: