mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 21:24:26 +08:00
Bug: none Change-Id: I37f9e905ec2c9f1c6f988f18dc27995e2e56eaf1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6179962 Auto-Submit: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
pac-proxy-agent
A PAC file proxy http.Agent implementation for HTTP and HTTPS
This module provides an http.Agent implementation that retreives the specified
PAC proxy file 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
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);
});