Skip to content

Commit a2a06d9

Browse files
2.8.3
1 parent 992b002 commit a2a06d9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "socks",
33
"private": false,
4-
"version": "2.8.2",
4+
"version": "2.8.3",
55
"description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.",
66
"main": "build/index.js",
77
"typings": "typings/index.d.ts",

src/common/helpers.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,15 @@ export function ipToBuffer(ip: string): Buffer {
236236
} else if (net.isIPv6(ip)) {
237237
// Handle IPv6 addresses
238238
const address = new Address6(ip);
239-
return Buffer.from(address.canonicalForm().split(":").map(segment => segment.padStart(4, '0')).join(''), 'hex');
239+
return Buffer.from(
240+
address
241+
.canonicalForm()
242+
.split(':')
243+
.map((segment) => segment.padStart(4, '0'))
244+
.join(''),
245+
'hex',
246+
);
240247
} else {
241248
throw new Error('Invalid IP address format');
242249
}
243250
}
244-

0 commit comments

Comments
 (0)