socks5-proxy
v1.0.3
Published
A Socket 5 Server
Maintainers
Readme
Socks5 Proxy
socks5-proxy It is a proxy service that supports user authentication.
Install
npm install socks5-proxy --saveExample
import { Socket5Server } from 'socks5-proxy';
import * as net from 'net';
const app = new Socket5Server({
host: '127.0.0.1',
port: 1080,
auth: {
user: 'admin',
pass: '123456'
}
});
app.listen((client) => {
const socket = net.connect({
port: client.port,
host: client.host
}, () => {
socket.pipe(client.socket).pipe(socket);
client.next(); // Must call 'next' funtion
});
});