1.0.3 • Published 6 years ago
@yume-chan/socks5-server v1.0.3
SOCKS5 Server
An SOCKS5 server implementation that doesn't tie to specific transportation
Limitation
- Only support NONE authentication.
- Only support CONNECT command
API
export default class Socks5ServerConnection extends Duplex {
    write(data: Buffer): void;
    end(): void;
    on(event: 'data', listener: (data: Buffer) => void): void;
    on(event: 'close', listener: () => void): void;
}Usage
- Create Socks5ServerConnectioninstance for each new client connection
- Feed data from client into processfunction
- Feed data from dataevent to client
- Invoke endwhen client closes connection
- Close client connection when closeevent fire
Development
This project uses pnpm (GitHub) to manage dependency packages.
Install dependencies:
pnpm iYou may also use npm, but the lockfile may become out of sync.
Testing
npm testCoverage
npm run coverageLicense
MIT