Extension:TorBlock

Automatically applies restrictions to Tor exit nodes.

Installation

 * 1) Download the files (using snapshot) to the extensions directory, e.g. put the TorBlock folder in ServerRoot/w/extensions.
 * 2) Add include_once('extensions/TorBlock/TorBlock.php'); in LocalSettings.php.

Parameters
User account permissions that bypass Tor blocks.
 * $wgTorBypassPermissions = array( 'torunblocked' );

By default,  is set, so logged-in users will bypass permissions unless it is set to false.

Load and cache a list of Tor nodes as necessary if the list is not stored in cache under the key 'mw-tor-exit-nodes'. Despite code comments, APC appears to be usable as cache. loadExitNodes.php can be used in a cron job instead of this.
 * $wgTorLoadNodes = true;

An array of IP addresses that the wiki server uses. Only exit nodes allowed to connect to these IPs will be returned in the internal list.
 * $wgTorIPs = array( '208.80.152.2' );

Disables existing Tor blocks made by admins
 * $wgTorDisableAdminBlocks = true;

Like $wgAutoConfirmAge and $wgAutoConfirmCount. Both sets of limits must be passed for an account to be granted autoconfirmed status.
 * $wgTorAutoConfirmAge = 0;
 * $wgTorAutoConfirmCount = 0;

Permissions allowed to Tor anonymous users. By default, Tor users cannot create accounts.
 * $wgTorAllowedActions = array( 'read' );

NOTE
There have been reports of this module not functioning properly. Its status as stable may need to be updated.