From 9d829406d15d1d9d3608b7d9c3028d6668f8d205 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Sat, 14 Sep 2019 23:01:34 -0400 Subject: [PATCH 1/6] Add nft support --- installers/common.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index d75a4c7..e1d9e95 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -7,6 +7,7 @@ version=`sed 's/\..*//' /etc/debian_version` # php package to install if [ $version -eq 10 ]; then version_msg="Raspbian 10.0 (Buster)" + sudo apt update --allow-releaseinfo-change php_package="php7.1-cgi" elif [ $version -eq 9 ]; then version_msg="Raspbian 9.0 (Stretch)" @@ -214,13 +215,24 @@ function default_configuration() { sudo chmod 755 /var/lib/lokinet/lokilaunch.sh # Generate required lines for Rasp AP to place into rc.local file. - # #RASPAP is for removal script + # #RASPAP is for removal + # select iptables or nftables + + function networktables() { + if [ ! -f /usr/sbin/iptables-nft ]; then + tablerouteA='iptables -t nat -A POSTROUTING -s 10.3.141.0\/24 -o lokitun0 -j MASQUERADE #RASPAP' + tablerouteB='iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP' + else + sudo apt-get -y install nftables + tablerouteA='nft add rule ip nat POSTROUTING oifname "lokitun0" ip saddr 10.3.141.0\/24 counter masquerade #RASPAP' + tablerouteB='nft add rule ip nat POSTROUTING counter masquerade #RASPAP' + } + lines=( - 'echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward #RASPAP' - 'iptables -t nat -A POSTROUTING -s 10.3.141.0\/24 -o lokitun0 -j MASQUERADE #RASPAP' - 'iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP' + 'echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward #RASPAP') + $tablerouteA + $tablerouteB 'sudo \/var\/lib\/lokinet\/.\/lokilaunch.sh start #RASPAP' - ) for line in "${lines[@]}"; do From 2b2a0b70a55c06dae05c1d37c967fc6aef4a61f5 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Sat, 14 Sep 2019 23:02:07 -0400 Subject: [PATCH 2/6] change raw URL to master --- installers/raspbian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/raspbian.sh b/installers/raspbian.sh index f416675..85dc2e0 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -1,4 +1,4 @@ -UPDATE_URL="https://raw.githubusercontent.com/necro-nemesis/Lokiap-webgui/staging/" +UPDATE_URL="https://raw.githubusercontent.com/necro-nemesis/Lokiap-webgui/master/" wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/raspapcommon.sh source /tmp/raspapcommon.sh && rm -f /tmp/raspapcommon.sh From e3b8756a1c889aef19af11f0feae8429cd6a86ef Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Sun, 15 Sep 2019 02:17:09 -0400 Subject: [PATCH 3/6] Reduce bootstrap messages --- config/lokilaunch.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/config/lokilaunch.sh b/config/lokilaunch.sh index 2b1e22c..b128fd7 100644 --- a/config/lokilaunch.sh +++ b/config/lokilaunch.sh @@ -28,14 +28,11 @@ case "$1" in ;; bootstrap) - echo -n "LOKINET DICONNECTED AND DAEMON SHUTDOWN FOR BOOTSTRAPPING\n" - pkill lokinet - sleep 2 - pidof lokinet >/dev/null && echo "Service is running\n" || echo "Service NOT running\n" - echo -n "FETCH BOOTSTRAP <---- " - lokinet-bootstrap "$2" - echo -n "SUCCESS! BOOTSTRAPPED WTIH ---> $2\n\n" - echo -n "YOU MUST MANUALLY RESTART LOKINET DAEMON AND RECONNECT FOR SERVICE\n" + systemctl stop lokinet + echo -n "FETCHING BOOTSTRAP <---- " + usr/bin/lokinet-bootstrap "$2" + echo -n "BOOTSTRAPPED WTIH ---> $2\n\n" + systemctl start lokinet ;; *) From eb1327ca8f8fac8a94c58f69f8a545c6c126ee12 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 17 Sep 2019 18:26:36 -0400 Subject: [PATCH 4/6] Loki theme --- dist/css/custom.css | 36 +++++++++++++++++++++++++++--------- index.php | 2 +- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/dist/css/custom.css b/dist/css/custom.css index 2a35d8d..12c9031 100644 --- a/dist/css/custom.css +++ b/dist/css/custom.css @@ -1,32 +1,50 @@ +.body { + background-color: #000000; +} + +html * { + font-family: Arial, Andale Mono, monospace; + font-size: 10pt; + color: #33ff00; + background-color: #152010; +} + + .page-header { - margin: 20px 0 20px; + margin: 10px 0 10px; + font-size: 20pt; + color: #ffffff; + } .page-header .logo { margin-right: 5px; + background-color: #152010; + } .panel-primary { - border-color: #c61931; + border-color: #33ff00; + background-color: #0C1309; } .panel-primary>.panel-heading { - border-color: #d8224c; - background-color: #5f9e12; + border-color: #33ff00; + background-color: #0C1309; } .panel-footer { - background-color: #f2f1f0; + background-color: #0C1309; } .btn-primary.btn-outline { - color: #c61931; - border-color: #c61931; + color: #d8224c; + border-color: #d8224c; } .btn-primary:hover { - background-color: #c61931; - border-color: #c61931; + background-color: #d8224c; + border-color: #d8224c; } .info-item { diff --git a/index.php b/index.php index f309141..b655e04 100755 --- a/index.php +++ b/index.php @@ -105,7 +105,7 @@ $theme_url = 'dist/css/'.htmlspecialchars($theme, ENT_QUOTES); - v + v From 472b211b36bb3ff4be3ba23bcd56b7003499db10 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 17 Sep 2019 21:27:16 -0400 Subject: [PATCH 5/6] More theme settings --- dist/css/custom.css | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dist/css/custom.css b/dist/css/custom.css index 12c9031..0283222 100644 --- a/dist/css/custom.css +++ b/dist/css/custom.css @@ -1,5 +1,5 @@ .body { - background-color: #000000; + background: #000000 !important; } html * { @@ -9,16 +9,19 @@ html * { background-color: #152010; } +#wrapper,#page-wrapper,.panel-body,.nav>li>a,.navbar-default { + background-color: #152010; +} .page-header { margin: 10px 0 10px; - font-size: 20pt; + font-size: 28pt; color: #ffffff; } .page-header .logo { - margin-right: 5px; + margin-right: 1px; background-color: #152010; } @@ -42,6 +45,11 @@ html * { border-color: #d8224c; } +.btn-danger.btn-outline { + color: #d8224c; + border-color: #d8224c; +} + .btn-primary:hover { background-color: #d8224c; border-color: #d8224c; From 9bef6d4e99581f8dc6b338336dcc1b05ec8dff3c Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 17 Sep 2019 21:34:53 -0400 Subject: [PATCH 6/6] Change tab name --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index b655e04..483d38f 100755 --- a/index.php +++ b/index.php @@ -62,7 +62,7 @@ $theme_url = 'dist/css/'.htmlspecialchars($theme, ENT_QUOTES); - <?php echo _("Raspbian WiFi Configuration Portal"); ?> + <?php echo _("LokiAP"); ?>