NordVPN-NetworkManager icon indicating copy to clipboard operation
NordVPN-NetworkManager copied to clipboard

Question: general vpn provider tool?

Open peteruithoven opened this issue 6 years ago • 2 comments

This is mostly a question / brainstorm. So currently on linux we need a tool per vpn provider, they need to implement:

  • downloading configurations
  • benchmarking
  • kill switches
  • dns leak protection
  • auto connect
  • category mapping
  • ...?

This while I think the Nord VPN provider specific parts of this tool are quite minimal. Please correct me if I'm wrong. I think it's mostly:

  • api / url to download ovpn files
  • available categories
  • available countries
  • mapping to ovpn files

What if these could be defined in configuration files per vpn provider? This way this tool and all it's features could be used for any vpn provider. (For the end users it's probably best if these configurations would be included in the tool itself?)

Maybe, in the future people could even build gui's / os integrations on top of this tool?

(I think AirVPN is currently the only one with a gui client: https://github.com/AirVPN/Eddie )

I'm very curious what your thoughts are on this.

peteruithoven avatar Dec 22 '17 12:12 peteruithoven

Thanks for starting a discussion on this!

It has been my goal from the beginning to create a universal tool. I had already put a decent amount of thought into how to approach this and decided that creating a "vpn provider" class abstraction, with all the required methods defined. Any developer could then create support for a provider by creating such a "vpn provider" class by following the provided interface. This could of course be abstracted further by providing configuration files, but I feel some varying logic between providers will be neccessary, so the former may be the best approach.

The nordnm tool is currently very reliant on specifics of the NordVPN API, so before this would be possible, quite some restructuring is needed. It will be my goal to begin work on making a universal version once I have added some more features which I deem important. I also want to have some basic unit tests available and some further testing of core functionality. Any problems that exist now could grow exponentially by adding support for many providers :).

I will keep this issue open as a discussion and it will be updated as I put more time into this feature.

chadsr avatar Jan 15 '18 11:01 chadsr

@Chadsr Would you consider adding a feature to simply import an `.ovpn" file? Something like:

sudo nordnm import /path/to/foo.ovpn --username alice --password princess [--kill-switch] [--auto-connect]

And it would work exactly like the last part of nordnm sync, but without any NordVPN-specific features, such as listing or benchmarking. This would allow users to reuse features like auto-connect, kill-switch, and dns leak protection, without being tied to any vpn provider. (As suggested by @peteruithoven, these features are useful for any OpenVPN setup on linux.)

The import feature should be a lot simpler to implement. In fact, I modeled this based on the existing networkmanager.import_connection method so extensive refactoring should not be needed. Yet it provides a simple way for users to use any reasonable VPN provider (or self-hosted / corporate VPN) that provides OpenVPN config files. Even after the "vpn provider" feature is ready, this can still come in handy for not-yet-implemented providers, for providers who does not provide APIs, for self-hosted / corporate VPNs, or in cases where the user just to want to use a certain server (e.g. downloaded via the "recommended" server from NordVPN website).

I'm currently evaluating some alternatives to NordVPN and I personally find such a feature really handy. I'm willing to implement this myself and submit a Pull Request if this is a feature you'd consider. Please let me know what you think. (P.S. I'll probably at least do a local fork because I myself need this feature.)

utf8please avatar Sep 02 '18 03:09 utf8please