Copy openvpn project as base
This commit is contained in:
1 parent
1f8d30e878
commit
337d10e1e0
139 files changed
+84632
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,57 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/***************************************************************************
|
||||
*
|
||||
* Copyright (C) 2008 Dan Williams, <dcbw@redhat.com>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef _AUTH_HELPERS_H_
|
||||
#define _AUTH_HELPERS_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
typedef void (*ChangedCallback) (GtkWidget *widget, gpointer user_data);
|
||||
|
||||
void tls_pw_init_auth_widget (GtkBuilder *builder,
|
||||
NMSettingVpn *s_vpn,
|
||||
const char *contype,
|
||||
const char *prefix,
|
||||
ChangedCallback changed_cb,
|
||||
gpointer user_data);
|
||||
|
||||
void sk_init_auth_widget (GtkBuilder *builder,
|
||||
NMSettingVpn *s_vpn,
|
||||
ChangedCallback changed_cb,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean auth_widget_check_validity (GtkBuilder *builder, const char *contype, GError **error);
|
||||
|
||||
gboolean auth_widget_update_connection (GtkBuilder *builder,
|
||||
const char *contype,
|
||||
NMSettingVpn *s_vpn);
|
||||
|
||||
GtkFileFilter *tls_file_chooser_filter_new (gboolean pkcs_allowed);
|
||||
|
||||
GtkFileFilter *sk_file_chooser_filter_new (void);
|
||||
|
||||
GtkWidget *advanced_dialog_new (GHashTable *hash, const char *contype);
|
||||
|
||||
GHashTable *advanced_dialog_new_hash_from_connection (NMConnection *connection, GError **error);
|
||||
|
||||
GHashTable *advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/freedesktop/network-manager-openvpn">
|
||||
<file preprocess="xml-stripblanks">nm-openvpn-dialog.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,36 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/***************************************************************************
|
||||
*
|
||||
* Copyright (C) 2008 Dan Williams, <dcbw@redhat.com>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef _IMPORT_EXPORT_H_
|
||||
#define _IMPORT_EXPORT_H_
|
||||
|
||||
extern const char *_nmovpn_test_temp_path;
|
||||
|
||||
gboolean _nmovpn_test_args_parse_line (const char *line,
|
||||
gsize line_len,
|
||||
const char ***out_p,
|
||||
char **out_error);
|
||||
|
||||
NMConnection *do_import (const char *path, const char *contents, gsize contents_len, GError **error);
|
||||
|
||||
gboolean do_export (const char *path, NMConnection *connection, GError **error);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
global:
|
||||
nm_vpn_plugin_ui_factory;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
global:
|
||||
nm_vpn_editor_factory_openvpn;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
global:
|
||||
nm_vpn_editor_plugin_factory;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,234 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/***************************************************************************
|
||||
* nm-openvpn-editor-plugin.c : GNOME UI dialogs for configuring openvpn VPN connections
|
||||
*
|
||||
* Copyright (C) 2005 Tim Niemueller <tim@niemueller.de>
|
||||
* Copyright (C) 2008 - 2010 Dan Williams, <dcbw@redhat.com>
|
||||
* Copyright (C) 2008 - 2011 Red Hat, Inc.
|
||||
* Based on work by David Zeuthen, <davidz@redhat.com>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
||||
#include "nm-openvpn-editor-plugin.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef NM_VPN_OLD
|
||||
#include "nm-openvpn-editor.h"
|
||||
#else
|
||||
#include "nm-utils/nm-vpn-plugin-utils.h"
|
||||
#endif
|
||||
|
||||
#include "import-export.h"
|
||||
|
||||
#define OPENVPN_PLUGIN_NAME _("OpenVPN")
|
||||
#define OPENVPN_PLUGIN_DESC _("Compatible with the OpenVPN server.")
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_NAME,
|
||||
PROP_DESC,
|
||||
PROP_SERVICE
|
||||
};
|
||||
|
||||
static void openvpn_editor_plugin_interface_init (NMVpnEditorPluginInterface *iface_class);
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (OpenvpnEditorPlugin, openvpn_editor_plugin, G_TYPE_OBJECT, 0,
|
||||
G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_EDITOR_PLUGIN,
|
||||
openvpn_editor_plugin_interface_init))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static NMConnection *
|
||||
import (NMVpnEditorPlugin *iface, const char *path, GError **error)
|
||||
{
|
||||
NMConnection *connection = NULL;
|
||||
char *contents = NULL;
|
||||
char *ext;
|
||||
gsize contents_len;
|
||||
|
||||
ext = strrchr (path, '.');
|
||||
|
||||
if (!ext || ( !g_str_has_suffix (ext, ".ovpn")
|
||||
&& !g_str_has_suffix (ext, ".conf")
|
||||
&& !g_str_has_suffix (ext, ".cnf")
|
||||
&& !g_str_has_suffix (ext, ".ovpntest"))) { /* Special extension for testcases */
|
||||
g_set_error_literal (error,
|
||||
NMV_EDITOR_PLUGIN_ERROR,
|
||||
NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
|
||||
_("unknown OpenVPN file extension"));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!g_file_get_contents (path, &contents, &contents_len, error))
|
||||
return NULL;
|
||||
|
||||
connection = do_import (path, contents, contents_len, error);
|
||||
|
||||
out:
|
||||
g_free (contents);
|
||||
return connection;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
export (NMVpnEditorPlugin *iface,
|
||||
const char *path,
|
||||
NMConnection *connection,
|
||||
GError **error)
|
||||
{
|
||||
return do_export (path, connection, error);
|
||||
}
|
||||
|
||||
static char *
|
||||
get_suggested_filename (NMVpnEditorPlugin *iface, NMConnection *connection)
|
||||
{
|
||||
NMSettingConnection *s_con;
|
||||
const char *id;
|
||||
|
||||
g_return_val_if_fail (connection != NULL, NULL);
|
||||
|
||||
s_con = nm_connection_get_setting_connection (connection);
|
||||
g_return_val_if_fail (s_con != NULL, NULL);
|
||||
|
||||
id = nm_setting_connection_get_id (s_con);
|
||||
g_return_val_if_fail (id != NULL, NULL);
|
||||
|
||||
return g_strdup_printf ("%s (openvpn).conf", id);
|
||||
}
|
||||
|
||||
static guint32
|
||||
get_capabilities (NMVpnEditorPlugin *iface)
|
||||
{
|
||||
return (NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT |
|
||||
NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT |
|
||||
NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6);
|
||||
}
|
||||
|
||||
#ifndef NM_VPN_OLD
|
||||
static NMVpnEditor *
|
||||
_call_editor_factory (gpointer factory,
|
||||
NMVpnEditorPlugin *editor_plugin,
|
||||
NMConnection *connection,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
return ((NMVpnEditorFactory) factory) (editor_plugin,
|
||||
connection,
|
||||
error);
|
||||
}
|
||||
#endif
|
||||
|
||||
static NMVpnEditor *
|
||||
get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
|
||||
{
|
||||
g_return_val_if_fail (OPENVPN_IS_EDITOR_PLUGIN (iface), NULL);
|
||||
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
|
||||
g_return_val_if_fail (!error || !*error, NULL);
|
||||
|
||||
{
|
||||
#ifdef NM_VPN_OLD
|
||||
return openvpn_editor_new (connection, error);
|
||||
#else
|
||||
return nm_vpn_plugin_utils_load_editor (NM_PLUGIN_DIR"/libnm-vpn-plugin-openvpn-editor.so",
|
||||
"nm_vpn_editor_factory_openvpn",
|
||||
_call_editor_factory,
|
||||
iface,
|
||||
connection,
|
||||
NULL,
|
||||
error);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
get_property (GObject *object, guint prop_id,
|
||||
GValue *value, GParamSpec *pspec)
|
||||
{
|
||||
switch (prop_id) {
|
||||
case PROP_NAME:
|
||||
g_value_set_string (value, OPENVPN_PLUGIN_NAME);
|
||||
break;
|
||||
case PROP_DESC:
|
||||
g_value_set_string (value, OPENVPN_PLUGIN_DESC);
|
||||
break;
|
||||
case PROP_SERVICE:
|
||||
g_value_set_string (value, NM_VPN_SERVICE_TYPE_OPENVPN);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
openvpn_editor_plugin_init (OpenvpnEditorPlugin *plugin)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
openvpn_editor_plugin_interface_init (NMVpnEditorPluginInterface *iface_class)
|
||||
{
|
||||
iface_class->get_editor = get_editor;
|
||||
iface_class->get_capabilities = get_capabilities;
|
||||
iface_class->import_from_file = import;
|
||||
iface_class->export_to_file = export;
|
||||
iface_class->get_suggested_filename = get_suggested_filename;
|
||||
}
|
||||
|
||||
static void
|
||||
openvpn_editor_plugin_class_init (OpenvpnEditorPluginClass *req_class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (req_class);
|
||||
|
||||
object_class->get_property = get_property;
|
||||
|
||||
g_object_class_override_property (object_class,
|
||||
PROP_NAME,
|
||||
NM_VPN_EDITOR_PLUGIN_NAME);
|
||||
|
||||
g_object_class_override_property (object_class,
|
||||
PROP_DESC,
|
||||
NM_VPN_EDITOR_PLUGIN_DESCRIPTION);
|
||||
|
||||
g_object_class_override_property (object_class,
|
||||
PROP_SERVICE,
|
||||
NM_VPN_EDITOR_PLUGIN_SERVICE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
G_MODULE_EXPORT NMVpnEditorPlugin *
|
||||
nm_vpn_editor_plugin_factory (GError **error)
|
||||
{
|
||||
g_return_val_if_fail (!error || !*error, NULL);
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
|
||||
return g_object_new (OPENVPN_TYPE_EDITOR_PLUGIN, NULL);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/***************************************************************************
|
||||
* nm-openvpn-editor.h : GNOME UI dialogs for configuring openvpn VPN connections
|
||||
*
|
||||
* Copyright (C) 2008 Dan Williams, <dcbw@redhat.com>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef __NM_OPENVPN_EDITOR_PLUGIN_H__
|
||||
#define __NM_OPENVPN_EDITOR_PLUGIN_H__
|
||||
|
||||
#define OPENVPN_TYPE_EDITOR_PLUGIN (openvpn_editor_plugin_get_type ())
|
||||
#define OPENVPN_EDITOR_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OPENVPN_TYPE_EDITOR_PLUGIN, OpenvpnEditorPlugin))
|
||||
#define OPENVPN_EDITOR_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OPENVPN_TYPE_EDITOR_PLUGIN, OpenvpnEditorPluginClass))
|
||||
#define OPENVPN_IS_EDITOR_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OPENVPN_TYPE_EDITOR_PLUGIN))
|
||||
#define OPENVPN_IS_EDITOR_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OPENVPN_TYPE_EDITOR_PLUGIN))
|
||||
#define OPENVPN_EDITOR_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OPENVPN_TYPE_EDITOR_PLUGIN, OpenvpnEditorPluginClass))
|
||||
|
||||
typedef struct _OpenvpnEditorPlugin OpenvpnEditorPlugin;
|
||||
typedef struct _OpenvpnEditorPluginClass OpenvpnEditorPluginClass;
|
||||
|
||||
struct _OpenvpnEditorPlugin {
|
||||
GObject parent;
|
||||
};
|
||||
|
||||
struct _OpenvpnEditorPluginClass {
|
||||
GObjectClass parent;
|
||||
};
|
||||
|
||||
GType openvpn_editor_plugin_get_type (void);
|
||||
|
||||
typedef NMVpnEditor *(*NMVpnEditorFactory) (NMVpnEditorPlugin *editor_plugin,
|
||||
NMConnection *connection,
|
||||
GError **error);
|
||||
|
||||
NMVpnEditor *
|
||||
nm_vpn_editor_factory_openvpn (NMVpnEditorPlugin *editor_plugin,
|
||||
NMConnection *connection,
|
||||
GError **error);
|
||||
|
||||
#endif /* __NM_OPENVPN_EDITOR_PLUGIN_H__ */
|
||||
|
||||
@@ -0,0 +1,563 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/***************************************************************************
|
||||
* CVSID: $Id: nm-openvpn.c 4232 2008-10-29 09:13:40Z tambeti $
|
||||
*
|
||||
* nm-openvpn.c : GNOME UI dialogs for configuring openvpn VPN connections
|
||||
*
|
||||
* Copyright (C) 2005 Tim Niemueller <tim@niemueller.de>
|
||||
* Copyright (C) 2008 - 2010 Dan Williams, <dcbw@redhat.com>
|
||||
* Copyright (C) 2008 - 2011 Red Hat, Inc.
|
||||
* Based on work by David Zeuthen, <davidz@redhat.com>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
||||
#include "nm-openvpn-editor.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "auth-helpers.h"
|
||||
#include "utils.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void openvpn_editor_plugin_widget_interface_init (NMVpnEditorInterface *iface_class);
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (OpenvpnEditor, openvpn_editor_plugin_widget, G_TYPE_OBJECT, 0,
|
||||
G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_EDITOR,
|
||||
openvpn_editor_plugin_widget_interface_init))
|
||||
|
||||
#define OPENVPN_EDITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), OPENVPN_TYPE_EDITOR, OpenvpnEditorPrivate))
|
||||
|
||||
typedef struct {
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *widget;
|
||||
GtkWindowGroup *window_group;
|
||||
gboolean window_added;
|
||||
GHashTable *advanced;
|
||||
gboolean new_connection;
|
||||
GtkWidget *tls_user_cert_chooser;
|
||||
} OpenvpnEditorPrivate;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define COL_AUTH_NAME 0
|
||||
#define COL_AUTH_PAGE 1
|
||||
#define COL_AUTH_TYPE 2
|
||||
|
||||
static gboolean
|
||||
check_gateway_entry (const char *str)
|
||||
{
|
||||
gs_free char *str_clone = NULL;
|
||||
char *str_iter;
|
||||
const char *tok;
|
||||
gboolean success = FALSE;
|
||||
|
||||
if (!str || !str[0])
|
||||
return FALSE;
|
||||
|
||||
str_clone = g_strdup (str);
|
||||
str_iter = str_clone;
|
||||
while ((tok = strsep (&str_iter, " \t,"))) {
|
||||
if ( tok[0]
|
||||
&& (nmovpn_remote_parse (tok,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL) != -1))
|
||||
return FALSE;
|
||||
success = TRUE;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_validity (OpenvpnEditor *self, GError **error)
|
||||
{
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (self);
|
||||
GtkWidget *widget;
|
||||
const char *str;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
const char *contype = NULL;
|
||||
gboolean success;
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "gateway_entry"));
|
||||
str = gtk_entry_get_text (GTK_ENTRY (widget));
|
||||
if (str && check_gateway_entry (str))
|
||||
gtk_style_context_remove_class (gtk_widget_get_style_context (widget), "error");
|
||||
else {
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "error");
|
||||
g_set_error (error,
|
||||
NMV_EDITOR_PLUGIN_ERROR,
|
||||
NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY,
|
||||
NM_OPENVPN_KEY_REMOTE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_combo"));
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
|
||||
g_return_val_if_fail (model, FALSE);
|
||||
success = gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
|
||||
g_return_val_if_fail (success == TRUE, FALSE);
|
||||
gtk_tree_model_get (model, &iter, COL_AUTH_TYPE, &contype, -1);
|
||||
if (!auth_widget_check_validity (priv->builder, contype, error))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
stuff_changed_cb (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
g_signal_emit_by_name (OPENVPN_EDITOR (user_data), "changed");
|
||||
}
|
||||
|
||||
static void
|
||||
auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
|
||||
{
|
||||
OpenvpnEditor *self = OPENVPN_EDITOR (user_data);
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (self);
|
||||
GtkWidget *auth_notebook;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
gint new_page = 0;
|
||||
|
||||
auth_notebook = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_notebook"));
|
||||
g_assert (auth_notebook);
|
||||
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
|
||||
g_assert (model);
|
||||
g_assert (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter));
|
||||
|
||||
gtk_tree_model_get (model, &iter, COL_AUTH_PAGE, &new_page, -1);
|
||||
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (auth_notebook), new_page);
|
||||
|
||||
stuff_changed_cb (combo, self);
|
||||
}
|
||||
|
||||
static void
|
||||
advanced_dialog_close_cb (GtkWidget *dialog, gpointer user_data)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
/* gtk_widget_destroy() will remove the window from the window group */
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
advanced_dialog_response_cb (GtkWidget *dialog, gint response, gpointer user_data)
|
||||
{
|
||||
OpenvpnEditor *self = OPENVPN_EDITOR (user_data);
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (self);
|
||||
GError *error = NULL;
|
||||
|
||||
if (response != GTK_RESPONSE_OK) {
|
||||
advanced_dialog_close_cb (dialog, self);
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->advanced)
|
||||
g_hash_table_destroy (priv->advanced);
|
||||
priv->advanced = advanced_dialog_new_hash_from_dialog (dialog, &error);
|
||||
if (!priv->advanced) {
|
||||
g_message ("%s: error reading advanced settings: %s", __func__, error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
advanced_dialog_close_cb (dialog, self);
|
||||
|
||||
stuff_changed_cb (NULL, self);
|
||||
}
|
||||
|
||||
static void
|
||||
advanced_button_clicked_cb (GtkWidget *button, gpointer user_data)
|
||||
{
|
||||
OpenvpnEditor *self = OPENVPN_EDITOR (user_data);
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (self);
|
||||
GtkWidget *dialog, *toplevel, *widget;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
const char *contype = NULL;
|
||||
gboolean success;
|
||||
|
||||
toplevel = gtk_widget_get_toplevel (priv->widget);
|
||||
g_return_if_fail (gtk_widget_is_toplevel (toplevel));
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_combo"));
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
|
||||
success = gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
|
||||
g_return_if_fail (success == TRUE);
|
||||
gtk_tree_model_get (model, &iter, COL_AUTH_TYPE, &contype, -1);
|
||||
|
||||
dialog = advanced_dialog_new (priv->advanced, contype);
|
||||
if (!dialog) {
|
||||
g_warning ("%s: failed to create the Advanced dialog!", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_window_group_add_window (priv->window_group, GTK_WINDOW (dialog));
|
||||
if (!priv->window_added) {
|
||||
gtk_window_group_add_window (priv->window_group, GTK_WINDOW (toplevel));
|
||||
priv->window_added = TRUE;
|
||||
}
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (toplevel));
|
||||
g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (advanced_dialog_response_cb), self);
|
||||
g_signal_connect (G_OBJECT (dialog), "close", G_CALLBACK (advanced_dialog_close_cb), self);
|
||||
|
||||
gtk_widget_show_all (dialog);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
init_editor_plugin (OpenvpnEditor *self, NMConnection *connection, GError **error)
|
||||
{
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (self);
|
||||
NMSettingVpn *s_vpn;
|
||||
GtkWidget *widget;
|
||||
GtkListStore *store;
|
||||
GtkTreeIter iter;
|
||||
int active = -1;
|
||||
const char *value;
|
||||
const char *contype = NM_OPENVPN_CONTYPE_TLS;
|
||||
|
||||
s_vpn = nm_connection_get_setting_vpn (connection);
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "gateway_entry"));
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
if (s_vpn) {
|
||||
value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_REMOTE);
|
||||
if (value)
|
||||
gtk_entry_set_text (GTK_ENTRY (widget), value);
|
||||
}
|
||||
g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_combo"));
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
|
||||
store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING);
|
||||
|
||||
if (s_vpn) {
|
||||
contype = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_CONNECTION_TYPE);
|
||||
if (contype) {
|
||||
if ( strcmp (contype, NM_OPENVPN_CONTYPE_TLS)
|
||||
&& strcmp (contype, NM_OPENVPN_CONTYPE_STATIC_KEY)
|
||||
&& strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD)
|
||||
&& strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS))
|
||||
contype = NM_OPENVPN_CONTYPE_TLS;
|
||||
} else
|
||||
contype = NM_OPENVPN_CONTYPE_TLS;
|
||||
}
|
||||
|
||||
/* TLS auth widget */
|
||||
tls_pw_init_auth_widget (priv->builder, s_vpn,
|
||||
NM_OPENVPN_CONTYPE_TLS, "tls",
|
||||
stuff_changed_cb, self);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COL_AUTH_NAME, _("Certificates (TLS)"),
|
||||
COL_AUTH_PAGE, 0,
|
||||
COL_AUTH_TYPE, NM_OPENVPN_CONTYPE_TLS,
|
||||
-1);
|
||||
|
||||
/* Password auth widget */
|
||||
tls_pw_init_auth_widget (priv->builder, s_vpn,
|
||||
NM_OPENVPN_CONTYPE_PASSWORD, "pw",
|
||||
stuff_changed_cb, self);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COL_AUTH_NAME, _("Password"),
|
||||
COL_AUTH_PAGE, 1,
|
||||
COL_AUTH_TYPE, NM_OPENVPN_CONTYPE_PASSWORD,
|
||||
-1);
|
||||
if ((active < 0) && !strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD))
|
||||
active = 1;
|
||||
|
||||
/* Password+TLS auth widget */
|
||||
tls_pw_init_auth_widget (priv->builder, s_vpn,
|
||||
NM_OPENVPN_CONTYPE_PASSWORD_TLS, "pw_tls",
|
||||
stuff_changed_cb, self);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COL_AUTH_NAME, _("Password with Certificates (TLS)"),
|
||||
COL_AUTH_PAGE, 2,
|
||||
COL_AUTH_TYPE, NM_OPENVPN_CONTYPE_PASSWORD_TLS,
|
||||
-1);
|
||||
if ((active < 0) && !strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS))
|
||||
active = 2;
|
||||
|
||||
/* Static key auth widget */
|
||||
sk_init_auth_widget (priv->builder, s_vpn, stuff_changed_cb, self);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COL_AUTH_NAME, _("Static Key"),
|
||||
COL_AUTH_PAGE, 3,
|
||||
COL_AUTH_TYPE, NM_OPENVPN_CONTYPE_STATIC_KEY,
|
||||
-1);
|
||||
if ((active < 0) && !strcmp (contype, NM_OPENVPN_CONTYPE_STATIC_KEY))
|
||||
active = 3;
|
||||
|
||||
gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
|
||||
g_object_unref (store);
|
||||
g_signal_connect (widget, "changed", G_CALLBACK (auth_combo_changed_cb), self);
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active < 0 ? 0 : active);
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "advanced_button"));
|
||||
g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (advanced_button_clicked_cb), self);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GObject *
|
||||
get_widget (NMVpnEditor *iface)
|
||||
{
|
||||
OpenvpnEditor *self = OPENVPN_EDITOR (iface);
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (self);
|
||||
|
||||
return G_OBJECT (priv->widget);
|
||||
}
|
||||
|
||||
static void
|
||||
hash_copy_advanced (gpointer key, gpointer data, gpointer user_data)
|
||||
{
|
||||
NMSettingVpn *s_vpn = NM_SETTING_VPN (user_data);
|
||||
const char *value = (const char *) data;
|
||||
|
||||
g_return_if_fail (value && strlen (value));
|
||||
|
||||
/* HTTP Proxy password is a secret, not a data item */
|
||||
if (!strcmp (key, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD))
|
||||
nm_setting_vpn_add_secret (s_vpn, (const char *) key, value);
|
||||
else
|
||||
nm_setting_vpn_add_data_item (s_vpn, (const char *) key, value);
|
||||
}
|
||||
|
||||
static char *
|
||||
get_auth_type (GtkBuilder *builder)
|
||||
{
|
||||
GtkComboBox *combo;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
char *auth_type = NULL;
|
||||
gboolean success;
|
||||
|
||||
combo = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "auth_combo")));
|
||||
model = gtk_combo_box_get_model (combo);
|
||||
|
||||
success = gtk_combo_box_get_active_iter (combo, &iter);
|
||||
g_return_val_if_fail (success == TRUE, NULL);
|
||||
gtk_tree_model_get (model, &iter, COL_AUTH_TYPE, &auth_type, -1);
|
||||
|
||||
return auth_type;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
update_connection (NMVpnEditor *iface,
|
||||
NMConnection *connection,
|
||||
GError **error)
|
||||
{
|
||||
OpenvpnEditor *self = OPENVPN_EDITOR (iface);
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (self);
|
||||
NMSettingVpn *s_vpn;
|
||||
GtkWidget *widget;
|
||||
char *auth_type;
|
||||
const char *str;
|
||||
gboolean valid = FALSE;
|
||||
|
||||
if (!check_validity (self, error))
|
||||
return FALSE;
|
||||
|
||||
s_vpn = NM_SETTING_VPN (nm_setting_vpn_new ());
|
||||
g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_VPN_SERVICE_TYPE_OPENVPN, NULL);
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "gateway_entry"));
|
||||
str = gtk_entry_get_text (GTK_ENTRY (widget));
|
||||
if (str && str[0])
|
||||
nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_REMOTE, str);
|
||||
|
||||
auth_type = get_auth_type (priv->builder);
|
||||
if (auth_type) {
|
||||
nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_CONNECTION_TYPE, auth_type);
|
||||
auth_widget_update_connection (priv->builder, auth_type, s_vpn);
|
||||
g_free (auth_type);
|
||||
}
|
||||
|
||||
if (priv->advanced)
|
||||
g_hash_table_foreach (priv->advanced, hash_copy_advanced, s_vpn);
|
||||
|
||||
/* Default to agent-owned secrets for new connections */
|
||||
if (priv->new_connection) {
|
||||
if (nm_setting_vpn_get_secret (s_vpn, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD)) {
|
||||
nm_setting_set_secret_flags (NM_SETTING (s_vpn),
|
||||
NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD,
|
||||
NM_SETTING_SECRET_FLAG_AGENT_OWNED,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (nm_setting_vpn_get_secret (s_vpn, NM_OPENVPN_KEY_PASSWORD)) {
|
||||
nm_setting_set_secret_flags (NM_SETTING (s_vpn),
|
||||
NM_OPENVPN_KEY_PASSWORD,
|
||||
NM_SETTING_SECRET_FLAG_AGENT_OWNED,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (nm_setting_vpn_get_secret (s_vpn, NM_OPENVPN_KEY_CERTPASS)) {
|
||||
nm_setting_set_secret_flags (NM_SETTING (s_vpn),
|
||||
NM_OPENVPN_KEY_CERTPASS,
|
||||
NM_SETTING_SECRET_FLAG_AGENT_OWNED,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
nm_connection_add_setting (connection, NM_SETTING (s_vpn));
|
||||
valid = TRUE;
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
static void
|
||||
is_new_func (const char *key, const char *value, gpointer user_data)
|
||||
{
|
||||
gboolean *is_new = user_data;
|
||||
|
||||
/* If there are any VPN data items the connection isn't new */
|
||||
*is_new = FALSE;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
openvpn_editor_plugin_widget_init (OpenvpnEditor *plugin)
|
||||
{
|
||||
}
|
||||
|
||||
NMVpnEditor *
|
||||
openvpn_editor_new (NMConnection *connection, GError **error)
|
||||
{
|
||||
NMVpnEditor *object;
|
||||
OpenvpnEditorPrivate *priv;
|
||||
gboolean new = TRUE;
|
||||
NMSettingVpn *s_vpn;
|
||||
|
||||
if (error)
|
||||
g_return_val_if_fail (*error == NULL, NULL);
|
||||
|
||||
object = g_object_new (OPENVPN_TYPE_EDITOR, NULL);
|
||||
if (!object) {
|
||||
g_set_error_literal (error, NMV_EDITOR_PLUGIN_ERROR, 0, _("could not create openvpn object"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
priv = OPENVPN_EDITOR_GET_PRIVATE (object);
|
||||
|
||||
priv->builder = gtk_builder_new ();
|
||||
|
||||
gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
|
||||
|
||||
if (!gtk_builder_add_from_resource (priv->builder, "/org/freedesktop/network-manager-openvpn/nm-openvpn-dialog.ui", error)) {
|
||||
g_object_unref (object);
|
||||
g_return_val_if_reached (NULL);
|
||||
}
|
||||
|
||||
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "openvpn-vbox"));
|
||||
if (!priv->widget) {
|
||||
g_set_error_literal (error, NMV_EDITOR_PLUGIN_ERROR, 0, _("could not load UI widget"));
|
||||
g_object_unref (object);
|
||||
g_return_val_if_reached (NULL);
|
||||
}
|
||||
g_object_ref_sink (priv->widget);
|
||||
|
||||
priv->window_group = gtk_window_group_new ();
|
||||
|
||||
s_vpn = nm_connection_get_setting_vpn (connection);
|
||||
if (s_vpn)
|
||||
nm_setting_vpn_foreach_data_item (s_vpn, is_new_func, &new);
|
||||
priv->new_connection = new;
|
||||
|
||||
if (!init_editor_plugin (OPENVPN_EDITOR (object), connection, error)) {
|
||||
g_object_unref (object);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
priv->advanced = advanced_dialog_new_hash_from_connection (connection, error);
|
||||
if (!priv->advanced) {
|
||||
g_object_unref (object);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
static void
|
||||
dispose (GObject *object)
|
||||
{
|
||||
OpenvpnEditor *plugin = OPENVPN_EDITOR (object);
|
||||
OpenvpnEditorPrivate *priv = OPENVPN_EDITOR_GET_PRIVATE (plugin);
|
||||
|
||||
g_clear_object (&priv->window_group);
|
||||
|
||||
g_clear_object (&priv->widget);
|
||||
|
||||
g_clear_object (&priv->builder);
|
||||
|
||||
g_clear_pointer (&priv->advanced, g_hash_table_destroy);
|
||||
|
||||
G_OBJECT_CLASS (openvpn_editor_plugin_widget_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
openvpn_editor_plugin_widget_interface_init (NMVpnEditorInterface *iface_class)
|
||||
{
|
||||
/* interface implementation */
|
||||
iface_class->get_widget = get_widget;
|
||||
iface_class->update_connection = update_connection;
|
||||
}
|
||||
|
||||
static void
|
||||
openvpn_editor_plugin_widget_class_init (OpenvpnEditorClass *req_class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (req_class);
|
||||
|
||||
g_type_class_add_private (req_class, sizeof (OpenvpnEditorPrivate));
|
||||
|
||||
object_class->dispose = dispose;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef NM_VPN_OLD
|
||||
|
||||
#include "nm-openvpn-editor-plugin.h"
|
||||
|
||||
G_MODULE_EXPORT NMVpnEditor *
|
||||
nm_vpn_editor_factory_openvpn (NMVpnEditorPlugin *editor_plugin,
|
||||
NMConnection *connection,
|
||||
GError **error)
|
||||
{
|
||||
g_return_val_if_fail (!error || !*error, NULL);
|
||||
|
||||
return openvpn_editor_new (connection, error);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/***************************************************************************
|
||||
* nm-openvpn-editor.h : GNOME UI dialogs for configuring openvpn VPN connections
|
||||
*
|
||||
* Copyright (C) 2008 Dan Williams, <dcbw@redhat.com>
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef __NM_OPENVPN_EDITOR_H__
|
||||
#define __NM_OPENVPN_EDITOR_H__
|
||||
|
||||
#define OPENVPN_TYPE_EDITOR (openvpn_editor_plugin_widget_get_type ())
|
||||
#define OPENVPN_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OPENVPN_TYPE_EDITOR, OpenvpnEditor))
|
||||
#define OPENVPN_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OPENVPN_TYPE_EDITOR, OpenvpnEditorClass))
|
||||
#define OPENVPN_IS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OPENVPN_TYPE_EDITOR))
|
||||
#define OPENVPN_IS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OPENVPN_TYPE_EDITOR))
|
||||
#define OPENVPN_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OPENVPN_TYPE_EDITOR, OpenvpnEditorClass))
|
||||
|
||||
typedef struct _OpenvpnEditor OpenvpnEditor;
|
||||
typedef struct _OpenvpnEditorClass OpenvpnEditorClass;
|
||||
|
||||
struct _OpenvpnEditor {
|
||||
GObject parent;
|
||||
};
|
||||
|
||||
struct _OpenvpnEditorClass {
|
||||
GObjectClass parent;
|
||||
};
|
||||
|
||||
GType openvpn_editor_plugin_widget_get_type (void);
|
||||
|
||||
NMVpnEditor *openvpn_editor_new (NMConnection *connection, GError **error);
|
||||
|
||||
#endif /* __NM_OPENVPN_EDITOR_H__ */
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
client
|
||||
dev tap
|
||||
proto tcp
|
||||
topology subnet
|
||||
remote miami.proxpn.com 443
|
||||
resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
comp-lzo
|
||||
tun-mtu 1500
|
||||
mssfix 1450
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
reneg-sec 0
|
||||
|
||||
cd /etc/openvpn
|
||||
ca CompanyISCA.pem
|
||||
cipher AES-256-CBC
|
||||
reneg-sec 0
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
verb 4
|
||||
@@ -0,0 +1,27 @@
|
||||
client
|
||||
dev company0
|
||||
dev-type tun
|
||||
proto tcp
|
||||
topology subnet
|
||||
remote miami.proxpn.com 443
|
||||
resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
comp-lzo
|
||||
tun-mtu 1500
|
||||
mssfix 1450
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
reneg-sec 0
|
||||
|
||||
cd /etc/openvpn
|
||||
ca CompanyISCA.pem
|
||||
cipher AES-256-CBC
|
||||
reneg-sec 0
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
verb 4
|
||||
@@ -0,0 +1,2 @@
|
||||
myusername
|
||||
mypassword
|
||||
@@ -0,0 +1,14 @@
|
||||
# something non utf8: Att äta en ko
|
||||
|
||||
client
|
||||
dev tun
|
||||
proto udp
|
||||
topology subnet
|
||||
remote test.server.com 443
|
||||
nobind
|
||||
ca Attätaenko.pem
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
script-security 2
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
port 2345
|
||||
|
||||
remote 173.8.149.245
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-auth keys/46.key 1
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
keepalive 10 30
|
||||
@@ -0,0 +1,20 @@
|
||||
client
|
||||
dev tun
|
||||
proto tcp
|
||||
remote miami.proxpn.com 443
|
||||
resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
comp-lzo
|
||||
tun-mtu 1500
|
||||
mssfix 1450
|
||||
auth-user-pass
|
||||
reneg-sec 0
|
||||
|
||||
ca ssl/ca.crt
|
||||
cert ssl/client.crt
|
||||
key ssl/client.key
|
||||
cipher BF-CBC
|
||||
keysize 512
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
client
|
||||
dev company0
|
||||
dev-type tun
|
||||
proto tcp
|
||||
topology subnet
|
||||
remote miami.proxpn.com 443
|
||||
resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
comp-lzo
|
||||
tun-mtu 1500
|
||||
mssfix 1450
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
reneg-sec 0
|
||||
|
||||
cd /etc/openvpn
|
||||
ca CompanyISCA.pem
|
||||
cipher AES-256-CBC
|
||||
reneg-sec 0
|
||||
mtu-disc yes
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
verb 4
|
||||
@@ -0,0 +1,30 @@
|
||||
client
|
||||
dev tun
|
||||
|
||||
proto udp
|
||||
topology subnet
|
||||
|
||||
rport 2352
|
||||
remote test.server.com 443
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
|
||||
|
||||
ca cacert.pem
|
||||
cipher AES-256-CBC #xcomment
|
||||
reneg-sec 0
|
||||
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
|
||||
# random comment
|
||||
|
||||
script-security 2
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
port 2345
|
||||
|
||||
remote 173.8.149.245
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-auth keys/46.key 1
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
ping 10
|
||||
ping-exit 120
|
||||
@@ -0,0 +1,26 @@
|
||||
port 2345
|
||||
|
||||
remote 173.8.149.245
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-auth keys/46.key 1
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
ping 10
|
||||
ping-restart 30
|
||||
@@ -0,0 +1,17 @@
|
||||
remote 173.8.149.245 1194
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
pkcs12 keys/mine.p12
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
port 2345
|
||||
|
||||
remote 173.8.149.245
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-auth keys/46.key 1
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
client
|
||||
dev tun
|
||||
|
||||
proto tcp
|
||||
topology subnet
|
||||
|
||||
rport 2352
|
||||
remote test.server.com 443
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
|
||||
http-proxy-retry
|
||||
http-proxy proxy.domain.tld 3128 httpauthfile basic
|
||||
|
||||
ca cacert.pem
|
||||
cipher AES-256-CBC
|
||||
reneg-sec 0
|
||||
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
|
||||
# random comment
|
||||
|
||||
script-security 2
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
client
|
||||
dev tun
|
||||
|
||||
proto tcp
|
||||
topology subnet
|
||||
|
||||
rport 2352
|
||||
remote aa:bb::1 1194 udp
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
|
||||
http-proxy 10.1.1.1 8080 httpauthfile
|
||||
http-proxy-retry
|
||||
|
||||
ca cacert.pem
|
||||
cipher AES-256-CBC
|
||||
reneg-sec 0
|
||||
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
|
||||
# random comment
|
||||
|
||||
script-security 2
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
client
|
||||
dev tun
|
||||
|
||||
proto tcp
|
||||
topology subnet
|
||||
|
||||
rport 2352
|
||||
remote test.server.com 443
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
|
||||
socks-proxy 10.1.1.1 1080
|
||||
socks-proxy-retry
|
||||
|
||||
ca cacert.pem
|
||||
cipher AES-256-CBC
|
||||
reneg-sec 0
|
||||
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
|
||||
# random comment
|
||||
|
||||
script-security 2
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
route 1.2.3.0 255.255.255.0 1.2.3.254 99
|
||||
route 5.6.7.8 255.255.255.252
|
||||
route 192.168.0.0 255.255.0.0 192.168.44.1
|
||||
|
||||
remote 173.8.149.245
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-auth keys/46.key 1
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
rport 6789
|
||||
|
||||
remote 173.8.149.245
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-auth keys/46.key 1
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# 2048 bit OpenVPN static key
|
||||
#
|
||||
-----BEGIN OpenVPN Static key V1-----
|
||||
378e209d0fe8efe398afa86bdb19b9a8
|
||||
f9cc3ae06e42f9468f97d81724101046
|
||||
1722e4888756212c05dd0e9341e28388
|
||||
aa6f1ea6fbb46779a2e1ce6db1fcef47
|
||||
69bd0266c9e14f02a2f19760e77d2f71
|
||||
59f6e96769bcc09eda1786adbbd51a50
|
||||
f027a829b0a71106b01a046972b1cd20
|
||||
41774be1515f81e8760da576077f543d
|
||||
75d6deb92c9bfd7760a12b0f05938e7d
|
||||
63fc0c663cdbb623d3f45fcfcbc2009c
|
||||
1fc36c7b8ecc147462fb7c8747676574
|
||||
3b7bd0d6a89aa90514d453b9f1b92e22
|
||||
57bb24180cd867357131ac9972f118b8
|
||||
d4cebc0da588fed8ec73b9b9be86962d
|
||||
1a28946996a012767fae84851c126bab
|
||||
65fee86c5e72d11c6d10c01728e33000
|
||||
-----END OpenVPN Static key V1-----
|
||||
@@ -0,0 +1,5 @@
|
||||
remote 10.11.12.13
|
||||
dev tun
|
||||
ifconfig 10.8.0.2 10.8.0.1
|
||||
secret static.key 1
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
remote 10.11.12.13
|
||||
dev tun
|
||||
ifconfig 10.8.0.2 10.8.0.1
|
||||
secret static.key
|
||||
key-direction 0
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDojCCAooCCQCu+mQn9w/PJDANBgkqhkiG9w0BAQ0FADASMRAwDgYDVQQDDAd0
|
||||
ZXN0LWNhMB4XDTE2MDEyMjEzMjAwNFoXDTE3MDEyMTEzMjAwNFowFDESMBAGA1UE
|
||||
AwwJdGVzdC1jZXJ0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAv/dC
|
||||
/LXKu1V9OOTxznvvLvoxtXFsDvywO4qtWcYip9CloNjUD03kJJBzrzAnV+EOCg94
|
||||
5Nw6SFMbbZ751H+or6S58pyy+9Iyxu1Uo3ION+1bbeCqcOv+BCMKovuqavlzmN/o
|
||||
yO4ll4Iz+0CqznwbE4IePG4bKmS2nm11CD9Kw6b/3qz9fdaXb+/DuOlqvLQNHrfm
|
||||
VnS2Z7HKzNWhac9dLTst0mYrZ/Fs8puSSI83BvGZgzuYdtarJIcMoOzXN7BmO2XZ
|
||||
EI2iMMXeNLwv65MdJ6MYZ1CAtY7frSVlKiLTrZL83Elz2R66l3MLCng6dI+2f6sM
|
||||
duFKTb7Mzzlq3Lldt4EeA3vcmzPgH4W8Ihu4IgNSVMTawEnMTW7fvHdZtK7Geqsc
|
||||
/mY9IJYpwrQkuDlGcB0Nzteg1v+w3kvU79/16lfuzWHlsVvDPBk2UBiXicL45jaD
|
||||
xARwPNdyFYAglURwcFrpOmq2GGml1qMB6s55K8dzqe+ZmDm1mfVdGseBjTcrBFbi
|
||||
ZRZWhmY3MSkuQ5FhDDB55U59aGAIeSwv265GDNFv9M/cTV/+SEpzv+o6lROycN/+
|
||||
PGC74FT19f9E3nmZu+B0pV5ByP0NARc5tlvGQ2WnuHuNmo6KfNujcqRqZInkk6HS
|
||||
BPotLss3GZcJ97qkbw1A8oghx29pG8edJy52w/MCAwEAATANBgkqhkiG9w0BAQ0F
|
||||
AAOCAQEAkUVsxyanQN1iPW3d17hfZ3o0lmSihZkw396FXP34tGUeIvk2EbFHS1Jy
|
||||
3Gh4r1adB5bil0X1GYU8AFPKaM+CqWagyBAYXwX6YaXb1pzFn8Ixw6t0gRoAW9ex
|
||||
MW4Eduh8JOYi+KkJaXj5SAVDd3ZDCIwW3rN+jIMy2tvnuWW07UW5HvOZ4qRXyOlZ
|
||||
mqUBgft97uOiVEor8KEhrBzgGzT72ELOykzZGWEuWWy0ytbPrAc+XyodvylvAGzR
|
||||
lj74pDerwl/oUl80vRgEl8M1o4nGdoe17SfaGhD7MP+YD2HmY2kTCw8ks70KBpxJ
|
||||
nCtKkguacJwDtUeh2jpbXZKBQAgqkw==
|
||||
-----END CERTIFICATE-----
|
||||
@@ -0,0 +1,51 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
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
|
||||
-----END RSA PRIVATE KEY-----
|
||||
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# 2048 bit OpenVPN static key
|
||||
#
|
||||
-----BEGIN OpenVPN Static key V1-----
|
||||
378e209d0fe8efe398afa86bdb19b9a8
|
||||
f9cc3ae06e42f9468f97d81724101046
|
||||
1722e4888756212c05dd0e9341e28388
|
||||
aa6f1ea6fbb46779a2e1ce6db1fcef47
|
||||
69bd0266c9e14f02a2f19760e77d2f71
|
||||
59f6e96769bcc09eda1786adbbd51a50
|
||||
f027a829b0a71106b01a046972b1cd20
|
||||
41774be1515f81e8760da576077f543d
|
||||
75d6deb92c9bfd7760a12b0f05938e7d
|
||||
63fc0c663cdbb623d3f45fcfcbc2009c
|
||||
1fc36c7b8ecc147462fb7c8747676574
|
||||
3b7bd0d6a89aa90514d453b9f1b92e22
|
||||
57bb24180cd867357131ac9972f118b8
|
||||
d4cebc0da588fed8ec73b9b9be86962d
|
||||
1a28946996a012767fae84851c126bab
|
||||
65fee86c5e72d11c6d10c01728e33000
|
||||
-----END OpenVPN Static key V1-----
|
||||
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
remote 173.8.149.245 1194
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
float
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-auth keys/46.key
|
||||
remote-cert-tls server
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
verify-x509-name "C=US, L=Cambridge, CN=GNOME, emailAddress=networkmanager-list@gnome.org" subject
|
||||
|
||||
key-direction 1
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
remote 173.8.149.245 1194
|
||||
resolv-retry infinite
|
||||
|
||||
dev tun
|
||||
persist-key
|
||||
persist-tun
|
||||
link-mtu 1400
|
||||
proto udp
|
||||
nobind
|
||||
pull
|
||||
tls-client
|
||||
|
||||
float
|
||||
|
||||
ca keys/mg8.ca
|
||||
cert keys/clee.crt
|
||||
key keys/clee.key
|
||||
|
||||
tls-crypt keys/46.key
|
||||
remote-cert-tls server
|
||||
tls-remote "/CN=myvpn.company.com"
|
||||
verify-x509-name "C=US, L=Cambridge, CN=GNOME, emailAddress=networkmanager-list@gnome.org" subject
|
||||
|
||||
comp-lzo
|
||||
verb 3
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
client
|
||||
dev tun
|
||||
|
||||
proto udp
|
||||
topology subnet
|
||||
|
||||
tun-mtu 1300
|
||||
mssfix
|
||||
fragment 1200
|
||||
|
||||
rport 2352
|
||||
remote test.server.com 443
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
user openvpn
|
||||
group openvpn
|
||||
|
||||
|
||||
ca cacert.pem
|
||||
cipher AES-256-CBC
|
||||
reneg-sec 0
|
||||
|
||||
auth-user-pass
|
||||
auth-nocache
|
||||
|
||||
ping 30
|
||||
ping-exit 120
|
||||
|
||||
# random comment
|
||||
|
||||
script-security 2
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user