2017 © Pedro Peláez
 

library tordetect

Easily detect tor users.

image

profburial/tordetect

Easily detect tor users.

  • Wednesday, May 4, 2016
  • by profburial
  • Repository
  • 2 Watchers
  • 3 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Tor Exit Node Detection

I love Tor and most everything it represents. However, in certain use cases, people can use Tor to be jerks., (*1)

*** Disclaimer ***, (*2)

You probably shouldn't use this lib as is if you are wanting to do anything serious. It maintains a json file with a list of Tor exit nodes that should be stored elsewhere for more serious applications., (*3)

Support

If you use this library or it's components in a commercial project please consider a moral license, (*4)

Installation

composer require profburial/tordetect 1.1

Usage

Create a writable json file to store your ip data., (*5)

// Get a list of Tor exit nodes
$ips = (new ProfBurial\TorDetect\Client(
    __DIR__."/_data/torexitnodes.json", // File for storing ips
    24 // Update every 24 hours
))->get();

// array(1067) {
//   [0]=>
//   string(13) "1.169.207.157"
//   [1]=>
//   string(12) "2.107.22.186"
//   [2]=>
//   string(11) "2.111.64.26"
//   [3]=>
//   string(11) "2.221.39.34"
//   ...
// }

// Check an ip address against your list of exit nodes
$check = (new ProfBurial\TorDetect\Client(
    __DIR__."/_data/torexitnodes.json", // File for storing ips
    24 // Update every 24 hours
))->check('127.0.0.1');

// bool(false) if not found
// '127.0.0.1' if found

Tests

Unit:, (*6)

phpunit tests/ClientUnitTest.php

Integration:, (*7)

phpunit tests/ClientIntegrationTest.php

The Versions

04/05 2016

dev-master

9999999-dev

Easily detect tor users.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Terry Harmon

tor

23/12 2015

v1.1

1.1.0.0

Easily detect tor users.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Terry Harmon

tor

19/05 2015

v1.0

1.0.0.0

Easily detect tor users.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Terry Harmon

tor