[Win32] openvpn.exe - configuration via STDIN?

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
gridrun
OpenVPN User
Posts: 30
Joined: Sat Feb 25, 2012 10:25 pm

[Win32] openvpn.exe - configuration via STDIN?

Post by gridrun » Wed Mar 28, 2012 9:24 am

Hi all,

Is it possible to have openvpn.exe read its configuration from STDIN instead of a file?
First rule of programming: It's always your fault! - Jeff Atwood

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: [Win32] openvpn.exe - configuration via STDIN?

Post by janjust » Wed Mar 28, 2012 10:04 am

nope, but you can specify everything using command line parameters. Each config file statement can be prepended by '--' and used on the commandline, e.g.

Code: Select all

openvpn --dev tun --remote IP --port 1194 --ca ....

gridrun
OpenVPN User
Posts: 30
Joined: Sat Feb 25, 2012 10:25 pm

Re: [Win32] openvpn.exe - configuration via STDIN?

Post by gridrun » Wed Mar 28, 2012 12:51 pm

Hi Jan,

That's what I was afraid of.

Would have been nice if that worked, as there is a limit to the overall length of command line arguments in Wintendo and writing out config to the HD just so openVPN can read it again seems like nothing more but a necessary evil and additional error source (disk may be full, access denied, etc etc).

I don't think the length limit will actually be a problem. Writing a new Win32 service for openVPN, you see. I'm not happy at all with the existing service wrapper.
First rule of programming: It's always your fault! - Jeff Atwood

Post Reply