Extension:TorBlock

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
TorBlock

Release status: stable

Implementation User access
Description Automatically applies restrictions to Tor exit nodes with access to the wiki's front-door server.
Author(s) Andrew Garrett (Werdnatalk)
License GPL
Download
Parameters

$wgTorIPs

Added rights

torunblock

Hooks used
getUserPermissionsErrorsExpensive

AbortAutoblock
GetAutoPromoteGroups
GetBlockedStatus
AutopromoteCondition
RecentChange_save
ListDefinedTags

Translate the TorBlock extension if possible

Check usage and version matrix; code metrics

Automatically applies restrictions to Tor exit nodes with access to the wiki's front-door server.

Installation[edit | edit source]

  • Download and extract the files in a directory called TorBlock in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once( "$IP/extensions/TorBlock/TorBlock.php" );
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Parameters[edit | edit source]

$wgTorBypassPermissions = array( 'torunblocked' );

User account permissions that bypass Tor blocks.

By default, $wgGroupPermissions['user']['torunblocked'] = true; is set, so logged-in users will bypass permissions unless it is set to false.

$wgTorLoadNodes = true;

If set to true, the extension will always try to load a list of nodes if there is no current list available in the cache. Loading the exit node list is expensive, so some wikis may want to set this to false, and instead have loadExitNodes.php be run as a cron job to update the node list.

$wgTorIPs = array( '208.80.152.2' );

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. Note: this is only used when the extension has to fall back to the Tor Project's bulk list service, rather than using the newer Onionoo protocol.

$wgTorDisableAdminBlocks = true;

Disables existing Tor blocks made by admins.

$wgTorAutoConfirmAge = 0;
$wgTorAutoConfirmCount = 0;

Like $wgAutoConfirmAge and $wgAutoConfirmCount. Both sets of limits must be passed for an account to be granted autoconfirmed status.

$wgTorAllowedActions = array( 'read' );

Permissions allowed to Tor anonymous users. By default, Tor users cannot create accounts.

$wgTorOnionooServer = 'https://onionoo.torproject.org';
$wgTorOnionooCA = "$dir/torproject.crt";

By default, the extension uses a service called Onionoo, created by the Tor Project, to retrieve the list of exit nodes. Onionoo servers can be run by anybody, so a custom one (and its associated SSL certificate) can be set with these variables. The default is the Tor Project's own server.


Language: English  • русский