Gateway selection
Current situation
Riseup has several gateways in different locations. The existing code selects automatically the one closest to you (we are currently improving that #84 (closed)).
There is an implementation of the gateway selection with bad UX. Is not enabled by default, as we think it will confuse people, but it can be used by passing a -select-gateway
flag to the RiseupVpn binary.
Improvements
- Reconnect the VPN when a gateway is selected. It does reconnect when we choose a location, but not when we switch to "automatic".
- We need to come up with a better identifier than just the city, as riseup has now two gateways in the same city. The selection will be done on the city level, not on the gateway level.
- Get feedback about the actual gateway you are connected to. RiseupVPN gives to openvpn a list of gateways sorted by preference, if one gateway fails to connect openvpn will try the following one. The user selection of a gateway produces this list with the selected gateway on top of the list, but that doesn't mean that the connection will for sure be made to this gateway.1
- Get the gateway health from menshen and display it. (maybe customizing the combobox)
- Refresh the menshen gateway list on every reconnection or in background periodically or when you go to select a location.
- Design a Qt UI for it.
- Be able to reopen the main window after closing it.
-
Can we avoid leaking the
bonafide.Gateway
struct outsidepkg.vpn
? - The systray should display the status correctly
- Get the list of locations on time for the UI, right now they don't appear until you connect for the first time.
-
reduce the hackyness of the reconnection: remove sleeps in
api.UseGateway
, don't teardown the firewall, ... - Fix the tests.
-
Rename things in the UI (and maybe in the code):
- cities -> locations.
- gateways tab -> Settings or Locations.
- automatic -> fastest/best
- the snap in the CI is bronken:
QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:5 plugin cannot be loaded for module "QtQuick.Controls": The plugin '/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so' uses incompatible Qt library. (5.15.0) [release]
[ ] Add persistency to the gateway selection so it keeps your preferences after restarts.
-
One common situation where this happens is when the network is lost. openvpn will try to reconnect while the network is gone and will keep rotating over the list. When the network is back it will connect to the next one that was on the list, that might not be the one selected. This functionality is in place in case one gateway is down to connect to another one. But we haven't figure out how to differentiate between a gateway being down and the users connection being down.