Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 19, 2024 via pnpm

socks 2.7.1

Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.
Package summary
Share
0
issues
1
license
3
MIT
Package created
15 Feb 2013
Version published
2 Oct 2022
Maintainers
1
Total deps
3
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
ip@2.0.1
smart-buffer@4.2.0
socks@2.7.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of socks 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
ip2.0.115.13 kBMIT
prod
smart-buffer4.2.021.03 kBMIT
prod

Visualizations

Frequently Asked Questions

What does socks do?

Socks is a fully-featured SOCKS proxy client that supports SOCKSv4, SOCKSv4a, and SOCKSv5. It includes Bind and Associate functionality, providing users with comprehensive proxy support. This tool is perfectly suited for Node.js development environments because it enables developers to create and control proxy connections via code, ultimately establishing secure data routes.

How do you use socks?

Using Socks involves setting up your environment with Node.js v10.0+ and installing the Socks package using either npm (npm install --save socks) or yarn (yarn add socks). Afterward, you can start using Socks in your JavaScript or TypeScript code by importing the Socks package. Here is an example of how to use it:

// import the SocksClient
const SocksClient = require('socks').SocksClient;

// define connection options
const options = {
  proxy: {
    host: '159.203.75.200', // ipv4 or ipv6 or hostname
    port: 1080,
    type: 5 // Proxy version (4 or 5)
  },
  command: 'connect', // SOCKS command (createConnection factory function only supports the connect command)
  destination: {
    host: '192.30.253.113', // github.com (hostname lookups are supported with SOCKS v4a and 5)
    port: 80
  }
};

// create connection
SocksClient.createConnection(options)
.then(info => {
  console.log(info.socket);
  // <Socket ...>  (this is a raw net.Socket that is established to the destination host through the given proxy server)
})
.catch(err => {
  // Handle errors
});

Where are the socks docs?

You can find the Socks documentation in the package's GitHub repository. The docs provide a detailed description of its features, usage examples for various scenarios (like creating a connection, chaining proxies, or using the TCP relay and UDP relay), and information on how to migrate from v1. They also include a comprehensive API reference and guidelines for handling errors.