Categorygithub.com/ezioruan/openvpn-file-parser
modulepackage
0.0.0-20220331073941-76ccfd71ec9d
Repository: https://github.com/ezioruan/openvpn-file-parser.git
Documentation: pkg.go.dev

# README

openvpn-file-parser

A tools to extract CA, Cert and Key from .ovpn files

Go Reportcard

Usage

with Go module enabled (go 1.11+) go get github.com/ezioruan/openvpn-file-parser

Parse file


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)

Use the CLI

go run main.go -i test-data/test.ovpn -o out

# Packages

Copyright © 2022 NAME HERE <EMAIL ADDRESS> */.
No description provided by the author