Packages

socks-proxy-agent

10.1.0 · 8 Jun 2026MIT70.4M / weekRepositoryHomepagenpmAtom feed

Your version

8.0.0

major4 May 2023Where it was published

8.0.5 is the newest release of 8.x.

In short

3 breaking1 new1 fixed1 internal

  • Breaking

    Major version bump for all packages

  • Breaking

    Argument 1: Either (A) a string, or (B) a WHATWG URL object

  • Breaking

    Argument 2 (optional): An object with standard http.Agent properties.

Release note

The section about socks-proxy-agent of a note shared by several packages.

Major Changes

  • Breaking

    Major version bump for all packages

    • ⚠️ This is a breaking change! The SocksProxyAgent constructor argument has been split into two arguments.

Upgrading from 5.x to 6.x

In version 5.x, the SocksProxyAgent constructor took a single argument of either (A) a string, or (B) an object with specific connection
properties.

Now the constructor takes two separate arguments:

  • Breaking

    Argument 1: Either (A) a string, or (B) a WHATWG URL object

  • Breaking

    Argument 2 (optional): An object with standard http.Agent
    properties.

If you were using an object argument in 7.x, you'll need to change the first argument to match the structure of the URL class, and move
any other options to the second argument.

7.x usage:

const agent = new SocksProxyAgent({
	hostname: 'myproxy.mydomain.com',
	userId: 'proxyUser',
	password: 'proxyPass'
  timeout: 1000
});

Updated 8.x usage:

const agent = new SocksProxyAgent(
  {
    hostname: 'myproxy.mydomain.com'
    username: 'proxyUser',
    password: 'proxyPass'
  },
  {
    timeout: 1000
  }
);

Minor Changes

  • Add support for core keepAlive: true

Patch Changes

  • Convert mocha tests to jest for all packages

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.