mirror of https://github.com/Aidaho12/haproxy-wi
parent
9c749a0eb2
commit
3a82cfd432
|
@ -440,7 +440,7 @@ def update_db_v_3_5_3(**kwargs):
|
||||||
|
|
||||||
def update_ver(**kwargs):
|
def update_ver(**kwargs):
|
||||||
con, cur = get_cur()
|
con, cur = get_cur()
|
||||||
sql = """update version set version = '3.5.5'; """
|
sql = """update version set version = '3.5.6'; """
|
||||||
try:
|
try:
|
||||||
cur.execute(sql)
|
cur.execute(sql)
|
||||||
con.commit()
|
con.commit()
|
||||||
|
|
|
@ -347,8 +347,6 @@ if serv is not None and act == "configShow":
|
||||||
|
|
||||||
try:
|
try:
|
||||||
conf = open(cfg, "r")
|
conf = open(cfg, "r")
|
||||||
#conf = conf.read()
|
|
||||||
#conf = funct.escape_html(conf)
|
|
||||||
except IOError:
|
except IOError:
|
||||||
print('<div class="alert alert-danger">Can\'t read import config file</div>')
|
print('<div class="alert alert-danger">Can\'t read import config file</div>')
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
for ARGUMENT in "$@"
|
for ARGUMENT in "$@"
|
||||||
do
|
do
|
||||||
|
|
||||||
KEY=$(echo $ARGUMENT | cut -f1 -d=)
|
KEY=$(echo $ARGUMENT | cut -f1 -d=)
|
||||||
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
|
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
|
||||||
|
|
||||||
|
@ -16,8 +15,6 @@ do
|
||||||
STAT_FILE) STAT_FILE=${VALUE} ;;
|
STAT_FILE) STAT_FILE=${VALUE} ;;
|
||||||
*)
|
*)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $PROXY != "" ]]
|
if [[ $PROXY != "" ]]
|
||||||
|
@ -27,26 +24,22 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/haproxy/haproxy.cfg ];then
|
if [ -f /etc/haproxy/haproxy.cfg ];then
|
||||||
echo -e 'error: Haproxy already installed. You can edit config<a href="/app/config.py" title="Edit HAProxy config">here</a> <br /><br />'
|
echo -e 'Info: Haproxy already installed. You can edit config<a href="/app/config.py" title="Edit HAProxy config">here</a> <br /><br />'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
set +x
|
set +x
|
||||||
if hash apt-get 2>/dev/null; then
|
if hash apt-get 2>/dev/null; then
|
||||||
sudo apt-get install haproxy socat -y
|
sudo apt-get install haproxy socat -y
|
||||||
else
|
else
|
||||||
#wget http://cbs.centos.org/kojifiles/packages/haproxy/1.8.1/5.el7/x86_64/haproxy18-1.8.1-5.el7.x86_64.rpm
|
sudo wget https://repo.haproxy-wi.org/haproxy-2.0.6-1.el7.x86_64.rpm --no-check-certificate
|
||||||
wget http://au1.mirror.crc.id.au/repo/el7-extra/x86_64/haproxy-2.0.3-2.el7.x86_64.rpm
|
sudo yum install haproxy-2.0.6-1.el7.x86_64.rpm -y
|
||||||
#sudo yum install haproxy18-1.8.1-5.el7.x86_64.rpm -y
|
|
||||||
sudo yum install haproxy-2.0.3-2.el7.x86_64.rpm -y
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $? -eq 1 ]
|
if [ $? -eq 1 ]
|
||||||
then
|
then
|
||||||
sudo yum install wget socat -y > /dev/null
|
sudo yum install wget socat -y > /dev/null
|
||||||
#wget http://cbs.centos.org/kojifiles/packages/haproxy/1.8.1/5.el7/x86_64/haproxy18-1.8.1-5.el7.x86_64.rpm
|
sudo wget https://repo.haproxy-wi.org/haproxy-2.0.6-1.el7.x86_64.rpm --no-check-certificate
|
||||||
wget http://au1.mirror.crc.id.au/repo/el7-extra/x86_64/haproxy-2.0.3-2.el7.x86_64.rpm
|
sudo yum install haproxy-2.0.6-1.el7.x86_64.rpm -y
|
||||||
#sudo yum install haproxy18-1.8.1-5.el7.x86_64.rpm -y
|
|
||||||
sudo yum install haproxy-2.0.3-2.el7.x86_64.rpm -y
|
|
||||||
fi
|
fi
|
||||||
if [ $? -eq 1 ]
|
if [ $? -eq 1 ]
|
||||||
then
|
then
|
||||||
|
@ -57,8 +50,8 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bash -c 'echo "" > /tmp/haproxy.cfg'
|
sudo bash -c 'echo "" > /tmp/haproxy.cfg'
|
||||||
bash -c cat << EOF > /tmp/haproxy.cfg
|
sudo bash -c cat << EOF > /tmp/haproxy.cfg
|
||||||
global
|
global
|
||||||
log 127.0.0.1 local2
|
log 127.0.0.1 local2
|
||||||
chroot /var/lib/haproxy
|
chroot /var/lib/haproxy
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
if [[ $1 == "enable" ]]; then
|
if [[ $1 == "enable" ]]; then
|
||||||
if sudo grep -q "net.ipv4.tcp_syncookies = 1" /etc/sysctl.conf; then
|
if sudo grep -q "net.ipv4.tcp_syncookies = 1" /etc/sysctl.conf; then
|
||||||
echo "SYN flood protectd allready enabled"
|
echo "SYN flood protect has already enabled"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
sudo bash -c cat <<EOF >> /etc/sysctl.conf
|
sudo bash -c cat <<EOF >> /etc/sysctl.conf
|
||||||
|
|
|
@ -205,9 +205,7 @@ sudo systemctl restart waf
|
||||||
sudo rm -f /tmp/libevent-devel-2.0.21-4.el7.x86_64.rpm
|
sudo rm -f /tmp/libevent-devel-2.0.21-4.el7.x86_64.rpm
|
||||||
sudo rm -f /tmp/modsecurity-2.9.2.tar.gz
|
sudo rm -f /tmp/modsecurity-2.9.2.tar.gz
|
||||||
sudo rm -f /tmp/yajl-devel-2.0.4-4.el7.x86_64.rpm
|
sudo rm -f /tmp/yajl-devel-2.0.4-4.el7.x86_64.rpm
|
||||||
#sudo rm -rf /tmp/haproxy-$VERSION
|
|
||||||
sudo rm -rf /tmp/haproxy-$VERSION.tar.gz
|
sudo rm -rf /tmp/haproxy-$VERSION.tar.gz
|
||||||
#sudo rm -rf /tmp/modsecurity-2.9.2
|
|
||||||
|
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "error: Can't start Haproxy WAF service <br /><br />"
|
echo "error: Can't start Haproxy WAF service <br /><br />"
|
||||||
|
|
|
@ -177,6 +177,9 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||||
|
How to setup groups you can watch in this video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="servers">
|
<div id="servers">
|
||||||
<table class="overview" id="ajax-servers">
|
<table class="overview" id="ajax-servers">
|
||||||
|
@ -302,6 +305,7 @@
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=servers" title="Servers description" target="_blank">here</a>
|
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=servers" title="Servers description" target="_blank">here</a>
|
||||||
|
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -423,6 +427,7 @@
|
||||||
<div id="ajax-ssh"></div>
|
<div id="ajax-ssh"></div>
|
||||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=creds" title="Servers description" target="_blank">here</a>
|
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=creds" title="Servers description" target="_blank">here</a>
|
||||||
|
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ body, .container {
|
||||||
<input type="hidden" value="{{reff}}" name="ref" id="ref">
|
<input type="hidden" value="{{reff}}" name="ref" id="ref">
|
||||||
<button type="submit" name="Login" value="Enter" id="enter">Login</button>
|
<button type="submit" name="Login" value="Enter" id="enter">Login</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="alert alert-danger" style="display: none; margin-top: 220px;margin-right: -210px;width: 300px;">
|
<div class="alert alert-danger wrong-login">
|
||||||
Your login or password is incorrect
|
Your login or password is incorrect
|
||||||
<br />
|
<br />
|
||||||
<span id="ban_10">
|
<span id="ban_10">
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<tbody id="ajaxstatus"></tbody>
|
<tbody id="ajaxstatus"></tbody>
|
||||||
</table>
|
</table>
|
||||||
<table class="overview-wi" style="height: 170;">
|
<table class="overview-wi" style="height: 170;">
|
||||||
<tr class="overviewHead">
|
<tr class="overviewHead" style="height: 43px;">
|
||||||
<td class="padding10 first-collumn-wi">
|
<td class="padding10 first-collumn-wi">
|
||||||
{% if role <= 1 %}
|
{% if role <= 1 %}
|
||||||
<a href="/app/viewlogs.py?viewlogs=haproxy-wi-{{date}}.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View HAProxy-WI logs" class="logs_link">
|
<a href="/app/viewlogs.py?viewlogs=haproxy-wi-{{date}}.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View HAProxy-WI logs" class="logs_link">
|
||||||
|
|
|
@ -209,6 +209,7 @@
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=servers" title="Servers description" target="_blank">here</a>
|
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=servers" title="Servers description" target="_blank">here</a>
|
||||||
|
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -314,6 +315,7 @@
|
||||||
<div id="ajax-ssh"></div>
|
<div id="ajax-ssh"></div>
|
||||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=creds" title="Servers description" target="_blank">here</a>
|
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=creds" title="Servers description" target="_blank">here</a>
|
||||||
|
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -688,6 +688,12 @@ td,th {
|
||||||
background-color: #fff3cd;
|
background-color: #fff3cd;
|
||||||
border-color: #ffeeba;
|
border-color: #ffeeba;
|
||||||
}
|
}
|
||||||
|
.wrong-login {
|
||||||
|
display: none;
|
||||||
|
margin-top: 220px;
|
||||||
|
margin-right: 50px;
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
.validateTips {
|
.validateTips {
|
||||||
width: 540px;
|
width: 540px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -822,6 +828,14 @@ label {
|
||||||
width: 32.4%;
|
width: 32.4%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media (max-width: 1900px) {
|
||||||
|
#logo_span {
|
||||||
|
margin-left: 15%;
|
||||||
|
}
|
||||||
|
.wrong-login {
|
||||||
|
margin-right: -150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@media (max-width: 1080px) {
|
@media (max-width: 1080px) {
|
||||||
#logo_span {
|
#logo_span {
|
||||||
margin-left: -5%;
|
margin-left: -5%;
|
||||||
|
@ -835,6 +849,9 @@ label {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
}
|
}
|
||||||
|
.wrong-login {
|
||||||
|
margin-right: -50px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
#logo_span {
|
#logo_span {
|
||||||
|
@ -849,6 +866,27 @@ label {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
}
|
}
|
||||||
|
.wrong-login {
|
||||||
|
margin-right: -150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
#logo_span {
|
||||||
|
margin-left: -12%;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.chart-container {
|
||||||
|
position: relative;
|
||||||
|
height: 410px;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
.overview-wi {
|
||||||
|
width: 95%;
|
||||||
|
max-width: 95%;
|
||||||
|
}
|
||||||
|
.wrong-login {
|
||||||
|
margin-right: -260px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 667px) {
|
@media (max-width: 667px) {
|
||||||
#logo_span {
|
#logo_span {
|
||||||
|
@ -864,20 +902,8 @@ label {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
}
|
}
|
||||||
}
|
.wrong-login {
|
||||||
@media (max-width: 768px) {
|
margin-right: -210px;
|
||||||
#logo_span {
|
|
||||||
margin-left: -12%;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.chart-container {
|
|
||||||
position: relative;
|
|
||||||
height: 410px;
|
|
||||||
width: 95%;
|
|
||||||
}
|
|
||||||
.overview-wi {
|
|
||||||
width: 95%;
|
|
||||||
max-width: 95%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.loading, .loading_full_page, .loading_hapwi_overview {
|
.loading, .loading_full_page, .loading_hapwi_overview {
|
||||||
|
|
Loading…
Reference in New Issue