HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //usr/lib/node_modules/pm2/node_modules/pac-proxy-agent/README.md
pac-proxy-agent
===============
### A [PAC file][pac-wikipedia] proxy `http.Agent` implementation for HTTP and HTTPS

This module provides an `http.Agent` implementation that retreives the specified
[PAC proxy file][pac-wikipedia] and uses it to resolve which HTTP, HTTPS, or
SOCKS proxy, or if a direct connection should be used to connect to the
HTTP endpoint.

It is designed to be be used with the built-in `http` and `https` modules.

Example
-------

```ts
import * as http from 'http';
import { PacProxyAgent } from 'pac-proxy-agent';

const agent = new PacProxyAgent('pac+https://cloudup.com/ceGH2yZ0Bjp+');

http.get('http://nodejs.org/api/', { agent }, (res) => {
  console.log('"response" event!', res.headers);
  res.pipe(process.stdout);
});
```

[pac-wikipedia]: http://wikipedia.org/wiki/Proxy_auto-config