MediaWiki
REL1_19
|
Functions for dealing with proxies. More...
Go to the source code of this file.
Functions | |
wfGetAgent () | |
Returns the browser/OS data from the request header Note: headers are spoofable. | |
wfGetForwardedFor () | |
Extracts the XFF string from the request header Note: headers are spoofable. | |
wfGetIP () | |
Work out the IP address based on various globals For trusted proxies, use the XFF client IP (first of the chain) | |
wfIsTrustedProxy ($ip) | |
Checks if an IP is a trusted proxy providor. | |
wfProxyCheck () | |
Forks processes to scan the originating IP for an open proxy server MemCached can be used to skip IPs that have already been scanned. |
Functions for dealing with proxies.
Definition in file ProxyTools.php.
wfGetAgent | ( | ) |
Returns the browser/OS data from the request header Note: headers are spoofable.
Definition at line 28 of file ProxyTools.php.
References wfDeprecated().
Extracts the XFF string from the request header Note: headers are spoofable.
Definition at line 15 of file ProxyTools.php.
References wfDeprecated().
wfGetIP | ( | ) |
Work out the IP address based on various globals For trusted proxies, use the XFF client IP (first of the chain)
Definition at line 41 of file ProxyTools.php.
References wfDeprecated().
wfIsTrustedProxy | ( | $ | ip | ) |
Checks if an IP is a trusted proxy providor.
Useful to tell if X-Fowarded-For data is possibly bogus. Squid cache servers for the site are whitelisted.
$ip | String |
Definition at line 55 of file ProxyTools.php.
References $wgSquidServers, $wgSquidServersNoPurge, and wfRunHooks().
wfProxyCheck | ( | ) |
Forks processes to scan the originating IP for an open proxy server MemCached can be used to skip IPs that have already been scanned.
Definition at line 68 of file ProxyTools.php.
References $title, $url, $wgBlockOpenProxies, $wgMemc, $wgProxyKey, $wgProxyMemcExpiry, $wgProxyPorts, $wgProxyScriptPath, SpecialPage\getTitleFor(), wfExpandUrl(), wfGetNull(), and wfMemcKey().
Referenced by EditPage\initialiseForm().