Detect whether an IP address belongs to a Tor exit node.
npm install tor-detect> Detect whether an IP address belongs to a Tor exit node.
```
~ ❯❯❯ npm install --save tor-detect
`js
const torDetect = require('tor-detect');
torDetect('176.31.45.3').then(tor => {
console.log(tor);
//=> true
});
torDetect('8.8.8.8').then(tor => {
console.log(tor);
//=> false
});
`
Returns a Promise for a boolean which is true if any of the targets belongs to Tor.
#### targets
Type: string Array
#### options
##### timeout
Type: number
Timeout in milliseconds after which a request is considered failed. Default: 5000`.
- check.torproject.org - A list of all Tor exit nodes from the past 16 hours that can contact 1.1.1.1 on port 80
- dan.me.uk - A page containing a full TOR nodelist.
- tor-detect.now - A minimal service to check whether a visitor is running behing Tor.
MIT © Nikolaos Kamarinakis