Maint: refactor VPN configuration structure
- Paves the way for Wireguard - VPN struct contains Type, Openvpn and Provider configurations - OpenVPN specific options (e.g. client key) moved from Provider to Openvpn configuration struct - Move Provider configuration from OpenVPN configuration to VPN - HTTP control server returns only openvpn settings (not provider settings)
This commit is contained in:
@@ -9,11 +9,13 @@ import (
|
||||
|
||||
type SettingsGetSetter = state.SettingsGetSetter
|
||||
|
||||
func (l *Loop) GetSettings() (settings configuration.OpenVPN) {
|
||||
func (l *Loop) GetSettings() (
|
||||
openvpn configuration.OpenVPN, provider configuration.Provider) {
|
||||
return l.state.GetSettings()
|
||||
}
|
||||
|
||||
func (l *Loop) SetSettings(ctx context.Context, settings configuration.OpenVPN) (
|
||||
func (l *Loop) SetSettings(ctx context.Context,
|
||||
openvpn configuration.OpenVPN, provider configuration.Provider) (
|
||||
outcome string) {
|
||||
return l.state.SetSettings(ctx, settings)
|
||||
return l.state.SetSettings(ctx, openvpn, provider)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user