1.0.13 • Published 2 years ago

@anzerr/tcp.proxy v1.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

Intro

GitHub Actions status | publish

Tunnel a tcp connection to a remote socket and listen/edit the traffic through the tunnel.

Install

npm install --save git+https://github.com/anzerr/tcp.proxy.git
npm install --save @anzerr/tcp.proxy

Example

const Proxy = require('tcp.proxy');

let p = new Proxy('localhost:5670', 'localhost:5671');

p.on('connect', (tunnel) => {
	tunnel.on(Proxy.RX, (data, resolve) => {
		console.log(Proxy.RX, tunnel.key, data.toString());
		resolve(data);
	}).on(Proxy.TX, (data, resolve) => {
		console.log(Proxy.TX, tunnel.key, data.toString());
		resolve(data);
	}).on('close', () => {
		console.log('tunnel closed', tunnel.key);
	});
});
1.0.13

2 years ago

1.0.12

3 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.6

5 years ago

1.0.3

5 years ago

1.0.4

5 years ago

1.0.5

5 years ago