Basic SOCKS5 server libary
A basic SOCKS5 server library written for node.js.
argyle supports the most basic features of SOCKS and not a whole lot more, namely:
In the future I may add support for more auth modes and commands, but currently this implementation works well for my main use case (sitting between a local browser and server).
var argyle = require'argyle';var server = argyle8080 '127.0.0.1';serveron'connected'reqpipedest;destpipereq;;
var argyle = require'argyle'throttle = require'throttled-stream'kbpsUp = 32kbpsDown = 128;var server = argyle8080 '127.0.0.1';serveron'connected'var tReq = throttlereq kbpsUp * 1024tDest = throttledest kbpsDown * 1024;destonce'error' reqend;on'close' reqend; ;tReqon'data'destwritechunk;;tDeston'data'reqwritechunk;;;
Sets up a new SOCKS server on the specified port and host. If debug is specified, the server will output messages about the status of connections.
A new client connected to the server and the socket to their requested destination is now open. Handlers for this event are passed a
request socket, corresponding to the client that made the request from the server, and a
destination socket, corresponding to the server that they requested to connect to.
npm install argyle