Skip to content

Commit 1039a99

Browse files
committed
add speedtest web-ui tool
1 parent 641d85c commit 1039a99

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
## version 1.6.0rc1
55
- add support for ubuntu 24.04 (LTS)
6+
- add speedtest web-ui tool
67

78
## version 1.5.1rc1
89
- fix salt installation and change to new salt repo
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
# Show Tools only for internal FFDD-Network clients
3+
4+
# FFDD-Network
5+
ALLOWED_IP="10.200.0.0/15"
6+
# get REMOTE_ADDR from CGI ENV
7+
IP="$REMOTE_ADDR"
8+
9+
check_cidr="/usr/bin/grepcidr $ALLOWED_IP <(echo $IP) >/dev/null"
10+
eval "$check_cidr"
11+
12+
hostname_short="$(cat /etc/hostname | awk -F'.' '{print $1}')"
13+
14+
# exclude network != FFDD-Network and NAT'ed Rules from ipX/nodeX.freifunk-dresden.de
15+
if [ "$?" -eq 0 ] && [ "$IP" != '10.200.0.1' ]; then
16+
if [ "$(uci -qX get ffdd.sys.apache_ddos_prevent)" -eq '0' ]; then
17+
cat <<-EOM
18+
<TR><TD><BIG CLASS="plugin">Tools</BIG></TD></TR>
19+
<TR><TD><DIV CLASS="plugin"><A CLASS="plugin" TARGET="_blank" HREF="http://speedtest.$hostname_short.ffdd/">Speedtest</A></DIV></TD></TR>
20+
EOM
21+
fi
22+
fi

salt/freifunk/base/ddmesh/var/www_freifunk/css/ff.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ A:active {
6363
color: crimson;
6464
}
6565
A:hover {
66-
color: darkmagenta;
66+
color: darkmagenta;
6767
}
6868
A.form:link,A.form:visited,A.form:active,
6969
A.color:link,A.color:visited,A.color:active,
@@ -360,4 +360,3 @@ form
360360
border: 0px;
361361
text-align: right;
362362
}
363-

salt/freifunk/base/tools/etc/apache2/sites-available/speedtest-backend.conf.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
# redirect if not found, to avoid displaying other internal stuff
77
ErrorDocument 404 /
88

9-
DocumentRoot /var/www_speedtest/backend
10-
<Directory /var/www_speedtest/backend>
9+
Header set Access-Control-Allow-Origin '*'
10+
11+
DocumentRoot /var/www_speedtest
12+
<Directory /var/www_speedtest>
1113
AllowOverride None
1214
Options -Indexes +MultiViews +FollowSymLinks +Includes
1315
Require all granted

0 commit comments

Comments
 (0)