Methods |
public
|
__construct()
ProxyCheck constructor.
|
#
|
public
|
get(): string|false
Get IP address from proxy header specified in $xoopsConfig['proxy_env']
Get IP address from proxy header specified in $xoopsConfig['proxy_env']
Returns proxy revealed valid client address, or false if such address was
not found.
|
#
|
protected
|
splitOnComma(string $header): string[]
Split comma delimited string
Split comma delimited string
|
#
|
protected
|
getProxyEnvConfig(): string|bool
get configured proxy environment variable
get configured proxy environment variable
|
#
|
protected
|
getProxyHeader(): string|false
get the configured proxy header
get the configured proxy header
|
#
|
protected
|
getFor(string $header): string|false
Extract 'for' IP address in FORWARDED header as in RFC 7239
Extract 'for' IP address in FORWARDED header as in RFC 7239
Returns
IP address, or false if invalid
|
#
|
protected
|
getXForwardedFor(string $ip): string|false
Process an X-Forwarded-For or Client-IP style header
Process an X-Forwarded-For or Client-IP style header
Parameters
$ip |
expected to be an IP address
|
Returns
IP address, or false if invalid
|
#
|
protected
|
validateRoutableIP(string $ip): string|false
Validate that an IP address is routable
Validate that an IP address is routable
Parameters
$ip |
an IP address to validate
|
Returns
IP address or false if invalid
|
#
|