Need help to use sock proxy while sending http request using AnyEvent in perl
I am trying to send multiple http get requests using perl. I need to send those request using sock proxy.
If i use following code, I am able to send request with sock proxy Code:
#!/usr/bin/perl Code:
#!/usr/bin/perl Even in terminal, I export proxy, commands like curl wget work fine with sock proxy but when I use perl command to execute this script as a sock proxy, it does not work. I could integrate it with LWP agent, but it is not working with Any Event. I have used proxy => [$host, $port], below GET => $url, but it works for http and https proxy only, not for sock proxy. I am not sure what I am doing wrong. If you suggest any solution, it will be great help from your side. Thanks Sam |
I'm not sure what problem is caused with AnyEvent, but this may be useful, i like to use IO::Socket::Socks for any socks proxy connections;
You'd use it like this for HTTP requests: Code:
#!/usr/bin/env perl |
I think you could use 'runsocks', 'tsocks' or 'redsocks' or similar program to redict traffic to SOCKS-proxy.
|
Maybe you could use threads
Code:
#!/usr/bin/perl |
All times are GMT -5. The time now is 05:28 PM. |