The new WANProxy configuration file format.

Juli Mallett juli at
Sat Jun 27 18:10:57 PDT 2009

Hey folks,

The next version will have a new configuration system, ostensibly to
support exchange of previously-sent data, but that code hasn't been
written yet.  I opted for a modular configuration system that is a
little bare-bones at the moment, so the configuration system is a
little awkwardly bolted-on, to put it mildly.  That said, it should
support everything (except for the flow monitor and flow tables) that
the old one did.  It's in Subversion now and I'd encourage you to try
it out.

To give you some idea of how it works — you create, configure and then
activate configuration objects.  A proxy, for example, has 4
configuration parameters — interface, decoder, peer and encoder.  (It
should have a fifth one but I haven't decided whether I actually want
to keep the flow table stuff.)  The interface is the address to bind
to and listen on, the decoder is what codec to use for decoding data
coming in on that interface, the peer is the remote address to connect
to and the encoder is what codec to use for encoding data going out to
that peer.  Addresses, codecs and peers are all objects and have
parameters of their own, etc.

For example, to create a proxy which listens on port 8080 and
which connects to port 9910, with no codecs, you'd do
something like this:

create interface if0
set IPv4
set ""
set if0.port 8080
activate if0

create peer peer0
set IPv4
set ""
set peer0.port 9910
activate peer0

create proxy proxy0
set proxy0.interface if0
set proxy0.decoder None
set proxy0.peer peer0
set proxy0.encoder None
activate proxy0

A bit cumbersome, but hopefully flexible.  In case you were wondering,
the IPv4 there is indeed a reference to the fact that I'd like to add
IPv6 support soon, too.

Likewise, if you wanted to use the XCodec to encode, you could do
something like:

create codec codec0
set codec0.codec XCodec
activate codec0

And then just change the encoder:

% set proxy0.encoder codec0

Hopefully more intuitive than the old system.  I'd like to clean it up
a bit (it's not broken or anything, but I've been working on it in 5
minute bursts and it shows) and update the website, and then I'll
probably do a 0.4.5 release with the new configuration system, and at
some point a 0.5.0 will follow when I get it more tightly-integrated
and have things working like at least one of: the exchange of
previously-sent data, IPv6 or persistent storage; all of which are
finally within sight now that there's the new configuration system.

Let me know if you have any questions or find any problems.  I haven't
had any real time for WANProxy for a few weeks, but have tried to stay


More information about the wanproxy mailing list