• Stars
    star
    254
  • Rank 155,160 (Top 4 %)
  • Language
    JavaScript
  • Created about 11 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

socks5-https-client

SOCKS v5 HTTPS client implementation in JavaScript for Node.js.
JavaScript
185
star
2

language-subtag-registry

BCP 47/IANA language subtag data in JSON format.
JavaScript
73
star
3

language-tags

A Swiss Army knife for language tags.
JavaScript
64
star
4

har-to-curl

Convert a HAR (HTTP Archive) object to a cURL command using JavaScript.
JavaScript
58
star
5

socks5-client

SOCKS v5 client socket implementation in JavaScript for Node.JS.
JavaScript
56
star
6

network-byte-order

JavaScript implementation of htonl, htons, ntohl, ntohs - convert values between host and network byte order.
JavaScript
28
star
7

starttls

Upgrade a regular `net.Stream` connection to a secure `tls` connection.
JavaScript
14
star
8

exiflocation

Extract lat long data and get map location URLs from EXIF data in images.
JavaScript
12
star
9

php-mime

MIME type and file extension utilities for PHP.
PHP
9
star
10

ms-viewstate

Utility functions for working with VIEWSTATE and EVENTVALIDATION hashes in ASP.NET-generated HTML markup.
JavaScript
7
star
11

css3-translate

A tiny, functional CSS3 translation transforms API for JavaScript that shims browser-specific APIs.
JavaScript
7
star
12

cjsDelivery

Deliver CommonJS-syntax JavaScript modules to clients as a single file.
PHP
7
star
13

aemu

Android emulator tools: hosts file syncing, pasting, etc.
Shell
5
star
14

tiny-deferred

Does what it says on the tin and does it well. That is all.
JavaScript
4
star
15

stopImmediatePropagation

Polyfill for missing Event#stopImmediatePropagation support on older browsers.
JavaScript
4
star
16

cjsDeliveryBundle

Symfony2 Bundle that provides CommonJS module compilation in the form of an Assetic filter.
PHP
4
star
17

gexfphp

PHP
3
star
18

oauth-sessions

OAuth sessions with a separate storage engine interface and simple API.
JavaScript
2
star
19

node_dbxml

Unfinished, undocumented, experimental bindings to Berkeley DB XML
C++
2
star
20

responsive-ajax

Responsive AJAX for people who know what they're doing.
JavaScript
2
star
21

mattcg.github.com

1
star
22

ayuda-data

Ayuda oficial al desarrollo, 2007-2012, gobierno de España.
1
star
23

php-messageformat

Fast and reliable multilingual message formatting.
PHP
1
star
24

tuanis

Mapas coropléticos para Costa Rica.
JavaScript
1
star
25

zerofill

Zero-pad a number to the given size.
JavaScript
1
star
26

m17n-orm

Multilingual ORM for restful public interfaces.
JavaScript
1
star
27

penelope

An editor front-end for Neo4j.
PHP
1
star