diff --git a/node_modules/socks/build/common/helpers.js b/node_modules/socks/build/common/helpers.js index 65bd95bdc6221..1ae44e4159a15 100644 --- a/node_modules/socks/build/common/helpers.js +++ b/node_modules/socks/build/common/helpers.js @@ -152,7 +152,11 @@ function ipToBuffer(ip) { else if (net.isIPv6(ip)) { // Handle IPv6 addresses const address = new ip_address_1.Address6(ip); - return Buffer.from(address.toByteArray()); + return Buffer.from(address + .canonicalForm() + .split(':') + .map((segment) => segment.padStart(4, '0')) + .join(''), 'hex'); } else { throw new Error('Invalid IP address format'); diff --git a/node_modules/socks/package.json b/node_modules/socks/package.json index 2c89eb578b47b..5cc2a6836072e 100644 --- a/node_modules/socks/package.json +++ b/node_modules/socks/package.json @@ -1,7 +1,7 @@ { "name": "socks", "private": false, - "version": "2.8.2", + "version": "2.8.3", "description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.", "main": "build/index.js", "typings": "typings/index.d.ts", diff --git a/package-lock.json b/package-lock.json index b765af19ccdb9..afd915d1bbe50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12163,9 +12163,9 @@ } }, "node_modules/socks": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.2.tgz", - "integrity": "sha512-5Hvyu6Md91ooZzdrN/bSn/zlulFaRHrk2/6IY6qQNa3oVHTiG+CKxBV5PynKCGf31ar+3/hyPvlHFAYaBEOa3A==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "inBundle": true, "dependencies": { "ip-address": "^9.0.5",