A simple socks5 server written in typescript.
const Socks5 = require('ts-socks');
new Socks5({
options: {
listen: 12345,
allowNoAuth: true,
},
users: [{username: 'test', password: 'test'}],
}).on('connection', (proxy) => {
console.log(proxy.remote.remoteAddress + ':' + proxy.remote.remotePort);
proxy.origin.pipe(proxy.remote);
proxy.remote.pipe(proxy.origin);
});
import Socks5 from 'ts-socks';
new Socks5({
options: {
listen: 12345,
allowNoAuth: true,
},
users: [{username: 'test', password: 'test'}],
}).on('connection', (proxy) => {
console.log(proxy.remote.remoteAddress + ':' + proxy.remote.remotePort);
proxy.origin.pipe(proxy.remote);
proxy.remote.pipe(proxy.origin);
});