From 9279804b3f550d8920c1f879aaaca919365d881a Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 17 Oct 2011 17:38:53 +0000 Subject: Add dead-ended knetworkmanager 0.8 source Add copy of same for knetworkmanager 0.9 starting point git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knetworkmanager9@1259314 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../vpn-plugins/openvpn/src/Makefile.am | 12 + .../openvpn/src/knetworkmanager-openvpn.cpp | 566 +++++++++++++++++++ .../openvpn/src/knetworkmanager-openvpn.h | 110 ++++ .../vpn-plugins/openvpn/src/openvpnauth.ui | 80 +++ .../vpn-plugins/openvpn/src/openvpnprop.ui | 619 +++++++++++++++++++++ 5 files changed, 1387 insertions(+) create mode 100644 knetworkmanager-0.9/vpn-plugins/openvpn/src/Makefile.am create mode 100644 knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp create mode 100644 knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h create mode 100644 knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnauth.ui create mode 100644 knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnprop.ui (limited to 'knetworkmanager-0.9/vpn-plugins/openvpn/src') diff --git a/knetworkmanager-0.9/vpn-plugins/openvpn/src/Makefile.am b/knetworkmanager-0.9/vpn-plugins/openvpn/src/Makefile.am new file mode 100644 index 0000000..af37dc3 --- /dev/null +++ b/knetworkmanager-0.9/vpn-plugins/openvpn/src/Makefile.am @@ -0,0 +1,12 @@ +INCLUDES = $(KNETWORKMANAGER_CFLAGS) $(OPENVPN_CFLAGS) $(all_includes) + +METASOURCES = AUTO + +kde_module_LTLIBRARIES = knetworkmanager_openvpn.la +knetworkmanager_openvpn_la_SOURCES = knetworkmanager-openvpn.cpp \ + openvpnprop.ui \ + openvpnauth.ui +noinst_HEADERS = knetworkmanager-openvpn.h +knetworkmanager_openvpn_la_LDFLAGS = -module $(all_libraries) +knetworkmanager_openvpn_la_LIBADD = $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) + diff --git a/knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp b/knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp new file mode 100644 index 0000000..0593a08 --- /dev/null +++ b/knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp @@ -0,0 +1,566 @@ +/*************************************************************************** + * + * knetworkmanager-openvpn.cpp - A NetworkManager frontend for KDE + * + * Copyright (C) 2006 Novell, Inc. + * + * Author: Helmut Schaa , + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + **************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "knetworkmanager-openvpn.h" + +typedef KGenericFactory OpenVPNPluginFactory; +K_EXPORT_COMPONENT_FACTORY( knetworkmanager_openvpn, OpenVPNPluginFactory("knetworkmanager_openvpn")); + +/************************************ +* OpenVPNPlugin +************************************/ +OpenVPNPlugin::OpenVPNPlugin(TQObject* parent, const char* name, const TQStringList& args) + : VPNPlugin(parent, name, args) +{ + +} + +OpenVPNPlugin::~OpenVPNPlugin() +{ + +} + +VPNConfigWidget* OpenVPNPlugin::CreateConfigWidget(TQWidget* parent) +{ + return new OpenVPNConfig(parent); +} + +VPNAuthenticationWidget* OpenVPNPlugin::CreateAuthenticationWidget(TQWidget* parent) +{ + return new OpenVPNAuthentication(parent); +} + +/************************************ +* OpenVPNConnectionType +************************************/ +OpenVPNConnectionType::CONNECTIONTYPE OpenVPNConnectionType::mapString2ConnectionType(int prop) +{ + if (prop == 0) + return X509; + else if (prop == 1) + return SHARED_KEY; + else if (prop == 2) + return PASSWORD; + else if (prop == 3) + return X509USERPASS; + return UNKNOWN; +} + +int OpenVPNConnectionType::mapConnectionType2String(CONNECTIONTYPE connType) +{ + switch(connType) + { + case X509: + return 0; + case SHARED_KEY: + return 1; + case PASSWORD: + return 2; + case X509USERPASS: + return 3; + default: + return -1; + } + return -1; +} + +/************************************ +* OpenVPNConfig +************************************/ + +OpenVPNConfig::OpenVPNConfig(TQWidget* parent) + : VPNConfigWidget(parent) +{ + TQVBoxLayout* tqlayout = new TQVBoxLayout(this, 1, 1); + _openvpnWidget = new OpenVPNConfigWidget(this); + tqlayout->addWidget(_openvpnWidget); + + connect(_openvpnWidget->chkUseCipher, TQT_SIGNAL(toggled(bool)), _openvpnWidget->cboCipher, TQT_SLOT(setEnabled(bool))); + connect(_openvpnWidget->chkUseTLS, TQT_SIGNAL(toggled(bool)), _openvpnWidget->cboDirection, TQT_SLOT(setEnabled(bool))); + connect(_openvpnWidget->chkUseTLS, TQT_SIGNAL(toggled(bool)), _openvpnWidget->editTLSAuth, TQT_SLOT(setEnabled(bool))); + connect(_openvpnWidget->chkIPAdresses, TQT_SIGNAL(toggled(bool)), _openvpnWidget->routes, TQT_SLOT(setEnabled(bool))); + + // add all Cipher modes to the Combobox + getCipherModes(); + + // switch to the right configuration interface when selecting the connection type + connect(_openvpnWidget->cboConnectionType, TQT_SIGNAL( activated(int)), _openvpnWidget->widgetStack, TQT_SLOT(raiseWidget(int))); + this->languageChange(); +} + +OpenVPNConfig::~OpenVPNConfig() +{ + +} + +void OpenVPNConfig::languageChange() +{ + _openvpnWidget->cboConnectionType->insertItem(i18n("X.509 Certificates"), OpenVPNConnectionType::X509 ); + _openvpnWidget->cboConnectionType->insertItem(i18n("Pre-shared key") , OpenVPNConnectionType::SHARED_KEY ); + _openvpnWidget->cboConnectionType->insertItem(i18n("Password Authentication") , OpenVPNConnectionType::PASSWORD ); + _openvpnWidget->cboConnectionType->insertItem(i18n("X.509 with Password Authentication") , OpenVPNConnectionType::X509USERPASS ); + + _openvpnWidget->cboDirection->insertItem(i18n("none")); + _openvpnWidget->cboDirection->insertItem(i18n("0")); + _openvpnWidget->cboDirection->insertItem(i18n("1")); +} + +TQString OpenVPNConfig::findOpenVPNBinary() +{ + static const char *openvpn_binary_paths[] = + { + "/usr/sbin/openvpn", + "/sbin/openvpn", + NULL + }; + + const char **openvpn_binary = openvpn_binary_paths; + + while (*openvpn_binary != NULL) { + if ( TQFileInfo(*openvpn_binary).exists()) + break; + openvpn_binary++; + } + + return *openvpn_binary; +} + + +void OpenVPNConfig::receiveCipherData(KProcess*, char* buffer, int len) +{ + // add possible cipher modes to the combobox + TQStringList cipherModes = TQStringList::split("\n", TQString::tqfromLatin1(buffer, len), false ); + for (TQStringList::ConstIterator it = cipherModes.begin(); it != cipherModes.end(); ++it) + { + _openvpnWidget->cboCipher->insertItem((*it)); + } +} + +void OpenVPNConfig::getCipherModes() +{ + // get all possible cipher modes + TQString openvpn = findOpenVPNBinary(); + if (!openvpn.isNull()) + { + KProcess* cipherHelper = new KProcess(); + cipherHelper->setUseShell(true, "/bin/sh"); + *cipherHelper << TQString::tqfromLatin1("%1 --show-ciphers | awk '/^[A-Z][A-Z0-9]+-/ { print $1 }'").tqarg(openvpn); + connect (cipherHelper, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(receiveCipherData(KProcess*, char*, int))); + kdDebug() << "starting openvpn to get cipher modes" << endl; + if (!cipherHelper->start(KProcess::Block, KProcess::Stdout)) + kdDebug() << "error starting openvpn" << endl; + } + +} + +void OpenVPNConfig::setVPNData(const TQStringList& routes, const TQMap& properties) +{ + // fill up our inputfields + for(TQMap::ConstIterator it = properties.begin(); it != properties.end(); ++it) + { + TQString entry = it.key(); + TQString value = it.data(); + + if (entry == "connection-type") + { + OpenVPNConnectionType::CONNECTIONTYPE type = OpenVPNConnectionType::mapString2ConnectionType(value.toInt()); + _openvpnWidget->cboConnectionType->setCurrentItem(type); + _openvpnWidget->widgetStack->raiseWidget(type); + } + else if (entry == "remote") + { + _openvpnWidget->gateway->setText(value); + } + else if (entry == "port") + { + if (value.toInt() > 0) + { + _openvpnWidget->port->setText(value); + _openvpnWidget->chkDefaultPort->setChecked(false); + } + else + { + _openvpnWidget->chkDefaultPort->setChecked(true); + } + } + else if (entry == "proto" || entry == "proto-tcp") + { + _openvpnWidget->chkUseTCP->setChecked( value == "yes"); + } + else if (entry == "ca") + { + _openvpnWidget->editCA->setURL(value); + } + else if (entry == "cert") + { + _openvpnWidget->editCert->setURL(value); + } + else if (entry == "key") + { + _openvpnWidget->editKey->setURL(value); + } + else if (entry == "cipher") + { + _openvpnWidget->chkUseCipher->setChecked(true); + _openvpnWidget->cboCipher->setCurrentItem(value); + } + else if (entry == "comp-lzo") + { + _openvpnWidget->chkUseLZO->setChecked(value == "true"); + } + else if (entry == "shared-key" || entry == "static-key") + { + _openvpnWidget->editSharedKey->setURL(value); + } + else if (entry == "username") + { + _openvpnWidget->editUsername->setText(value); + } + else if (entry == "local-ip") + { + _openvpnWidget->editLocalIP->setText(value); + } + else if (entry == "remote-ip") + { + _openvpnWidget->editRemoteIP->setText(value); + } + else if (entry == "dev" || entry == "tap-dev") { + _openvpnWidget->chkUseTAP->setChecked(value == "true"); + } + else if (entry == "ta") + { + _openvpnWidget->chkUseTLS->setChecked(true); + _openvpnWidget->editTLSAuth->setURL(value); + } + else if (entry == "ta-dir") + { + _openvpnWidget->cboDirection->setCurrentItem(value); + } + else + { + kdDebug() << TQString("OpenVPN: Property '%1' not handled").tqarg(entry) << endl; + } + } + + // set routes + if (!routes.empty()) + { + _openvpnWidget->chkIPAdresses->setChecked(true); + _openvpnWidget->routes->setText(routes.join(" ")); + } +} + +TQMapOpenVPNConfig::getVPNProperties() +{ + // build a StingList of properties + TQMap strlist; + + strlist.insert("connection-type", TQString::number(OpenVPNConnectionType::mapConnectionType2String((OpenVPNConnectionType::CONNECTIONTYPE)_openvpnWidget->cboConnectionType->currentItem()))); + strlist.insert("remote", TQString(_openvpnWidget->gateway->text())); + + // port is not necessary + if (!_openvpnWidget->port->text().isEmpty() && !_openvpnWidget->chkDefaultPort->isChecked()) + strlist.insert("port", _openvpnWidget->port->text()); + + strlist.insert("ca", TQString(_openvpnWidget->editCA->url())); + strlist.insert("cert",TQString(_openvpnWidget->editCert->url() )); + strlist.insert("key", TQString(_openvpnWidget->editKey->url())); + + if (_openvpnWidget->chkUseCipher->isChecked()) + strlist.insert("cipher", TQString(_openvpnWidget->cboCipher->currentText())); + + if (_openvpnWidget->chkUseLZO->isChecked()) + strlist.insert("comp-lzo", TQString("true")); + else + strlist.insert("comp-lzo", TQString("false")); + + strlist.insert("static-key", TQString(_openvpnWidget->editSharedKey->url())); + strlist.insert("username", TQString(_openvpnWidget->editUsername->text())); + strlist.insert("local-ip", TQString(_openvpnWidget->editLocalIP->text())); + strlist.insert("remote-ip", TQString(_openvpnWidget->editRemoteIP->text())); + + if (_openvpnWidget->chkUseTAP->isChecked()) { + strlist.insert("tap-dev", "true"); + strlist.insert("proto-tcp", "true"); + } else { + strlist.insert("tap-dev", "false"); + strlist.insert("proto-tcp", "false"); + } + + if (_openvpnWidget->chkUseTLS->isChecked()) + strlist.insert("ta", TQString(_openvpnWidget->editTLSAuth->url())); + + strlist.insert("ta-dir", TQString(_openvpnWidget->cboDirection->currentText())); + + return strlist; +} + +TQStringList OpenVPNConfig::getVPNRoutes() +{ + TQStringList strlist; + if(_openvpnWidget->chkIPAdresses->isChecked()) + { + strlist = TQStringList::split(" ", _openvpnWidget->routes->text()); + } + return strlist; +} + +bool OpenVPNConfig::hasChanged() +{ + return true; +} + +bool OpenVPNConfig::isValid(TQStringList& err_msg) +{ + bool retval = true; + + // check gateway + if (_openvpnWidget->gateway->text().isEmpty()) + { + err_msg.append(i18n("You have to specify a gateway")); + retval = false; + } + + bool ok = false; + _openvpnWidget->port->text().toULong(&ok); + if (!ok && !_openvpnWidget->port->text().isEmpty() ) + { + err_msg.append(i18n("The port number has to be numeric")); + retval = false; + } + + switch(_openvpnWidget->cboConnectionType->currentItem()) + { + case OpenVPNConnectionType::X509: + // check if ca file is correct + if (_openvpnWidget->editCA->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("no CA file provided")); + } + else if (!TQFileInfo(_openvpnWidget->editCA->url()).isFile()) + { + retval = false; + err_msg.append(i18n("CA file not valid")); + } + + // check if cert file is correct + if (_openvpnWidget->editCert->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("no CERT file provided")); + } + else if (!TQFileInfo(_openvpnWidget->editCert->url()).isFile()) + { + retval = false; + err_msg.append(i18n("CERT file not valid")); + } + + // check if key file is correct + if (_openvpnWidget->editKey->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("no Key file provided")); + } + else if (!TQFileInfo(_openvpnWidget->editKey->url()).isFile()) + { + retval = false; + err_msg.append(i18n("Key file not valid")); + } + + break; + + + case OpenVPNConnectionType::SHARED_KEY: + // check if a shared key is selected + if (_openvpnWidget->editSharedKey->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("Please provide a valid shared key")); + } + // check if the shared key file exists + else if (!TQFileInfo(_openvpnWidget->editSharedKey->url()).exists()) + { + retval = false; + err_msg.append(i18n("Please provide a valid shared key")); + } + + // check if local ip is valid + if (!TQHostAddress().setAddress(_openvpnWidget->editLocalIP->text())) + { + retval = false; + err_msg.append(i18n("local IP is invalid")); + } + // check if remote ip is valid + if (!TQHostAddress().setAddress(_openvpnWidget->editRemoteIP->text())) + { + retval = false; + err_msg.append(i18n("remote IP is invalid")); + } + + break; + case OpenVPNConnectionType::PASSWORD: + // check if username is suplied + if (_openvpnWidget->editUsername->text().isEmpty()) + { + retval = false; + err_msg.append(i18n("no username provided")); + } + + // check if ca file is correct + if (_openvpnWidget->editCA->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("no CA file provided")); + } + else if (!TQFileInfo(_openvpnWidget->editCA->url()).isFile()) + { + retval = false; + err_msg.append(i18n("CA file not valid")); + } + + break; + + + case OpenVPNConnectionType::X509USERPASS: + // check if username is suplied + if (_openvpnWidget->editUsername->text().isEmpty()) + { + retval = false; + err_msg.append(i18n("no username provided")); + } + + // check if ca file is correct + if (_openvpnWidget->editCA->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("no CA file provided")); + } + else if (!TQFileInfo(_openvpnWidget->editCA->url()).isFile()) + { + retval = false; + err_msg.append(i18n("CA file not valid")); + } + + // check if cert file is correct + if (_openvpnWidget->editCert->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("no CERT file provided")); + } + else if (!TQFileInfo(_openvpnWidget->editCert->url()).isFile()) + { + retval = false; + err_msg.append(i18n("CERT file not valid")); + } + + // check if key file is correct + if (_openvpnWidget->editKey->url().isEmpty()) + { + retval = false; + err_msg.append(i18n("no Key file provided")); + } + else if (!TQFileInfo(_openvpnWidget->editKey->url()).isFile()) + { + retval = false; + err_msg.append(i18n("Key file not valid")); + } + break; + } + + + return retval; +} + +/************************************ +* OpenVPNAuthentication +************************************/ + +OpenVPNAuthentication::OpenVPNAuthentication(TQWidget* parent, char* name) + : VPNAuthenticationWidget(parent, name) +{ + TQVBoxLayout* tqlayout = new TQVBoxLayout(this, 1, 1); + _openvpnAuth = new OpenVPNAuthenticationWidget(this); + tqlayout->addWidget(_openvpnAuth); +} + +OpenVPNAuthentication::~OpenVPNAuthentication() +{ + +} + +void OpenVPNAuthentication::setVPNData(const TQStringList& /*routes*/, const TQMap& properties) +{ + // find the connection type property + for(TQMap::ConstIterator it = properties.begin(); it != properties.end(); ++it) + { + if (it.key() == "connection-type") + { + _connectionType = OpenVPNConnectionType::mapString2ConnectionType(it.data().toInt()); + break; + } + } +} + +TQMap OpenVPNAuthentication::getPasswords() +{ + TQMap pwds; + if ((_connectionType == OpenVPNConnectionType::PASSWORD) || (_connectionType == OpenVPNConnectionType::X509USERPASS)) + pwds.insert("password", TQString(_openvpnAuth->editUserPassword->password())); + else + pwds.insert("no-secret", TQString("true")); + + return pwds; +} + +void OpenVPNAuthentication::setPasswords(TQString name, TQString value) { + if (name == TQString("password")) { + _openvpnAuth->editUserPassword->erase(); + _openvpnAuth->editUserPassword->insert(value); + } +} + +bool OpenVPNAuthentication::needsUserInteraction() +{ + if ((_connectionType == OpenVPNConnectionType::PASSWORD) || (_connectionType == OpenVPNConnectionType::X509USERPASS)) + return true; + return false; +} + diff --git a/knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h b/knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h new file mode 100644 index 0000000..c78f524 --- /dev/null +++ b/knetworkmanager-0.9/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h @@ -0,0 +1,110 @@ +/*************************************************************************** + * + * knetworkmanager-openvpn.h - A NetworkManager frontend for KDE + * + * Copyright (C) 2006 Novell, Inc. + * + * Author: Helmut Schaa , + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + **************************************************************************/ + +#ifndef KNETWORKMANAGER_OPENVPN_H +#define KNETWORKMANAGER_OPENVPN_H + +#include +#include +#include +#include +#include + +#include "knetworkmanager-vpnplugin.h" +#include "openvpnprop.h" +#include "openvpnauth.h" + +class OpenVPNPlugin : public VPNPlugin +{ + Q_OBJECT + TQ_OBJECT + public: + OpenVPNPlugin(TQObject*, const char*, const TQStringList&); + ~OpenVPNPlugin(); + + VPNConfigWidget* CreateConfigWidget(TQWidget* parent=0); + VPNAuthenticationWidget* CreateAuthenticationWidget(TQWidget* parent=0); +}; + +class OpenVPNConnectionType +{ + public: + enum CONNECTIONTYPE + { + UNKNOWN = -1 + , X509 = 0 + , SHARED_KEY + , PASSWORD + , X509USERPASS + }; + + static CONNECTIONTYPE mapString2ConnectionType(int string); + static int mapConnectionType2String(CONNECTIONTYPE connectionType); +}; + +class OpenVPNConfig : public VPNConfigWidget +{ + Q_OBJECT + TQ_OBJECT + public: + void setVPNData(const TQStringList& routes, const TQMap& properties); + TQMap getVPNProperties(); + TQStringList getVPNRoutes(); + bool hasChanged(); + bool isValid(TQStringList& ); + + OpenVPNConfig(TQWidget* parent); + ~OpenVPNConfig(); + + public slots: + void receiveCipherData(KProcess*, char*, int); + + private: + OpenVPNConfigWidget* _openvpnWidget; + + void getCipherModes(); + TQString findOpenVPNBinary(); + + protected slots: + void languageChange(); +}; + +class OpenVPNAuthentication : public VPNAuthenticationWidget +{ + Q_OBJECT + TQ_OBJECT + public: + OpenVPNAuthentication(TQWidget* parent = NULL, char* name = NULL); + ~OpenVPNAuthentication(); + void setVPNData(const TQStringList&, const TQMap&); + TQMap getPasswords(); + void setPasswords(TQString name, TQString value); + bool needsUserInteraction(); + + private: + OpenVPNAuthenticationWidget* _openvpnAuth; + OpenVPNConnectionType::CONNECTIONTYPE _connectionType; +}; + +#endif /* KNETWORKMANAGER_OPENVPN_H */ diff --git a/knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnauth.ui b/knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnauth.ui new file mode 100644 index 0000000..4cb6578 --- /dev/null +++ b/knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnauth.ui @@ -0,0 +1,80 @@ + +OpenVPNAuthenticationWidget + + + OpenVPNAuthenticationWidget + + + + 0 + 0 + 372 + 171 + + + + OpenVPNAuthentication + + + + unnamed + + + 0 + + + + textLabel1 + + + Password + + + + + spacer2 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + spacer1 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + editUserPassword + + + + + + + + + + + diff --git a/knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnprop.ui b/knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnprop.ui new file mode 100644 index 0000000..c136050 --- /dev/null +++ b/knetworkmanager-0.9/vpn-plugins/openvpn/src/openvpnprop.ui @@ -0,0 +1,619 @@ + +OpenVPNConfigWidget + + + OpenVPNConfigWidget + + + + 0 + 0 + 667 + 322 + + + + + unnamed + + + 0 + + + + kTabWidget1 + + + + TabPage + + + Required Information + + + + unnamed + + + + spacer9 + + + Vertical + + + Expanding + + + + 20 + 16 + + + + + + widgetStack + + + + WStackPage + + + 0 + + + + unnamed + + + 0 + + + + groupBox5 + + + X.509 + + + + unnamed + + + + editCA2 + + + + + editCert2 + + + + + editKey2 + + + + + textLabel2 + + + CA file + + + + + textLabel3_2 + + + Certificate + + + + + textLabel4 + + + Key + + + + + + + + + WStackPage + + + 1 + + + + unnamed + + + 0 + + + + groupBox5_2 + + + Shared key + + + + unnamed + + + + editSharedKey + + + + + editLocalIP + + + + + editRemoteIP + + + + + textLabel5 + + + Shared Key + + + + + textLabel6 + + + Local IP + + + + + textLabel7 + + + Remote IP + + + + + + + + + WStackPage + + + 2 + + + + unnamed + + + 0 + + + + groupBox5_2_2 + + + Password + + + + unnamed + + + + editCA3 + + + + + editUsername2 + + + + + textLabel8 + + + CA file + + + + + textLabel9 + + + Username + + + + + + + + + WStackPage + + + 3 + + + + unnamed + + + 0 + + + + groupBox5_3 + + + X.509 with password authentication + + + + unnamed + + + + editCA + + + + + textLabel2_2 + + + CA file + + + + + editCert + + + + + textLabel3_2_2 + + + Certificate + + + + + textLabel4_2 + + + Key + + + + + editKey + + + + + editUsername + + + + + textLabel9_2 + + + Username + + + + + + + + + + labelConnectionType + + + Connection Type + + + + + cboConnectionType + + + + + textLabel3 + + + Gateway + + + + + textLabel3_3 + + + Port + + + + + gateway + + + + + port + + + false + + + + + chkDefaultPort + + + Use Default + + + true + + + + + + + TabPage + + + Optional Information + + + + unnamed + + + + routes + + + false + + + + + chkIPAdresses + + + Only use VPN Connection for these Addresses (eg: 172.16.0.0/16 10.11.12.0/24) + + + + + chkUseTAP + + + Use TAP device + + + + + chkUseLZO + + + Use LZO compression + + + + + chkUseTCP + + + Use TCP connection + + + + + spacer10 + + + Vertical + + + Expanding + + + + 20 + 30 + + + + + + chkUseCipher + + + Use cipher + + + + + chkUseTLS + + + Use TLS auth + + + + + textLabel1 + + + Direction: + + + + + cboDirection + + + false + + + + + editTLSAuth + + + false + + + + + cboCipher + + + false + + + + + + + + + + + + editCA + textChanged(const QString&) + editCA2 + setURL(const QString&) + + + editCA + textChanged(const QString&) + editCA3 + setURL(const QString&) + + + editCA2 + textChanged(const QString&) + editCA + setURL(const QString&) + + + editCA2 + textChanged(const QString&) + editCA3 + setURL(const QString&) + + + editCA3 + textChanged(const QString&) + editCA2 + setURL(const QString&) + + + editCA3 + textChanged(const QString&) + editCA + setURL(const QString&) + + + editCert + textChanged(const QString&) + editCert2 + setURL(const QString&) + + + editCert2 + textChanged(const QString&) + editCert + setURL(const QString&) + + + editKey + textChanged(const QString&) + editKey2 + setURL(const QString&) + + + editKey2 + textChanged(const QString&) + editKey + setURL(const QString&) + + + editUsername + textChanged(const QString&) + editUsername2 + setText(const QString&) + + + editUsername2 + textChanged(const QString&) + editUsername + setText(const QString&) + + + chkDefaultPort + toggled(bool) + port + setDisabled(bool) + + + + kTabWidget1 + chkUseLZO + chkUseTAP + chkUseTCP + chkUseCipher + cboCipher + chkUseTLS + editTLSAuth + cboDirection + chkIPAdresses + routes + gateway + cboConnectionType + editCA2 + editCert2 + editKey2 + editSharedKey + editLocalIP + editRemoteIP + editCA3 + editUsername2 + editCA + editCert + editKey + editUsername + + + + + -- cgit v1.2.1