mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
added domain name resolving before connection for wg/awg and xray protocols (#814)
added domain name resolving before connection
This commit is contained in:
@@ -109,7 +109,10 @@ QStringList NetworkUtilities::summarizeRoutes(const QStringList &ips, const QStr
|
||||
|
||||
QString NetworkUtilities::getIPAddress(const QString &host)
|
||||
{
|
||||
if (ipAddressRegExp().match(host).hasMatch()) {
|
||||
QHostAddress address(host);
|
||||
if (QAbstractSocket::IPv4Protocol == address.protocol()) {
|
||||
return host;
|
||||
} else if (QAbstractSocket::IPv6Protocol == address.protocol()) {
|
||||
return host;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user