Skip to content

2.3.1

Compare
Choose a tag to compare
@JoshGlazebrook JoshGlazebrook released this 03 Feb 06:49
· 42 commits to master since this release
  • 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
  }
};