proxy-pac
Get/set proxy auto-config (PAC) file. Currently only supports OS X.
Install
$ npm install --save proxy-pac
Usage
const proxyPac = ; proxyPac;//=> 'Wi-Fi' proxyPac;//=> [ { name: 'Bluetooth DUN 2', url: null, enabled: false },// { name: 'Wi-Fi', url: 'http://test.com/proxy.pac', enabled: true },// { name: 'Bluetooth PAN', url: null, enabled: false },// { name: 'Thunderbolt Bridge', url: null, enabled: false } ] proxyPac;//=> [ 'Bluetooth DUN 2', 'Wi-Fi', 'Bluetooth PAN', 'Thunderbolt Bridge' ] proxyPac;//=> { name: 'Thunderbolt Bridge', url: null, enabled: false } proxyPac ;//=> { name: 'Thunderbolt Bridge', url: 'http:localhost:1234/proxy.pac', enabled: true } proxyPac;//=> { name: 'Thunderbolt Bridge', url: ' ', enabled: false }// NOTE: I couldn't find a way to set url to null or empty-string so it is set// to the space character (' ') instead. // ----------------------------------------------------------------// The APIs below perform the action on the current active service.// ---------------------------------------------------------------- proxyPac;//=> { name: 'Wi-Fi', url: 'http://test.com/proxy.pac', enabled: true } proxyPac;//=> { name: 'Wi-Fi', url: 'http://foo.bar/hello.pac', enabled: true } proxyPac;//=> { name: 'Wi-Fi', url: ' ', enabled: false } // ---------------------------------------------------------// The APIs below perform the action on all active services.// --------------------------------------------------------- proxyPac;//=> [ { name: 'Bluetooth DUN 2', url: 'http://just-a-test/proxy.pac', enabled: true },// { name: 'Wi-Fi', url: 'http://just-a-test/proxy.pac', enabled: true },// { name: 'Bluetooth PAN', url: 'http://just-a-test/proxy.pac', enabled: true },// { name: 'Thunderbolt Bridge', url: 'http://just-a-test/proxy.pac', enabled: true } ] proxyPac;//=> [ { name: 'Bluetooth DUN 2', url: ' ', enabled: false },// { name: 'Wi-Fi', url: ' ', enabled: false },// { name: 'Bluetooth PAN', url: ' ', enabled: false },// { name: 'Thunderbolt Bridge', url: ' ', enabled: false } ]
License
MIT © DaveJ