@@ -3,6 +3,7 @@ package params
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
libparams "github.com/qdm12/golibs/params"
|
||||
"github.com/qdm12/private-internet-access-docker/internal/models"
|
||||
@@ -63,3 +64,10 @@ func (p *paramsReader) GetTargetIP() (ip net.IP, err error) {
|
||||
}
|
||||
return ip, nil
|
||||
}
|
||||
|
||||
// GetOpenVPNCipher obtains a custom cipher to use with OpenVPN
|
||||
// from the environment variable OPENVPN_CIPHER
|
||||
func (p *paramsReader) GetOpenVPNCipher() (cipher string, err error) {
|
||||
cipher, err = p.envParams.GetEnv("OPENVPN_CIPHER")
|
||||
return strings.ToLower(cipher), err
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ type ParamsReader interface {
|
||||
GetOpenVPNVerbosity() (verbosity int, err error)
|
||||
GetOpenVPNRoot() (root bool, err error)
|
||||
GetTargetIP() (ip net.IP, err error)
|
||||
GetOpenVPNCipher() (cipher string, err error)
|
||||
|
||||
// PIA getters
|
||||
GetPortForwarding() (activated bool, err error)
|
||||
|
||||
Reference in New Issue
Block a user