@petersteele/tor-manager
v1.0.11
Published
This package makes it easy to use tor binary with bridges or without
Downloads
21
Maintainers
Readme
tor-manager
What is this package for?
This package makes it easy to use tor binary with bridges or without.
How to use
- Download tor expert bundle from https://www.torproject.org/download/tor
- Extract two folders (data, tor) in the same folder in your project.
- Initialize it with
initTor(<path_to_tor_binary>)
- Run tor using
enableTor()
Possible project structure
|— package.json
|— index.js
|— tor
|
|— tor
| |
| tor.exe
| pluggable_transports
|
|— data
| |
| geoip
| geoip6
Arguments
bridge
Allows to specify bridge type which tor will use
enableTor({bridge: BridgeType.Obfs4})
// Bridges: BridgeType.Obfs4, BridgeType.Snowflake, BridgeType.MeekAzure
onLog
Callback for tor logs
enableTor({
onLog: (message) => {
console.log(message)
}
})
country
Allows to specify country code (if not provided, it will be defined automatically)
enableTor({country: "us"})
timeout
Sets timeout after which tor will be disabled
enableTor({timeout: 10000})