v3: If manual location is selected, the first gateway gets returned twice
There is a bug in the v3 implementation for GetBestGatways (renamed in !196 (closed)):
- auto select location: that works (e. g. gives 3 gateways for paris)
- manually select paris: the first gateway is returned twice, which leads to
2024-06-10T18:41:48+02:00 DBG Adding gateway to command line via --remote gateway=vpn02-par.riseup.net ip4=51.159.197.108 port=80 proto=udp4
2024-06-10T18:41:48+02:00 DBG Adding gateway to command line via --remote gateway=vpn02-par.riseup.net ip4=51.159.197.108 port=1194 proto=udp4
2024-06-10T18:41:48+02:00 DBG Adding gateway to command line via --remote gateway=vpn02-par.riseup.net ip4=51.159.197.108 port=80 proto=udp4
2024-06-10T18:41:48+02:00 DBG Adding gateway to command line via --remote gateway=vpn02-par.riseup.net ip4=51.159.197.108 port=1194 proto=udp4
2024-06-10T18:41:48+02:00 DBG Adding gateway to command line via --remote gateway=vpn03-par.riseup.net ip4=163.172.58.132 port=80 proto=udp4
2024-06-10T18:41:48+02:00 DBG Adding gateway to command line via --remote gateway=vpn03-par.riseup.net ip4=163.172.58.132 port=1194 proto=udp4
...
2024-06-10T18:41:48+02:00 DBG Executing bitmask-root cmd="/usr/sbin/bitmask-root openvpn start /usr/sbin/openvpn --key-direction 1 --float --keepalive 10 30 --dev tun --persist-key --auth SHA512 --data-ciphers AES-256-GCM --tls-cipher
TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384 --tls-version-min 1.2 --verb 3 --data-ciphers AES-256-GCM --rcvbuf 0 --nobind --sndbuf 0 --remote 51.159.197.108 80 udp4 --remote 51.159.197.108 1194 udp4 --remote 51.159.197.108 80 udp4 --remote 51
.159.197.108 1194 udp4 --remote 163.172.58.132 80 udp4 --remote 163.172.58.132 1194 udp4 --verb 3 --management-client --management 127.0.0.1 6061 /tmp/leap-1263261157/leap-vpn-3857932057 --ca /tmp/leap-1263261157/cacert.pem --cert /tmp/leap-12
63261157/openvpn.pem --key /tmp/leap-1263261157/openvpn.pem --persist-tun --log /tmp/leap-vpn.log --pull-filter ignore route"
If you check the --remotes and you will find 51.159.197.108 four times (with 80 and 1194). Need to figure out.