How to use the socks.SocksClient function in socks

To help you get started, we’ve selected a few socks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TooTallNate / node-socks-proxy-agent / index.js View on Github external
/**
 * Module dependencies.
 */

var tls; // lazy-loaded...
var url = require('url');
var dns = require('dns');
var Agent = require('agent-base');
var SocksClient = require('socks').SocksClient;
var inherits = require('util').inherits;

/**
 * Module exports.
 */

module.exports = SocksProxyAgent;

/**
 * The `SocksProxyAgent`.
 *
 * @api public
 */

function SocksProxyAgent(opts) {
	if (!(this instanceof SocksProxyAgent)) return new SocksProxyAgent(opts);
github ssbc / multiserver / plugins / onion.js View on Github external
var socks = require('socks').SocksClient;
var toPull = require('stream-to-pull-stream')

module.exports = function (opts) {
  if(!socks) { //we are in browser
    console.warn('onion dialing through socks proxy not supported in browser setting')
    return {
      name: 'onion',
      scope: function() { return 'public' },
      parse: function (s) { return null }
    }
  }

  opts = opts || {}
  var proxyOpts = {
    ipaddress: "127.0.0.1",
    //TODO: tor port should be configurable.

socks

Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.

MIT
Latest version published 4 months ago

Package Health Score

79 / 100
Full package analysis