complex of little fixes
This commit is contained in:
+1
-2
@@ -30,7 +30,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 */ {
|
||||
|
||||
+12
-12
@@ -12,14 +12,6 @@
|
||||
<h1 class="proxyService__title">
|
||||
{{PAGE_TITLE}}
|
||||
</h1>
|
||||
<section class="proxyService__lastDestinations lastDestinations section">
|
||||
<div class="lastDestinations__title section__title">
|
||||
Last destinations
|
||||
</div>
|
||||
<ul class="lastDestinations__list">
|
||||
{{LAST_DESTINATIONS_LIST}}
|
||||
</ul>
|
||||
</section>
|
||||
<section class="proxyService__handledTraffic handledTraffic section">
|
||||
<div class="handledTraffic__mainTitle section__title">
|
||||
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"/>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="handledTraffic__number">
|
||||
{{DAILY_DOWNLOAD}}
|
||||
@@ -88,9 +80,17 @@
|
||||
{{TOTAL_DOWNLOAD}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="proxyService__lastDestinations lastDestinations section">
|
||||
<div class="lastDestinations__title section__title">
|
||||
Last destinations
|
||||
</div>
|
||||
<ul class="lastDestinations__list">
|
||||
{{LAST_DESTINATIONS_LIST}}
|
||||
</ul>
|
||||
</section>{{INFORMATION}}
|
||||
<section class="proxyService__topDestinations topDestinations section">
|
||||
<div class="section__title">
|
||||
Top destinations
|
||||
@@ -111,11 +111,11 @@
|
||||
{{TOTAL_TOP_DESTINATIONS_LIST}}
|
||||
</ul>
|
||||
</div>
|
||||
</section>{{BLOCKED_DESTINATIONS}}{{INFORMATION}}
|
||||
</section>{{BLOCKED_DESTINATIONS}}
|
||||
</div>
|
||||
</main>
|
||||
<div class="proxyService__copyright copyright">
|
||||
{{COPYRIGHT}} | FE by Trotsky | <a href="https://notabug.org/acetone/3proxy-eagle" target="_blank">source code</a>
|
||||
<a href="https://notabug.org/acetone/3proxy-eagle" target="_blank">3proxy-eagle</a> {{VERSION}} | {{COPYRIGHT}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -90,6 +90,8 @@ void ProxyInstanse::generateBlackList(const QStringList &domainsOrAddresses)
|
||||
continue;
|
||||
}
|
||||
|
||||
name.remove(' ');
|
||||
|
||||
QHostInfo host = QHostInfo::fromName(name);
|
||||
if (host.error() != QHostInfo::NoError)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user