diff --git a/src/dbmanager.cpp b/src/dbmanager.cpp index 7f20440..58c8638 100644 --- a/src/dbmanager.cpp +++ b/src/dbmanager.cpp @@ -30,7 +30,6 @@ along with this program. If not, see . QMutex DBManager::m_mtx; qint64 DBManager::m_dailyTopTableLastActualizeTimestamp = 0; -qint64 DBManager::m_dailyTrafficTableLastActualizeTimestamp = 0; constexpr int DB_VERSION = 1; @@ -328,7 +327,7 @@ QString DBManager::getStandaloneVariable(const QString &key) const QString DBManager::escaped(const QString &str) { QString result {str}; - static QRegularExpression rgx("[\\'\\;\\!\\-\\@\\#\\$\\%\\^\\&\\*\\(\\)\\`\\~\\+\\=\\\\/\\]\\[ ]"); + static QRegularExpression rgx("[';`]"); result.replace(rgx, "_"); return result; } diff --git a/src/g.cpp b/src/g.cpp index 40ebd8f..2e2b254 100644 --- a/src/g.cpp +++ b/src/g.cpp @@ -50,6 +50,7 @@ namespace c { const QString HA_BLOCKED_DESTINTIONS = "{{BLOCKED_DESTINATIONS}}"; const QString HA_INFORMATION = "{{INFORMATION}}"; const QString HA_COPYRIGHT = "{{COPYRIGHT}}"; + const QString HA_VERSION = "{{VERSION}}"; } // namespace c namespace p { diff --git a/src/g.h b/src/g.h index 2f2d7b8..bbcd7c9 100644 --- a/src/g.h +++ b/src/g.h @@ -52,6 +52,7 @@ namespace c /* for Constants */ { extern const QString HA_BLOCKED_DESTINTIONS; extern const QString HA_INFORMATION; extern const QString HA_COPYRIGHT; + extern const QString HA_VERSION; } // namespace c namespace p /* for Parameters */ { diff --git a/src/html/index.html b/src/html/index.html index bc2330b..1e8189f 100644 --- a/src/html/index.html +++ b/src/html/index.html @@ -12,14 +12,6 @@

{{PAGE_TITLE}}

-
-
- Last destinations -
- -
Traffic @@ -71,7 +63,7 @@ c-2.7,0-4.9,0.9-6.6,2.6c-1.7,1.7-2.6,3.9-2.6,6.6v356.3h-64c-3.8,0-6.6,1.8-8.3,5.4c-1.5,3.6-1,6.9,1.4,10l101.4,109.6 c1.9,1.9,4.2,2.9,6.9,2.9c2.5,0,4.7-0.9,6.6-2.9L217,380.9C219.5,377.8,220,374.5,218.4,370.9z"/> - +
{{DAILY_DOWNLOAD}} @@ -88,9 +80,17 @@ {{TOTAL_DOWNLOAD}}
- +
+
+
+ Last destinations +
+ +
{{INFORMATION}}
Top destinations @@ -111,11 +111,11 @@ {{TOTAL_TOP_DESTINATIONS_LIST}}
-
{{BLOCKED_DESTINATIONS}}{{INFORMATION}} + {{BLOCKED_DESTINATIONS}} diff --git a/src/main.cpp b/src/main.cpp index 10ce990..620f1e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -146,6 +146,10 @@ int main(int argc, char *argv[]) else if ((key == "-I" or key == "--ignored-destinations") and not value.isEmpty()) { g::p::IGNORED_DESTINATIONS = value.split(','); + for (auto& string: g::p::IGNORED_DESTINATIONS) + { + string.remove(' '); + } } else if ((key == "-b" or key == "--bind-to-address") and not value.isEmpty()) diff --git a/src/proxyinstanse.cpp b/src/proxyinstanse.cpp index 1a0ee5d..e6a20a4 100644 --- a/src/proxyinstanse.cpp +++ b/src/proxyinstanse.cpp @@ -90,6 +90,8 @@ void ProxyInstanse::generateBlackList(const QStringList &domainsOrAddresses) continue; } + name.remove(' '); + QHostInfo host = QHostInfo::fromName(name); if (host.error() != QHostInfo::NoError) { diff --git a/src/webpage.cpp b/src/webpage.cpp index f2c0161..a5618a9 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -245,6 +245,7 @@ void WebPage::informationBlock(QString &document) void WebPage::copyright(QString &document) { document.replace(g::c::HA_COPYRIGHT, g::c::COPYRIGHT); + document.replace(g::c::HA_VERSION, g::c::SOFTWARE_VERSION); } QString WebPage::lastDestinationItemAllowed(const QString &destination)