socks5-https-client

WebJar for socks5-https-client

License

License

MIT
Categories

Categories

CLI User Interface
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

socks5-https-client
Last Version

Last Version

1.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

socks5-https-client
WebJar for socks5-https-client
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mattcg/socks5-https-client

Download socks5-https-client

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/socks5-https-client/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>socks5-https-client</artifactId>
    <version>1.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/socks5-https-client/
implementation 'org.webjars.npm:socks5-https-client:1.2.1'
// https://jarcasting.com/artifacts/org.webjars.npm/socks5-https-client/
implementation ("org.webjars.npm:socks5-https-client:1.2.1")
'org.webjars.npm:socks5-https-client:jar:1.2.1'
<dependency org="org.webjars.npm" name="socks5-https-client" rev="1.2.1">
  <artifact name="socks5-https-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='socks5-https-client', version='1.2.1')
)
libraryDependencies += "org.webjars.npm" % "socks5-https-client" % "1.2.1"
[org.webjars.npm/socks5-https-client "1.2.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : socks5-client jar [1.2.3,1.3)

Project Modules

There are no modules declared in this project.

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: 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.

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, just pass a reference to the Agent constructor..

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.

		// Optional credentials
		socksUsername: 'proxyuser',
		socksPassword: 'p@ssw0rd',
	}
}, function(err, res) {
	console.log(err || res.body);
});

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.

Versions

Version
1.2.1