Node.js global proxy setting

前端 未结 5 2259
孤城傲影
孤城傲影 2020-12-12 16:58

I was working in a corporate network behind a proxy server. In my code I can set the proxy by using the approach mentioned in this thread.

But the problem is that mo

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 17:37

    I finally created a module to get this question (partially) resolved. Basically this module rewrites http.request function, added the proxy setting then fire. Check my blog post: https://web.archive.org/web/20160110023732/http://blog.shaunxu.me:80/archive/2013/09/05/semi-global-proxy-setting-for-node.js.aspx

提交回复
热议问题