JoshGlazebrook / socks

Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.
https://www.npmjs.com/package/socks
MIT License
303 stars 35 forks source link

Why are we not allowing proxy to be a domain? #41

Closed benkaiser closed 5 years ago

benkaiser commented 5 years ago

Regarding this line: https://github.com/JoshGlazebrook/socks/blob/d7f91b7bf58c6f80755b356e7777db6b75adff52/src/common/helpers.ts#L135

I'm using this socks5 proxy (redacted) socks5://user:password@proxy-nl.privateinternetaccess.com:1080 and it works perfectly fine using curl, but it seems to be specifically disabled in this library. What is the reasoning behind this? does it really make sense?

Note: I've removed the line locally and it seems to work just fine.

JoshGlazebrook commented 5 years ago

You know, that's a good question 🙃

The shitty thing is we can remove the isIp() check, but the property is still ipaddress. I guess I could rename it to 'host' so it makes more sense and leave ipaddress for backwards compatibility.

JoshGlazebrook commented 5 years ago

This is now possible in v2.3.1

benkaiser commented 5 years ago

You legend! Thanks Josh!