Skip to content
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

Adding HTTP Proxy #2482

Closed
wants to merge 1 commit into from
Closed

Adding HTTP Proxy #2482

wants to merge 1 commit into from

Conversation

TBG-FR
Copy link

@TBG-FR TBG-FR commented May 3, 2022

This PR aims to add the possibility to set a HTTP proxy, using environment variables. It answers to the following issue (and implemented a solution using the advice given here) : Is there a way to set proxy settings ?

So from now, you can set GLOBAL_AGENT_HTTPS_PROXY if you have proxy needs, and it will work 👌

Pull Request Process

  • Ensure any install or build dependencies are removed before the end of the layer when doing a build.
  • Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
  • Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is SemVer.

Additionnal notes

The solution implemented uses 'global-agent, but it looks like it didn't need a npm install global-agentto add it to thepackage.json, I suppose it's included in another lib used by the package (maybe got` ?). If you want me to add it "in case of", I can do that !

Thanks in advance for checking that PR 😄

closes #2014

@jdalrymple
Copy link
Owner

Amazing, ill give it a look to double check the functionality and its limits!

@TBG-FR
Copy link
Author

TBG-FR commented May 24, 2022

This needs further work. I finally stopped using gitbeaker and did my Gitlab API requests using "raw" node/ts for now.

When adding a proxy, gitbeaker's request (=> got requests) are facing a HTTP 403 Forbidden error which I couldn't solve. It works using fetch/got or even cURL, so I believe the issue lies in gitbeaker's code 👀 TODO

@twinkle77
Copy link

image

Global-agent may affects global code ?
What if I just want Got use a proxy
@TBG-FR

@jdalrymple
Copy link
Owner

Recently switched things to native fetch, is this functionality supported through the fetch api in any fashion?

@jdalrymple jdalrymple deleted the branch jdalrymple:master April 26, 2023 18:01
@jdalrymple jdalrymple closed this Apr 26, 2023
@cosydney cosydney mentioned this pull request May 4, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a way to set proxy settings ?
3 participants