Let's say i got a vps hosting with a dedicated ip, can i make a curl php script that receives a url, fetch it, and output it, and make all this as a proxy server, so i can put my vps ip in the proxy settings of the browser.
Is there any way to do that?
Note: Please don't suggest me a web based proxy like glype.
Thanks
Yes, you could (see Jasper's answer). That would be effectively making your own web-based proxy.
However, given that it's a VPS, I would suggest using a SSH SOCKS proxy, since it'll be easier and will be running through an encrypted tunnel to the VPS.
Use Apache with mod_proxy
and mod_proxy_http
. See the docs.
You can access the proxy through https, effectively encrypting all your traffic between your computer and the VPS.
You can use tor proxy, here is the script:
<?php
function tor_new_identity($tor_ip='127.0.0.1', $control_port='9051',$auth_code='saad'){
$fp = fsockopen($tor_ip, $control_port, $errno, $errstr, 30);
if (!$fp) return false; //can't connect to the control port
fputs($fp, "AUTHENTICATE $auth_code\r\n");
$response = fread($fp, 1024);
list($code, $text) = explode(' ', $response, 2);
if ($code != '250') return false; //authentication failed
//send the request to for new identity
fputs($fp, "signal NEWNYM\r\n");
$response = fread($fp, 1024);
list($code, $text) = explode(' ', $response, 2);
if ($code != '250') return false; //signal failed
fclose($fp);
return true;
}
?>
Call the function "if (tor_new_identity('127.0.0.01', '9051')) {//do stuffs here}
"
But you must install the tor system in the VPS 1st.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With