From: Jan Cermak Date: Sun, 5 May 2019 09:31:50 +0000 (+0200) Subject: HTTPS connection. X-Git-Url: https://git.johniez.cz/?p=aspt.git;a=commitdiff_plain;h=41646ae61c3720d27e56958d24bca6baf5a55014 HTTPS connection. --- diff --git a/configtab.cc b/configtab.cc index b43b08c..64ee685 100755 --- a/configtab.cc +++ b/configtab.cc @@ -11,7 +11,7 @@ http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode */ ConfigTab::ConfigTab(QWidget *parent): QWidget(parent) { file = 0; - http = new QHttp; + http = new QHttp("https://www.soccerproject.com/sptd.php", QHttp::ConnectionModeHttps, 443); QSettings settings("config/global.ini", QSettings::IniFormat); langToSave = settings.value("lang", 0).toInt(); useProxy = settings.value("Network/proxyUsed", 0).toInt(); @@ -142,10 +142,10 @@ void ConfigTab::downloadLatest() { msgbox->setText("downloading..."); file = new QFile("data/data_"+num+".xml"); file->open(QIODevice::WriteOnly); - QUrl url("http://www.soccerproject.com/sptd.php"); - int p_port = settings.value("Network/proxyPort", 80).toInt(); + QUrl url("https://www.soccerproject.com/sptd.php"); + int p_port = settings.value("Network/proxyPort", 443).toInt(); if(useProxy) http->setProxy(settings.value("Network/proxyAddr", "").toString(), p_port, settings.value("Network/proxyName", "").toString(), settings.value("Network/proxyPass", "").toString()); - http->setHost(url.host(), 80); + http->setHost(url.host(), QHttp::ConnectionModeHttps, 443); //QTextStream out(stdout); out << "log"; httpId = http->get(url.path() + "?login=" + QUrl::toPercentEncoding(nick->text()) + "&pw=" + QUrl::toPercentEncoding(pass->text()) + "&sptdid=8&sptdpw=Cerm12", file); settings.setValue("username", nick->text());