summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-04 10:11:45 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-04 10:11:45 +0200
commit0096d0471fef972e305a61435623d64b7da4f0d9 (patch)
tree17530b91964e40beeb590da8e6bb83fd32cea365 /internal
parent926b5a36f309b397fc4e9c4e8e316c0d3c956c06 (diff)
Refactor: Renmae force TCP to prefer TCP
Diffstat (limited to 'internal')
-rw-r--r--internal/server/common.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/server/common.go b/internal/server/common.go
index 7f4a0de..36dba32 100644
--- a/internal/server/common.go
+++ b/internal/server/common.go
@@ -422,7 +422,7 @@ func HasValidProfile(server Server) (bool, error) {
return false, nil
}
-func GetConfig(server Server, forceTCP bool) (string, string, error) {
+func GetConfig(server Server, preferTCP bool) (string, string, error) {
errorMessage := "failed getting an OpenVPN/WireGuard configuration"
profile, profileErr := getCurrentProfile(server)
@@ -433,8 +433,8 @@ func GetConfig(server Server, forceTCP bool) (string, string, error) {
supportsOpenVPN := profile.supportsOpenVPN()
supportsWireguard := profile.supportsWireguard()
- // If forceTCP we must be able to get a config with OpenVPN
- if forceTCP && supportsOpenVPN {
+ // If preferTCP we must be able to get a config with OpenVPN
+ if preferTCP && supportsOpenVPN {
return "", "", &types.WrappedErrorMessage{
Message: errorMessage,
Err: &ServerGetConfigForceTCPError{},
@@ -475,7 +475,7 @@ func (e *ServerGetCurrentProfileNotFoundError) Error() string {
type ServerGetConfigForceTCPError struct{}
func (e *ServerGetConfigForceTCPError) Error() string {
- return "failed to get config, force TCP is on but the server does not support OpenVPN"
+ return "failed to get config, prefer TCP is on but the server does not support OpenVPN"
}
type ServerEnsureServerEmptyURLError struct{}