Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
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

FAQs

Package last updated on 04 Mar 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc