Maint: port forwarding refactoring (#543)

- portforward package
- portforward run loop
- Less functional arguments and cycles
This commit is contained in:
Quentin McGaw
2021-07-28 08:35:44 -07:00
committed by GitHub
parent c777f8d97d
commit 2998cf5e48
25 changed files with 639 additions and 255 deletions

View File

@@ -13,7 +13,6 @@ var _ Manager = (*State)(nil)
type Manager interface {
SettingsGetSetter
ServersGetterSetter
PortForwardedGetterSetter
GetSettingsAndServers() (settings configuration.OpenVPN,
allServers models.AllServers)
}
@@ -36,9 +35,6 @@ type State struct {
allServers models.AllServers
allServersMu sync.RWMutex
portForwarded uint16
portForwardedMu sync.RWMutex
}
func (s *State) GetSettingsAndServers() (settings configuration.OpenVPN,