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:
@@ -71,7 +71,7 @@ func (c *Cyberghost) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "mssfix "+strconv.Itoa(int(settings.MSSFix)))
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
if settings.IPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
@@ -81,9 +81,9 @@ func (c *Cyberghost) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.CyberghostCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnCert(
|
||||
settings.Provider.ExtraConfigOptions.ClientCertificate)...)
|
||||
settings.ClientCrt)...)
|
||||
lines = append(lines, utils.WrapOpenvpnKey(
|
||||
settings.Provider.ExtraConfigOptions.ClientKey)...)
|
||||
settings.ClientKey)...)
|
||||
|
||||
lines = append(lines, "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user