Il 27/01/2016 00:54, Selva Nair ha scritto:

On Tue, Jan 26, 2016 at 4:24 PM, Gert Doering <g...@greenie.muc.de
<mailto:g...@greenie.muc.de>> wrote:

    Since Heiko has reworked the "classic" code (in automatic.c now, as
    he called this "automatic service") maybe we can just use the
    opportunity
    to get the remaining issues fixed - is there more than "restart
    openvpn.exe
    when it dies"?


Haven't look at the new code, but of  if the "automatic service" logic
is the same as before, it would take some work to make it behave like a
watchdog of openvpn.exe processes. Using NSSM for "automatic" uses and
this one only for interactive start ups by the GUI may be a better
option. NSSM has the added advantage of one service per config which
could be independently stopped and restarted etc.

The original service starts all the configs and then sits there waiting
for the exit event to trigger, at which point the service will just
stop. For one, the exit event will not trigger when openvpn.exe quits
and even if we make the event to trigger, there is only one common event
for multiple configs, and the service just stopping at such an event
serves no purpose.

Instead of fixing it why not just use NSSM? Then the interactive service
patch could be decoupled from openvpnserv and provided as a new feature
independent of the original service.

Selva

There actually is a drop-in replacement for the old openvpnserv.exe here:

<https://github.com/mattock/openvpnserv2>

It was announced here:

<https://community.openvpn.net/openvpn/ticket/595>

From now on, I will call it openvpnserv2 to distinguish it from the old crappy openvpnserv.exe and from the interactive service.

I would personally prefer openvpnserv2 over using glue and duct-tape around NSSM to make it's configuration frontend suck less. Openvpnserv2 can already restart dead connections, e.g. after the computer has resumed from suspend or hibernation. I did some very basic testing on a Windows 7 laptop and confirmed suspend/resume worked fine. Of course we'd need more extensive tests with test installers before releasing it to a wider audience.

An added bonus is that openvpnserv2 is written in C#, which means it can be developed on Linux using Mono, and the language choice probably helps getting new contributions from people not fluent with C.

--
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

Reply via email to