ts-socks
v0.9.3
Published
a simple socks5 server you can use
Downloads
2
Maintainers
Readme
Socks5
A simple socks5 server written in typescript.
No dependencies
Javascript
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);
});
Typescript
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);
});