From f29305bb0137de0b399f3d300f19277c209001e0 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Thu, 6 Nov 2014 23:50:36 +0100 Subject: [PATCH] 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 --- src/widget/form/addfriendform.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/widget/form/addfriendform.cpp b/src/widget/form/addfriendform.cpp index cae06b785..e28eebb91 100644 --- a/src/widget/form/addfriendform.cpp +++ b/src/widget/form/addfriendform.cpp @@ -18,11 +18,13 @@ #include #include +#include #include #include "ui_mainwindow.h" #include "src/core.h" #include "src/misc/cdata.h" #include "src/toxdns.h" +#include "src/misc/settings.h" AddFriendForm::AddFriendForm() { @@ -93,6 +95,14 @@ void AddFriendForm::onSendTriggered() this->toxId.clear(); this->message.clear(); } 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); if (toxId.toString().isEmpty())