Hi,

There is a question at the end, so scroll down if you're impatient :). Anyways, some of you may know I've been looking into NSSM:

<http://nssm.cc>

The idea is to use NSSM to replace the OpenVPN Service Wrapper ("openvpnserv.exe") which is buggy, unmaintained, causes all sorts of issues and seems disintegrate more and more with every new Windows release.

NSSM on is actively maintained[1] general purpose service manager which can launch an arbitrary program and restart it if it crashes. NSSM registers itself as a Windows service and manages a set of services, which can be arbitrary programs. In our case nssm.exe would run a command such as this:

..\bin\openvpn.exe --config default.ovpn

The working directory would be set to C:\Program Files\OpenVPN\config. Should an OpenVPN process die, nssm.exe would respawn it immediately. Note that each OpenVPN connection is monitored separately.

For the corporate use-case simply bundling nssm.exe along with instructions and maybe a simple template script would suffice:

<https://community.openvpn.net/openvpn/wiki/IntegratingOpenvpnWithNssm>

However, in the general case we have a problem. OpenVPN connections can be added and removed by the user at a whim, so the user has to be able to configure nssm.exe him/herself at any time. All we'd really need is a GUI similar to this:

---
"OpenVPN connections to launch and monitor automatically on boot:"

[x] foo
[x] bar
[  ] def
---

Checking or unchecking a checkbox would simply run nssm.exe with appropriate command-line parameters. If the user needs more fine-grained control over nssm.exe's behavior he/she can resort to using nssm.exe's GUI or command-line.

After several hours of research I'm leaning towards one of these options:

1) An interactive batch file

This would do the trick, but would be fairly crude and unsophisticated. Powershell would be way better, but Windows Vista (not EOL until 2017) does not have it installed by default.

2) Simple C# GUI application

Write a real C# application would be way more work than #1, but still not a huge task. In addition this application could be later extended for other tasks such as turning on/off openvpnserv.exe and adding/removing tap-windows adapters.

---

Any other suggestions on how to solve this issue? Am I overlooking some obvious? And most importantly: does anyone feel like participating in this fun Windows development adventure? :P

Best regards,

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

irc freenode net: mattock

[1] That said, according Git logs the project is maintained by a single person.

Reply via email to