Skip to content

Instantly share code, notes, and snippets.

@dongyuwei
Created July 21, 2015 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dongyuwei/9cd95de40e1d36cce048 to your computer and use it in GitHub Desktop.
Save dongyuwei/9cd95de40e1d36cce048 to your computer and use it in GitHub Desktop.
var net = require('net');
var socket = net.connect({
port: 55555 // ssh -N -D 0.0.0.0:55555 localhost
},function() {
console.log('connected to ssh socks server!');
var server = net.createServer(function(client) {
client.pipe(socket);
});
server.listen(1080, '127.0.0.1');
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment