Commit 748832ff authored by Enrique Melendez's avatar Enrique Melendez Committed by Nicolas Fella
Browse files

Implement additional protocols provided by Networkmanager-openconnect

The following additional openconnect protocols have been implemented:
- F5
- Fortinet
- Array

The implementation ensures compatibility with the current implementation of NetworkManager-openconnect.
The configuration drop-down menu has been updated to include those additional protocols.
parent 250d797f
Pipeline #215650 passed with stage
in 2 minutes and 49 seconds
......@@ -39,3 +39,6 @@ add_openconnect_plugin(anyconnect)
add_openconnect_plugin(juniperui)
add_openconnect_plugin(globalprotectui)
add_openconnect_plugin(pulseui)
add_openconnect_plugin(arrayui)
add_openconnect_plugin(f5ui)
add_openconnect_plugin(fortinetui)
/*
SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "openconnectui.h"
#include <KPluginFactory>
class OpenConnectArrayUi : public OpenconnectUiPlugin
{
Q_OBJECT
public:
explicit OpenConnectArrayUi(QObject *parent = nullptr, const QVariantList &args = QVariantList())
: OpenconnectUiPlugin(parent, args)
{
}
};
K_PLUGIN_CLASS_WITH_JSON(OpenConnectArrayUi, "plasmanetworkmanagement_openconnect_arrayui.json")
#include "openconnect_arrayui.moc"
/*
SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "openconnectui.h"
#include <KPluginFactory>
class OpenConnectF5Ui : public OpenconnectUiPlugin
{
Q_OBJECT
public:
explicit OpenConnectF5Ui(QObject *parent = nullptr, const QVariantList &args = QVariantList())
: OpenconnectUiPlugin(parent, args)
{
}
};
K_PLUGIN_CLASS_WITH_JSON(OpenConnectF5Ui, "plasmanetworkmanagement_openconnect_f5ui.json")
#include "openconnect_f5ui.moc"
/*
SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "openconnectui.h"
#include <KPluginFactory>
class OpenConnectFortinetUi : public OpenconnectUiPlugin
{
Q_OBJECT
public:
explicit OpenConnectFortinetUi(QObject *parent = nullptr, const QVariantList &args = QVariantList())
: OpenconnectUiPlugin(parent, args)
{
}
};
K_PLUGIN_CLASS_WITH_JSON(OpenConnectFortinetUi, "plasmanetworkmanagement_openconnect_fortinetui.json")
#include "openconnect_fortinetui.moc"
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>418</width>
<height>518</height>
<height>544</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -33,7 +33,7 @@
<number>6</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="label_41">
<property name="text">
<string>Gateway:</string>
</property>
......@@ -146,6 +146,21 @@
<string>Pulse Connect Secure</string>
</property>
</item>
<item>
<property name="text">
<string>F5 BIG-IP SSL VPN</string>
</property>
</item>
<item>
<property name="text">
<string>Fortinet SSL VPN</string>
</property>
</item>
<item>
<property name="text">
<string>Array SSL VPN</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
......
......@@ -194,8 +194,16 @@ void OpenconnectSettingWidget::loadConfig(const NetworkManager::Setting::Ptr &se
cmbProtocolIndex = 1;
} else if (dataMap[NM_OPENCONNECT_KEY_PROTOCOL] == QLatin1String("gp")) {
cmbProtocolIndex = 2;
} else {
} else if (dataMap[NM_OPENCONNECT_KEY_PROTOCOL] == QLatin1String("pulse")) {
cmbProtocolIndex = 3; // pulse, Pulse Connect Secure
} else if (dataMap[NM_OPENCONNECT_KEY_PROTOCOL] == QLatin1String("f5")) {
cmbProtocolIndex = 4; // F5 BIG-IP SSL VPN
} else if (dataMap[NM_OPENCONNECT_KEY_PROTOCOL] == QLatin1String("fortinet")) {
cmbProtocolIndex = 5; // Fortinet SSL VPN
} else if (dataMap[NM_OPENCONNECT_KEY_PROTOCOL] == QLatin1String("array")) {
cmbProtocolIndex = 6; // Array SSL VPN
} else {
cmbProtocolIndex = 3; // pulse, Pulse Connect Secure is the default
}
int cmbReportedOsIndex;
......@@ -283,6 +291,18 @@ QVariantMap OpenconnectSettingWidget::setting() const
case 2:
protocol = QLatin1String("gp");
break;
case 3:
protocol = QLatin1String("pulse");
break;
case 4:
protocol = QLatin1String("f5");
break;
case 5:
protocol = QLatin1String("fortinet");
break;
case 6:
protocol = QLatin1String("array");
break;
default:
protocol = QLatin1String("pulse");
}
......
{
"KPlugin": {
"Authors": [
{
"Email": "plasma-devel@kde.org ",
"Name": "KDE plasma",
"Name[es]": "KDE plasma"
}
],
"Category": "VPNService",
"Description": "Compatible with Array Networks SSL VPN",
"EnabledByDefault": false,
"Icon": "",
"Id": "plasmanetworkmanagement_openconnect_arrayui",
"License": "GPL",
"Name": "Array Networks Compatible VPN (openconnect)",
"Version": "0.1",
"Website": ""
},
"X-NetworkManager-Services": "org.freedesktop.NetworkManager.openconnect",
"X-NetworkManager-Services-Subtype": "anyconnect"
}
{
"KPlugin": {
"Authors": [
{
"Email": "plasma-devel@kde.org ",
"Name": "KDE plasma",
"Name[es]": "KDE plasma"
}
],
"Category": "VPNService",
"Description": "Compatible with F5 BIG-IP SSL VPN",
"EnabledByDefault": false,
"Icon": "",
"Id": "plasmanetworkmanagement_openconnect_f5ui",
"License": "GPL",
"Name": "F5 BIG-IP Compatible VPN (openconnect)",
"Version": "0.1",
"Website": ""
},
"X-NetworkManager-Services": "org.freedesktop.NetworkManager.openconnect",
"X-NetworkManager-Services-Subtype": "anyconnect"
}
{
"KPlugin": {
"Authors": [
{
"Email": "plasma-devel@kde.org ",
"Name": "KDE plasma",
"Name[es]": "KDE plasma"
}
],
"Category": "VPNService",
"Description": "Compatible with Fortinet VPN",
"EnabledByDefault": false,
"Icon": "",
"Id": "plasmanetworkmanagement_openconnect_fortinetui",
"License": "GPL",
"Name": "Fortinet Compatible VPN (openconnect)",
"Version": "0.1",
"Website": ""
},
"X-NetworkManager-Services": "org.freedesktop.NetworkManager.openconnect",
"X-NetworkManager-Services-Subtype": "anyconnect"
}
......@@ -69,7 +69,7 @@
"Description[zh_TW]": "與 PAN GlobalProtect SSL VPN 相容",
"EnabledByDefault": false,
"Icon": "",
"Id": "plasmanetworkmanagement_openconnect_globalprotect",
"Id": "plasmanetworkmanagement_openconnect_globalprotectui",
"License": "GPL",
"Name": "PAN Global Protect (openconnect)",
"Name[ar]": "خادم PAN Global Protect بواسطة (openconnect)",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment