koorosh
2019-05-19 02:51 deepin
$ sudo nmcli connection import type openvpn file your-own-openvpn-profile-config-file.ovpn
Connection 'your-own-openvpn-profile-config-file' (5b04c610-ca37-4f76-bb61-07e9acdc603a) successfully added.
Now it will be displayed in Deepin control center => Network => VPN as 'your-own-openvpn-profile-config-file' and you can now start this connection.
Connection 'your-own-openvpn-profile-config-file' (5b04c610-ca37-4f76-bb61-07e9acdc603a) successfully added.
Now it will be displayed in Deepin control center => Network => VPN as 'your-own-openvpn-profile-config-file' and you can now start this connection.
Reply Like 0 View the author
The process works pretty well, but there is one annoying feature - you cannot create for example an OpenVPN entry with an .ovpn configuration file, unless you manually add .conf to that filename. Currently the file import only supports .conf files.
Maybe this line?
const auto file = QFileDialog::getOpenFileUrl(nullptr, "", QUrl::fromLocalFile(QDir::homePath()), "*.conf");
in dde-control-center -> /src/frame/modules/network/vpnpage.cpp
Can the file import dialog support more configuration file extensions, or even *.* (all) ?
Thanks!