From aac698a1f128f6672d7e988276eb3dc76ad392a9 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 7 Nov 2019 11:59:55 +0100 Subject: [PATCH] Added fix for licensing/updating through non-SSL proxy server --- src/controller/controller_license.cpp | 1 + src/controller/controller_updater.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/controller/controller_license.cpp b/src/controller/controller_license.cpp index 8166fbbb..2203d1a8 100644 --- a/src/controller/controller_license.cpp +++ b/src/controller/controller_license.cpp @@ -100,6 +100,7 @@ namespace Controller{ dl.dataTimeout = 25;//25-second data timeout, increased from 5s default #ifdef SSL HTTP::URL url("https://releases.mistserver.org/license.php"); + if (dl.isProxied()){url.protocol = "http";} #else HTTP::URL url("http://releases.mistserver.org/license.php"); #endif diff --git a/src/controller/controller_updater.cpp b/src/controller/controller_updater.cpp index 0f502c5c..2ccf0530 100644 --- a/src/controller/controller_updater.cpp +++ b/src/controller/controller_updater.cpp @@ -82,6 +82,7 @@ namespace Controller{ Log("UPDR", "Downloading update..."); #ifdef SSL HTTP::URL url("https://releases.mistserver.org/update.php"); + if (DL.isProxied()){url.protocol = "http";} #else HTTP::URL url("http://releases.mistserver.org/update.php"); #endif @@ -171,6 +172,7 @@ namespace Controller{ JSON::Value updrInfo; #ifdef SSL HTTP::URL url("https://releases.mistserver.org/update.php"); + if (DL.isProxied()){url.protocol = "http";} #else HTTP::URL url("http://releases.mistserver.org/update.php"); #endif