# Socks5 Proxy

`socks5-proxy` It is a proxy service that supports user authentication.

## Install

```bash
npm install socks5-proxy --save
```

## Example

```javascript
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
  });
});
```
