Implementing a VPN plugin
- From: Manuel Schölling <manuel schoelling gmx de>
- To: networkmanager-list gnome org
- Subject: Implementing a VPN plugin
- Date: Sat, 09 Dec 2017 20:31:51 +0100
Hi,
I am currently implementing a WireGuard [1] VPN plugin for
NetworkManager in Rust.
My plugin can already setup a network device, but right now I am
working on giving feedback to NetworkManager.
If I understand the code correctly, my program has to call
nm_vpn_service_plugin_set_ip4_config() and pass a "a{sv}" dict to tell
NetworkManager about the configuration. If NetworkManager validates the
data, it will show the connection as "up".
But what data needs to be passed in the dict? Is
NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS and NM_VPN_PLUGIN_IP4_CONFIG_PREFIX
enough? And what data type should these values be?
Right now NetworkManager does not like the data I am passing and give a
message like "invalid IP4 config received".
There is also the nm_vpn_service_plugin_set_config() function. Has this
function to be called, too? And what arguments does it need?
And btw, is it ok if I call nm_vpn_service_plugin_set{_ipv4}_config(0
right from my program or I have to call it via the DBus instead?
Thanks!
Manuel
[1] http://wireguard.io/
[2] https://github.com/manuels/wg-p2p-nm-plugin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]