# socks5-https-client

> SOCKS v5 HTTPS client.

Latest version **1.2.1** (published 2017-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install socks5-https-client
pnpm add socks5-https-client
yarn add socks5-https-client
bun add socks5-https-client
```

## 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.2.1 |
| Published | 2017-06-21 |
| First published | 2013-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.4.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Matthew Caruana Galizia |
| Maintainers | mcg |
| Keywords | socks5, socksv5, socks, v5, https, ssl, tls, tor, client |

## Links

- npm: https://www.npmjs.com/package/socks5-https-client
- Repository: https://github.com/mattcg/socks5-https-client
- Issues: https://github.com/mattcg/socks5-https-client/issues
- npm.io page: https://npm.io/package/socks5-https-client

## Dependencies (1)

- [socks5-client](https://npm.io/package/socks5-client.md) ~1.2.3

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2017-06-21
- 1.2.0 — 2016-11-16
- 1.1.3 — 2016-06-06
- 1.1.2 — 2015-11-09
- 1.1.1 — 2015-07-18
- 1.1.0 — 2015-05-13
- 1.0.1 — 2015-02-25
- 1.0.0 — 2015-02-25
- 0.2.2 — 2013-10-10
- 0.2.1 — 2013-10-10
- 0.2.0 — 2013-08-27
- 0.1.3 — 2013-05-23
- 0.1.2 — 2013-04-18
- 0.1.1 — 2013-03-05
- 0.1.0 — 2013-03-05

## README

# SOCKS5 HTTPS Client #

[![Build Status](https://travis-ci.org/mattcg/socks5-https-client.png?branch=master)](https://travis-ci.org/mattcg/socks5-https-client)

SOCKS v5 HTTPS client implementation in JavaScript for Node.js.

```js
var shttps = require('socks5-https-client');

shttps.get({
	hostname: 'encrypted.google.com',
	path: '/',
	rejectUnauthorized: true // This is the default.
}, function(res) {
	res.setEncoding('utf8');
	res.on('readable', function() {
		console.log(res.read()); // Log response to console.
	});
});
```

Specify the `socksHost` and `socksPort` options if your SOCKS server isn't running on `localhost:1080`. Tor runs its SOCKS server on port `9050` by default, for example.

Username and password authentication is supported with the `socksUsername` and `socksPassword` options.

You may also pass a URL as the first argument to `get` or `request`, which will be parsed using `url.parse`.

## Using with Tor ##

Works great for making HTTPS requests through [Tor](https://www.torproject.org/).

Make sure a Tor server is running locally and run `node example/tor https://check.torproject.org/` to test.

## Using with Request ##

To use with [Request](https://github.com/mikeal/request), just pass a reference to the `Agent` constructor..

```js
var Agent = require('socks5-https-client/lib/Agent');

request({
	url: 'https://encrypted.google.com/',
	strictSSL: true,
	agentClass: Agent,
	agentOptions: {
		socksHost: 'my-tor-proxy-host', // Defaults to 'localhost'.
		socksPort: 9050 // Defaults to 1080.
	}
}, function(err, res) {
	console.log(err || res.body);
});
```

## HTTP ##

This client only provides support for making HTTPS requests. See [socks5-http-client](https://github.com/mattcg/socks5-http-client) for an HTTP implementation.

## License ##

Copyright © 2013 [Matthew Caruana Galizia](http://twitter.com/mcaruanagalizia), licensed under an [MIT license](http://mattcg.mit-license.org/).

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