0.9.5 • Published 4 years ago

tor-network-launcher v0.9.5

Weekly downloads
33
License
SEE LICENSE IN LI...
Repository
github
Last release
4 years ago

TOR Network Launcher

First you need to install TOR Network:

# MAC OS example
brew update && brew install tor

Installing TNL

npm i tor-network-launcher -g

Usage

CLI:

type tnl --help to see all options

tnl --instances 3 --silent --output /temp/torNetworks.txt

Code:

import TNS from 'tor-network-launcher';

const TORNetworks = new TNS({ silent: true }); // default is false

TORNetworks.on('network', network => {
  console.info(network); // {internal: 'socks5://127.0.0.1:30400', external: 'socks5://192.168.0.77:30400'}
  console.info(TORNetworks.list); // [{internal: 'socks5://127.0.0.1:30400', external: 'socks5://192.168.0.77:30400'}, ...]
  TORNetworks.closeNetwork(network);
});

TORNetworks.on('networkError', (network, message) => {
  console.error(message); // data from sdterr of TOR process
  TORNetworks.closeNetwork(network);
});

TORNetworks.on('networkExit', (network, code) => {
  console.info(`Closing network ${network.internal}. Child process exited with code ${code}.`);
});

TORNetworks.on('error', console.error);

TORNetworks.launch(3); // Launch 3 networks. Default is 1.

This project using SemVer for versioning. For the versions available, see the tags on this repository.

This project is licensed under the MIT License - see the LICENSE file for details.

0.9.5

4 years ago

0.9.4

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago