Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pac-resolver

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pac-resolver - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

8

History.md
1.1.0 / 2014-01-25
==================
* index: make the `filename` configurable
* index: make the `sandbox` configurable
* index: add an `opts` argument
* README++
1.0.0 / 2014-01-08

@@ -3,0 +11,0 @@ ==================

13

index.js

@@ -61,6 +61,7 @@

* @param {String} str JS string
* @param {Object} opts optional "options" object
* @return {Function} async resolver function
*/
function generate (str) {
function generate (str, opts) {

@@ -76,3 +77,2 @@ // convert the JS FindProxyForURL function into

// the sandbox to use for the vm
// TODO: make configurable
var sandbox = {

@@ -92,2 +92,8 @@ dateRange: dateRange,

};
if (opts && opts.sandbox) {
// copy the properties from the user-provided `sandbox` onto ours
for (var i in opts.sandbox) {
sandbox[i] = opts.sandbox[i];
}
}

@@ -98,4 +104,3 @@ // for `facebook/regnerator`

// filename of the pac file for the vm
// TODO: make configurable
var filename = 'proxy.pac';
var filename = opts && opts.filename ? opts.filename : 'proxy.pac';

@@ -102,0 +107,0 @@ // evaluate the JS string and extract the FindProxyForURL generator function

{
"name": "pac-resolver",
"version": "1.0.0",
"version": "1.1.0",
"description": "Generates an asynchronous resolver function from a PAC file",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -29,4 +29,7 @@ pac-resolver

function FindProxyForURL(url, host) {
if (isInNet(myIpAddress(), "10.1.10.0", "255.255.255.0"))
if (isInNet(myIpAddress(), "10.1.10.0", "255.255.255.0")) {
return "PROXY 1.2.3.4:8080";
} else {
return "DIRECT";
}
}

@@ -33,0 +36,0 @@ ```

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