denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

[Bug]: Unable to use proxy with Deno Deploy due to unstable API of createHttpClient and lack of support for HTTPS_PROXY and HTTP_PROXY environment variables #591

Open financesaucer opened 10 months ago

financesaucer commented 10 months ago

Problem description

Description:

I'm trying to use a proxy with Deno Deploy, but I'm encountering some issues. The Deno.createHttpClient API, which could potentially be used to set up a proxy, is currently marked as unstable.

Additionally, Deno Deploy does not seem to respect the HTTPS_PROXY and HTTP_PROXY environment variables, which are commonly used to configure a proxy.

This is causing difficulties in using Deno Deploy in environments where a proxy is required for outbound HTTP/HTTPS requests.

Steps to reproduce

  1. Set the HTTPS_PROXY or HTTP_PROXY environment variable to the URL of a proxy server.
  2. Deploy a Deno application that makes an outbound fetch HTTP/HTTPS request.
  3. Observe that the request does not go through the proxy. (simply fetch an ip api and it will return the server ip isntead of the proxy ip, you can see with ip.smartproxy.com/json that its google cloud isp)

Expected behavior

Expected behavior:

Deno Deploy should respect the HTTPS_PROXY and HTTP_PROXY environment variables and use the specified proxy for outbound HTTP/HTTPS requests.

Actual behavior:

The HTTPS_PROXY and HTTP_PROXY environment variables are ignored, and outbound HTTP/HTTPS requests do not go through the proxy.

Additional information:

This issue is preventing me from using Deno Deploy in my environment, where a proxy is required for outbound HTTP/HTTPS requests. I would appreciate it if this could be addressed.

Thank you.

Environment

No response

Possible solution

Enable usage of createHttpClient on deno deploy or the use of proxy env variables.

Additional context

No response

hpandelo commented 2 days ago

Same issue here