{"repo":"gajus/global-agent","free":true,"listed":false,"github":"https://github.com/gajus/global-agent","clone":"git clone https://github.com/gajus/global-agent.git","description":"Global HTTP/HTTPS proxy agent configurable using environment variables.","language":"TypeScript","stars":417,"topics":["nodejs","http","https","global","proxy"],"license":null,"category":"networking-infra","readme_excerpt":"global-agent Global HTTP/HTTPS proxy configurable using environment variables. Usage Setup proxy using global-agent/bootstrap Setup proxy using bootstrap routine Runtime configuration Exclude URLs API createGlobalProxyAgent Environment variables global.GLOBAL AGENT Supported libraries FAQ What is the reason global-agent overrides explicitly configured HTTP(S) agent? What is the reason global-agent/bootstrap does not use HTTP PROXY ? What is the difference from global-tunnel and tunnel ? Usage Setup proxy using global-agent/bootstrap To configure HTTP proxy: 1. Import global-agent/bootstrap . 1. Export HTTP proxy address as GLOBAL AGENT HTTP PROXY environment variable. Code: Bash: Alternatively, you can preload module using Node.js --require, -r configuration, e.g. Setup proxy using bootstrap routine Instead of importing a self-initialising script with side-effects as demonstrated in the setup proxy using global-agent/bootstrap documentation, you can import bootstrap routine and explicitly evaluate the bootstrap logic, e.g. This is useful if you need to conditionally bootstrap global-agent , e.g. Setup proxy using createGlobalProxyAgent If you do not want to use global.GLOBAL AGENT variable, then you can use createGlobalProxyAgent to instantiate a controlled instance of global-agent , e.g. Unlike bootstrap routine, createGlobalProxyAgent factory does not create global.GLOBAL AGENT variable and does not guard against multiple initializations of global-agent . The result object ","default_branch":null,"files":null,"tree":[],"storefront":"/r/gajus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gajus/global-agent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}