https://github.com/koalex/tor-network-launcher
TOR networks launcher.
https://github.com/koalex/tor-network-launcher
cli proxy tor
Last synced: 9 months ago
JSON representation
TOR networks launcher.
- Host: GitHub
- URL: https://github.com/koalex/tor-network-launcher
- Owner: koalex
- License: mit
- Created: 2020-10-12T20:12:25.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-10-15T05:23:38.000Z (over 5 years ago)
- Last Synced: 2025-09-21T13:52:18.287Z (10 months ago)
- Topics: cli, proxy, tor
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TOR Network Launcher
First you need to install TOR Network:
```sh
# MAC OS example
brew update && brew install tor
```
#### Installing TNL
```sh
npm i tor-network-launcher -g
```
#### Usage
*CLI*:
type `tnl --help` to see all options
```sh
tnl --instances 3 --silent --output /temp/torNetworks.txt
```
*Code*:
```javascript
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](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/koalex/tor-network-launcher/tags).
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.