简体   繁体   中英

node.js set proxy for http,https and ws connections globally

My problem is the following: In an app I am working on I need to use http, https and websocket connections all from behind a corporate proxy. All of these connections are established from submodules some of them thirdparty and with no option to specify a proxy server.

My question is: Is there a way to set a global proxy value that is honored by all submodules ?

Checkout this global-tunnel library . It might suit your needs.

To make all HTTP and HTTPS connections go through an outbound HTTP proxy

It may not work with websockets however.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM