ivpn / desktop-app

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

Disable fastest server when switching to SingleHop #273

Closed gorkapernas closed 1 year ago

gorkapernas commented 1 year ago

Description:

Currently when connected with MultiHop and switching to SingleHop, if fastest server was selected before, the app will select the fastest server, however, there is an issue if latency values are not present when connected with MultiHop and switching to SingleHop, the app will connect randomly to the first server on the list.

In order to avoid this issue, when connected with MultiHop and switching to SingleHop, the fastest server option should be disabled automatically, so SingleHop connection will be established to the EntryServer used from the MultiHop connection.

stenya commented 1 year ago

Changed functionality of fastest server detection:

Now, the app looks for the server with the lowest latency (searching among active servers that have latency info).

However, if there is no latency info for any server:

The "FastestServer" selection remains unchanged.

stenya commented 1 year ago

v3.10.18

gorkapernas commented 1 year ago

@stenya there seems to be an scenario where the application always fallsback to the first server in the list, so far I reproduced it on Windows and Linux, could you please confirm if the following case is correct?

Windows 11 steps:

stenya commented 1 year ago

No, the server should remain unchanged.

Investigating ...

stenya commented 1 year ago

Fixed. v3.10.20 Good finding @gorkapernas Thank you!

gorkapernas commented 1 year ago

Verified fixed on v3.10.20 the last issue reported on https://github.com/ivpn/desktop-app/issues/273#issuecomment-1532713439, tested in all platforms, the app does not connect to the first server in the list when changing to SingleHop if the fastest_server is set as the entry_server during the MultiHop connection, it uses the currently selected entry_server for the SingleHop connection. The new functionality works as described on https://github.com/ivpn/desktop-app/issues/273#issuecomment-1516230171