MediaWiki
1.30.0
|
Public Member Functions | |
__construct ( $proxyServers, $proxyServersComplex) | |
isConfiguredProxy ( $ip) | |
Checks if an IP matches a proxy we've configured. More... | |
isTrustedProxy ( $ip) | |
Checks if an IP is a trusted proxy provider. More... | |
Private Attributes | |
IPSet null | $proxyIPSet |
string[] | $proxyServers |
string[] | $proxyServersComplex |
Definition at line 27 of file ProxyLookup.php.
ProxyLookup::__construct | ( | $proxyServers, | |
$proxyServersComplex | |||
) |
string[] | $proxyServers | Simple list of IPs |
string[] | $proxyServersComplex | Complex list of IPs/ranges |
Definition at line 48 of file ProxyLookup.php.
References $proxyServers, and $proxyServersComplex.
ProxyLookup::isConfiguredProxy | ( | $ip | ) |
Checks if an IP matches a proxy we've configured.
string | $ip |
Definition at line 59 of file ProxyLookup.php.
Referenced by isTrustedProxy().
ProxyLookup::isTrustedProxy | ( | $ip | ) |
Checks if an IP is a trusted proxy provider.
Useful to tell if X-Forwarded-For data is possibly bogus. CDN cache servers for the site are whitelisted.
string | $ip |
Definition at line 80 of file ProxyLookup.php.
References isConfiguredProxy(), and Hooks\run().
|
private |
Definition at line 42 of file ProxyLookup.php.
|
private |
Definition at line 32 of file ProxyLookup.php.
Referenced by __construct().
|
private |
Definition at line 37 of file ProxyLookup.php.
Referenced by __construct().