[sslh] plug in =)
Yves Rutschle
yves at naryves.com
Sun Mar 4 23:07:52 CET 2012
On Fri, Feb 24, 2012 at 03:33:15PM +0100, Régis A. Despres wrote:
> Before I deep more in the code, would it be easy to include a
> configuration file listing the protocols & their trigger.
> The main goal of this : easing tests in order to add more protocols.
Ok, here's a patch that adds support for a configuration
file which can replace the command line parameters, and
allows to define regular expressions to match protocols.
You'll need libconfig to compile (apt-get install
libconfig8-dev in Debian).
Defining a protocol looks something like:
{ name: "my_proto"; host: "localhost"; port: "123"; probe: [ "^hello", "world" ] }
"If the first packet starts with 'hello' or contains
'world', connect to localhost port 123".
There is an 'example.cfg' that contains the current
protocols, and you can specify it with -F (or --config):
./sslh-select -F example.cfg
The patch is enough to start playing with pattern matching,
but isn't fully finished: it's currently not possible to
specify the built-in probing functions, and it removes the
ability to specify target protocols on the command line.
Happy regexing!
Y.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sslh-config_file_regex.patch
Type: text/x-diff
Size: 22629 bytes
Desc: not available
URL: <http://rutschle.net/pipermail/sslh/attachments/20120304/d42411bf/attachment.patch>
More information about the sslh
mailing list