use VPS IP as proxy?

Discussion in 'Proxies' started by black_muffin, Mar 1, 2009.

  1. black_muffin

    black_muffin Registered Member

    Joined:
    Jan 8, 2008
    Messages:
    65
    Likes Received:
    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 :)
     
  2. zone69

    zone69 Junior Member

    Joined:
    Nov 24, 2008
    Messages:
    196
    Likes Received:
    1,291
    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: Mar 1, 2009
  3. Mp3Mage

    Mp3Mage BANNED BANNED

    Joined:
    Sep 15, 2008
    Messages:
    410
    Likes Received:
    510
    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:
     
  4. black_muffin

    black_muffin Registered Member

    Joined:
    Jan 8, 2008
    Messages:
    65
    Likes Received:
    8
    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
     
  5. black_muffin

    black_muffin Registered Member

    Joined:
    Jan 8, 2008
    Messages:
    65
    Likes Received:
    8
    hi THEEPNCREATER thanks for replying ;)
    any idea of reliable proxy that I could buy and works with cURL and php?
     
  6. zone69

    zone69 Junior Member

    Joined:
    Nov 24, 2008
    Messages:
    196
    Likes Received:
    1,291
    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.
     
  7. joewilliam51

    joewilliam51 Regular Member

    Joined:
    Jan 26, 2009
    Messages:
    208
    Likes Received:
    3
    Occupation:
    Wanderer
    Location:
    the world
    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??
     
  8. asyk

    asyk BANNED BANNED

    Joined:
    Oct 14, 2008
    Messages:
    127
    Likes Received:
    57
    google putty, you have to ssh into your vps
     
  9. Questionable

    Questionable Registered Member

    Joined:
    Mar 14, 2009
    Messages:
    84
    Likes Received:
    27
    These links should help everyone.
    vo1dmain.info/how-to-configure-private-proxy-on-vps
    wiki.vpslink.com/Instant_SOCKS_Proxy_over_SSH
     
  10. blackmagicmaster

    blackmagicmaster BANNED BANNED

    Joined:
    Dec 11, 2008
    Messages:
    587
    Likes Received:
    932
    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 !! :)
     
  11. sheikhchilli22

    sheikhchilli22 Newbie

    Joined:
    Oct 28, 2009
    Messages:
    2
    Likes Received:
    0
    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
     
  12. sheikhchilli22

    sheikhchilli22 Newbie

    Joined:
    Oct 28, 2009
    Messages:
    2
    Likes Received:
    0
    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