tor-detect

1.0.7 • Public • Published

tor-detect Build Status

Detect whether an IP address belongs to a Tor exit node.

Install

~ ❯❯❯ npm install --save tor-detect

Usage

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
});

API

torDetect(targets, [options])

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.

Credits

  • 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.

Related

  • tor-detect.now - A minimal service to check whether a visitor is running behing Tor.

License

MIT © Nikolaos Kamarinakis

Readme

Keywords

Package Sidebar

Install

npm i tor-detect

Weekly Downloads

21

Version

1.0.7

License

MIT

Unpacked Size

28.6 kB

Total Files

6

Last publish

Collaborators

  • k4m4