This is my current code
index.php
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>index.php</title>
</head><body><div style="text-align: center;"><big><big><big><big>Beta <span style="font-family: arial,helvetica,sans-serif;"></span>Suffix Proxy</big></big></big></big><br><form method="post" action="/browse.php"> <p id="address_bar"><label>Web Address <input id="address_box" type="text" name="" value="google.com" onfocus="this.select()" /></label> <input id="go" type="submit" value="Go" /></p><!-- I ask you keep this, or donate. --><script type="text/javascript"><!--google_ad_client = "pub-3402075004633034";/* ProxyHelp Script */google_ad_slot = "6505751312";google_ad_width = 468;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></form><br><br></span><span style="font-weight: bold;"><span style="font-weight: bold;">Hostedby </span></span><span style="font-weight: bold; text-decoration: underline;"></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px;"></span></span></div>
<div style="text-align: center;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px;"><b style=""><a href="http://www.xproxyhost.com/" target="_blank" style="color: rgb(88, 124, 29); text-decoration: none; outline-width: 0px;">xProxy Host - Proxy Hosting With GeoIP and cPanel</a><br style=""><br style=""><a href="http://www.xproxylist.com/" target="_blank" style="color: rgb(3, 92, 159); text-decoration: none;">x Proxy List -List Your Proxy Site</a><br style=""><br style=""><a href="http://vectroproxy.com/pages/tunnel.php" target="_blank" style="color: rgb(3, 92, 159); text-decoration: none;">VectroTunnelAdvanced SSH Tunnel Proxy</a><br><br><br><br><br><br><a href="http://JeffsSite.us" target="_blank" style="color: rgb(30, 92, 159); text-decoration: none;">Codeing of this Script is by, JeffsSite.us (proxyhelp.org) </a><br><br><br><br><br><script type="text/javascript" src="http://ajax.cloudflare.com/cdn-cgi/scripts/cf_status.js"></script><a href="http://www.cloudflare.com" style="display: block; position: relative; width: 0px; height: 0px;"><img src="http://ajax.cloudflare.com/cdn-cgi/images/seal/standard/0x0.png" style="border: 0pt none ; position: absolute; clip: rect(0px, 0px, 0px, 0px);" onload="try{window.__CF.checkStatus(this)}catch(e){}"></a></b></span></span></div>
</body></html>
browse.php
PHP Code:
<?php
define("PROXY_SUFFIX", ".testproxy.tk"); // domain name suffix to reply fordefine("PROXY_HOME","www.google.com"); // if user enters above domain as proxy site, send them to...$ads1 = 'Your viewing this useing a beta proxy';/*// Author: Maurits van der Schee// Editor: Jeffery Schefke JeffsSite.us// License: GPL// */
function parse_headers($lines){ $headers = array(); while (count($lines)>0) { $line = trim(array_shift($lines)); if ($line=='') break; $seppos = strpos($line,':'); $name = trim(substr($line,0,$seppos)); $value = trim(substr($line,$seppos+1)); if ($headers[$name]) { if (!is_array($headers[$name])) { $headers[$name] = array($headers[$name]); } array_push($headers[$name],$value); } else $headers[$name]=$value; } return $headers;}
function parse_chunked($chunked){ $data = ''; $startpos = 0; while ($startpos<strlen($chunked)) { $new_startpos = strpos($chunked,"\r\n",$startpos)+2; $length = hexdec(rtrim(substr($chunked, $startpos, $new_startpos-$startpos))); $data .= substr($chunked, $new_startpos, $length); $startpos = $new_startpos + $length; } return $data;}
function get_request($method, $host, $url, $data){ $headers = array(); array_push($headers, $method.' '.$url.' HTTP/1.1'); array_push($headers, 'Host: '.$host); array_push($headers, 'User-Agent: '.$_SERVER['HTTP_USER_AGENT']); if ($method=='POST') { array_push($headers, 'Content-Type: '.$_SERVER['CONTENT_TYPE']); array_push($headers, 'Content-Length: '.$_SERVER['CONTENT_LENGTH']); } array_push($headers, 'Accept: '.$_SERVER['HTTP_ACCEPT']); array_push($headers, 'Accept-Language: '.$_SERVER['HTTP_ACCEPT_LANGUAGE']); array_push($headers, 'Accept-Charset: '.$_SERVER['HTTP_ACCEPT_CHARSET']); if ($_SERVER['HTTP_COOKIE']) array_push($headers, 'Cookie: '.$_SERVER['HTTP_COOKIE']); array_push($headers, 'Referer: '.$_SERVER['HTTP_REFERER']); if ($_SERVER['HTTP_X-FORWARDED-FOR']) $forwarded_for=$_SERVER['HTTP_X-FORWARDED-FOR'].', '.$_SERVER['REMOTE_ADDR']; else $forwarded_for=$_SERVER['REMOTE_ADDR']; array_push($headers, 'X-Forwarded-For: '.$forwarded_for); array_push($headers, 'Connection: close'); array_push($headers, ''); array_push($headers, $data); return join("\r\n",$headers);}
function log_txt($data){ $log = fopen('log.txt', 'a'); fwrite($log, date(DATE_RFC822)." - ".$data."\n"); fclose($log);}
function proxy($method,$url){ $url = parse_url($url); $scheme = $url['scheme']; $host = $url['host']; if ($url['port']) $port = $url['port']; else $port = ($scheme=='http'?80:443); $path = $url['path']; $query = $url['query']; if ($query) $query='?'.$query;
$data = file_get_contents('php://input'); $data = get_request($method,$host,$path.$query,$data); $ip = gethostbyname($host.'.'); if ($ip==$host.'.') { echo "Could not resolve host '$host'"; exit; } $fp = @fsockopen(($scheme=='https'?'ssl://':'').$ip, $port, $errno, $errstr, 5); if ($fp===false){ echo "$errno $errstr"; exit; } fwrite($fp,$data); /*weird bug*/ $old_errorlevel = error_reporting(1); $data = stream_get_contents($fp); /*weird bug*/ error_reporting($old_errorlevel); fclose($fp);
$p = strpos($data,"\r\n\r\n"); $lines = split("\r\n",substr($data,0,$p)); $status = trim(array_shift($lines)); $headers = parse_headers($lines); $data = substr($data,$p+4); $transfer_encoding = $headers['Transfer-Encoding']; if ($transfer_encoding=="chunked") $data = parse_chunked($data); return array('status'=>$status,'headers'=>$headers,'data'=>$data);} function strends($string,$suffix){ return substr($string,-1*strlen($suffix))==$suffix;}$makeroom = '<style type="text/css"> html body { margin-top: 80px; } </style>';
function add_warning($matches){ return $matches[1].$makeroom.'<div style="width:100%;margin:0;text-align:center;border-bottom:1px solid #725554;color:#000000;background-color:#F2FDF3;font-size:12px;font-weight:bold;font-family:Bitstream Vera Sans,arial,sans-serif;padding:4px;"><img src="ubuntu.png" alt="Ubuntu.com" /><BR> Your useing a BETA! Proxy</div>';}
function url_rewrite($matches){ if ($_COOKIE['dontcensorme_ssl']) $matches[1]='https'; $url = $matches[1].$matches[2].$matches[3]; if (!strends($url, PROXY_SUFFIX)) $url.=PROXY_SUFFIX; return $url;}
function domain_rewrite($matches){ $url = $matches[1].$matches[2].$matches[3]; if (!strends($url, PROXY_SUFFIX)) $url.=PROXY_SUFFIX; return $url;}
function rewrite($data){ $data = preg_replace_callback('/(<body[^>]*>)/i','add_warning',$data); return preg_replace_callback('/(https?)(:\/\/)([0-9a-zA-Z\.\-]+)/','url_rewrite',$data);}
function rewrite_cookie($data){ return preg_replace_callback('/(domain)(=)([0-9a-zA-Z\.\-]+)/i','domain_rewrite',$data);}
$method = trim(strtoupper($_SERVER['REQUEST_METHOD']));$scheme = ($_SERVER['HTTPS']?'https':'http');$host = $_SERVER['HTTP_HOST'];$requri = $_SERVER['REQUEST_URI'];if ($scheme=='http' && $_COOKIE['dontcensorme_ssl']){ header('Location: https://'.$host.$requri);}if ($scheme=='https' && $_COOKIE['dontcensorme_ssl']){ $scheme='http';}$newhost = $host;if (strends($newhost, PROXY_SUFFIX)) $newhost=substr($host,0,-1*strlen(PROXY_SUFFIX));
if ('.'.$newhost==PROXY_SUFFIX){ header('Location: http://'.PROXY_HOME.PROXY_SUFFIX); exit;}$response = proxy($method,$scheme.'://'.$newhost.$requri); $redirect_url = trim($response['headers']['Location']);if ($redirect_url) { header('Location: '.rewrite($redirect_url));} $type = $response['headers']['Content-Type'];$type = strtolower(substr($type,0,strpos($type,'/')));
if ($type=='text') $data = rewrite($response['data']);else $data = $response['data'];
header('Content-Type: '.$response['headers']['Content-Type']);if ($response['headers']['Set-Cookie']){ $setcookie = $response['headers']['Set-Cookie']; if (is_array($setcookie)) { foreach ($setcookie as $cookie) { header('Set-Cookie: '.rewrite_cookie($cookie), false); } } else header('Set-Cookie: '.rewrite_cookie($response['headers']['Set-Cookie']));}echo $data;?>
Thats my current quick codeing.
Bookmarks