Maint: make VPN connection not specific to OpenVPN
- Add VPN field to ServerSelection struct - Set VPN type to server selection at start using VPN_TYPE - Change OpenVPNConnection to Connection with Type field - Rename Provider GetOpenVPNConnection to GetConnection - Rename GetTargetIPOpenVPNConnection to GetTargetIPConnection - Rename PickRandomOpenVPNConnection to PickRandomConnection - Add 'OpenVPN' prefix to OpenVPN specific methods on connection
This commit is contained in:
@@ -26,10 +26,10 @@ func setupOpenVPN(ctx context.Context, fw firewall.VPNConnectionSetter,
|
||||
openvpnConf openvpn.Interface, providerConf provider.Provider,
|
||||
openVPNSettings configuration.OpenVPN, providerSettings configuration.Provider) (
|
||||
serverName string, err error) {
|
||||
var connection models.OpenVPNConnection
|
||||
var connection models.Connection
|
||||
var lines []string
|
||||
if openVPNSettings.Config == "" {
|
||||
connection, err = providerConf.GetOpenVPNConnection(providerSettings.ServerSelection)
|
||||
connection, err = providerConf.GetConnection(providerSettings.ServerSelection)
|
||||
if err == nil {
|
||||
lines = providerConf.BuildConf(connection, openVPNSettings)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user