Maint: configuration Openvpn selection structure
- Move network protocol from ServerSelection to OpenVPNSelection child - Move PIA encryption preset from ServerSelection to OpenVPNSelection child - Move custom port from ServerSelection to OpenVPNSelection child
This commit is contained in:
@@ -10,11 +10,11 @@ import (
|
||||
func (p *Protonvpn) GetOpenVPNConnection(selection configuration.ServerSelection) (
|
||||
connection models.OpenVPNConnection, err error) {
|
||||
protocol := constants.UDP
|
||||
if selection.TCP {
|
||||
if selection.OpenVPN.TCP {
|
||||
protocol = constants.TCP
|
||||
}
|
||||
|
||||
port, err := getPort(selection.TCP, selection.CustomPort)
|
||||
port, err := getPort(selection.OpenVPN.TCP, selection.OpenVPN.CustomPort)
|
||||
if err != nil {
|
||||
return connection, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user