OPENVPN_AUTH variable, refers to #94

This commit is contained in:
Quentin McGaw
2020-03-29 16:22:21 -04:00
committed by GitHub
parent 3d6a580102
commit 643745d33e
11 changed files with 46 additions and 31 deletions

View File

@@ -16,6 +16,7 @@ type OpenVPN struct {
Root bool
TargetIP net.IP
Cipher string
Auth string
}
// GetOpenVPNSettings obtains the OpenVPN settings using the params functions
@@ -40,6 +41,10 @@ func GetOpenVPNSettings(params params.ParamsReader) (settings OpenVPN, err error
if err != nil {
return settings, err
}
settings.Auth, err = params.GetOpenVPNAuth()
if err != nil {
return settings, err
}
return settings, nil
}
@@ -55,6 +60,7 @@ func (o *OpenVPN) String() string {
"Run as root: " + runAsRoot,
"Target IP address: " + o.TargetIP.String(),
"Custom cipher: " + o.Cipher,
"Custom auth algorithm: " + o.Auth,
}
return strings.Join(settingsList, "\n|--")
}