Files
gluetun/internal/openvpn/settings.go
Quentin McGaw (desktop) cc2235653a 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)
2021-08-17 15:44:11 +00:00

22 lines
512 B
Go

package openvpn
import (
"context"
"github.com/qdm12/gluetun/internal/configuration"
"github.com/qdm12/gluetun/internal/openvpn/state"
)
type SettingsGetSetter = state.SettingsGetSetter
func (l *Loop) GetSettings() (
openvpn configuration.OpenVPN, provider configuration.Provider) {
return l.state.GetSettings()
}
func (l *Loop) SetSettings(ctx context.Context,
openvpn configuration.OpenVPN, provider configuration.Provider) (
outcome string) {
return l.state.SetSettings(ctx, openvpn, provider)
}