YunoHost-Apps / vpnclient_ynh

VPN Client app for YunoHost
GNU Affero General Public License v3.0
41 stars 24 forks source link

Don't try to resolve DNS when VPN server is not a domain #122

Closed hidrarga closed 2 months ago

hidrarga commented 2 months ago

Problem

See https://forum.arn-fai.net/t/18-04-2024-ne-pas-mettre-a-jour-vos-vpnclient-ynh/9495/2

In short, VPN client can sometimes timeout if the keepalive session is too low and the server is slow (for instance on internet cubes). I noticed that the client was trying to do DNS resolution on IP address, which is useless. The idea is to reduce the time needed for the client to connect.

Solution

First check if the VPN remote address is an IP or a domain. If it's a domain, proceed with DNS resolution to obtain the IP address.

PR Status

Automatic tests

Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

hidrarga commented 2 months ago

!testme

yunohost-bot commented 2 months ago

May the CI gods be with you! Test Badge

yunohost-bot commented 2 months ago

:books: Test Badge

alexAubin commented 2 months ago

(Btw dont forget to bump the version number before merging to the main branch)