mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-24 19:36:24 +02:00
chore(updater): move updater packages to pkg/updaters/<name>
This commit is contained in:
@@ -2,8 +2,8 @@ package vpn
|
||||
|
||||
import (
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||
"github.com/qdm12/gluetun/internal/netlink"
|
||||
"github.com/qdm12/gluetun/pkg/updaters/constants"
|
||||
)
|
||||
|
||||
func (l *Loop) isIPv6Used(settings settings.VPN) bool {
|
||||
@@ -11,14 +11,14 @@ func (l *Loop) isIPv6Used(settings settings.VPN) bool {
|
||||
return false
|
||||
}
|
||||
switch settings.Type {
|
||||
case vpn.AmneziaWg:
|
||||
case constants.AmneziaWg:
|
||||
for _, prefix := range settings.AmneziaWg.Wireguard.Addresses {
|
||||
if prefix.Addr().Is6() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
case vpn.OpenVPN:
|
||||
case constants.OpenVPN:
|
||||
link, err := l.netLinker.LinkByName(settings.OpenVPN.Interface)
|
||||
if err != nil {
|
||||
l.logger.Warnf("assuming IPv6 is not supported, cannot get OpenVPN link by name: %v", err)
|
||||
@@ -35,7 +35,7 @@ func (l *Loop) isIPv6Used(settings settings.VPN) bool {
|
||||
}
|
||||
}
|
||||
return false
|
||||
case vpn.Wireguard:
|
||||
case constants.Wireguard:
|
||||
for _, prefix := range settings.Wireguard.Addresses {
|
||||
if prefix.Addr().Is6() {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user