A tools to extract CA
, Cert
and Key
from .ovpn
files
with Go module enabled (go 1.11+)
go get github.com/ezioruan/openvpn-file-parser
config, err := parser.ParseFromFile("client.ovpn")
if err != nil {
fmt.Printf("Error parse openvpn file %v", err)
return
}
fmt.Sprintf("CA %s \n Cert %s \n Key %s \n", config.CA, config.Cert, config.Key)
go run main.go -i test-data/test.ovpn -o out