Branch Coverage

blib/lib/POE/Component/Proxy/SOCKS.pm
Criterion Covered Total %
branch 8 188 4.2


line true false branch
18 0 1 ref $options eq 'HASH' ? :
62 0 0 unless $wheel_id and defined $$self{'clients'}{$wheel_id}
68 0 0 unless $wheel_id and defined $$self{'links'}{$wheel_id}
74 0 0 unless $wheel_id and defined $$self{'sockets'}{$wheel_id}
80 0 0 unless $self->_conn_exists($id)
84 0 0 if $cid eq $id
85 0 0 if $$self{'clients'}{$cid}{'dstip'} ne $$client{'dstip'}
86 0 0 if $$self{'clients'}{$cid}{'dstport'} ne $$client{'dstport'}
101 0 1 if ($$self{'alias'}) { }
107 1 0 if ($kernel != $sender)
119 0 1 defined $$self{'address'} ? :
1 0 defined $$self{'port'} ? :
139 1 0 unless $$self{'alias'}
151 0 0 if ($self->denied($peeraddr))
164 0 0 unless $wheel
179 0 0 if ($$self{'ident'})
204 0 0 unless $self->_conn_exists($wheel_id)
216 0 0 unless $self->_conn_exists($wheel_id)
224 0 0 unless $self->_conn_exists($id)
225 0 0 unless defined $$self{'clients'}{$id}{'user_id'}
226 0 0 unless defined $$self{'clients'}{$id}{'ident'}
228 0 0 unless ($$client{'ident'})
232 0 0 unless ($$client{'ident'} eq $$client{'user_id'})
236 0 0 if $$client{'cd'} eq '1'
237 0 0 if $$client{'cd'} eq '2'
243 0 0 unless $self->_conn_exists($id)
255 0 0 if $null_idx == -1
257 0 0 unless $request
259 0 0 unless $packet or length $packet == 4
261 0 0 unless scalar @results == 3
263 0 0 unless $dstip
268 0 0 unless $id
275 0 0 unless $self->_conn_exists($id)
278 0 0 unless ($$client{'link_id'})
281 0 0 unless (@args)
287 0 0 unless ($dstip)
294 0 0 if ($vn ne '4' or not $cd =~ /^(1|2)$/)
298 0 0 if ($dstip =~ /^0\.0\.0\./ and $cd ne '2')
300 0 0 unless ($host)
309 0 0 if ($response)
314 0 0 if ($cd eq '2')
316 0 0 unless ($cid)
321 0 0 if $$self{'ident'}
322 0 0 unless $$self{'ident'}
325 0 0 if $$self{'ident'}
326 0 0 unless $$self{'ident'}
329 0 0 unless $self->_link_exists($$client{'link_id'})
339 0 0 unless $self->_conn_exists($id)
340 0 0 unless (defined $net_dns_packet)
345 0 0 unless (@net_dns_answers)
350 0 0 unless $net_dns_answer->type eq 'A'
353 0 0 if $$self{'ident'}
354 0 0 unless $$self{'ident'}
363 0 0 unless $self->_conn_exists($id)
371 0 0 unless $self->_conn_exists($id)
372 0 0 if $$self{'clients'}{$id}{'link_id'}
373 0 0 unless $$self{'clients'}{$id}{'reject'}
380 0 0 unless $self->_conn_exists($id)
388 0 0 unless $self->_conn_exists($id)
390 0 0 if ($$client{'link_id'} and $self->_link_exists($$client{'link_id'}))
393 0 0 if ($$client{'factory'} and $self->_sock_exists($$client{'factory'}))
401 0 0 unless $self->_conn_exists($id)
420 0 0 unless $self->_conn_exists($id)
423 0 0 unless $self->_conn_exists($primary)
425 0 0 unless $link_id or $self->_link_exists($link_id)
438 0 0 unless ($sockname)
458 0 0 if $self->_conn_exists($client_id)
469 0 0 unless $self->_conn_exists($client_id)
494 0 0 unless $self->_conn_exists($client_id)
496 0 0 unless ($peeraddr eq $$client{'dstip'})
524 0 0 unless $self->_link_exists($link_id)
526 0 0 unless $self->_conn_exists($client_id)
533 0 0 unless $self->_link_exists($link_id)
537 0 0 if ($$link{'client'} and $self->_conn_exists($$link{'client'}))
549 0 0 unless (@events)
557 0 0 unless /^_/
560 0 0 unless ($$self{'sessions'}{$sender_id}{'refcnt'}++ or $session == $sender)
573 0 0 unless (@events)
587 0 0 unless /^_/
589 0 0 unless ($blah)
593 0 0 if (--$$self{'sessions'}{$sender_id}{'refcnt'} <= 0)
595 0 0 unless ($session == $sender)
607 1 0 if (--$$self{'sessions'}{$session_id}{'refcnt'} <= 0)
609 1 0 unless $session_id eq $socksd_id
646 0 0 unless $netmask->isa('Net::Netmask')
654 0 0 unless $netmask->isa('Net::Netmask')
655 0 0 unless $$self{'denials'}{$netmask}
663 0 0 unless $netmask->isa('Net::Netmask')
664 0 0 unless $$self{'exemptions'}{$netmask}
671 0 0 unless $netmask->isa('Net::Netmask')
672 0 0 unless $$self{'exemptions'}{$netmask}
680 0 0 if $self->exempted($ipaddr)
682 0 0 if $$self{'denials'}{$mask}->match($ipaddr)
691 0 0 if $$self{'exemptions'}{$mask}->match($ipaddr)