Thursday, January 27, 2011

Making a socks proxy using PHP

Using ssh, I can use another computer as a proxy, for ex.

$ssh -D 9999 username@ip-address-of-ssh-server

Now, I can configure my application to use socks proxy on port 9999 at the above given up address.

If I own a web server, can i make a php script which also listens from connections on a particular port (preferably access provided through password)?

  • This isn't something that can really work over a HTTP connection. Most HTTP servers are made to serve short lived connections and a SOCKS proxy is going to need the connection to stay open.

    From carson
  • Hi,

    I need your help, how you'll configure a PHP application use a particular port or connect through a socks proxy. I need to access a MySql server via socks proxy using PHP. Please help me if you know how to do this.

    Thanks, Karthik

    From Karthik
  • If your server has shell access, you can do this. However, SSH tunneling is not a great way to pass traffic, as it can cause issues with TCP windowing. If you are just looking for a secure proxy to get your data out, I'd look at VPN services instead of webhosting.

0 comments:

Post a Comment