perl - Why is IO::Socket::Socks unreliable when creating a proxy chain? -


i want use module create connection using multiple socks proxies, module using unreliable , slow compared using external solution such proxychains. after connecting through chain of proxies, while loop begins sending data through proxy chain. however, program crashes error: "out of memory". have advice on how fix code? appreciated.

while ($sock) {  $sock->syswrite ( "get / http/1.1\r\n" );  } 

when @ wireshark capture, initial request sent without problems following requests have duplicate http requests in each packet. see: wireshark capture

edit: tried using io::async, requests aren't sent.

my $loop = io::async::loop->new; $handle = io::async::handle->new( write_handle => $sock,  on_write_ready  => sub {  $request = "get / http/1.1\r\n" print $sock $request;      } );  $loop->add( $handle ); $loop->loop_forever; 

edit: able fix script establishing new chain each request send. possible send connect request through socks chain establish new connection each time send http request?


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -