deno does not support http proxy

Created on 24 Aug 2018  路  8Comments  路  Source: denoland/deno

I set a http/https proxy on os:

baas@SZX1000428520:~/git/js/deno$ env | grep proxy
http_proxy=http://10.77.28.6:9090
https_proxy=http://10.77.28.6:9090

but deno cannot use them:

baas@SZX1000428520:~/git/js/deno$ deno hello.ts
Downloading http://unpkg.com/[email protected]/testing.ts
Error: Cannot resolve module "http://unpkg.com/[email protected]/testing.ts" from "/home/baas/git/js/deno/hello.ts".
  os.codeFetch message: an error occurred trying to connect: Connection timed out (os error 110)
    at throwResolutionError (deno/js/compiler.ts:99:9)
    at DenoCompiler.resolveModule (deno/js/compiler.ts:362:16)
    at DenoCompiler.resolveModuleName (deno/js/compiler.ts:396:33)
    at moduleNames.map.name (deno/js/compiler.ts:552:33)
    at Array.map (<anonymous>)
    at DenoCompiler.resolveModuleNames (deno/js/compiler.ts:543:24)
    at Object.compilerHost.resolveModuleNames (deno/third_party/node_modules/typescript/lib/typescript.js:111649:117)
    at resolveModuleNamesWorker (deno/third_party/node_modules/typescript/lib/typescript.js:82561:106)
    at resolveModuleNamesReusingOldState (deno/third_party/node_modules/typescript/lib/typescript.js:82768:24)
    at processImportedModules (deno/third_party/node_modules/typescript/lib/typescript.js:84005:35)

Most helpful comment

@zekth could you a tutorial how to use the hyper_proxy ? now im using deno on windows and got this problem because coorperate proxy

Working on it ATM. There is a draft PR. Have to make it work.

All 8 comments

Does anyone have a workaround for this? Tried using this on windows but does not work:

netsh winhttp set proxy 'proxyurl'

We can achieve it by using hyper_proxy library. At the moment Deno only uses hyper base library which does not offer the possibility to use a proxy.

Are you ok to add hyper_proxy ? I can handle this.

I'm also interested in this functionality.

@zekth could you a tutorial how to use the hyper_proxy ? now im using deno on windows and got this problem because coorperate proxy

@zekth could you a tutorial how to use the hyper_proxy ? now im using deno on windows and got this problem because coorperate proxy

Working on it ATM. There is a draft PR. Have to make it work.

ref: request's handlings of http proxy settings https://github.com/request/request#controlling-proxy-behaviour-using-environment-variables

npm seems depending on request for this feature. https://github.com/nodejs/node/blob/master/deps/npm/doc/misc/npm-config.md#https-proxy

FYI proxies should work on latest master, there's still tests missing tho

Support is in v0.17.0 - missing docs still https://github.com/denoland/deno/issues/2873

Was this page helpful?
0 / 5 - 0 ratings

Related issues

watilde picture watilde  路  3Comments

ry picture ry  路  3Comments

kyeotic picture kyeotic  路  3Comments

motss picture motss  路  3Comments

doutchnugget picture doutchnugget  路  3Comments