3

So I've been wondering (and testing), can I use fsockopen with proxy and UDP traffic?

Cause for example this:

$fp = fsockopen('udp://host.name.com', 512, $errno, $errstr);
if(!$fp){ die($errno . ' - ' . $errstr); }

works... but as soon as I add proxy

$proxy = "123.58.183.141 "; // proxy 
$port = 1080; // proxy port

$fp = fsockopen("udp://".$proxy, $port, $errno, $errstr);
if(!$fp){ die($errno . ' - ' . $errstr); }

// after connecting to proxy... connect to target...
fputs($fp, "CONNECT host.name.com:512\r\n");

and try to send some data with fwrite read reply with fread I get nothing.

But without proxy everything works perfectly. I tried load of public proxies but I could never get reply...

Any thoughts on thisone? Also I'm starting to think "fputs($fp, "CONNECT host.name.com:512\r\n");" is not the right way for this... or is it?

Beast
  • 31
  • 1
  • Do you use the correct kind of proxy (eg. not a http proxy, which comes to mind since you mention public proxies)? Also since it is UDP (unreliable) and proxys are usually pretty unreliable themselves than maybe there is a problem in the connection between you and your proxy. – hynner May 10 '15 at 21:19
  • Yeah, I used socks proxies from different public proxy lists. I know how UDP works, but I'm kinda surprised I couldn't get thru (or back idk if they came thru) single reply and I tried around 50 proxies. – Beast May 10 '15 at 21:31

0 Answers0