mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-25 11:56:24 +02:00
chore(updater): move updater packages to pkg/updaters/<name>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user