PHPackages                             bramr/tor-exits - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bramr/tor-exits

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bramr/tor-exits
===============

Retrieves tor exit list from the tor project and make that available in a convenient way.

v1.0.0(9y ago)025MITPHPPHP &gt;=5.6.0

Since Nov 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/bramr/tor-exits)[ Packagist](https://packagist.org/packages/bramr/tor-exits)[ RSS](/packages/bramr-tor-exits/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

TorExits
========

[](#torexits)

A simple library to retreive a convenient list of current [Tor](https://torproject.org) exit nodes/relays.

[![Build Status](https://camo.githubusercontent.com/d98f8c0f8944a333fccf721b03d901c8e4c0848bd6cef302ff59734172165557/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6272616d722f746f722d65786974732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bramr/tor-exits/build-status/master) [![Code Coverage](https://camo.githubusercontent.com/2878d91c2304aec2356871bc8c4d3d67f6852a68c5571b4c25ce738f22579f9b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6272616d722f746f722d65786974732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bramr/tor-exits/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/9ab9269949b4f686bd4354de0d58eed2345e7366354c6423e64fb41bfa583588/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6272616d722f746f722d65786974732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bramr/tor-exits/?branch=master)

Installation
------------

[](#installation)

The easiest way to install tor-exits is with [Composer](https://getcomposer.org).

```
composer require bramr/tor-exits

```

Usage
-----

[](#usage)

```
$clientIp = '127.0.0.1';

//simplest example using tor project exit node list
$parser = new TorProjectParser(new TorProjectCollector());
$ipList = IpList::fromParserWithCache($parser, new IpListJsonCache());

if ($ipList->contains($clientIp)) {
    echo 'client uses Tor.';
}
```

There is a lot more to configure, for more complex examples see: example.php

Important
---------

[](#important)

Please don't use this code to outright block users coming from the Tor network.
There are perfectly valid reasons to use Tor. (and better ways to block all Tor traffic to your site)

Also never refresh the list more than once an hour.
The consensus document is only updated hourly, so fetching an exit node list more often is pointless.

I don't use this code in production myself. I use most of it for a personal project.
If you're running into problems feel free to contact me. I don't mind helping out.

License
-------

[](#license)

MIT, for details see LICENSE file.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3507d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1217758?v=4)[bramr](/maintainers/bramr)[@bramr](https://github.com/bramr)

---

Top Contributors

[![bramr](https://avatars.githubusercontent.com/u/1217758?v=4)](https://github.com/bramr "bramr (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bramr-tor-exits/health.svg)

```
[![Health](https://phpackages.com/badges/bramr-tor-exits/health.svg)](https://phpackages.com/packages/bramr-tor-exits)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
