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

Is there a way to set proxy settings ? #2014

Closed
ardole opened this issue Aug 17, 2021 · 3 comments
Closed

Is there a way to set proxy settings ? #2014

ardole opened this issue Aug 17, 2021 · 3 comments
Labels

Comments

@ardole
Copy link

ardole commented Aug 17, 2021

Hi !

Trying to use gitbeaker behind a corporate proxy, is it possible ?

Steps to reproduce

  • Behind a corporate proxy
  • Any request to Gitlab
const api = new Gitlab({
    host: 'https://gitlab.com',
    token: 'my-token',
});
let projects = await api.Groups.projects("anyid", {maxPages: 2, perPage: 40 });

Actual behavior

As no proxy has been defined...

RequestError: getaddrinfo ENOTFOUND gitlab.com

Thanks

@jdalrymple
Copy link
Owner

Hmm this is a good question, ill follow up when i have time to tinker

@jdalrymple
Copy link
Owner

It looks like this could be possible in the future, though would require some tweaks. Since we mainly use Got, here is an example of how they extended the basic got request to support proxies. Similar modifications could be made to either a custom requester, or natively in this library

@TBG-FR
Copy link

TBG-FR commented Apr 29, 2022

I think that feature would be great. I started used your lib because manually creating all request to fit Gitlab API was not really convenient, but now I'm blocked by the corporate proxy...

I'll see if I manage to tweak the code and create a PR !

@TBG-FR TBG-FR mentioned this issue May 3, 2022
3 tasks
@cosydney cosydney mentioned this issue May 4, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants