Skip to content

Instantly share code, notes, and snippets.

@ofirule
ofirule / convert_openvpn_conf_file_to_ovpn_file.py
Last active July 18, 2024 17:25
converting openvpn .conf file to .ovpn file
import sys, os
ALLOW_FILE_OPTIONS = ["ca", "cert", "dh", "extra-certs", "key", "pkcs12", "secret", "crl-verify", "http-proxy-user-pass", "tls-auth", "tls-crypt"]
filepath = sys.argv[1]
output_file = os.path.basename(filepath). replace(".conf", ".ovpn")
inline_tuples_to_add = []