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
304 stars 35 forks source link

socks with a TLS socket #43

Closed ni-vo closed 5 years ago

ni-vo commented 5 years ago

How would I create a TLS socket using this library? I can't connect on port 443.

JoshGlazebrook commented 5 years ago

This is what you're looking for - https://github.com/TooTallNate/node-socks-proxy-agent

It's built on top of socks.

ni-vo commented 5 years ago

@JoshGlazebrook I'm looking to work with raw sockets, not a HTTP(s) library. Any suggestions?

JoshGlazebrook commented 5 years ago

That's beyond the scope of this module. You'd need to look at how the TLS protocol is implemented and do it yourself, or use a module that handles it for you.

ni-vo commented 5 years ago

I have figured it out myself. If anyone else is having trouble: https://github.com/nickvorie/node-socks-tls/blob/master/index.js