OpenVPN/openvpn — pull request #10 by andreax79 (2013-12-10 16:59:56+00:00)
Title: Custom control messages & trigger

Hi,
I like to share with you this patch.
I was searching for a method to notify (e.g. executing a script) a client when something happen on the server.
The scenario is the following: then some configuration are changed on the server, the client has to update the
firewall rules.
In order to achieve the goal I added a new control message "CUSTOM". Then the this message is received, the script specified with "--custom" is executed. All the additional argument specified after CUSTOM are passed to the script as parameters.
I added a new command "control" to the management cli to send arbitrary control command to clients (by common name or by address/port).

As example, the following command:
control 192.168.18.164:45421 CUSTOM test
sends the "CUSTOM test" control message to the client at 192.168.18.164:45421.
On the client, the "--custom" script is executed with "test" as first parameter.

Cheers,
Andrea