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

HTTP proxy authent with fetch #273

Open
nocquidant opened this issue Mar 15, 2024 · 5 comments
Open

HTTP proxy authent with fetch #273

nocquidant opened this issue Mar 15, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@nocquidant
Copy link

Hi, sometimes I need to attach one of my Lambdas to a VPC to access private ressources like ALB...
And then, I have to specify an HTTP proxy to be able to access the Internet (security requirement).
But as far I as know, fetch doesn't support HTTP proxy with authentication out of the box.
Do you have some guidelines here to make this use case work?
Thanks!
--nick

@nocquidant nocquidant changed the title HTTP proxy with authent HTTP proxy with authent with fetch Mar 19, 2024
@nocquidant
Copy link
Author

nocquidant commented Mar 19, 2024

It would be nice if variables: HTTP_PROXY, HTTPS_PROXY and NO_PROXY could be supported out of the box.
As bun did: oven-sh/bun#1440 (or Deno)
My understanding is that it is not supported yet in Node: nodejs/undici#1650
Would import the unidici dependency work (and configure the proxy agent)?

@nocquidant nocquidant changed the title HTTP proxy with authent with fetch HTTP proxy authent with fetch Mar 19, 2024
@richarddavison
Copy link
Contributor

Hi @nocquidant. So you wan't fetch to route request via a proxy configured via HTTP(s)_PROXY? How would you configure auth? Meanwhile, can you use something like s_client to work around that?

@nocquidant
Copy link
Author

nocquidant commented Mar 21, 2024

Hi, thanks for your response!
The HTTP(s)_PROXY URL supports credentials: http_proxy=http://user:password@proxy:port/
Humm, so I guess s_client would be installed via layer?
Not very convenient and doesn't the layer affect cold starts?

@richarddavison richarddavison added the enhancement New feature or request label Apr 2, 2024
@richarddavison
Copy link
Contributor

Thanks, we will add this!

@yollotltam yollotltam self-assigned this Apr 2, 2024
@nocquidant
Copy link
Author

Hi, any chance of implementing this in near future? I 'll need it for my next project. Thanks (just asking)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants