1.0.2 • Published 6 years ago

detect-tor v1.0.2

Weekly downloads
12
License
MIT
Repository
-
Last release
6 years ago

Detect-Tor

Easy to use library to identify TOR network connection.

Usage Example:

const detectTor = require( 'detect-tor' ) 

function testTor() {
    console.log( detectTor.isTor( '127.0.0.1' ) ) // true or false    
}

require( 'http' )
    .createServer( testTor )
    .listen( 8000 )
    .once( 'listening', ()=> console.log( 'Tor detection server enabled on ' + 8000 ) );

curl localhost:8000

About

List of exit addresses is automatically updated every 24hrs. The list of TOR exit nodes used can be found here: https://check.torproject.org/exit-addresses

Tests:

npm test