61 $this->chain = array_values(
$chain);
76 foreach ($this->chain as
$i => $search) {
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));
An exception for terminatinating execution or to throw for unit testing.
A normal proxy-chain definition that lists each level of the chain as either a string or regular expr...
isSizeValid(array $list)
Validate the size of the the list as compared to our chain.
matches(array $list)
Match a list of proxies.
__construct(array $chain)
A chain is an array of strings or regexp strings that will be matched against.
static trace($str)
This method is used to log something in debug mode.
An interface for classes that define a list of allowed proxies in front of the current application.
if(isset($_REQUEST['delete'])) $list