use VPS IP as proxy?

black_muffin

Registered Member
Joined
Jan 8, 2008
Messages
65
Reaction score
8
Hello guys :)

I have a CentOS VPS with 2 IPs.
How do I use them as proxies?

I tried this in curl.

Code:
<?php

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://www.google.com/'); 
curl_setopt($ch, CURLOPT_USERAGENT, "Internet Explorer 6.0 (Windows XP)");
curl_setopt($ch, CURLOPT_HEADER, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); 
curl_setopt($ch, CURLOPT_PROXY, '64.10.344.51:100'); 
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'myusername:mypassword'); 
$data = curl_exec($ch); 
curl_close($ch); 
 
echo $data;
?>

It doesn't display anything. And i know this code is Ok.
So my question is:
- Do I need to set up something to use the IPs as proxies with cURL?

Please advice me on this, in exchange I can give you:
- cURL scripts (gmail creator, youtube creator)
- help with cURL and php
- good karma
- advice on youtube marketing or in general.

Any help will be greatly appreciated :)
 
You can install Squid to set up a proxy on your Centos installation.

here are a couple of URLs to get you started but if you search around on g00gle you will find lots more:

Code:
http://www.howtoforge.com/anonymous-proxy-using-squid-3-centos-5.x
http://www.cyberciti.biz/tips/howto-rhel-centos-fedora-squid-installation-configuration.html


Another option is to use ssh tunnelling. You can see how to do this in a post here at BHW.
Here it is: http://www.blackhatworld.com/blackhat-seo/proxies/56333-ssh-tunneling-100-effective.html

Hope that helps you out
 
Last edited:
Yes, you can use a VPS as a 'proxy'... A vps is better than a proxy because it isnt. It's a dedicated IP. You can do anything and more with a VPS that you would if you were using a proxy.

:usa:
 
Hello guys,
thanks a lot for your replies.
I had installed Squid correctly. Tried the 2 elite proxies with my browser all working fine.

But somehow it doesn't work with cURL ...
Code:
<?php
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://www.google.com'); 
curl_setopt($ch, CURLOPT_HEADER, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); 
curl_setopt($ch, CURLOPT_PROXY, '00.00.000.00:3128'); 
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'username:password'); 
$data = curl_exec($ch); 
curl_close($ch); 

echo $data
?>

The 2 proxies are working fine. But the cURL is not. :(
I've searched google for hours and tried many variations but nothing.

If you have any idea it would be greatly appreaciated.

Thanks
 
hi THEEPNCREATER thanks for replying ;)
any idea of reliable proxy that I could buy and works with cURL and php?
 
have you tried setting the port separately in the curl script?

Code:
curl_setopt($ch, CURLOPT_PROXYPORT, 3128);

I know it should work as you have it but it's worth a try.

Also, if you have set up squid to be a socks proxy then you would need to speciify that in the curl as well.
Code:
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);

Just a couple of guesses I thought I'd throw out there.
 
A noob question, how do you use a VPS as a proxy, I have a couple of ips but I am a little bit lost??
 
google putty, you have to ssh into your vps
 
These links should help everyone.
vo1dmain.info/how-to-configure-private-proxy-on-vps
wiki.vpslink.com/Instant_SOCKS_Proxy_over_SSH
 
very simple use Tunnelier copy this and paste in google after downloading just ssh at your box and it will start socks at 127.0.0.1:9999 just set your browser to use that port at localhost (127.0.0.1) thats it you will be socks now use it !!!

or if u have hosting with cpanel and u know ssh of your webhost u can do same with them weather your ssh is enable or not it always work !! :)
 
hi guys i have one dedicated ip i want to use it has a proxy. how do i do that. I have a windows pc
 
i dont know how to use squid. it would be nice if some one can tell me or setup http proxy for me i will pay for it
 
Back
Top