# proxy-agent-https

> HTTPS Agent for node.js HTTPS requests via a proxy

Latest version **1.0.0** (published 2018-10-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install proxy-agent-https
pnpm add proxy-agent-https
yarn add proxy-agent-https
bun add proxy-agent-https
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-10-17 |
| First published | 2018-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jerryh |
| Maintainers | jerryh |
| Keywords | https, proxy, agent |

## Links

- npm: https://www.npmjs.com/package/proxy-agent-https
- npm.io page: https://npm.io/package/proxy-agent-https

## Recent versions

- 1.0.0 (latest) — 2018-10-17

## README

proxy-agent-https
================
### An HTTP(s) proxy `https.Agent` implementation for HTTPS


This module provides an `https.Agent` implementation that connects to a specified
HTTP or HTTPS proxy server, and can be used with the built-in `https` module.


Installation
------------

Install with `npm`:

``` bash
$ npm install proxy-agent-https
```


Example
-------

``` js
var url = require('url');
var https = require('https');
var ProxyAgentHttps = require('proxy-agent-https');

// HTTP/HTTPS proxy to connect to
var proxy = process.env.http_proxy || 'https://localhost:3128';
console.log('using proxy server %j', proxy);

// HTTP endpoint for the proxy to connect to
var endpoint = process.argv[2] || 'http://nodejs.org/api/';
console.log('attempting to GET %j', endpoint);
var opts = url.parse(endpoint);

// create an instance of the `ProxyAgentHttps` class with the proxy server information
var agent = new ProxyAgentHttps(proxy);
opts.agent = agent;

https.get(opts, function (res) {
  console.log('"response" event!', res.headers);
  res.pipe(process.stdout);
});
```


License
-------

(The MIT License)

Copyright (c) 2018 Jerry He &lt;hypapyh@gmail.com&gt;

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---
_Source: https://npm.io/package/proxy-agent-https · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
