1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Warn user if we try to use DNS with a SOCKS5 proxy

Ask if we really want to do a DNS request, without the proxy

Fixes #627
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-06 23:50:36 +01:00
parent 9eccf3282c
commit f29305bb01
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -18,11 +18,13 @@
#include <QFont> #include <QFont>
#include <QMessageBox> #include <QMessageBox>
#include <QErrorMessage>
#include <tox/tox.h> #include <tox/tox.h>
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "src/core.h" #include "src/core.h"
#include "src/misc/cdata.h" #include "src/misc/cdata.h"
#include "src/toxdns.h" #include "src/toxdns.h"
#include "src/misc/settings.h"
AddFriendForm::AddFriendForm() AddFriendForm::AddFriendForm()
{ {
@ -93,6 +95,14 @@ void AddFriendForm::onSendTriggered()
this->toxId.clear(); this->toxId.clear();
this->message.clear(); this->message.clear();
} else { } else {
if (Settings::getInstance().getUseProxy())
{
QMessageBox::StandardButton btn = QMessageBox::warning(main, "qTox", tr("qTox needs to use the Tox DNS, but can't do it through a proxy\n\
Ignore the proxy and connect to the Internet directly ?"), QMessageBox::Ok|QMessageBox::No, QMessageBox::No);
if (btn != QMessageBox::Ok)
return;
}
ToxID toxId = ToxDNS::resolveToxAddress(id, true); ToxID toxId = ToxDNS::resolveToxAddress(id, true);
if (toxId.toString().isEmpty()) if (toxId.toString().isEmpty())