Manual:$wgProxyList/zh
From Linux Web Expert
<translate> User rights, access control and monitoring</translate>: $wgProxyList | |
---|---|
禁止的IP地址列表 |
|
<translate> Introduced in version:</translate> | 1.3.0 (r4130) |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (数组), (字符串) |
<translate> Default value:</translate> | [] |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
细节
Sets a list of IP addresses to be banned. (Originally meant for presumed open proxies that would most likely only be used for vandalism and block evasion, but can be used for blocking any kind of unwanted actors.)
This can be an array of IP addresses or a string with the path to a file with each IP address on a separate line.
-{zh-hans:示例; zh-hant:範例;}-
IP地址列表
$wgProxyList = [
'127.0.0.1',
];
来自介面消息
Copy and paste a comma-delimited list (e.g. 1.0.170.183,1.0.170.188,1.0.170.234,1.0.170.24) of open proxies into "MediaWiki:Openproxylist"; then put the following in LocalSettings.php :
$wgHooks['userCan'][] = 'getOpenProxyList';
$gotOpenProxyList = false;
function getOpenProxyList( $article, $fields ) {
global $gotOpenProxyList, $wgProxyList;
if ( !$gotOpenProxyList ) {
$wgProxyList = explode( ',', wfMessage( 'openproxylist' )->plain() );
}
$gotOpenProxyList = true;
return true;
}
参见
$wgProxyWhitelist
- Allows to directly exempt an individual IP address or a list of IP addresses$wgEnableDnsBlacklist
- Allows to use a DNS blacklist service to block IP addresses- 已知的机器人IP地址列表