Replace options in ovpn file

How to customize and extend your OpenVPN installation.

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

Post Reply
Eugeny1
OpenVpn Newbie
Posts: 1
Joined: Mon Oct 16, 2023 12:40 pm

Replace options in ovpn file

Post by Eugeny1 » Mon Oct 16, 2023 1:02 pm

I need to add options to the openvpn client, and can not perform it through daemon command line.
The only way seems to me modify supplied .ovpn file. Initially I add required options at the end of the file, but if file would appear to have same options earlier I am afraid config reader will stop on that option. Thus next idea is to add required options at the beginning of the config file.
But the correct way must be replacement of the options. Is there any ready-to-use solution for this - not requiring parsing config file myself?

Post Reply