New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

socks5-https-client

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socks5-https-client

SOCKS v5 HTTPS client.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-4.1%
Maintainers
1
Weekly downloads
 
Created
Source

SOCKS5 HTTPS Client

Build Status

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

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

shttps.get({
	hostname: 'encrypted.google.com',
	path: '/',
	rejectUnauthorized: false // True by 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.

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 (see bundled example).

Using with Request

To use with Request, just pass an agent instance.

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

request({
	url: 'https://encrypted.google.com/',
	agent: new Socks5ClientHttpsAgent({
		socksHost: 'my-tor-proxy-host', // Defaults to 'localhost'.
		socksPort: 9050 // Defaults to 1080.
	})
}, function(err, res) {
	console.log(res);
});

HTTP

This client only provides support for making HTTPS requests. See socks5-http-client for an HTTP implementation.

License

Copyright © 2013 Matthew Caruana Galizia, licensed under an MIT license.

Keywords

FAQs

Package last updated on 25 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc