ivpn / desktop-app

Official IVPN Desktop app
https://www.ivpn.net/apps/
GNU General Public License v3.0
322 stars 49 forks source link

[Feature Request] Add button to regenerate WireGuard keys when connected via OpenVPN #220

Open jordan-ivpn opened 1 year ago

jordan-ivpn commented 1 year ago

Feature request

Description

In the IVPN App's Settings > Connection area, make the button to regenerate WireGuard keys available when OpenVPN is connected.

It can be helpful to regenerate keys when OpenVPN is connected when there are network restrictions that block access to the API servers.

This works when OpenVPN is connected, but not all users are comfortable with the command line and a button might be easier:

ivpn wgkeys -regenerate

Describe the solution you'd like

Add a button to regenerate WireGuard keys when connected via OpenVPN. If OpenVPN is disconnected, do not display the button or always display the button (connected, disconnected, OpenVPN, WireGuard).

Describe alternatives you've considered

CLI

-- Thanks.

stenya commented 1 year ago

The easier solution could be:

@jurajhilje @gorkapernas @jordan-ivpn What do you think?

jurajhilje commented 1 year ago

@stenya Your proposal sounds good to me. What do you think about adding a checkbox in OpenVPN settings so it is not enabled by default? Because this does not sound like a use case for majority of users.

stenya commented 1 year ago

I think the additional option will be redundant. The idea is to minimize issues with WG keys regeneration automatically. Users should not care about it. Anyway, we can discuss it at the meeting.

jurajhilje commented 1 year ago

OK, we'll implement without the button in mobile apps as well.

ajay-gh commented 1 year ago

I'd love to see implementation of these ideas, it would make using WG much easier in environments where staying on either WG or OV all the time is not possible.

stenya commented 1 year ago

The easier solution could be:

  • to allow the IVPN app to update WG keys in the background when OpenVPN is connected
  • after establishing OpenVPN connection: the IVPN app must check if WG keys are expired and update them if required

I just checked the implementation. The desktop apps already behave almost exactly as described. No changes are required.

Regarding the addition of a new button, as mentioned in the topic, it's primarily a matter of UI design. It can be easily added once we agree on the UI design. My main concern is to keep it clean and understandable. Including WireGuard-related buttons in the OpenVPN settings would be confusing.

jordan-ivpn commented 1 year ago

Clicking a button is easier than using the CLI for some users. Since the Windows PATH addition is optional, it is even more cumbersome to type this or try to make copy/paste work in a Command Prompt:

"C:\Program Files\IVPN Client\cli\ivpn.exe" wgkeys -regenerate