You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

proxy-from-env

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-from-env

Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.

0.0.1
Source
npmnpm
Version published
Weekly downloads
47M
2.46%
Maintainers
1
Weekly downloads
 
Created

What is proxy-from-env?

The proxy-from-env npm package is a utility for determining the proxy server to use for HTTP or HTTPS requests, based on environment variables. It interprets standard proxy environment variables like HTTP_PROXY, HTTPS_PROXY, and NO_PROXY, and provides a simple API to retrieve the correct proxy based on a given URL.

What are proxy-from-env's main functionalities?

Get proxy for URL

This feature allows you to determine the appropriate proxy for a given URL by considering the environment variables. The function `getProxyForUrl` returns the URL of the proxy server that should be used for the provided URL.

const getProxyForUrl = require('proxy-from-env').getProxyForUrl;
const url = 'http://example.com';
const proxy = getProxyForUrl(url);
console.log(proxy);

Other packages similar to proxy-from-env

Keywords

proxy

FAQs

Package last updated on 18 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts