get-system-proxy-for-url

1.0.0 • Public • Published

get-system-proxy-for-url

Gets the proxy to be used for a given url from the operating system. Currently only supports Windows. Internally will use PowerShell script getSystemProxyForUrl.ps1 (included)

Installation

$ npm i -S get-system-proxy-for-url
$ yarn add get-system-proxy-for-url

Quick start

var url = require('url');
var getSystemProxyForUrl = require('get-system-proxy-for-url');
 
getSystemProxyForUrl("http://google.com")
.then(function(proxy) {
    if (proxy === "DIRECT") {
        console.log("proxy not required");
    } else {
        var endpoint = url.parse(proxy);
        console.log(endpoint.href);
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i get-system-proxy-for-url

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

6.07 kB

Total Files

6

Last publish

Collaborators

  • kasajian