VPN Import - Support for more Configuration File Extensions
Tofloor
poster avatar
rhp
deepin
2019-05-19 00:18
Author
When Creating (Import) a new VPN configuration, you can choose a configuration file (.conf) to do so.

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!




Reply Favorite View the author
All Replies
koorosh
deepin
2019-05-19 02:51
#1
$ 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.
Reply View the author
rhp
deepin
2019-05-19 04:45
#2
https://bbs.deepin.org/post/178182
$ sudo nmcli connection import type openvpn file your-own-openvpn-profile-config-file.ovpn

Connecti ...

As mentioned, another way is to rename someconfig.ovpn TO someconfig.ovpn.conf and it will be accepted.

These are unfortunately just workarounds due to missing GUI functionalities, and not for normal not-at-all technical people.

And thanks for the suggestion, I could actually use that in a script processing a folder of configs
Reply View the author