From 1665a487b26b8718e4d06594dce23349fe62b373 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 28 Mar 2011 17:35:47 +0000 Subject: powerfulproxy --- doc/www.powerfulproxy.com/public_html/do_it.php | 107 ++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 doc/www.powerfulproxy.com/public_html/do_it.php (limited to 'doc') diff --git a/doc/www.powerfulproxy.com/public_html/do_it.php b/doc/www.powerfulproxy.com/public_html/do_it.php new file mode 100644 index 0000000..f3e3b14 --- /dev/null +++ b/doc/www.powerfulproxy.com/public_html/do_it.php @@ -0,0 +1,107 @@ + true, // return web page + CURLOPT_HEADER => false, // don't return headers + CURLOPT_FOLLOWLOCATION => true, // follow redirects + CURLOPT_ENCODING => "", // handle all encodings + CURLOPT_USERAGENT => "AnoNet proxy", // who am i + CURLOPT_AUTOREFERER => true, // set referer on redirect + CURLOPT_CONNECTTIMEOUT => 15, // timeout on connect + CURLOPT_TIMEOUT => 28, // timeout on response + CURLOPT_MAXREDIRS => 10, // stop after 10 redirects + CURLOPT_FAILONERROR => true, +// CURLOPT_PROXY => "http://b.polipo.srn.ano:8000/", + ); + $ch = curl_init ($url); + curl_setopt_array( $ch, $options ); + $fields_string = ""; + if (count($data)) { + foreach($data as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } + rtrim($fields_string,'&'); + curl_setopt($ch, CURLOPT_POST, count($data)); + curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); + } + $ret = curl_exec ($ch); + if ($error = curl_error($ch)) + echo 'ERROR: ',$error; + $info = curl_getinfo($ch); + return array("data"=>$ret,"info"=>$info); +} +// Rewrite relative paths +function rewriteRelative($html, $base) { + $server = preg_replace('@^([^\:]*)://([^/*]*)(/|$).*@', '\1://\2/', $base); + $html = preg_replace('@\<([^>]*) (href|src)="/([^"]*)"@i', '<\1 \2="' . $server . '\3"', $html); + $html = preg_replace('@\<([^>]*) (href|src)="(([^\:"])*|([^"]*:[^/"].*))"@i', '<\1 \2="' . $base . '\3"', $html); + return $html; +} +if (isset($_SERVER["PATH_INFO"])) + $p = $_SERVER["PATH_INFO"]; +if (isset($_SERVER["QUERY_STRING"])) + $q = $_SERVER["QUERY_STRING"]; +$postdata = $_POST; +$pall = explode("/", $p); +if (count($pall) <= 1) { + echo "Wrong host format? or smtg."; + die; +} +$proto = $pall[1]; +$host = $pall[2]; +unset($pall[0]); +unset($pall[1]); +unset($pall[2]); +$path = implode("/", $pall); +// Figure out relative paths +$pi = pathinfo($path); +if ($pi) { + $rp = @$pi["dirname"]; +} else + $rp = ""; +if (!$rp) + $rp = $path; +// Construct request url +$geturl = $proto."://".$host."/".$path; +if ($q) + $geturl .= "?".$q; // Append query string + +$d = get_url($geturl, $postdata); +$data = $d["data"]; +$ct = $d["info"]["content_type"]; +$ct_s = explode(";", $ct); +$found = false; +$match_ct = array("text/html", "text/xml", "text/plain"); +foreach($match_ct as $m) { + if ($ct_s[0] == $m) + $found = true; +} +if ($found) { // Only rewrite for proper content + $ret = rewriteRelative($data, $proto."://".$host."/".$rp."/"); + $ret = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', $SERVICEURL.str_replace("http://", "http/", "$1"), $ret); + $ret = str_replace(".php/http://", ".php/http/", $ret); + $ret = str_replace(".php/https://", ".php/https/", $ret); + + $ret = str_replace("../", "", $ret); + $items = Array("/src='\/(.*)'/", "/src=\"\/(.*)\"/", "/href='\/(.*)'/", "/href=\"\/(.*)\"/"); + $ret = preg_replace($items, "src='".$SERVICEURL.$proto."/".$host."/$1'", $ret); + $ret = preg_replace("/action=\"\/\"/i", "action=\"".$SERVICEURL.$proto."/".$host."/\"", $ret); + +} else + $ret = ""; +// Output da shit +header("Content-Type: ".$ct); +if (strlen($ret) == 0) + echo $data; +else + echo $ret; + +?> -- cgit v1.2.3 From cdbeb53c66e77bde892728e4a655785aaaa6cac9 Mon Sep 17 00:00:00 2001 From: thejetset Date: Tue, 29 Mar 2011 01:37:10 +0000 Subject: Edited Anonet2.org to include thejetset's client port --- doc/www.anonet2.org/public_pod/index.pod | 1 + doc/www.anonet2.org/public_pod/thejetset_clientport.pod | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 doc/www.anonet2.org/public_pod/thejetset_clientport.pod (limited to 'doc') diff --git a/doc/www.anonet2.org/public_pod/index.pod b/doc/www.anonet2.org/public_pod/index.pod index 17fa36e..54ef1d6 100644 --- a/doc/www.anonet2.org/public_pod/index.pod +++ b/doc/www.anonet2.org/public_pod/index.pod @@ -69,6 +69,7 @@ are a few options available: L (You will need openvpn for this option, but there is no need for routing software.) +L =item * diff --git a/doc/www.anonet2.org/public_pod/thejetset_clientport.pod b/doc/www.anonet2.org/public_pod/thejetset_clientport.pod new file mode 100644 index 0000000..471ae09 --- /dev/null +++ b/doc/www.anonet2.org/public_pod/thejetset_clientport.pod @@ -0,0 +1,14 @@ +=head1 Thejetset's client port +If you're looking to access AnoNet but don't have the luxury of some box +that you can run routing software on reliably then never fear! You can +use this client port to access the depths of AnoNet using IP. + +=over + +=head2 How to access + +=item Server: anonet.it.cx +=item Username: anonymous +=item Password: anonymous +=item Please ensure that you DO NOT USE this as your default route. Only +use as a route for 1.0.0.0/8 -- cgit v1.2.3 From 69e0e3cc15122005776b1680da0a24a49fe16326 Mon Sep 17 00:00:00 2001 From: thejetset Date: Tue, 29 Mar 2011 01:45:59 +0000 Subject: WHY?!? FTFY --- doc/www.anonet2.org/public_pod/thejetset_clientport.pod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/www.anonet2.org/public_pod/thejetset_clientport.pod b/doc/www.anonet2.org/public_pod/thejetset_clientport.pod index 471ae09..f251e84 100644 --- a/doc/www.anonet2.org/public_pod/thejetset_clientport.pod +++ b/doc/www.anonet2.org/public_pod/thejetset_clientport.pod @@ -10,5 +10,7 @@ use this client port to access the depths of AnoNet using IP. =item Server: anonet.it.cx =item Username: anonymous =item Password: anonymous -=item Please ensure that you DO NOT USE this as your default route. Only +=item VPN type: PPTP +=item Please ensure that you DO NOT USE this as your default route. +Only use as a route for 1.0.0.0/8 -- cgit v1.2.3 From a9baa5de74e59b4b8a0e98b77849f1b2f6dd7fc2 Mon Sep 17 00:00:00 2001 From: thejetset Date: Tue, 29 Mar 2011 01:58:47 +0000 Subject: FTFY --- doc/www.anonet2.org/public_pod/Makefile | 2 +- doc/www.anonet2.org/public_pod/index.pod | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/www.anonet2.org/public_pod/Makefile b/doc/www.anonet2.org/public_pod/Makefile index 63ff6ff..d368a8c 100644 --- a/doc/www.anonet2.org/public_pod/Makefile +++ b/doc/www.anonet2.org/public_pod/Makefile @@ -1,4 +1,4 @@ -all: index.html links.html faq.html darknet_comparison.html anonymity.html intro.html irc_anonymity.html services.html assholes.html +all: index.html links.html faq.html darknet_comparison.html anonymity.html intro.html irc_anonymity.html services.html assholes.html thejetset_clientport.html %.html: %.pod pod2xhtml --noindex < $< 2>/dev/null > $@.tmp diff --git a/doc/www.anonet2.org/public_pod/index.pod b/doc/www.anonet2.org/public_pod/index.pod index 54ef1d6..3278e64 100644 --- a/doc/www.anonet2.org/public_pod/index.pod +++ b/doc/www.anonet2.org/public_pod/index.pod @@ -69,7 +69,11 @@ are a few options available: L (You will need openvpn for this option, but there is no need for routing software.) -L + +=item * + +L =item * -- cgit v1.2.3 From 84bf8b7a2636934160d6780a6dcde903b8ad8ed3 Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 29 Mar 2011 02:03:19 +0000 Subject: formatting fixes --- doc/www.anonet2.org/public_pod/thejetset_clientport.pod | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/www.anonet2.org/public_pod/thejetset_clientport.pod b/doc/www.anonet2.org/public_pod/thejetset_clientport.pod index f251e84..b106a87 100644 --- a/doc/www.anonet2.org/public_pod/thejetset_clientport.pod +++ b/doc/www.anonet2.org/public_pod/thejetset_clientport.pod @@ -1,16 +1,23 @@ =head1 Thejetset's client port + If you're looking to access AnoNet but don't have the luxury of some box that you can run routing software on reliably then never fear! You can use this client port to access the depths of AnoNet using IP. -=over - =head2 How to access +=over + =item Server: anonet.it.cx + =item Username: anonymous + =item Password: anonymous + =item VPN type: PPTP -=item Please ensure that you DO NOT USE this as your default route. -Only -use as a route for 1.0.0.0/8 + +=back + +Please ensure that you DO NOT USE this as your default route. + +Only use as a route for 1.0.0.0/8 -- cgit v1.2.3