@yume-chan/socks5-server
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

SOCKS5 Server

travis-ci Greenkeeper badge

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

  1. Create Socks5ServerConnection instance for each new client connection
  2. Feed data from client into process function
  3. Feed data from data event to client
  4. Invoke end when client closes connection
  5. Close client connection when close event fire

Development

This project uses pnpm (GitHub) to manage dependency packages.

Install dependencies:

pnpm i

You may also use npm, but the lockfile may become out of sync.

Testing

npm test

Coverage

npm run coverage

License

MIT

Dependencies (1)

Dev Dependencies (5)

Package Sidebar

Install

npm i @yume-chan/socks5-server

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

54.4 kB

Total Files

9

Last publish

Collaborators

  • yume-chan