comparison doc/www.powerfulproxy.com/public_html/do_it.php @ 613:c2879679114d draft

PP (uncommented safe defaults and added useragent pass-through)
author Nick <nick@somerandomnick.ano>
date Sun, 18 Sep 2011 08:57:34 +0000
parents 83bc7f6e03ae
children 2b68d711a063
comparison
equal deleted inserted replaced
612:b721aa91808d 613:c2879679114d
28 '@(<[^>]*)(src|href|action)\s*=\s*(\'|")(https?)://([^\'"]*)\3@i' => '$1$2=$3'.$SERVICEURL.'$4/$5$3', 28 '@(<[^>]*)(src|href|action)\s*=\s*(\'|")(https?)://([^\'"]*)\3@i' => '$1$2=$3'.$SERVICEURL.'$4/$5$3',
29 /* Rewrite URLs relative to site root, enable one of the tree, and no more! */ 29 /* Rewrite URLs relative to site root, enable one of the tree, and no more! */
30 // '@(src|href|action)\s*=\s*(\'|")/([^\'"]*)\2@i' => '$1=$2'.$SERVICEURL.$proto.'/'.$host.'/$3$2', 30 // '@(src|href|action)\s*=\s*(\'|")/([^\'"]*)\2@i' => '$1=$2'.$SERVICEURL.$proto.'/'.$host.'/$3$2',
31 '@(<[^>]*)(src|href|action)\s*=\s*(\'|")/([^\'"]*)\3@i' => '$1$2=$3'.$SERVICEURL.$proto.'/'.$host.'/$4$3', 31 '@(<[^>]*)(src|href|action)\s*=\s*(\'|")/([^\'"]*)\3@i' => '$1$2=$3'.$SERVICEURL.$proto.'/'.$host.'/$4$3',
32 ); 32 );
33 $CURL_OPTIONS = array( 33 if (file_exists("do_it.inc")) include "do_it.inc";
34 CURLOPT_USERAGENT => "AnoNet proxy", 34 if (!isset($CURL_OPTIONS)) $CURL_OPTIONS = array(
35 // CURLOPT_USERAGENT => "AnoNet proxy",
36 CURLOPT_USERAGENT => $_SERVER["HTTP_USER_AGENT"]." AnoNetProxy",
35 CURLOPT_AUTOREFERER => TRUE, 37 CURLOPT_AUTOREFERER => TRUE,
36 CURLOPT_CONNECTTIMEOUT => 15, 38 CURLOPT_CONNECTTIMEOUT => 15,
37 CURLOPT_TIMEOUT => 28, 39 CURLOPT_TIMEOUT => 28,
38 CURLOPT_MAXREDIRS => 10, 40 CURLOPT_MAXREDIRS => 10,
39 CURLOPT_FAILONERROR => FALSE, 41 CURLOPT_FAILONERROR => FALSE,
40 CURLOPT_HEADER => 1, 42 CURLOPT_HEADER => 1,
41 CURLOPT_FOLLOWLOCATION => FALSE, 43 CURLOPT_FOLLOWLOCATION => FALSE,
42 // CURLOPT_INTERFACE => '0.0.0.0', 44 // CURLOPT_INTERFACE => '0.0.0.0',
43 // CURLOPT_PROXY => "http://b.polipo.srn.ano:8000/", 45 CURLOPT_PROXY => "http://b.polipo.srn.ano:8000/",
44 // CURLOPT_PROXYUSERPWD => 'username:password', 46 // CURLOPT_PROXYUSERPWD => 'username:password',
45 ); 47 );
46 /* END OF CONFIGURATION */ 48 /* END OF CONFIGURATION */
47 49
48 $url = $proto."://".$host."/".$path; 50 $url = $proto."://".$host."/".$path;