Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 17, 2024 via pnpm

https-proxy-agent 7.0.2

An HTTP(s) proxy `http.Agent` implementation for HTTPS
Package summary
Share
0
issues
1
license
4
MIT
Package created
9 Jul 2013
Version published
4 Sep 2023
Maintainers
1
Total deps
4
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
agent-base@7.1.1
debug@4.3.4
https-proxy-agent@7.0.2
ms@2.1.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of https-proxy-agent 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
agent-base7.1.130.52 kBMIT
prod
debug4.3.412.94 kBMIT
prod

Visualizations

Frequently Asked Questions

What does https-proxy-agent do?

The "https-proxy-agent" is an npm package that provides an "http.Agent" implementation to connect through a specified HTTP or HTTPS proxy server. This package is compatible and works welter with the built-in "https" module. Its core advantage is the implementation of the CONNECT HTTP method, which allows setting up of a direct TCP connection to the destination server via an intermediary "proxy" server. The method's versatility makes it compatible with other protocols using similar methods to establish connections over proxies, which includes WebSockets.

How do you use https-proxy-agent?

Using "https-proxy-agent" is fairly straightforward. Below is an example of how you can use it with the "https" module:

import * as https from 'https';
import { HttpsProxyAgent } from 'https-proxy-agent';

const agent = new HttpsProxyAgent('http://168.63.76.32:3128');

https.get('https://example.com', { agent }, (res) => {
  console.log('"response" event!', res.headers);
  res.pipe(process.stdout);
});

And here's an example of using it for WebSocket connections:

import WebSocket from 'ws';
import { HttpsProxyAgent } from 'https-proxy-agent';

const agent = new HttpsProxyAgent('http://168.63.76.32:3128');
const socket = new WebSocket('ws://echo.websocket.org', { agent });

socket.on('open', function () {
  console.log('"open" event!');
  socket.send('hello world');
});

socket.on('message', function (data, flags) {
  console.log('"message" event! %j %j', data, flags);
  socket.close();
});

Where are the https-proxy-agent docs?

For more comprehensive information on the "https-proxy-agent", refer to the package's documentation available on its GitHub repository. The URL for the GitHub repository is https://github.com/TooTallNate/proxy-agents. Details about the "HttpsProxyAgent" class, its constructor, accepted arguments, and additional properties of the "options" argument can be found in the API section of the readme file in the repository. Keep up with the repository for any updates or changes in functionality.