chore(constants): add internal/constants/openvpn package
This commit is contained in:
@@ -3,7 +3,7 @@ package utils
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants"
|
||||
"github.com/qdm12/gluetun/internal/constants/openvpn"
|
||||
)
|
||||
|
||||
func CipherLines(ciphers []string, version string) (lines []string) {
|
||||
@@ -12,7 +12,7 @@ func CipherLines(ciphers []string, version string) (lines []string) {
|
||||
}
|
||||
|
||||
switch version {
|
||||
case constants.Openvpn24:
|
||||
case openvpn.Openvpn24:
|
||||
return []string{
|
||||
"cipher " + ciphers[0],
|
||||
"ncp-ciphers " + strings.Join(ciphers, ":"),
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
"github.com/qdm12/gluetun/internal/constants"
|
||||
"github.com/qdm12/gluetun/internal/constants/openvpn"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/gluetun/internal/openvpn/parse"
|
||||
)
|
||||
@@ -61,7 +62,7 @@ func OpenVPNConfig(provider OpenVPNProviderSettings,
|
||||
lines.add("suppress-timestamps") // do not log timestamps, the Gluetun logger takes care of it
|
||||
lines.add("dev", settings.Interface)
|
||||
lines.add("verb", fmt.Sprint(*settings.Verbosity))
|
||||
lines.add("auth-user-pass", constants.OpenVPNAuthConf)
|
||||
lines.add("auth-user-pass", openvpn.AuthConf)
|
||||
lines.add("proto", connection.Protocol)
|
||||
lines.add("remote", connection.IP.String(), fmt.Sprint(connection.Port))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user