socks
2.8.11 · 19 Nov 2026MIT84.1M / weekRepositoryHomepagenpmAtom feed
Your version
2.8.11 is the newest release of 2.x.
In short
2 changed
Release note
When creating connections, 'ipaddress' can now be a hostname (proxyserver1.com for example)
'host' property added to proxy config, this is intended to replace 'ipaddress'. (ipaddress remains for backwards compatibility)
The following are equivalent:
Using 'ipaddress':
const options = {
proxy: {
ipaddress: '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
}
};Using 'host'
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
}
};Hostnames are now allowed:
const options = {
proxy: {
host: 'proxy1.proxyservers.com', // 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
}
};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.