Socket
Socket
Sign inDemoInstall

socks

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socks - npm Package Compare versions

Comparing version 2.6.2 to 2.7.0

.eslintrc.cjs

6

build/client/socksclient.js

@@ -48,2 +48,3 @@ "use strict";

callback(err);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return resolve(err); // Resolves pending promise (prevents memory leaks).

@@ -72,2 +73,3 @@ }

callback(err);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
resolve(err); // Resolves pending promise (prevents memory leaks).

@@ -91,2 +93,3 @@ }

static createConnectionChain(options, callback) {
// eslint-disable-next-line no-async-promise-executor
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {

@@ -100,2 +103,3 @@ // Validate SocksClientChainOptions

callback(err);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return resolve(err); // Resolves pending promise (prevents memory leaks).

@@ -113,3 +117,2 @@ }

try {
// tslint:disable-next-line:no-increment-decrement
for (let i = 0; i < options.proxies.length; i++) {

@@ -148,2 +151,3 @@ const nextProxy = options.proxies[i];

callback(err);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
resolve(err); // Resolves pending promise (prevents memory leaks).

@@ -150,0 +154,0 @@ }

1

build/common/util.js

@@ -19,3 +19,2 @@ "use strict";

function shuffleArray(array) {
// tslint:disable-next-line:no-increment-decrement
for (let i = array.length - 1; i > 0; i--) {

@@ -22,0 +21,0 @@ const j = Math.floor(Math.random() * (i + 1));

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

{
"name": "socks",
"private": false,
"version": "2.6.2",
"version": "2.7.0",
"description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.",

@@ -37,14 +37,14 @@ "main": "build/index.js",

"@types/ip": "1.1.0",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.15",
"coveralls": "^3.1.1",
"mocha": "^9.2.0",
"nyc": "15.1.0",
"prettier": "^2.5.1",
"socks5-server": "^0.1.1",
"ts-node": "^10.4.0",
"typescript": "^4.5.5"
"@types/mocha": "^9.1.1",
"@types/node": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"eslint": "^8.20.0",
"mocha": "^10.0.0",
"prettier": "^2.7.1",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
},
"dependencies": {
"ip": "^1.1.5",
"ip": "^2.0.0",
"smart-buffer": "^4.2.0"

@@ -56,30 +56,5 @@ },

"prettier": "prettier --write ./src/**/*.ts --config .prettierrc.yaml",
"coverage": "NODE_ENV=test nyc npm test",
"coveralls": "NODE_ENV=test nyc npm test && nyc report --reporter=text-lcov | coveralls",
"lint": "tslint --project tsconfig.json 'src/**/*.ts'",
"lint": "eslint 'src/**/*.ts'",
"build": "rm -rf build typings && prettier --write ./src/**/*.ts --config .prettierrc.yaml && tsc -p ."
},
"nyc": {
"extension": [
".ts",
".tsx"
],
"include": [
"src/*.ts",
"src/**/*.ts"
],
"exclude": [
"**.*.d.ts",
"node_modules",
"typings"
],
"require": [
"ts-node/register"
],
"reporter": [
"json",
"html"
],
"all": true
}
}

@@ -5,2 +5,4 @@ # socks [![Build Status](https://travis-ci.org/JoshGlazebrook/socks.svg?branch=master)](https://travis-ci.org/JoshGlazebrook/socks) [![Coverage Status](https://coveralls.io/repos/github/JoshGlazebrook/socks/badge.svg?branch=master)](https://coveralls.io/github/JoshGlazebrook/socks?branch=v2)

> Looking for Node.js agent? Check [node-socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent).
### Features

@@ -7,0 +9,0 @@

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { EventEmitter } from 'events';

@@ -10,7 +12,7 @@ import { SocksClientOptions, SocksClientChainOptions, SocksRemoteHost, SocksProxy, SocksClientBoundEvent, SocksClientEstablishedEvent, SocksUDPFrameDetails } from '../common/constants';

on(event: 'established', listener: (info: SocksClientEstablishedEvent) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: string, listener: (...args: unknown[]) => void): this;
once(event: 'error', listener: (err: SocksClientError) => void): this;
once(event: 'bound', listener: (info: SocksClientBoundEvent) => void): this;
once(event: 'established', listener: (info: SocksClientEstablishedEvent) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: string | symbol, ...args: unknown[]): boolean;
emit(event: 'error', err: SocksClientError): boolean;

@@ -40,3 +42,3 @@ emit(event: 'bound', info: SocksClientBoundEvent): boolean;

*/
static createConnection(options: SocksClientOptions, callback?: Function): Promise<SocksClientEstablishedEvent>;
static createConnection(options: SocksClientOptions, callback?: (error: Error | null, info?: SocksClientEstablishedEvent) => void): Promise<SocksClientEstablishedEvent>;
/**

@@ -51,3 +53,3 @@ * Creates a new SOCKS connection chain to a destination host through 2 or more SOCKS proxies.

*/
static createConnectionChain(options: SocksClientChainOptions, callback?: Function): Promise<SocksClientEstablishedEvent>;
static createConnectionChain(options: SocksClientChainOptions, callback?: (error: Error | null, socket?: SocksClientEstablishedEvent) => void): Promise<SocksClientEstablishedEvent>;
/**

@@ -54,0 +56,0 @@ * Creates a SOCKS UDP Frame.

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { Duplex } from 'stream';

@@ -3,0 +5,0 @@ import { Socket, SocketConnectOpts } from 'net';

@@ -13,3 +13,3 @@ import { SocksClientOptions, SocksClientChainOptions } from './constants';

*/
declare function shuffleArray(array: any[]): void;
declare function shuffleArray(array: unknown[]): void;
declare type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {

@@ -16,0 +16,0 @@ [K in Keys]?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc