[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
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
Set the HTTPS_PROXY or HTTP_PROXY environment variable to the URL of a proxy server.
Deploy a Deno application that makes an outbound fetch HTTP/HTTPS request.
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.
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
andHTTP_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
HTTPS_PROXY
orHTTP_PROXY
environment variable to the URL of a proxy server.Expected behavior
Expected behavior:
Deno Deploy should respect the
HTTPS_PROXY
andHTTP_PROXY
environment variables and use the specified proxy for outbound HTTP/HTTPS requests.Actual behavior:
The
HTTPS_PROXY
andHTTP_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