commit
5967ebc3cc
|
@ -6,8 +6,8 @@
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<extends>nm-connection-editor.desktop</extends>
|
<extends>nm-connection-editor.desktop</extends>
|
||||||
<extends>gnome-control-center.desktop</extends>
|
<extends>gnome-control-center.desktop</extends>
|
||||||
<_name>Wireguard client</_name>
|
<_name>WireGuard client</_name>
|
||||||
<_summary>Client for Wireguard virtual private networks</_summary>
|
<_summary>Client for WireGuard virtual private networks</_summary>
|
||||||
|
|
||||||
<keywords>
|
<keywords>
|
||||||
<keyword>network</keyword>
|
<keyword>network</keyword>
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
<keyword>NetworkManager</keyword>
|
<keyword>NetworkManager</keyword>
|
||||||
<keyword>connection</keyword>
|
<keyword>connection</keyword>
|
||||||
<keyword>VPN</keyword>
|
<keyword>VPN</keyword>
|
||||||
<keyword>Wireguard</keyword>
|
<keyword>WireGuard</keyword>
|
||||||
</keywords>
|
</keywords>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
<_p>Support for configuring Wireguard virtual private network connections.</_p>
|
<_p>Support for configuring WireGuard virtual private network connections.</_p>
|
||||||
<_p>Wireguard is a modern VPN client built for simplicity.</_p>
|
<_p>WireGuard is a modern VPN client built for simplicity.</_p>
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<screenshots>
|
<screenshots>
|
||||||
|
|
|
@ -87,7 +87,7 @@ def hibernate():
|
||||||
|
|
||||||
def get_wg_plugin(bus_name="org.freedesktop.NetworkManager.wireguard",
|
def get_wg_plugin(bus_name="org.freedesktop.NetworkManager.wireguard",
|
||||||
object_path="/org/freedesktop/NetworkManager/VPN/Plugin"):
|
object_path="/org/freedesktop/NetworkManager/VPN/Plugin"):
|
||||||
"""Retrieve the wireguard VPN plugin from the System Bus.
|
"""Retrieve the WireGuard VPN plugin from the System Bus.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
bus_name -- the bus name of the object to import
|
bus_name -- the bus name of the object to import
|
||||||
|
@ -107,7 +107,7 @@ def wg_disconnect(wg_plugin):
|
||||||
wg_plugin.Disconnect()
|
wg_plugin.Disconnect()
|
||||||
|
|
||||||
def wg_connect(wg_plugin):
|
def wg_connect(wg_plugin):
|
||||||
"""Send the Connect Command to the Wireguard Plugin"""
|
"""Send the Connect Command to the WireGuard Plugin"""
|
||||||
|
|
||||||
# these are the settings that are expected by Connect(a{sa{sv}}) for a VPN plugin
|
# these are the settings that are expected by Connect(a{sa{sv}}) for a VPN plugin
|
||||||
service_type = GLib.Variant("s", "service")
|
service_type = GLib.Variant("s", "service")
|
||||||
|
|
|
@ -1059,14 +1059,14 @@ handle_line_error:
|
||||||
|
|
||||||
if(!have_priv_key){
|
if(!have_priv_key){
|
||||||
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
||||||
"The file to import wasn't a valid Wireguard configuration (no local private key)");
|
"The file to import wasn't a valid WireGuard configuration (no local private key)");
|
||||||
|
|
||||||
goto out_error;
|
goto out_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!have_ip4_addr && !have_ip6_addr){
|
if(!have_ip4_addr && !have_ip6_addr){
|
||||||
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
||||||
"The file to import wasn't a valid Wireguard configuration (no local IPv4 or IPv6 addresses)");
|
"The file to import wasn't a valid WireGuard configuration (no local IPv4 or IPv6 addresses)");
|
||||||
|
|
||||||
goto out_error;
|
goto out_error;
|
||||||
}
|
}
|
||||||
|
@ -1075,7 +1075,7 @@ handle_line_error:
|
||||||
|
|
||||||
if(!have_pub_key){
|
if(!have_pub_key){
|
||||||
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
||||||
"The file to import wasn't a valid Wireguard configuration (no peer public key)");
|
"The file to import wasn't a valid WireGuard configuration (no peer public key)");
|
||||||
|
|
||||||
goto out_error;
|
goto out_error;
|
||||||
}
|
}
|
||||||
|
@ -1087,7 +1087,7 @@ handle_line_error:
|
||||||
|
|
||||||
if(!have_endpoint){
|
if(!have_endpoint){
|
||||||
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
g_set_error_literal(error, NMV_EDITOR_PLUGIN_ERROR, NMV_EDITOR_PLUGIN_ERROR_FAILED,
|
||||||
"The file to import wasn't a valid Wireguard configuration (no peer endpoint)");
|
"The file to import wasn't a valid WireGuard configuration (no peer endpoint)");
|
||||||
|
|
||||||
goto out_error;
|
goto out_error;
|
||||||
}
|
}
|
||||||
|
@ -1159,7 +1159,7 @@ create_config_string (NMConnection *connection, GError **error)
|
||||||
g_set_error_literal (error,
|
g_set_error_literal (error,
|
||||||
NMV_EDITOR_PLUGIN_ERROR,
|
NMV_EDITOR_PLUGIN_ERROR,
|
||||||
NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
|
NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
|
||||||
_("connection is not a valid Wireguard connection"));
|
_("connection is not a valid WireGuard connection"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue