@yume-chan/socks5-server
v1.0.3
Published
An SOCKS5 server implementation that doesn't tie to specific transportation
Downloads
838
Readme
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
Socks5ServerConnection
instance for each new client connection - Feed data from client into
process
function - Feed data from
data
event to client - Invoke
end
when client closes connection - 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