To set Node.js global proxy setting, we use the global-tunnel-ng
package.
For instance, we write
const globalTunnel = require("global-tunnel-ng");
globalTunnel.initialize({
host: "10.0.0.10",
port: 8080,
proxyAuth: "userId:password",
sockets: 50,
});
to call initialize
with an object with the proxy options and credentials to connect to the proxy.