0

I'm trying to run deno on my corporate machine. So I'm behind a corporate proxy.

When I try to run a command like:

deno run https://deno.land/std/http/server.ts

I get an error saying:

Download https://deno.land/std/http/server.ts
error: error sending request for url (https://deno.land/std/http/server.ts): error trying to connect: tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061)

I checked this GitHub Issue but it's still Open and without a resolution.

I also checked this GitHub Issue but without any luck.

There was a link pointing to some Manual in this GitHub Issue but it's broken.

Aleksey L.
  • 35,047
  • 10
  • 74
  • 84
SiddAjmera
  • 38,129
  • 5
  • 72
  • 110

1 Answers1

3

Ah! So I got the link to the manual for proxies here. As mentioned here:

Deno supports proxies for module downloads and the Web standard fetch API.

Proxy configuration is read from environmental variables: HTTP_PROXY and HTTPS_PROXY.

In case of Windows, if environment variables are not found Deno falls back to reading proxies from registry.

So I just set the HTTP_PROXY and HTTPS_PROXY environment variables to the proxy url(with format - http://my-proxy-domain.com:PORT/) and it started working.

Hope this helps others.

Community
  • 1
  • 1
SiddAjmera
  • 38,129
  • 5
  • 72
  • 110