Need private packages and team management tools?Check out npm Teams »

pac-file-tester

1.0.1 • Public • Published

Pac File Tester

Build Status Coverage Status

Tests a PAC file and returns its output.

Usage

As a CLI tool

npm install pac-file-tester -g
pac-file-tester -f http://your.site/proxy.pac -u http://www.google.com

Options

  • -f --file, the url/path of the pac file to test.
  • -u --url, the url to test the pac file against.
  • -i --ip, the IP address to return from myIpAddress(), defaults to your primary IP. (Optional)
  • -c --compare, the url/path of another pac file to compare output & speed with. (Optional)

Pragmatically

npm install --save pac-file-tester
import {testPacFile, getFileContents} from 'pac-file-tester'
 
const test = async () => {
  const script = await getFileContents('http://pac.domain.com/proxy.pac')
 
  const result = await testPacFile(script, 'https://www.google.com')
}

Keywords

Install

npm i pac-file-tester

DownloadsWeekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

18.5 kB

Total Files

12

Last publish

Collaborators

  • avatar