Patrick LeBoutillier > Apache-HTTunnel-0.08 > httunnel


Annotate this POD


New  1
Open  0
View/Report Bugs


httunnel - Client daemon for Apache::HTTunnel


  httunnel path [-V] [-VV] [-d]
  httunnel -v
  httunnel -h


httunnel is a stand-alone daemon that can be used to easily set up HTTP tunnels with Apache::HTTunnel.



Path to a configuration file or directory. If path is a directory, all .conf files found are loaded.


Verbose output.


Very verbose output. May contain binary data.


Daemon mode. httunnel will detach from the console and log information to syslog if available.


Prints version and exits.


Prints a short usage message and exits.


The configuration file format is similar to .ini files and to that of stunnel. It is built up of sections and directives. Here is an example:

  global_key_1 = value1
  global_key_2 = value2

  [section 1]
  section1_key_1 = value1
  section1_key_2 = value2

  [section 2]
  section2_key_1 = value1
  section2_key_2 = value2

Keys can be declared globally and/or locally inside a section. Sections not specifying a value locally will inherit the global value. If there is no global value, the default value is used.

Each section corresponds to a tunnel to be established. Below is the description of all the valid configuration directives.


local_addr = <hostname or ip address>

Local address to bind to. Default is 'localhost'.

local_port = <port nb.>

Local port number to bind to. This directive is mandatory.

protocol = <proto>

Protocol for the tunnelled connection. Default is 'tcp', possible values are 'tcp and 'udp'.

remote_port = <port nb.>

Remote port number. This directive is mandatory.

remote_host = <hostname or ip address>

Remote host. This directive if mandatory.

url = <url>

The URL to reach the Apache::HTTunnel server. This directive is mandatory.

http_protocol = <http proto>

The HTTP protocol to use. The default is 'HTTP/1.1'.

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'.

http_username = <username>

Basic authentication username for the Apache::HTTunnel server. The default is ''.

http_password = <password>

Basic authentication password for the Apache::HTTunnel server. The default is ''.

http_proxy = <url>

URL of your HTTP proxy. This is passed directly to LWP::UserAgent.

http_proxy_username = <username>

Basic authentication username for your HTTP proxy. The default is ''.

http_proxy_password = <password>

Basic authentication password for your HTTP proxy. The default is ''.

read_length = <nb. bytes>

The numbers of bytes the httunnel tries to read when a read is attempted. The default is 131072 bytes.

read_timeout = <nb. seconds>

All HTTP read request are interrupted after read_timeout by Apache::HTTunnel. However, HTTunnel::Client will keep on sending HTTP read requests until data is received. You can lower this value if your proxy is interrupting the HTTP requests abruptly, causing HTTunnel::Client to not function correctly. The default is 15 seconds.

verbose = <0 or 1 or 2>

Controls debug output. The default is as such: '2' if the -VV option is used, '1' if the -V option is used, '0' otherwise.

httunnel SERVICE ^

On supported platforms (Linux only for now), a service script (/etc/init.d/httunnel) is installed. When invoked using this script, httunnel will use /etc/httunnel.d as its configuration directory and subsequently load all .conf files found there.


I'm sure there are some in there :)


HTTunnel::Client, LWP::UserAgent


Patrick LeBoutillier, <>


Copyright 2005 by Patrick LeBoutillier

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: