chore(portforward): remove PIA dependency on storage package
This commit is contained in:
@@ -9,12 +9,13 @@ import (
|
||||
)
|
||||
|
||||
type Settings struct {
|
||||
Enabled *bool
|
||||
PortForwarder PortForwarder
|
||||
Filepath string
|
||||
Interface string // needed for PIA and ProtonVPN, tun0 for example
|
||||
ServerName string // needed for PIA
|
||||
ListeningPort uint16
|
||||
Enabled *bool
|
||||
PortForwarder PortForwarder
|
||||
Filepath string
|
||||
Interface string // needed for PIA and ProtonVPN, tun0 for example
|
||||
ServerName string // needed for PIA
|
||||
CanPortForward bool // needed for PIA
|
||||
ListeningPort uint16
|
||||
}
|
||||
|
||||
func (s Settings) Copy() (copied Settings) {
|
||||
@@ -23,6 +24,7 @@ func (s Settings) Copy() (copied Settings) {
|
||||
copied.Filepath = s.Filepath
|
||||
copied.Interface = s.Interface
|
||||
copied.ServerName = s.ServerName
|
||||
copied.CanPortForward = s.CanPortForward
|
||||
copied.ListeningPort = s.ListeningPort
|
||||
return copied
|
||||
}
|
||||
@@ -33,6 +35,7 @@ func (s *Settings) OverrideWith(update Settings) {
|
||||
s.Filepath = gosettings.OverrideWithComparable(s.Filepath, update.Filepath)
|
||||
s.Interface = gosettings.OverrideWithComparable(s.Interface, update.Interface)
|
||||
s.ServerName = gosettings.OverrideWithComparable(s.ServerName, update.ServerName)
|
||||
s.CanPortForward = gosettings.OverrideWithComparable(s.CanPortForward, update.CanPortForward)
|
||||
s.ListeningPort = gosettings.OverrideWithComparable(s.ListeningPort, update.ListeningPort)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user