61 $this->chain = array_values($chain);
73 $list = array_values($list);
76 foreach ($this->chain as
$i => $search) {
77 $proxy_url = $list[
$i];
78 if (preg_match(
'/^\/.*\/[ixASUXu]*$/s', $search)) {
79 if (preg_match($search, $proxy_url)) {
81 "Found regexp " . $search .
" matching " . $proxy_url
85 "No regexp match " . $search .
" != " . $proxy_url
91 if (strncasecmp($search, $proxy_url, strlen($search)) == 0) {
93 "Found string " . $search .
" matching " . $proxy_url
97 "No match " . $search .
" != " . $proxy_url
123 return (
sizeof($this->chain) ==
sizeof($list));
if(isset($_REQUEST['delete'])) $list
An interface for classes that define a list of allowed proxies in front of the current application...
static trace($str)
This method is used to log something in debug mode.
isSizeValid(array $list)
Validate the size of the the list as compared to our chain.
A normal proxy-chain definition that lists each level of the chain as either a string or regular expr...
__construct(array $chain)
A chain is an array of strings or regexp strings that will be matched against.
matches(array $list)
Match a list of proxies.