socks5-http-client

WebJar for socks5-http-client

Лицензия

Лицензия

MIT
Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

socks5-http-client
Последняя версия

Последняя версия

1.0.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

socks5-http-client
WebJar for socks5-http-client
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

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

Скачать socks5-http-client

Как подключить последнюю версию

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : socks5-client jar [1.2.6,1.3)

Модули Проекта

Данный проект не имеет модулей.

SOCKS5 HTTP Client

Build Status

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

var shttp = require('socks5-http-client');

shttp.get('http://www.google.com/', function(res) {
	res.setEncoding('utf8');
	res.on('readable', function() {
		console.log(res.read()); // Log response to console.
	});
});

URLs are parsed using url.parse. You may also pass an options hash as the first argument to get or request.

Options

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.

Specify a username and password using socksUsername and socksPassword.

Using with Tor

Works great for making HTTP requests through Tor.

Make sure a Tor server is running locally and run node example/tor http://en.wikipedia.org/wiki/SOCKS to test.

Using with Request

To use with Request, just pass a reference to the Agent constructor.

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

request({
	url: 'http://en.wikipedia.org/wiki/SOCKS',
	agentClass: Agent,
	agentOptions: {
		socksHost: 'my-tor-proxy-host', // Defaults to 'localhost'.
		socksPort: 9050 // Defaults to 1080.
	}
}, function(err, res) {
	console.log(err || res.body);
});

HTTPS

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

License

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

Версии библиотеки

Версия
1.0.4