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:
@@ -10,8 +10,8 @@ import (
|
||||
|
||||
var ErrTargetIPNotFound = errors.New("target IP address not found")
|
||||
|
||||
func GetTargetIPOpenVPNConnection(connections []models.OpenVPNConnection,
|
||||
targetIP net.IP) (connection models.OpenVPNConnection, err error) {
|
||||
func GetTargetIPConnection(connections []models.Connection,
|
||||
targetIP net.IP) (connection models.Connection, err error) {
|
||||
for _, connection := range connections {
|
||||
if targetIP.Equal(connection.IP) {
|
||||
return connection, nil
|
||||
|
||||
Reference in New Issue
Block a user