Apache-HTTunnel
view release on metacpan or search on metacpan
Client/httunnel view on Meta::CPAN
my $pid = fork() ;
sdie("Can't fork: $!") unless defined($pid) ;
next if ($pid) ;
# child
undef $listeners ;
undef $select ;
$pid = undef ;
my $reader = undef ;
my $hc = new My::HTTunnel::Client($cfg, keep_alive => $cfg->{http_keep_alive}) ;
eval {
local $SIG{TERM} = 'IGNORE' if $cfg->{protocol} ne 'udp' ;
$hc->proxy(['http'], $cfg->{http_proxy}) if $cfg->{http_proxy} ;
$hc->connect($cfg->{protocol}, $cfg->{remote_host}, $cfg->{remote_port}) ;
sdebug("Remote connection to $cfg->{remote_host}:$cfg->{remote_port} established") ;
my $lifeline = new IO::Pipe() ;
($reader, $pid) = start_reader($hc, $cfg, $lifeline) ;
if (! $reader){
Client/httunnel view on Meta::CPAN
# Process configuration
my %defaults = (
local_addr => 'localhost',
local_port => undef,
protocol => 'tcp',
remote_port => undef,
remote_host => undef,
url => undef,
http_protocol => 'HTTP/1.1',
http_keep_alive => 1,
http_username => '',
http_password => '',
http_proxy => '',
http_proxy_username => '',
http_proxy_password => '',
read_length => 131072,
read_timeout => 15,
verbose => $DEBUG,
) ;
Client/httunnel.pod view on Meta::CPAN
=item url = <url>
The URL to reach the L<Apache::HTTunnel> server. This directive
is mandatory.
=item http_protocol = <http proto>
The HTTP protocol to use. The default is 'HTTP/1.1'.
=item http_keep_alive = <0 or 1>
Whether to use persistent HTTP connections. Although not required, this
increases performance quite a bit. The default is '1'.
=item http_username = <username>
Basic authentication username for the L<Apache::HTTunnel> server.
The default is ''.
=item http_password = <password>
Client/lib/HTTunnel/Client.pm view on Meta::CPAN
$HTTunnel::Client::VERSION = '0.08' ;
sub new {
my $class = shift ;
my $url = shift ;
my %lwp_agent_args = @_ ;
my $this = $class->SUPER::new(
agent => 'HTTunnel::Client/$HTTunnel::Client::VERSION',
keep_alive => 1,
%lwp_agent_args
) ;
$url =~ s/\/+$// ;
$this->{__PACKAGE__}->{url} = $url ;
$this->{__PACKAGE__}->{pid} = 0 ;
$this->{__PACKAGE__}->{peer_info} = 0 ;
bless($this, $class) ;
( run in 0.586 second using v1.01-cache-2.11-cpan-df04353d9ac )