*/
$wgEnableOpm = false;
+/**
+ * Proxy whitelist, list of addresses that are assumed to be non-proxy despite what the other
+ * methods might say
+ */
+$wgProxyWhitelist = array();
+
/**
* Simple rate limiter options to brake edit floods.
* Maximum number actions allowed in the given number of seconds;
* just slightly outta sync and soon corrected - safer to block slightly more that less.
* And it's cheaper to check slave first, then master if needed, than master always.
*/
- function getBlockedStatus() {
- global $wgIP, $wgBlockCache, $wgProxyList, $wgEnableSorbs, $bFromSlave;
+ function getBlockedStatus( $bFromSlave = true ) {
+ global $wgIP, $wgBlockCache, $wgProxyList, $wgEnableSorbs, $wgProxyWhitelist;
if ( -1 != $this->mBlockedby ) { return; }
}
# Proxy blocking
- if ( !$this->mBlockedby ) {
+ if ( !$this->isSysop() && !in_array( $wgIP, $wgProxyWhitelist ) ) {
+
+ # Local list
if ( array_key_exists( $wgIP, $wgProxyList ) ) {
$this->mBlockedby = wfMsg( 'proxyblocker' );
$this->mBlockreason = wfMsg( 'proxyblockreason' );
}
- }
- # DNSBL
- if ( !$this->mBlockedby && $wgEnableSorbs ) {
- if ( $this->inSorbsBlacklist( $wgIP ) ) {
- $this->mBlockedby = wfMsg( 'sorbs' );
- $this->mBlockreason = wfMsg( 'sorbsreason' );
+ # DNSBL
+ if ( !$this->mBlockedby && $wgEnableSorbs ) {
+ if ( $this->inSorbsBlacklist( $wgIP ) ) {
+ $this->mBlockedby = wfMsg( 'sorbs' );
+ $this->mBlockreason = wfMsg( 'sorbsreason' );
+ }
}
}
-
}
function inSorbsBlacklist( $ip ) {