kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.62k stars 2.37k forks source link

A question about programmatically usage. #688

Closed arthurfiorette closed 2 years ago

arthurfiorette commented 2 years ago

Hi! I'm looking for possibilities to start an openvpn instance programmatically. So, I went looking for integrations with docker and came to this github page. I saw that, apparently, the only part that needs interaction for configuration is at the beginning, by calling the ovpn_genconfig script file.

My default go to now would be to override that file to accept input in an easier format like json and etc. I wanted to know if it would be easier to do in another way or if something similar is already implemented.

bjowol commented 2 years ago

You could script running the necessary commands with expressions. Then you can input values to that script, and possibly a target computer with docker installed, or promt for credentials to a remote instance.

add some lines to extract needed files, dump them somewhere, and give someone access to those files.