chore(updater): move updater packages to pkg/updaters/<name>

This commit is contained in:
Quentin McGaw
2026-04-23 03:47:57 +00:00
parent 5b01324d5f
commit 13503b0ae0
268 changed files with 1602 additions and 1026 deletions
+3 -4
View File
@@ -2,12 +2,11 @@ package utils
import (
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/constants/vpn"
"github.com/qdm12/gluetun/pkg/updaters/constants"
)
func getProtocol(selection settings.ServerSelection) (protocol string) {
if selection.VPN == vpn.OpenVPN && selection.OpenVPN.Protocol == constants.TCP {
if selection.VPN == constants.OpenVPN && selection.OpenVPN.Protocol == constants.TCP {
return constants.TCP
}
return constants.UDP
@@ -17,7 +16,7 @@ func filterByProtocol(selection settings.ServerSelection,
serverTCP, serverUDP bool,
) (filtered bool) {
switch selection.VPN {
case vpn.Wireguard:
case constants.Wireguard:
return !serverUDP
default: // OpenVPN
wantTCP := selection.OpenVPN.Protocol == constants.TCP