From 50ab349d1b3b0e2f700806baf0a335e88f68807c Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Thu, 30 Sep 2021 11:04:57 +0100 Subject: [PATCH 01/27] Custom settings --- app/js/custom.js | 2 +- app/js/custom.min.js | 2 +- config/config.php | 6 +++--- config/defaults.json | 6 +++--- config/dhcpcd.conf | 8 ++++---- config/hostapd.conf | 9 +++++---- installers/common.sh | 2 +- installers/raspapd.service | 2 +- installers/uninstall.sh | 2 +- templates/wifi_stations.php | 29 +++++++++++++++++++++++++++++ 10 files changed, 49 insertions(+), 19 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index da92097d..7edb4187 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -341,7 +341,7 @@ $(document).on("click", ".js-toggle-password", function(e) { } }); -$(document).on("keyup", ".js-validate-psk", function(e) { +$(document).on("input", ".js-validate-psk", function(e) { var field = $(e.target); var colors = field.data("colors").split(","); var target = $(field.data("target")); diff --git a/app/js/custom.min.js b/app/js/custom.min.js index 67444fb6..23a7c9b2 100644 --- a/app/js/custom.min.js +++ b/app/js/custom.min.js @@ -4,4 +4,4 @@ * Licensed under MIT (https://github.com/raspap-webgui/raspap-webgui/blob/master/LICENSE) */ -function msgShow(t,a){if(0==t)var e="success";else if(2==t||1==t)e="danger";return'"}function createNetmaskAddr(t){var a=[];for(i=0;i<4;i++){var e=Math.min(t,8);a.push(256-Math.pow(2,8-e)),t-=e}return a.join(".")}function loadSummary(a){$.post("/ajax/networking/get_ip_summary.php",{interface:a},function(t){jsonData=JSON.parse(t),console.log(jsonData),0==jsonData.return?$("#"+a+"-summary").html(jsonData.output.join("
")):2==jsonData.return&&$("#"+a+"-summary").append('")})}function getAllInterfaces(){$.get("/ajax/networking/get_all_interfaces.php",function(t){jsonData=JSON.parse(t),$.each(jsonData,function(t,a){loadSummary(a)})})}function setupTabs(){$('a[data-toggle="tab"]').on("shown.bs.tab",function(t){var a=$(t.target).attr("href");a.match("summary")||loadCurrentSettings(a.replace("#",""))})}function loadCurrentSettings(t){$.post("/ajax/networking/get_int_config.php",{interface:t},function(t){jsonData=JSON.parse(t),$.each(jsonData.output,function(t,a){var n=a.interface;$.each(a,function(t,a){switch(t){case"static":"true"==a?($("#"+n+"-static").click(),$("#"+n+"-nofailover").click()):$("#"+n+"-dhcp").click();break;case"failover":"true"===a?$("#"+n+"-failover").click():$("#"+n+"-nofailover").click();break;case"ip_address":var e=a.split("/");$("#"+n+"-ipaddress").val(e[0]),$("#"+n+"-netmask").val(createNetmaskAddr(e[1]));break;case"routers":$("#"+n+"-gateway").val(a);break;case"domain_name_server":svrsDNS=a.split(" "),$("#"+n+"-dnssvr").val(svrsDNS[0]),$("#"+n+"-dnssvralt").val(svrsDNS[1])}})})})}function saveNetworkSettings(t){var a=$("#frm-"+t).find(":input"),e={};$.each(a,function(t,a){"radio"==$(a).attr("type")?e[$(a).attr("id")]=$(a).prop("checked"):e[$(a).attr("id")]=$(a).val()}),e.interface=t,$.post("/ajax/networking/save_int_config.php",e,function(t){var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function applyNetworkSettings(){$(this).data("int");arrFormData={generate:""},$.post("/ajax/networking/gen_int_config.php",arrFormData,function(t){console.log(t);var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function setupBtns(){$("#btnSummaryRefresh").click(function(){getAllInterfaces()}),$(".intsave").click(function(){saveNetworkSettings($(this).data("int"))}),$(".intapply").click(function(){applyNetworkSettings()})}function setCSRFTokenHeader(t,a,e){var n=$("meta[name=csrf_token]").attr("content");/^(POST|PATCH|PUT|DELETE)$/i.test(e.type)&&a.setRequestHeader("X-CSRF-Token",n)}function contentLoaded(){switch(pageCurrent=window.location.href.split("?")[1].split("=")[1],pageCurrent=pageCurrent.replace("#",""),$("#side-menu").metisMenu(),pageCurrent){case"network_conf":getAllInterfaces(),setupTabs(),setupBtns()}}function loadWifiStations(a){return function(){var t=!0===a?"?refresh":"";$(".js-wifi-stations").addClass("loading-spinner").empty().load("/ajax/networking/wifi_stations.php"+t,function(){$(this).removeClass("loading-spinner")})}}$(document).on("click",".js-add-dhcp-static-lease",function(t){t.preventDefault();var a=$(".js-new-dhcp-static-lease"),e=$("input[name=mac]",a).val().trim(),n=$("input[name=ip]",a).val().trim();if(""!=e&&""!=n){var i=$("#js-dhcp-static-lease-row").html().replace("{{ mac }}",e).replace("{{ ip }}",n);$(".js-dhcp-static-lease-container").append(i),$("input[name=mac]",a).val(""),$("input[name=ip]",a).val("")}}),$(document).on("click",".js-remove-dhcp-static-lease",function(t){t.preventDefault(),$(this).parents(".js-dhcp-static-lease-row").remove()}),$(document).on("submit",".js-dhcp-settings-form",function(t){$(".js-add-dhcp-static-lease").trigger("click")}),$(".js-reload-wifi-stations").on("click",loadWifiStations(!0)),$(document).on("click",".js-toggle-password",function(t){var a=$(t.target),e=$(a.data("target"));e.is(":input")&&(t.preventDefault(),a.data("__toggle-with-initial")||a.data("__toggle-with-initial",a.text()),"password"===e.attr("type")?(a.text(a.data("toggle-with")),e.attr("type","text")):(a.text(a.data("__toggle-with-initial")),e.attr("type","password")))}),$(document).on("keyup",".js-validate-psk",function(t){var a=$(t.target),e=a.data("colors").split(","),n=$(a.data("target"));a.val().length<8||63'+a+""}function createNetmaskAddr(t){var a=[];for(i=0;i<4;i++){var e=Math.min(t,8);a.push(256-Math.pow(2,8-e)),t-=e}return a.join(".")}function loadSummary(a){$.post("/ajax/networking/get_ip_summary.php",{interface:a},function(t){jsonData=JSON.parse(t),console.log(jsonData),0==jsonData.return?$("#"+a+"-summary").html(jsonData.output.join("
")):2==jsonData.return&&$("#"+a+"-summary").append('")})}function getAllInterfaces(){$.get("/ajax/networking/get_all_interfaces.php",function(t){jsonData=JSON.parse(t),$.each(jsonData,function(t,a){loadSummary(a)})})}function setupTabs(){$('a[data-toggle="tab"]').on("shown.bs.tab",function(t){var a=$(t.target).attr("href");a.match("summary")||loadCurrentSettings(a.replace("#",""))})}function loadCurrentSettings(t){$.post("/ajax/networking/get_int_config.php",{interface:t},function(t){jsonData=JSON.parse(t),$.each(jsonData.output,function(t,a){var n=a.interface;$.each(a,function(t,a){switch(t){case"static":"true"==a?($("#"+n+"-static").click(),$("#"+n+"-nofailover").click()):$("#"+n+"-dhcp").click();break;case"failover":"true"===a?$("#"+n+"-failover").click():$("#"+n+"-nofailover").click();break;case"ip_address":var e=a.split("/");$("#"+n+"-ipaddress").val(e[0]),$("#"+n+"-netmask").val(createNetmaskAddr(e[1]));break;case"routers":$("#"+n+"-gateway").val(a);break;case"domain_name_server":svrsDNS=a.split(" "),$("#"+n+"-dnssvr").val(svrsDNS[0]),$("#"+n+"-dnssvralt").val(svrsDNS[1])}})})})}function saveNetworkSettings(t){var a=$("#frm-"+t).find(":input"),e={};$.each(a,function(t,a){"radio"==$(a).attr("type")?e[$(a).attr("id")]=$(a).prop("checked"):e[$(a).attr("id")]=$(a).val()}),e.interface=t,$.post("/ajax/networking/save_int_config.php",e,function(t){var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function applyNetworkSettings(){$(this).data("int");arrFormData={generate:""},$.post("/ajax/networking/gen_int_config.php",arrFormData,function(t){console.log(t);var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function setupBtns(){$("#btnSummaryRefresh").click(function(){getAllInterfaces()}),$(".intsave").click(function(){saveNetworkSettings($(this).data("int"))}),$(".intapply").click(function(){applyNetworkSettings()})}function setCSRFTokenHeader(t,a,e){var n=$("meta[name=csrf_token]").attr("content");/^(POST|PATCH|PUT|DELETE)$/i.test(e.type)&&a.setRequestHeader("X-CSRF-Token",n)}function contentLoaded(){switch(pageCurrent=window.location.href.split("?")[1].split("=")[1],pageCurrent=pageCurrent.replace("#",""),$("#side-menu").metisMenu(),pageCurrent){case"network_conf":getAllInterfaces(),setupTabs(),setupBtns()}}function loadWifiStations(a){return function(){var t=!0===a?"?refresh":"";$(".js-wifi-stations").addClass("loading-spinner").empty().load("/ajax/networking/wifi_stations.php"+t,function(){$(this).removeClass("loading-spinner")})}}$(document).on("click",".js-add-dhcp-static-lease",function(t){t.preventDefault();var a=$(".js-new-dhcp-static-lease"),e=$("input[name=mac]",a).val().trim(),n=$("input[name=ip]",a).val().trim();if(""!=e&&""!=n){var i=$("#js-dhcp-static-lease-row").html().replace("{{ mac }}",e).replace("{{ ip }}",n);$(".js-dhcp-static-lease-container").append(i),$("input[name=mac]",a).val(""),$("input[name=ip]",a).val("")}}),$(document).on("click",".js-remove-dhcp-static-lease",function(t){t.preventDefault(),$(this).parents(".js-dhcp-static-lease-row").remove()}),$(document).on("submit",".js-dhcp-settings-form",function(t){$(".js-add-dhcp-static-lease").trigger("click")}),$(".js-reload-wifi-stations").on("click",loadWifiStations(!0)),$(document).on("click",".js-toggle-password",function(t){var a=$(t.target),e=$(a.data("target"));e.is(":input")&&(t.preventDefault(),a.data("__toggle-with-initial")||a.data("__toggle-with-initial",a.text()),"password"===e.attr("type")?(a.text(a.data("toggle-with")),e.attr("type","text")):(a.text(a.data("__toggle-with-initial")),e.attr("type","password")))}),$(document).on("input",".js-validate-psk",function(t){var a=$(t.target),e=a.data("colors").split(","),n=$(a.data("target"));a.val().length<8||63 /dev/null; then diff --git a/installers/raspapd.service b/installers/raspapd.service index c5738465..7ec927f8 100644 --- a/installers/raspapd.service +++ b/installers/raspapd.service @@ -12,7 +12,7 @@ [Unit] Description=RaspAP Service Daemon DefaultDependencies=no -After=multi-user.target +After=network.target [Service] Type=oneshot diff --git a/installers/uninstall.sh b/installers/uninstall.sh index d0a3d9fb..4f155cac 100755 --- a/installers/uninstall.sh +++ b/installers/uninstall.sh @@ -158,7 +158,7 @@ function _restore_networking() { echo "Checking iptables rules" rules=( "-A POSTROUTING -j MASQUERADE" - "-A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE" + "-A POSTROUTING -s 192.168.200.0/24 ! -d 192.168.200.0/24 -j MASQUERADE" ) for rule in "${rules[@]}"; do if grep -- "$rule" $rulesv4 > /dev/null; then diff --git a/templates/wifi_stations.php b/templates/wifi_stations.php index 6949a51a..32cf8760 100755 --- a/templates/wifi_stations.php +++ b/templates/wifi_stations.php @@ -45,3 +45,32 @@ + +

+
+
+
+ + + +
+
+ +
+
+ +
+ +
+
+
+ +
+ " id="update" name="update" data-toggle="modal" data-target="#configureClientModal" /> +
+
+
+ + + +
From fd1c48b710bc730daefd583f3c97e2d3d434c81d Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Tue, 19 Oct 2021 18:51:44 +0200 Subject: [PATCH 02/27] Automated ssid and country code updates --- config/hostapd.conf | 2 +- installers/servicestart.sh | 64 ++++++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/config/hostapd.conf b/config/hostapd.conf index be3f7a71..792989f5 100644 --- a/config/hostapd.conf +++ b/config/hostapd.conf @@ -12,6 +12,7 @@ interface=uap0 wpa=2 wpa_pairwise=CCMP country_code=IT +ignore_broadcast_ssid=0 ## Rapberry Pi 3 specific to on board WLAN/WiFi #ieee80211n=1 # 802.11n support (Raspberry Pi 3) #wmm_enabled=1 # QoS support (Raspberry Pi 3) @@ -22,4 +23,3 @@ country_code=IT ## RaspAP bridge AP mode (disabled by default) #bridge=br0 -ignore_broadcast_ssid=0 diff --git a/installers/servicestart.sh b/installers/servicestart.sh index 377678ca..fa0edbe4 100755 --- a/installers/servicestart.sh +++ b/installers/servicestart.sh @@ -10,27 +10,26 @@ DAEMONPATH="/lib/systemd/system/raspapd.service" OPENVPNENABLED=$(pidof openvpn | wc -l) positional=() -while [[ $# -gt 0 ]] -do -key="$1" +while [[ $# -gt 0 ]]; do + key="$1" -case $key in - -i|--interface) - interface="$2" - shift # past argument - shift # past value - ;; - -s|--seconds) - seconds="$2" - shift - shift - ;; - -a|--action) - action="$2" - shift - shift - ;; -esac + case $key in + -i | --interface) + interface="$2" + shift # past argument + shift # past value + ;; + -s | --seconds) + seconds="$2" + shift + shift + ;; + -a | --action) + action="$2" + shift + shift + ;; + esac done set -- "${positional[@]}" @@ -48,6 +47,24 @@ if [ "${action}" = "stop" ]; then exit 0 fi +HOSTAPD_CONF="/etc/hostapd/hostapd.conf" + +old_ssid=$(grep ^ssid $HOSTAPD_CONF | cut -d "=" -f 2) +new_ssid="isobox-$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2)" + +if [[ "$old_ssid" != "$new_ssid" ]]; then + sed -i "s/$old_ssid/$new_ssid/" $HOSTAPD_CONF + echo "Updated ssid: $new_ssid" +fi + +new_country_code=$(curl -s -H "Authorization: Bearer 9da1eb466ed052" https://ipinfo.io/json | jq -r ".country // empty") +old_country_code=$(grep ^country_code $HOSTAPD_CONF | cut -d "=" -f 2) + +if [[ ! -z "$new_country_code" ]] && [[ "$old_country_code" != "$new_country_code" ]]; then + sed -i "s/$old_country_code/$new_country_code/" $HOSTAPD_CONF + echo "Updated country code: $new_country_code" +fi + if [ -f "$DAEMONPATH" ] && [ ! -z "$interface" ]; then echo "Changing RaspAP Daemon --interface to $interface" sed -i "s/\(--interface \)[[:alnum:]]*/\1$interface/" "$DAEMONPATH" @@ -57,7 +74,7 @@ if [ -r "$CONFIGFILE" ]; then declare -A config while IFS=" = " read -r key value; do config["$key"]="$value" - done < "$CONFIGFILE" + done <"$CONFIGFILE" if [ "${config[BridgedEnable]}" = 1 ]; then if [ "${interface}" = "br0" ]; then @@ -79,7 +96,7 @@ if [ -r "$CONFIGFILE" ]; then echo "Disabling systemd-networkd" systemctl disable systemd-networkd - ip link ls up | grep -q 'br0' &> /dev/null + ip link ls up | grep -q 'br0' &>/dev/null if [ $? == 0 ]; then echo "Removing br0 interface..." ip link set down br0 @@ -89,7 +106,7 @@ if [ -r "$CONFIGFILE" ]; then if [ "${config[WifiAPEnable]}" = 1 ]; then if [ "${interface}" = "uap0" ]; then - ip link ls up | grep -q 'uap0' &> /dev/null + ip link ls up | grep -q 'uap0' &>/dev/null if [ $? == 0 ]; then echo "Removing uap0 interface..." iw dev uap0 del @@ -127,4 +144,3 @@ if [ "${config[WifiAPEnable]}" = 1 ]; then fi echo "RaspAP service start DONE" - From ec2e0af7db1a46b211c3ddc1c576e9237e3ae26b Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Tue, 19 Oct 2021 19:30:47 +0200 Subject: [PATCH 03/27] Hostname automatic update --- installers/servicestart.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/installers/servicestart.sh b/installers/servicestart.sh index fa0edbe4..c4bc1eb3 100755 --- a/installers/servicestart.sh +++ b/installers/servicestart.sh @@ -50,7 +50,8 @@ fi HOSTAPD_CONF="/etc/hostapd/hostapd.conf" old_ssid=$(grep ^ssid $HOSTAPD_CONF | cut -d "=" -f 2) -new_ssid="isobox-$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2)" +rpi_serial=$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2) +new_ssid="isobox-$rpi_serial" if [[ "$old_ssid" != "$new_ssid" ]]; then sed -i "s/$old_ssid/$new_ssid/" $HOSTAPD_CONF @@ -65,6 +66,15 @@ if [[ ! -z "$new_country_code" ]] && [[ "$old_country_code" != "$new_country_cod echo "Updated country code: $new_country_code" fi +old_hostname=$(hostname) +new_hostname=$(isobox-$rpi_serial) + +if [[ "$old_hostname" != "$new_hostname" ]]; then + echo $new_hostname >/etc/hostname + sed -i "s/$old_hostname/$new_hostname/" /etc/hosts + hostname $new_hostname +fi + if [ -f "$DAEMONPATH" ] && [ ! -z "$interface" ]; then echo "Changing RaspAP Daemon --interface to $interface" sed -i "s/\(--interface \)[[:alnum:]]*/\1$interface/" "$DAEMONPATH" From 6a08924dd19d4370bfe54d9d9a44c17487e9f2e1 Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Tue, 19 Oct 2021 20:23:19 +0200 Subject: [PATCH 04/27] servicestart.sh fixes --- installers/servicestart.sh | 57 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/installers/servicestart.sh b/installers/servicestart.sh index c4bc1eb3..0c3cc557 100755 --- a/installers/servicestart.sh +++ b/installers/servicestart.sh @@ -33,6 +33,35 @@ while [[ $# -gt 0 ]]; do done set -- "${positional[@]}" +HOSTAPD_CONF="/etc/hostapd/hostapd.conf" + +new_country_code=$(curl -s -H "Authorization: Bearer 9da1eb466ed052" https://ipinfo.io/json | jq -r ".country // empty") +old_country_code=$(grep ^country_code $HOSTAPD_CONF | cut -d "=" -f 2) + +if [[ ! -z "$new_country_code" ]] && [[ "$old_country_code" != "$new_country_code" ]]; then + sudo sed -i "s/country_code=$old_country_code/country_code=$new_country_code/" /etc/hostapd/hostapd.conf + echo "Updated country code: $new_country_code" +fi + +old_ssid=$(grep ^ssid $HOSTAPD_CONF | cut -d "=" -f 2) +rpi_serial=$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2) +new_ssid="isobox-$rpi_serial" + +if [[ "$old_ssid" != "$new_ssid" ]]; then + sed -i "s/ssid=$old_ssid/ssid=$new_ssid/" $HOSTAPD_CONF + echo "Updated ssid: $new_ssid" +fi + +old_hostname=$(hostname) +new_hostname="isobox-$rpi_serial" + +if [[ "$old_hostname" != "$new_hostname" ]]; then + echo $new_hostname >/etc/hostname + sed -i "s/$old_hostname/$new_hostname/" /etc/hosts + hostname $new_hostname + echo "Updated hostname: $new_hostname" +fi + echo "Stopping network services..." if [ $OPENVPNENABLED -eq 1 ]; then systemctl stop openvpn-client@client @@ -47,34 +76,6 @@ if [ "${action}" = "stop" ]; then exit 0 fi -HOSTAPD_CONF="/etc/hostapd/hostapd.conf" - -old_ssid=$(grep ^ssid $HOSTAPD_CONF | cut -d "=" -f 2) -rpi_serial=$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2) -new_ssid="isobox-$rpi_serial" - -if [[ "$old_ssid" != "$new_ssid" ]]; then - sed -i "s/$old_ssid/$new_ssid/" $HOSTAPD_CONF - echo "Updated ssid: $new_ssid" -fi - -new_country_code=$(curl -s -H "Authorization: Bearer 9da1eb466ed052" https://ipinfo.io/json | jq -r ".country // empty") -old_country_code=$(grep ^country_code $HOSTAPD_CONF | cut -d "=" -f 2) - -if [[ ! -z "$new_country_code" ]] && [[ "$old_country_code" != "$new_country_code" ]]; then - sed -i "s/$old_country_code/$new_country_code/" $HOSTAPD_CONF - echo "Updated country code: $new_country_code" -fi - -old_hostname=$(hostname) -new_hostname=$(isobox-$rpi_serial) - -if [[ "$old_hostname" != "$new_hostname" ]]; then - echo $new_hostname >/etc/hostname - sed -i "s/$old_hostname/$new_hostname/" /etc/hosts - hostname $new_hostname -fi - if [ -f "$DAEMONPATH" ] && [ ! -z "$interface" ]; then echo "Changing RaspAP Daemon --interface to $interface" sed -i "s/\(--interface \)[[:alnum:]]*/\1$interface/" "$DAEMONPATH" From 6a361b80aa8b0d3f667814a2dcde920ff62bece7 Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Sat, 23 Oct 2021 14:27:36 +0200 Subject: [PATCH 05/27] Update 50-raspap-router.conf --- config/50-raspap-router.conf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config/50-raspap-router.conf b/config/50-raspap-router.conf index 1c10d26f..249c7c9a 100644 --- a/config/50-raspap-router.conf +++ b/config/50-raspap-router.conf @@ -1,9 +1,8 @@ server.modules += ( - "mod_rewrite", + "mod_rewrite", ) -$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" { - url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" ) - server.error-handler-404 = "/REPLACE_ME/index.php" +$HTTP["url"] =~ "^/var/www/html/(?!(dist|app|ajax|config)).*" { + url.rewrite-once = ( "^/var/www/html/(.*?)(\?.+)?$"=>"/var/www/html/index.php/$1$2" ) + server.error-handler-404 = "/var/www/html/index.php" } - From 70088732777ed2749b9ffaaee6e5cdee0b939e48 Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Sat, 23 Oct 2021 16:22:50 +0200 Subject: [PATCH 06/27] Update 50-raspap-router.conf --- config/50-raspap-router.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/50-raspap-router.conf b/config/50-raspap-router.conf index 249c7c9a..0248d545 100644 --- a/config/50-raspap-router.conf +++ b/config/50-raspap-router.conf @@ -1,8 +1,8 @@ server.modules += ( - "mod_rewrite", + "mod_rewrite", ) -$HTTP["url"] =~ "^/var/www/html/(?!(dist|app|ajax|config)).*" { - url.rewrite-once = ( "^/var/www/html/(.*?)(\?.+)?$"=>"/var/www/html/index.php/$1$2" ) - server.error-handler-404 = "/var/www/html/index.php" +$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" { + url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" ) + server.error-handler-404 = "/REPLACE_ME/index.php" } From 6b276a8c4e703008a74dd04a1a30ba7d6ec4ad82 Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Sat, 23 Oct 2021 16:38:28 +0200 Subject: [PATCH 07/27] Update 50-raspap-router.conf --- config/50-raspap-router.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/50-raspap-router.conf b/config/50-raspap-router.conf index 0248d545..23c13b2d 100644 --- a/config/50-raspap-router.conf +++ b/config/50-raspap-router.conf @@ -1,8 +1,8 @@ server.modules += ( - "mod_rewrite", + "mod_rewrite", ) -$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" { - url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" ) - server.error-handler-404 = "/REPLACE_ME/index.php" +$HTTP["url"] =~ "^/(?!(dist|app|ajax|config)).*" { + url.rewrite-once = ( "^/(.*?)(\?.+)?$"=>"/index.php/$1$2" ) + server.error-handler-404 = "/index.php" } From 4b6db8bb1bef5e1fb15b02ed139dcd9d2bd8ae6f Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 25 Jan 2022 08:36:14 +0000 Subject: [PATCH 08/27] Apply zbchristian/fix-wireguard conf --- includes/wireguard.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/wireguard.php b/includes/wireguard.php index 8718a2dd..dfe04d5c 100644 --- a/includes/wireguard.php +++ b/includes/wireguard.php @@ -18,6 +18,8 @@ function DisplayWireGuardConfig() SaveWireGuardConfig($status); } elseif (isset($_POST['savewgsettings']) && $optConf == 'upload' && is_uploaded_file($_FILES["wgFile"]["tmp_name"])) { SaveWireGuardUpload($status, $_FILES['wgFile'], $optRules); + } elseif (isset($_POST['savewgsettings']) && isset($_POST['wg_penabled']) ) { + SaveWireGuardConfig($status); } elseif (isset($_POST['startwg'])) { $status->addMessage('Attempting to start WireGuard', 'info'); exec('sudo /bin/systemctl start wg-quick@wg0', $return); @@ -166,7 +168,7 @@ function SaveWireGuardConfig($status) $good_input = true; $peer_id = 1; // Validate server input - if ($_POST['wg_senabled'] == 1) { + if ($_POST['wgSrvEnable'] == 1) { if (isset($_POST['wg_srvport'])) { if (strlen($_POST['wg_srvport']) > 5 || !is_numeric($_POST['wg_srvport'])) { $status->addMessage('Invalid value for server local port', 'danger'); @@ -224,7 +226,7 @@ function SaveWireGuardConfig($status) // Save settings if ($good_input) { // server (wg0.conf) - if ($_POST['wg_senabled'] == 1) { + if ($_POST['wgSrvEnable'] == 1) { // fetch server private key from filesytem $wg_srvprivkey = exec('sudo cat '. RASPI_WIREGUARD_PATH .'wg-server-private.key', $return); $config[] = '[Interface]'; From 4299d4d7ccfe1da42d7505a47ffa03ad542ddbc4 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 25 Jan 2022 08:42:09 +0000 Subject: [PATCH 09/27] Update release version --- README.md | 2 +- includes/defaults.php | 2 +- index.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index de65ba9b..1142af30 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![](https://i.imgur.com/xeKD93p.png) -[![Release 2.8.3](https://img.shields.io/badge/release-v2.8.3-green)](https://github.com/raspap/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi) [![Join Insiders](https://img.shields.io/static/v1?label=Join%20Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) ![https://travis-ci.com/github/raspap/raspap-webgui/](https://api.travis-ci.org/RaspAP/raspap-webgui.svg) [![Crowdin](https://badges.crowdin.net/raspap/localized.svg)](https://crowdin.com/project/raspap) [![Twitter URL](https://img.shields.io/twitter/url?label=%40RaspAP&logoColor=%23d8224c&url=https%3A%2F%2Ftwitter.com%2Frasp_ap)](https://twitter.com/rasp_ap) [![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/RaspAP?style=social)](https://www.reddit.com/r/RaspAP/) +[![Release 2.8.4](https://img.shields.io/badge/release-v2.8.4-green)](https://github.com/raspap/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi) [![Join Insiders](https://img.shields.io/static/v1?label=Join%20Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) ![https://travis-ci.com/github/raspap/raspap-webgui/](https://api.travis-ci.org/RaspAP/raspap-webgui.svg) [![Crowdin](https://badges.crowdin.net/raspap/localized.svg)](https://crowdin.com/project/raspap) [![Twitter URL](https://img.shields.io/twitter/url?label=%40RaspAP&logoColor=%23d8224c&url=https%3A%2F%2Ftwitter.com%2Frasp_ap)](https://twitter.com/rasp_ap) [![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/RaspAP?style=social)](https://www.reddit.com/r/RaspAP/) RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our popular [Quick installer](#quick-installer) creates a known-good default configuration for all current Raspberry Pis with onboard wireless. A fully responsive, mobile-ready interface gives you control over the relevant services and networking options. Advanced DHCP settings, WireGuard and OpenVPN support, [SSL certificates](https://docs.raspap.com/ssl-quick/), security audits, [captive portal integration](https://docs.raspap.com/captive/), themes and [multilingual options](https://docs.raspap.com/translations/) are included. diff --git a/includes/defaults.php b/includes/defaults.php index 56e66a6b..bdc38dfb 100755 --- a/includes/defaults.php +++ b/includes/defaults.php @@ -6,7 +6,7 @@ if (!defined('RASPI_CONFIG')) { $defaults = [ 'RASPI_BRAND_TEXT' => 'RaspAP', - 'RASPI_VERSION' => '2.8.3', + 'RASPI_VERSION' => '2.8.4', 'RASPI_CONFIG_NETWORK' => RASPI_CONFIG.'/networking/defaults.json', 'RASPI_ADMIN_DETAILS' => RASPI_CONFIG.'/raspap.auth', 'RASPI_WIFI_AP_INTERFACE' => 'wlan0', diff --git a/index.php b/index.php index 75b0402a..2a25876c 100755 --- a/index.php +++ b/index.php @@ -14,7 +14,7 @@ * @author Lawrence Yau * @author Bill Zimmerman * @license GNU General Public License, version 3 (GPL-3.0) - * @version 2.8.3 + * @version 2.8.4 * @link https://github.com/RaspAP/raspap-webgui/ * @link https://raspap.com/ * @see http://sirlagz.net/2013/02/08/raspap-webgui/ From c0b0d87ff4ef9beff7776511f5b54ae1c9be9259 Mon Sep 17 00:00:00 2001 From: BANKA2017 <17263253+BANKA2017@users.noreply.github.com> Date: Sun, 20 Feb 2022 15:59:43 +0800 Subject: [PATCH 10/27] Fix: function usedMemory While language in console is not English, this function may return `nan` --- app/lib/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/system.php b/app/lib/system.php index 3b09fb84..ee21ad84 100644 --- a/app/lib/system.php +++ b/app/lib/system.php @@ -42,7 +42,7 @@ class Sysinfo public function usedMemory() { - $used = shell_exec("free -m | awk '/Mem:/ { total=$2 ; used=$3 } END { print used/total*100}'"); + $used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'"); return floor($used); } From eeaed09f51a3132662d4c42f7e7ba1825eccf5e6 Mon Sep 17 00:00:00 2001 From: Jonny1797 Date: Mon, 7 Mar 2022 17:50:10 +0100 Subject: [PATCH 11/27] Wrong assumption of default behaviour As the default behaviour is the reboot, the "yes" option should (like before) stand out. Alternatively one can make default that the device does not reboot. --- installers/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index d43e287b..d24708d8 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -675,7 +675,7 @@ function _install_complete() { # Prompt to reboot if wired ethernet (eth0) is connected. # With default_configuration this will create an active AP on restart. if ip a | grep -q ': eth0:.*state UP'; then - echo -n "The system needs to be rebooted as a final step. Reboot now? [y/N]: " + echo -n "The system needs to be rebooted as a final step. Reboot now? [Y/n]: " read answer < /dev/tty if [ "$answer" != "${answer#[Nn]}" ]; then echo "Installation reboot aborted." From fc2637be6b0c368bcb97af4e9406ef9a20fd5b3e Mon Sep 17 00:00:00 2001 From: Flavio Capitao Date: Mon, 14 Mar 2022 11:23:54 +0100 Subject: [PATCH 12/27] fix: uninstall script default option #1140 --- installers/uninstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/uninstall.sh b/installers/uninstall.sh index d0a3d9fb..06173755 100755 --- a/installers/uninstall.sh +++ b/installers/uninstall.sh @@ -202,7 +202,7 @@ function _remove_installed_packages() { fi echo -n "Remove the following installed packages? lighttpd hostapd iptables-persistent $php_package $dhcpcd_package vnstat qrencode [y/N]: " read answer - if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then + if [ "$answer" == 'y' ] || [ "$answer" == 'Y' ]; then echo "Removing packages." sudo apt-get remove lighttpd hostapd iptables-persistent $php_package $dhcpcd_package vnstat qrencode || _install_error "Unable to remove installed packages" sudo apt-get autoremove || _install_error "Unable to run apt autoremove" From 1ed490786ea3d535b7c6565c3fef3f796ded24a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 19:22:59 +0000 Subject: [PATCH 13/27] Bump minimist from 1.2.5 to 1.2.6 Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9ecde714..71c854e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2757,9 +2757,9 @@ minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: brace-expansion "^1.1.7" minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" From 0aad7c8f0e941a7210a7489b23b6c48736a5772c Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 31 Mar 2022 10:47:55 +0100 Subject: [PATCH 14/27] Fix: filter dhcdpcd.log for ad block --- includes/adblock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/adblock.php b/includes/adblock.php index b9bcd74c..c61c25f6 100755 --- a/includes/adblock.php +++ b/includes/adblock.php @@ -78,8 +78,8 @@ function DisplayAdBlockConfig() $adblock_custom_content = file_get_contents(RASPI_ADBLOCK_LISTPATH .'custom.txt'); $adblock_log = ''; - exec('sudo chmod o+r '. RASPI_DHCPCD_LOG); - $handle = fopen("/tmp/dnsmasq.log", "r"); + exec('sudo chmod o+r '.RASPI_DHCPCD_LOG); + $handle = fopen(RASPI_DHCPCD_LOG, "r"); if ($handle) { while (($line = fgets($handle)) !== false) { if (preg_match('/(0.0.0.0)/', $line)) { From 5a7eb090e266c863550870b763f9830cd7dfc3e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Apr 2022 19:15:47 +0000 Subject: [PATCH 15/27] Bump copy-props from 2.0.4 to 2.0.5 Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 71c854e0..a22d0e85 100644 --- a/yarn.lock +++ b/yarn.lock @@ -936,12 +936,12 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= copy-props@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.4.tgz#93bb1cadfafd31da5bb8a9d4b41f471ec3a72dfe" - integrity sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A== + version "2.0.5" + resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2" + integrity sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw== dependencies: - each-props "^1.3.0" - is-plain-object "^2.0.1" + each-props "^1.3.2" + is-plain-object "^5.0.0" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1143,7 +1143,7 @@ duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" -each-props@^1.3.0: +each-props@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== @@ -2321,6 +2321,11 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + is-relative@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" From 4d93834e28698c4c5d59a3785de8624b44048ec2 Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Fri, 8 Apr 2022 18:37:24 +0200 Subject: [PATCH 16/27] Update BACKERS.md --- BACKERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BACKERS.md b/BACKERS.md index 2c5721bf..1a1159ae 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -22,6 +22,7 @@ The following features are currently available exclusively to sponsors. A tangib ✅ [WPA3-Personal AP security](https://docs.raspap.com/ap-basics/#wpa3-personal) ✅ [802.11w Protected Management Frames](https://docs.raspap.com/ap-basics/#80211w) ✅ [Printable Wi-Fi signs](https://docs.raspap.com/ap-basics/#printable-signs) + ✅ [Drag & drop dashboard widgets](https://docs.raspap.com/ap-basics/#drag-drop-widgets) ⚙️ Traffic shaping (in progress) Look for the list above to grow as we add more exclusive features. Be sure to visit this page from time to time to learn about what's new, check the [Insiders docs page](https://docs.raspap.com/insiders/) and follow [@RaspAP on Twitter](https://twitter.com/rasp_ap) to stay updated. From 55959257d97f3daaeec950afbd70c276ee021c0c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 05:16:52 +0000 Subject: [PATCH 17/27] Bump moment from 2.24.0 to 2.29.2 Bumps [moment](https://github.com/moment/moment) from 2.24.0 to 2.29.2. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](https://github.com/moment/moment/compare/2.24.0...2.29.2) --- updated-dependencies: - dependency-name: moment dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a22d0e85..ea34ed15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2822,9 +2822,9 @@ mkdirp@^1.0.3: integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== moment@^2.10.2: - version "2.24.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" - integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + version "2.29.2" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.2.tgz#00910c60b20843bcba52d37d58c628b47b1f20e4" + integrity sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg== ms@2.0.0: version "2.0.0" From 00fe51f0053dca778ae132cae576989ef358381b Mon Sep 17 00:00:00 2001 From: Federico Frigo Date: Sun, 10 Apr 2022 20:09:23 +0200 Subject: [PATCH 18/27] Reverting files to correct ones --- app/js/custom.js | 13 ------- app/js/custom.min.js | 2 +- config/50-raspap-router.conf | 9 +++-- config/config.php | 6 +-- config/defaults.json | 6 +-- config/dhcpcd.conf | 8 ++-- config/hostapd.conf | 9 ++--- installers/common.sh | 2 +- installers/raspapd.service | 2 +- installers/servicestart.sh | 75 ++++++++++++------------------------ installers/uninstall.sh | 2 +- templates/wifi_stations.php | 29 -------------- 12 files changed, 47 insertions(+), 116 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index d6ed0576..0e842ebf 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -459,19 +459,6 @@ $(document).on("click", ".js-toggle-password", function(e) { } }); -$(document).on("input", ".js-validate-psk", function(e) { - var field = $(e.target); - var colors = field.data("colors").split(","); - var target = $(field.data("target")); - if (field.val().length < 8 || field.val().length > 63) { - field.css("backgroundColor", colors[0]); - target.attr("disabled", true); - } else { - field.css("backgroundColor", colors[1]); - target.attr("disabled", false); - } -}); - $(function() { $('#theme-select').change(function() { var theme = themes[$( "#theme-select" ).val() ]; diff --git a/app/js/custom.min.js b/app/js/custom.min.js index 23a7c9b2..67444fb6 100644 --- a/app/js/custom.min.js +++ b/app/js/custom.min.js @@ -4,4 +4,4 @@ * Licensed under MIT (https://github.com/raspap-webgui/raspap-webgui/blob/master/LICENSE) */ -function msgShow(t,a){if(0==t)var e="success";else if(2==t||1==t)e="danger";return'"}function createNetmaskAddr(t){var a=[];for(i=0;i<4;i++){var e=Math.min(t,8);a.push(256-Math.pow(2,8-e)),t-=e}return a.join(".")}function loadSummary(a){$.post("/ajax/networking/get_ip_summary.php",{interface:a},function(t){jsonData=JSON.parse(t),console.log(jsonData),0==jsonData.return?$("#"+a+"-summary").html(jsonData.output.join("
")):2==jsonData.return&&$("#"+a+"-summary").append('")})}function getAllInterfaces(){$.get("/ajax/networking/get_all_interfaces.php",function(t){jsonData=JSON.parse(t),$.each(jsonData,function(t,a){loadSummary(a)})})}function setupTabs(){$('a[data-toggle="tab"]').on("shown.bs.tab",function(t){var a=$(t.target).attr("href");a.match("summary")||loadCurrentSettings(a.replace("#",""))})}function loadCurrentSettings(t){$.post("/ajax/networking/get_int_config.php",{interface:t},function(t){jsonData=JSON.parse(t),$.each(jsonData.output,function(t,a){var n=a.interface;$.each(a,function(t,a){switch(t){case"static":"true"==a?($("#"+n+"-static").click(),$("#"+n+"-nofailover").click()):$("#"+n+"-dhcp").click();break;case"failover":"true"===a?$("#"+n+"-failover").click():$("#"+n+"-nofailover").click();break;case"ip_address":var e=a.split("/");$("#"+n+"-ipaddress").val(e[0]),$("#"+n+"-netmask").val(createNetmaskAddr(e[1]));break;case"routers":$("#"+n+"-gateway").val(a);break;case"domain_name_server":svrsDNS=a.split(" "),$("#"+n+"-dnssvr").val(svrsDNS[0]),$("#"+n+"-dnssvralt").val(svrsDNS[1])}})})})}function saveNetworkSettings(t){var a=$("#frm-"+t).find(":input"),e={};$.each(a,function(t,a){"radio"==$(a).attr("type")?e[$(a).attr("id")]=$(a).prop("checked"):e[$(a).attr("id")]=$(a).val()}),e.interface=t,$.post("/ajax/networking/save_int_config.php",e,function(t){var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function applyNetworkSettings(){$(this).data("int");arrFormData={generate:""},$.post("/ajax/networking/gen_int_config.php",arrFormData,function(t){console.log(t);var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function setupBtns(){$("#btnSummaryRefresh").click(function(){getAllInterfaces()}),$(".intsave").click(function(){saveNetworkSettings($(this).data("int"))}),$(".intapply").click(function(){applyNetworkSettings()})}function setCSRFTokenHeader(t,a,e){var n=$("meta[name=csrf_token]").attr("content");/^(POST|PATCH|PUT|DELETE)$/i.test(e.type)&&a.setRequestHeader("X-CSRF-Token",n)}function contentLoaded(){switch(pageCurrent=window.location.href.split("?")[1].split("=")[1],pageCurrent=pageCurrent.replace("#",""),$("#side-menu").metisMenu(),pageCurrent){case"network_conf":getAllInterfaces(),setupTabs(),setupBtns()}}function loadWifiStations(a){return function(){var t=!0===a?"?refresh":"";$(".js-wifi-stations").addClass("loading-spinner").empty().load("/ajax/networking/wifi_stations.php"+t,function(){$(this).removeClass("loading-spinner")})}}$(document).on("click",".js-add-dhcp-static-lease",function(t){t.preventDefault();var a=$(".js-new-dhcp-static-lease"),e=$("input[name=mac]",a).val().trim(),n=$("input[name=ip]",a).val().trim();if(""!=e&&""!=n){var i=$("#js-dhcp-static-lease-row").html().replace("{{ mac }}",e).replace("{{ ip }}",n);$(".js-dhcp-static-lease-container").append(i),$("input[name=mac]",a).val(""),$("input[name=ip]",a).val("")}}),$(document).on("click",".js-remove-dhcp-static-lease",function(t){t.preventDefault(),$(this).parents(".js-dhcp-static-lease-row").remove()}),$(document).on("submit",".js-dhcp-settings-form",function(t){$(".js-add-dhcp-static-lease").trigger("click")}),$(".js-reload-wifi-stations").on("click",loadWifiStations(!0)),$(document).on("click",".js-toggle-password",function(t){var a=$(t.target),e=$(a.data("target"));e.is(":input")&&(t.preventDefault(),a.data("__toggle-with-initial")||a.data("__toggle-with-initial",a.text()),"password"===e.attr("type")?(a.text(a.data("toggle-with")),e.attr("type","text")):(a.text(a.data("__toggle-with-initial")),e.attr("type","password")))}),$(document).on("input",".js-validate-psk",function(t){var a=$(t.target),e=a.data("colors").split(","),n=$(a.data("target"));a.val().length<8||63'+a+""}function createNetmaskAddr(t){var a=[];for(i=0;i<4;i++){var e=Math.min(t,8);a.push(256-Math.pow(2,8-e)),t-=e}return a.join(".")}function loadSummary(a){$.post("/ajax/networking/get_ip_summary.php",{interface:a},function(t){jsonData=JSON.parse(t),console.log(jsonData),0==jsonData.return?$("#"+a+"-summary").html(jsonData.output.join("
")):2==jsonData.return&&$("#"+a+"-summary").append('")})}function getAllInterfaces(){$.get("/ajax/networking/get_all_interfaces.php",function(t){jsonData=JSON.parse(t),$.each(jsonData,function(t,a){loadSummary(a)})})}function setupTabs(){$('a[data-toggle="tab"]').on("shown.bs.tab",function(t){var a=$(t.target).attr("href");a.match("summary")||loadCurrentSettings(a.replace("#",""))})}function loadCurrentSettings(t){$.post("/ajax/networking/get_int_config.php",{interface:t},function(t){jsonData=JSON.parse(t),$.each(jsonData.output,function(t,a){var n=a.interface;$.each(a,function(t,a){switch(t){case"static":"true"==a?($("#"+n+"-static").click(),$("#"+n+"-nofailover").click()):$("#"+n+"-dhcp").click();break;case"failover":"true"===a?$("#"+n+"-failover").click():$("#"+n+"-nofailover").click();break;case"ip_address":var e=a.split("/");$("#"+n+"-ipaddress").val(e[0]),$("#"+n+"-netmask").val(createNetmaskAddr(e[1]));break;case"routers":$("#"+n+"-gateway").val(a);break;case"domain_name_server":svrsDNS=a.split(" "),$("#"+n+"-dnssvr").val(svrsDNS[0]),$("#"+n+"-dnssvralt").val(svrsDNS[1])}})})})}function saveNetworkSettings(t){var a=$("#frm-"+t).find(":input"),e={};$.each(a,function(t,a){"radio"==$(a).attr("type")?e[$(a).attr("id")]=$(a).prop("checked"):e[$(a).attr("id")]=$(a).val()}),e.interface=t,$.post("/ajax/networking/save_int_config.php",e,function(t){var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function applyNetworkSettings(){$(this).data("int");arrFormData={generate:""},$.post("/ajax/networking/gen_int_config.php",arrFormData,function(t){console.log(t);var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function setupBtns(){$("#btnSummaryRefresh").click(function(){getAllInterfaces()}),$(".intsave").click(function(){saveNetworkSettings($(this).data("int"))}),$(".intapply").click(function(){applyNetworkSettings()})}function setCSRFTokenHeader(t,a,e){var n=$("meta[name=csrf_token]").attr("content");/^(POST|PATCH|PUT|DELETE)$/i.test(e.type)&&a.setRequestHeader("X-CSRF-Token",n)}function contentLoaded(){switch(pageCurrent=window.location.href.split("?")[1].split("=")[1],pageCurrent=pageCurrent.replace("#",""),$("#side-menu").metisMenu(),pageCurrent){case"network_conf":getAllInterfaces(),setupTabs(),setupBtns()}}function loadWifiStations(a){return function(){var t=!0===a?"?refresh":"";$(".js-wifi-stations").addClass("loading-spinner").empty().load("/ajax/networking/wifi_stations.php"+t,function(){$(this).removeClass("loading-spinner")})}}$(document).on("click",".js-add-dhcp-static-lease",function(t){t.preventDefault();var a=$(".js-new-dhcp-static-lease"),e=$("input[name=mac]",a).val().trim(),n=$("input[name=ip]",a).val().trim();if(""!=e&&""!=n){var i=$("#js-dhcp-static-lease-row").html().replace("{{ mac }}",e).replace("{{ ip }}",n);$(".js-dhcp-static-lease-container").append(i),$("input[name=mac]",a).val(""),$("input[name=ip]",a).val("")}}),$(document).on("click",".js-remove-dhcp-static-lease",function(t){t.preventDefault(),$(this).parents(".js-dhcp-static-lease-row").remove()}),$(document).on("submit",".js-dhcp-settings-form",function(t){$(".js-add-dhcp-static-lease").trigger("click")}),$(".js-reload-wifi-stations").on("click",loadWifiStations(!0)),$(document).on("click",".js-toggle-password",function(t){var a=$(t.target),e=$(a.data("target"));e.is(":input")&&(t.preventDefault(),a.data("__toggle-with-initial")||a.data("__toggle-with-initial",a.text()),"password"===e.attr("type")?(a.text(a.data("toggle-with")),e.attr("type","text")):(a.text(a.data("__toggle-with-initial")),e.attr("type","password")))}),$(document).on("keyup",".js-validate-psk",function(t){var a=$(t.target),e=a.data("colors").split(","),n=$(a.data("target"));a.val().length<8||63"/index.php/$1$2" ) - server.error-handler-404 = "/index.php" +$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" { + url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" ) + server.error-handler-404 = "/REPLACE_ME/index.php" } + diff --git a/config/config.php b/config/config.php index 44670716..d4f9266e 100755 --- a/config/config.php +++ b/config/config.php @@ -1,6 +1,6 @@ /dev/null; then diff --git a/installers/raspapd.service b/installers/raspapd.service index 7ec927f8..c5738465 100644 --- a/installers/raspapd.service +++ b/installers/raspapd.service @@ -12,7 +12,7 @@ [Unit] Description=RaspAP Service Daemon DefaultDependencies=no -After=network.target +After=multi-user.target [Service] Type=oneshot diff --git a/installers/servicestart.sh b/installers/servicestart.sh index 0c3cc557..377678ca 100755 --- a/installers/servicestart.sh +++ b/installers/servicestart.sh @@ -10,58 +10,30 @@ DAEMONPATH="/lib/systemd/system/raspapd.service" OPENVPNENABLED=$(pidof openvpn | wc -l) positional=() -while [[ $# -gt 0 ]]; do - key="$1" +while [[ $# -gt 0 ]] +do +key="$1" - case $key in - -i | --interface) - interface="$2" - shift # past argument - shift # past value - ;; - -s | --seconds) - seconds="$2" - shift - shift - ;; - -a | --action) - action="$2" - shift - shift - ;; - esac +case $key in + -i|--interface) + interface="$2" + shift # past argument + shift # past value + ;; + -s|--seconds) + seconds="$2" + shift + shift + ;; + -a|--action) + action="$2" + shift + shift + ;; +esac done set -- "${positional[@]}" -HOSTAPD_CONF="/etc/hostapd/hostapd.conf" - -new_country_code=$(curl -s -H "Authorization: Bearer 9da1eb466ed052" https://ipinfo.io/json | jq -r ".country // empty") -old_country_code=$(grep ^country_code $HOSTAPD_CONF | cut -d "=" -f 2) - -if [[ ! -z "$new_country_code" ]] && [[ "$old_country_code" != "$new_country_code" ]]; then - sudo sed -i "s/country_code=$old_country_code/country_code=$new_country_code/" /etc/hostapd/hostapd.conf - echo "Updated country code: $new_country_code" -fi - -old_ssid=$(grep ^ssid $HOSTAPD_CONF | cut -d "=" -f 2) -rpi_serial=$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2) -new_ssid="isobox-$rpi_serial" - -if [[ "$old_ssid" != "$new_ssid" ]]; then - sed -i "s/ssid=$old_ssid/ssid=$new_ssid/" $HOSTAPD_CONF - echo "Updated ssid: $new_ssid" -fi - -old_hostname=$(hostname) -new_hostname="isobox-$rpi_serial" - -if [[ "$old_hostname" != "$new_hostname" ]]; then - echo $new_hostname >/etc/hostname - sed -i "s/$old_hostname/$new_hostname/" /etc/hosts - hostname $new_hostname - echo "Updated hostname: $new_hostname" -fi - echo "Stopping network services..." if [ $OPENVPNENABLED -eq 1 ]; then systemctl stop openvpn-client@client @@ -85,7 +57,7 @@ if [ -r "$CONFIGFILE" ]; then declare -A config while IFS=" = " read -r key value; do config["$key"]="$value" - done <"$CONFIGFILE" + done < "$CONFIGFILE" if [ "${config[BridgedEnable]}" = 1 ]; then if [ "${interface}" = "br0" ]; then @@ -107,7 +79,7 @@ if [ -r "$CONFIGFILE" ]; then echo "Disabling systemd-networkd" systemctl disable systemd-networkd - ip link ls up | grep -q 'br0' &>/dev/null + ip link ls up | grep -q 'br0' &> /dev/null if [ $? == 0 ]; then echo "Removing br0 interface..." ip link set down br0 @@ -117,7 +89,7 @@ if [ -r "$CONFIGFILE" ]; then if [ "${config[WifiAPEnable]}" = 1 ]; then if [ "${interface}" = "uap0" ]; then - ip link ls up | grep -q 'uap0' &>/dev/null + ip link ls up | grep -q 'uap0' &> /dev/null if [ $? == 0 ]; then echo "Removing uap0 interface..." iw dev uap0 del @@ -155,3 +127,4 @@ if [ "${config[WifiAPEnable]}" = 1 ]; then fi echo "RaspAP service start DONE" + diff --git a/installers/uninstall.sh b/installers/uninstall.sh index 56ca1d87..06173755 100755 --- a/installers/uninstall.sh +++ b/installers/uninstall.sh @@ -158,7 +158,7 @@ function _restore_networking() { echo "Checking iptables rules" rules=( "-A POSTROUTING -j MASQUERADE" - "-A POSTROUTING -s 192.168.200.0/24 ! -d 192.168.200.0/24 -j MASQUERADE" + "-A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE" ) for rule in "${rules[@]}"; do if grep -- "$rule" $rulesv4 > /dev/null; then diff --git a/templates/wifi_stations.php b/templates/wifi_stations.php index cde0bf45..9ccfa779 100755 --- a/templates/wifi_stations.php +++ b/templates/wifi_stations.php @@ -46,32 +46,3 @@ - -

-
-
-
- - - -
-
- -
-
- -
- -
-
-
- -
- " id="update" name="update" data-toggle="modal" data-target="#configureClientModal" /> -
-
-
- - - -
From 658a300d630bc40477bb1030cde42a9c39a60781 Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Tue, 12 Apr 2022 09:47:34 +0200 Subject: [PATCH 19/27] Update BACKERS.md --- BACKERS.md | 66 +++++++++++++++--------------------------------------- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/BACKERS.md b/BACKERS.md index 1a1159ae..ced82a5d 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -1,26 +1,24 @@ -## Insiders +Insiders logo -Development of RaspAP is made possible thanks to a sponsorware release model. This means that new features are first exclusively released to sponsors as part of [**Insiders**](https://github.com/sponsors/RaspAP). Read on to learn how sponsorship works, and how easy it is to get access to Insiders. +Development of RaspAP is made possible thanks to a sponsorware release model. This means that new features are first exclusively released to sponsors as part of **Insiders**. Read on to learn how sponsorship works, and how easy it is to get access to Insiders. -Untitled - -### How sponsorship works +## How sponsorship works New features first land in **Insiders**, which means that *sponsors will have access to them immediately*. Every feature is tied to a funding goal in monthly subscriptions. When a funding goal is hit, the features that are tied to it are merged back into the [public RaspAP repository](https://github.com/RaspAP/raspap-webgui) and released for general availability. Bugfixes and minor enhancements are always released simultaneously in both editions. -Don't want to sponsor? No problem, RaspAP already has tons of features available, so chances are that most of your requirements are already satisfied. See the list of exclusive features to learn which features are currently only available to sponsors. +Don't want to sponsor? No problem, RaspAP already has tons of features available, so chances are that most of your requirements are already satisfied. See the list of **exclusive features** to learn which features are currently only available to sponsors. -### How to become a sponsor -You can [become a sponsor](https://github.com/sponsors/RaspAP) using your individual or organization's GitHub account. Just pick any tier from $10/month and complete the checkout. Then, after a few hours, you will be added as a team member to the super-secret private GitHub repository containing the Insiders edition, which has all exclusive features. In addition, you get access to Insiders-only team discussions and content. +## How to become a sponsor +You can become a sponsor using your individual or organization's GitHub account. Just pick any tier from $10/month and complete the checkout. Then, after a few hours, you will be added as a team member to the super-secret private GitHub repository containing the Insiders edition, which has all exclusive features. In addition, you get access to Insiders-only team discussions and content. -> ℹ️ **Important**: If you're sponsoring [RaspAP](https://github.com/RaspAP/sponsors) through a GitHub organization, please send a short email to [sponsors@raspap.com](mailto:sponsors@raspap.com) with the name of your organization and the account that should be added as a collaborator. +> :information_source: **Important**: If you're sponsoring [RaspAP](https://github.com/RaspAP/sponsors) through a GitHub organization, please send a short email to [sponsors@raspap.com](mailto:sponsors@raspap.com) with the name of your organization and the account that should be added as a collaborator. -### Exclusive features +## Exclusive features The following features are currently available exclusively to sponsors. A tangible side benefit of sponsorship is that Insiders are able to help steer future development of RaspAP. This is done through Insiders' access to discussions, feature requests, issues and pull requests in the private GitHub repository. ✅ [Network device management](https://docs.raspap.com/net-devices/) - ✅ [Firewall settings](https://docs.raspap.com/firewall/) + ✅ [Firewall settings](https://docs.raspap.com/firewall/) ✅ [WPA3-Personal AP security](https://docs.raspap.com/ap-basics/#wpa3-personal) - ✅ [802.11w Protected Management Frames](https://docs.raspap.com/ap-basics/#80211w) + ✅ [802.11w Protected Management Frames](https://docs.raspap.com/ap-basics/#80211w) ✅ [Printable Wi-Fi signs](https://docs.raspap.com/ap-basics/#printable-signs) ✅ [Drag & drop dashboard widgets](https://docs.raspap.com/ap-basics/#drag-drop-widgets) ⚙️ Traffic shaping (in progress) @@ -36,43 +34,15 @@ The second **Insiders Edition** includes the features listed above. ### $500 The [first Insiders Edition goal](https://docs.raspap.com/insiders/#500-1st-insiders-edition) was reached in December 2021. Thank you sponsors! -### Frequently asked questions +## Quarterly giving +Beginning in 2022, each quarter 15% of all proceeds from Insiders will be donated directly to the [Raspberry Pi Foundation](https://www.raspberrypi.org/). The Raspberry Pi Foundation is a UK-based charity that works to put the power of computing and digital making into the hands of people all over the world. -#### How do I install Insiders? -*How do I install Insiders?* +[![Get involved with the Raspberry Pi Foundation](https://img.youtube.com/vi/dEzg92g1LHw/0.jpg)](https://www.youtube.com/watch?v=dEzg92g1LHw) -Invoke the [Quick Installer](https://docs.raspap.com/quick/) with the `--insiders` switch, like so: +When you become an Insider, not only do you support development of RaspAP but you also help inspire young people by harnessing the power of computing to solve problems and express themselves creatively. -``` -curl -sL https://install.raspap.com | bash -s -- --insiders -``` +## Frequently asked questions +We've covered all you need to know [here](https://docs.raspap.com/insiders/#frequently-asked-questions). -This will automatically pull from the private Insiders repo during the installation process. - -#### Upgrading -*I have an existing RaspAP installation. How do I upgrade to Insiders?* - -Upgrading is easy. Invoke the [Quick Installer](https://docs.raspap.com/quick/) with the `--upgrade` switch, specifying the private Insiders edition, like so: - -``` -curl -sL https://install.raspap.com | bash -s -- --upgrade --insiders -``` - -If you haven't [added SSH keys to your GitHub account](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) you will be prompted to authenticate. If so, just enter your GitHub credentials during the install: - -``` -RaspAP Install: Cloning latest files from github -Cloning into '/tmp/raspap-webgui'... -Username for 'https://github.com': octocat -Password for 'https://octocat@github.com': -``` - -> ℹ️ **Note**: your password is sent securely via SSH to GitHub. The above prompt is actually from GitHub, so the installer does _not_ know your credentials. - -#### Terms -*We're using RaspAP for a commercial project. Can we use Insiders under the same terms and conditions?* - -Yes. Whether you're an individual or a company, you may use RaspAP Insiders precisely under the same terms as RaspAP, which are defined by the GNU GPL 3.0 license. However, we kindly ask you to respect the following guidelines: - -* Please **don't distribute the source code** of Insiders. You may freely use it for public, private or commercial projects, fork it, mirror it, do whatever you want with it, but please don't release the source code, as it would counteract the sponsorware strategy. -* If you cancel your subscription, you're removed as a collaborator and will miss out on future updates of Insiders. However, you may *use the latest version* that's available to you as long as you like. Just remember that [GitHub deletes private forks](https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository). +### Terms +See our [official project documentation](https://docs.raspap.com/insiders/#terms). From f0d1fe9b841bb0641f32ebb0c2254b0b0adc2a6c Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 21 Apr 2022 09:52:09 +0100 Subject: [PATCH 20/27] Implement routing table raw output --- includes/internetRoute.php | 11 +++++++++++ includes/networking.php | 2 ++ locale/en_US/LC_MESSAGES/messages.mo | Bin 30851 -> 31005 bytes locale/en_US/LC_MESSAGES/messages.po | 6 ++++++ templates/networking.php | 23 +++++++++++++++++++++++ 5 files changed, 42 insertions(+) diff --git a/includes/internetRoute.php b/includes/internetRoute.php index e83dca22..f172b847 100755 --- a/includes/internetRoute.php +++ b/includes/internetRoute.php @@ -55,3 +55,14 @@ function getRouteInfo($checkAccess) return $rInfo; } +/* + * Fetches raw output of ip route + * + * @return string + */ +function getRouteInfoRaw() +{ + exec('ip route list', $routes); + return $routes; +} + diff --git a/includes/networking.php b/includes/networking.php index ac5d39bc..345ca14e 100755 --- a/includes/networking.php +++ b/includes/networking.php @@ -14,6 +14,7 @@ function DisplayNetworkingConfig() exec("ls /sys/class/net | grep -v lo", $interfaces); $routeInfo = getRouteInfo(true); + $routeInfoRaw = getRouteInfoRaw(); $arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini'); $bridgedEnabled = $arrHostapdConf['BridgedEnable']; @@ -21,6 +22,7 @@ function DisplayNetworkingConfig() "status", "interfaces", "routeInfo", + "routeInfoRaw", "bridgedEnabled") ); } diff --git a/locale/en_US/LC_MESSAGES/messages.mo b/locale/en_US/LC_MESSAGES/messages.mo index 84b77220b4b858a61a67557f3c256c36e87886af..3433cbf6ee28d819ec2cb9cac01e5a2ec37f3f59 100644 GIT binary patch delta 8622 zcmZYE30xOt9>?(qMdU^SIaCll5IhnA&pc33Qan;b1#dwS6%>&OuQ4+3N;B88(u&P1 zE7Q_4x800PYr8aEE3+~y%d*_;P)qmo{m(kVfW}b6qkli~kc|G!PFXv3C z_XfkU%FCFhI4jVYm^#KBj8d&J$??V{Vn-~&JPgL87>B2jTg(-VM4#ry_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ye_$l%1 z_`())IH#khgK0#)m2F!@+i1$Q32o*A;xl3;p<{}@u8CDU`XVuchn^H($q8;x(c+QH^Wf#AnAfTiAk;g!*n|+dAWRVjJ-xF@Z?oJnMIk3AR!f z3kV&#9w2j6#w!Jd-JmOVb{|j#ub!aP2bfNq%5yUV;#}eWJ z(al|F{lzE@uqOv`;tZkhW)<7!i-FX6t<3+3O@xkx#2-X|q7>J>i#jF|8;Loz{Rit3 zI))PNuadjQZ=hKJS^mGF^4OlZf%?x0&4_)Jf4A*PScPaz)FHe%ucIuX@8&;`PpE`( z{wWTzCr;s2B9!*GFqv?VA7?x2Lql(3Jn@8hc0|~MC)ahNoJmC5dtxd36Q>CscZtUK z+|QKf6P>A#!J9-Id+sC3^*tEBFAZN&>4$sqWg>;>V=wfftfL0uLEB8*uD15J`~pr> z14jiSf%*k3fhVxJy>1Np*>W81F(a#j4+o;-(@h-`QMDa_!4);OKe(VR%4tvk*kjuL*v3xtj%M1Z@* z&pqr&T(R}4+;^GsZsH*Ew{5?OKAh80oG2h%O=)OKVFaP0rGvST`v2!T))Ip$hvRZJ za10~@Y3pUL8HrtqMA|3XHeIJ9ntDGhi{E1zT!Y8-{2iyDBaPTY+#>! + +

+
+
+
+
+
+
+ + + + +
+ + + +
+
+
+
+
+
+

From b5b2e81d3bf8383950e05acd04887a092f1332c8 Mon Sep 17 00:00:00 2001 From: Lukas <47783030+luke23489@users.noreply.github.com> Date: Fri, 22 Apr 2022 18:50:18 +0200 Subject: [PATCH 21/27] fix overwrite issues The $jsonobj array is iterated from the back, so the first entries overwrite the newest entries (that is, the ones from the back). So it happens that instead of the traffic for today 16 o'clock ,the traffic from the day before yesterday 16 o'clock ends up in the array $data_template and is displayed in the graph. But this should not be like this! --- ajax/bandwidth/get_bandwidth_hourly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax/bandwidth/get_bandwidth_hourly.php b/ajax/bandwidth/get_bandwidth_hourly.php index a8e0f5cc..31442f1e 100644 --- a/ajax/bandwidth/get_bandwidth_hourly.php +++ b/ajax/bandwidth/get_bandwidth_hourly.php @@ -41,7 +41,7 @@ if (filter_input(INPUT_GET, 'tu') == 'h') { $jsonobj = json_decode($jsonstdoutvnstat[0], true)['interfaces'][0]; $jsonData = $jsonobj['traffic']['hour']; - for ($i = count($jsonData) - 1; $i >= 0; --$i) { + for ($i = count($jsonData) - 1; $i >= 0 && $i >= count($jsonData)-25; --$i) { $data_template[$jsonData[$i]['time']['hour']]['rx'] = round($jsonData[$i]['rx'] / 1024, 0); $data_template[$jsonData[$i]['time']['hour']]['tx'] = round($jsonData[$i]['tx'] / 1024, 0); } From 2b3b0eb6c24a038b0631d71f43e28da47d236b9b Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 22 Apr 2022 19:06:05 +0200 Subject: [PATCH 22/27] fix #1068 data size units --- ajax/bandwidth/get_bandwidth.php | 10 +++------- ajax/bandwidth/get_bandwidth_hourly.php | 7 +++++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ajax/bandwidth/get_bandwidth.php b/ajax/bandwidth/get_bandwidth.php index 04c1fc03..4fcf8057 100644 --- a/ajax/bandwidth/get_bandwidth.php +++ b/ajax/bandwidth/get_bandwidth.php @@ -49,6 +49,7 @@ if ($timeunits === 'm') { } $datasizeunits = filter_input(INPUT_GET, 'dsu'); +$dsu_factor = $datasizeunits == "mb" ? 1024 * 1024 : 1024; header('X-Content-Type-Options: nosniff'); header('Content-Type: application/json'); echo '[ '; @@ -73,13 +74,8 @@ for ($i = count($jsonData) - 1; $i >= 0; --$i) { echo ','; } - if ($datasizeunits == 'mb') { - $datasend = round($jsonData[$i]['tx'] / 1024, 0); - $datareceived = round($jsonData[$i]['rx'] / 1024, 0); - } else { - $datasend = $jsonData[$i]['rx']; - $datareceived = $jsonData[$i]['rx']; - } + $datasend = round($jsonData[$i]['tx'] / $dsu_factor, 0); + $datareceived = round($jsonData[$i]['rx'] / $dsu_factor, 0); if ($timeunits === 'm') { echo '{ "date": "' , $dt->format('Y-m') , '", "rx": "' , $datareceived , diff --git a/ajax/bandwidth/get_bandwidth_hourly.php b/ajax/bandwidth/get_bandwidth_hourly.php index 31442f1e..5e2f93f1 100644 --- a/ajax/bandwidth/get_bandwidth_hourly.php +++ b/ajax/bandwidth/get_bandwidth_hourly.php @@ -39,11 +39,14 @@ if (filter_input(INPUT_GET, 'tu') == 'h') { exit('vnstat error'); } + $datasizeunits = filter_input(INPUT_GET, 'dsu'); + $dsu_factor = $datasizeunits == "mb" ? 1024 * 1024 : 1024; + $jsonobj = json_decode($jsonstdoutvnstat[0], true)['interfaces'][0]; $jsonData = $jsonobj['traffic']['hour']; for ($i = count($jsonData) - 1; $i >= 0 && $i >= count($jsonData)-25; --$i) { - $data_template[$jsonData[$i]['time']['hour']]['rx'] = round($jsonData[$i]['rx'] / 1024, 0); - $data_template[$jsonData[$i]['time']['hour']]['tx'] = round($jsonData[$i]['tx'] / 1024, 0); + $data_template[$jsonData[$i]['time']['hour']]['rx'] = round($jsonData[$i]['rx'] / $dsu_factor, 0); + $data_template[$jsonData[$i]['time']['hour']]['tx'] = round($jsonData[$i]['tx'] / $dsu_factor, 0); } $data = array(); From c4a2649267e14bc121547c6fc1dd6987fd33303e Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 24 Apr 2022 10:11:01 +0100 Subject: [PATCH 23/27] Update picker w/ correct default --- app/js/huebee.js | 2 +- dist/raspap/css/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/huebee.js b/app/js/huebee.js index 895e1287..486d28b2 100644 --- a/app/js/huebee.js +++ b/app/js/huebee.js @@ -11,7 +11,7 @@ var hueb = new Huebee( elem, { // Set custom color if defined var color = getCookie('color'); if (color == null || color == '') { - color = '#d8224c'; + color = '#2b8080'; } hueb.setColor(color); diff --git a/dist/raspap/css/style.css b/dist/raspap/css/style.css index 45305ca1..c589341e 100644 --- a/dist/raspap/css/style.css +++ b/dist/raspap/css/style.css @@ -48,7 +48,7 @@ span.ra-wireguard:before { .ra-raspap:before { font-size: 4.35rem; content: "\e901"; - color: #d8224c; + color: #2b8080; margin-left: 0.1em; } From 993e65483d9820ae666c5086e5ffb4d4860c4422 Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Sun, 24 Apr 2022 11:18:08 +0200 Subject: [PATCH 24/27] Update picker w/ new default --- app/js/huebee.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/huebee.js b/app/js/huebee.js index 895e1287..486d28b2 100644 --- a/app/js/huebee.js +++ b/app/js/huebee.js @@ -11,7 +11,7 @@ var hueb = new Huebee( elem, { // Set custom color if defined var color = getCookie('color'); if (color == null || color == '') { - color = '#d8224c'; + color = '#2b8080'; } hueb.setColor(color); From 5d9ad372f9e8ed1769f3cecd71e290ff1ee42e09 Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Wed, 25 May 2022 19:57:06 +0200 Subject: [PATCH 25/27] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6c8e00f2..de6bcee7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,10 +11,12 @@ assignees: '' - [ ] This is a bug report +- [ ] I observed this bug on a clean install of the OS +- [ ] I have followed the project prerequisites - [ ] I have searched this repository for existing issues - [ ] I checked the FAQ and official documentation before creating this issue - [ ] I have read and understand the issue reporting guidelines @@ -38,7 +42,7 @@ Be sure there are no issues similar to yours that are already open. You can chec 1. Operating System: **ENTER HERE** 2. Hardware and version: 3. RaspAP version: -4. Followed the project prerequisites? +4. Clean install of a compatible operating system? 5. RaspAP Quick Install or Manual setup? 6. Using default configuration? 7. Simultaneous AP and managed mode? From 41cff2387824e7651ab686b6efc4a18d1069a6fc Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 May 2022 12:04:54 +0100 Subject: [PATCH 26/27] Update pt_BR translation + compile .mo --- locale/pt_BR/LC_MESSAGES/messages.mo | Bin 14308 -> 13098 bytes locale/pt_BR/LC_MESSAGES/messages.po | 593 +++++++++++++++++++++++++-- 2 files changed, 558 insertions(+), 35 deletions(-) diff --git a/locale/pt_BR/LC_MESSAGES/messages.mo b/locale/pt_BR/LC_MESSAGES/messages.mo index 7a612375be7716407fd8acc4129129ccd19c28f6..48ed7d1ae94b181c03527fe4c03a19d6935f7294 100644 GIT binary patch delta 5000 zcmZYCdvKK19meq!35f}WOCUl4;SB@=B%2$gBmv4L0ZbtfNDveh7P5qeWD_CLlyKr>i+l;t?}HLj;N9JvlgHVD8nS2 zjcRBSs=%eF23%B!+fhq#1Xb7>RN+@pOLz^{@eOqFOVs_Lc9f+x>y7$ie^kdgsHb`q zs-tpyekSVvYE3y?j$BN|t*8!;qh{hP-d25JCbV2If_U$c{k?RnQ! z`6yI_6OqX=bFeQi$0_)VJ^l){1f6+@HAAVWrN~C!Ff-IT$)2x5&4Ay!qz~)=04JW} zL<&1Au#w}Wa;gATUqAH6>lwSX>n; zwXd?*7bB}}mZ6p|w1pjwWFM-41E`KKpgQ~rRZzkJ`%of(W+)#T!7S8MzX&y@O{kG? zu)d6%p+l(lFQ5wh9Mkpwx8YM2XP}C1PRZPNDsAuO=h@JNA{1r9gTlPX+ zcJ#)csI?npkB6ZCtr&yqU!njZaWZ8~TPFeW3&I zgid%+9Zo=fVJfOpKWge$+T%^A`}bi9zKfdjwz<*o_d?x2098mKYR1N50s4`Fhs+*! z)WJby@a6;5LvtJJv1eZNKeIQYX6hJf3eTd}{6o~pKS34nE$Sgm8WLUmE*QsgZ`A$$ zF$SZX-oO9Z)CoW1<~e(w`y&nO&`*+yI?&ccc0~4g4N-->V2{<={oCUlsPNaw?}%ns zzdvRT(Nt>F>-9lokJk@>L%NVt3+NW7^&& zKO>>#e7Iyh(e@-%(f@S;tcW(nLu`v zS!5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?uc%L`cE*>7RbC|AGk*(Tl%ibxFgLbG*$KSNL*_tQaCDzaHCm^)A;;j7zz_wIN~P3ioN#GX?6 ztvf13tcp-n%*pX!Yn7(7H>392R*;7yddph9c38@qGq-nYg|_ocS)2TaQgd-qW8$Gz zh!^RmQpe_WiZNX?LOM2@_5Ue4RkVO^7>}EFmO-D|}@)AjiUC2jqs=$C88!3rHD42GI@ zw|QY}OgrM`hqRo-S`Bkds&+f;0d)$u@62WM`wgx&zYAhuzbCU48%xT;vH3gY2XsT#b`@$Z4Q9)BRZe&hr``p2BK%zre`Crh8{cQ>y08Z)6li(=MAvQ`W_pk{M=y zwt+NN#RlABd2*|;T4*;@>n<)Gti9ag@kR2 zKj_&_ro48{hziSFCLWRe-Tbu&UhmQSa^bYR4zX+#b{1m!6O2JI-d(Xi`zXruZW9Mv)4dt*+ShG`@neNOacOIfSyn) z3\n" "POT-Creation-Date: 2017-10-19 08:56+0000\n" -"PO-Revision-Date: 2019-10-27 15:30-0300\n" -"Last-Translator: Matheus Dal Mago \n" -"Language-Team: \n" +"PO-Revision-Date: 2022-01-05 11:43\n" +"Last-Translator: Bill Zimmerman \n" +"Language-Team: Portuguese, Brazilian\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Crowdin-Project: raspap\n" +"X-Crowdin-Project-ID: 395801\n" +"X-Crowdin-Language: pt-BR\n" +"X-Crowdin-File: /master/locale/en_US/LC_MESSAGES/messages.po\n" +"X-Crowdin-File-ID: 10\n" #: index.php msgid "RaspAP Wifi Configuration Portal" @@ -37,8 +36,14 @@ msgstr "Cliente WiFi" msgid "Hotspot" msgstr "Ponto de acesso" +msgid "Memory Use" +msgstr "Uso da memória" + +msgid "CPU Temp" +msgstr "Temperatura do CPU" + msgid "Networking" -msgstr "Networking" +msgstr "Rede" msgid "DHCP Server" msgstr "Servidor DHCP" @@ -141,9 +146,33 @@ msgstr "Esconder" msgid "Not configured" msgstr "Não configurado" +msgid "Connected" +msgstr "" + +msgid "Known" +msgstr "" + +msgid "Nearby" +msgstr "" + msgid "Note: WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP" msgstr "Nota: pontos de acesso WEP aparecem como 'Open'. Atualmente, o RaspAP não suporta conexão com WEP" +msgid "No Wifi stations found" +msgstr "" + +msgid "Reinitializing wpa_supplicant" +msgstr "" + +msgid "Click 'Rescan' to search for nearby Wifi stations." +msgstr "" + +msgid "Click 'Reinitialize' to force reinitialize wpa_supplicant." +msgstr "" + +msgid "Reinitialize" +msgstr "" + #: includes/dashboard.php msgid "Interface Information" msgstr "Informação da Interface" @@ -178,8 +207,8 @@ msgstr "Pacotes Transferidos" msgid "Transferred Bytes" msgstr "Bytes Transferidos" -msgid "Wireless Information" -msgstr "Informação de Wireless" +msgid "Wireless Client" +msgstr "Cliente WiFi" msgid "Connected To" msgstr "Conectado em" @@ -238,6 +267,60 @@ msgstr "Parar wlan0" msgid "Connected Devices" msgstr "Dispositivos Conectados" +msgid "Client: Ethernet cable" +msgstr "" + +msgid "Ethernet" +msgstr "" + +msgid "Client: Smartphone (USB tethering)" +msgstr "" + +msgid "Smartphone" +msgstr "" + +msgid "WiFi" +msgstr "" + +msgid "Mobile Data Client" +msgstr "" + +msgid "Mobile Data" +msgstr "" + +msgid "No information available" +msgstr "" + +msgid "Interface name invalid" +msgstr "" + +msgid "Required exec function is disabled. Check if exec is not added to php disable_functions." +msgstr "" + +msgid "Waiting for the interface to start ..." +msgstr "" + +msgid "Stop the Interface" +msgstr "" + +msgid "Connection mode" +msgstr "" + +msgid "Signal quality" +msgstr "" + +msgid "WAN IP" +msgstr "" + +msgid "Web-GUI" +msgstr "" + +msgid "Signal strength" +msgstr "" + +msgid "No Client device or not yet configured" +msgstr "" + #: includes/dhcp.php msgid "DHCP server settings" msgstr "Configurações do servidor DHCP" @@ -246,7 +329,16 @@ msgid "Client list" msgstr "Lista de Clientes" msgid "Interface" -msgstr "Interface" +msgstr "Inteface" + +msgid "Enable DHCP for this interface" +msgstr "" + +msgid "Enable this option if you want RaspAP to assign IP addresses on the selected interface." +msgstr "" + +msgid "DNS Server" +msgstr "Servidor DNS" msgid "Starting IP Address" msgstr "Endereço IP Inicial" @@ -275,6 +367,9 @@ msgstr "Tempo para expirar" msgid "MAC Address" msgstr "Endereço MAC" +msgid "Optional comment" +msgstr "" + msgid "Host name" msgstr "Nome de host" @@ -318,31 +413,55 @@ msgid "Dnsmasq is not running" msgstr "Dnsmasq não executando" msgid "Upstream DNS servers" -msgstr "Upstream DNS servers" +msgstr "" msgid "Only ever query DNS servers configured below" -msgstr "Only ever query DNS servers configured below" +msgstr "" msgid "Enable this option if you want RaspAP to send DNS queries to the servers configured below exclusively. By default RaspAP also uses its upstream DHCP server's name servers." -msgstr "Enable this option if you want RaspAP to send DNS queries to the servers configured below exclusively. By default RaspAP also uses its upstream DHCP server's name servers." +msgstr "" msgid "This option adds no-resolv to the dnsmasq configuration." -msgstr "This option adds no-resolv to the dnsmasq configuration." +msgstr "" msgid "Add upstream DNS server" -msgstr "Add upstream DNS server" +msgstr "" msgid "Format" -msgstr "Format" +msgstr "" msgid "Choose a hosted server" -msgstr "Choose a hosted server" +msgstr "" + +msgid "Enable these options to log DHCP server activity." +msgstr "" msgid "Log DHCP requests" -msgstr "Log DHCP requests" +msgstr "" msgid "Log DNS queries" -msgstr "Log DNS queries" +msgstr "" + +msgid "Restrict access" +msgstr "" + +msgid "Limit network access to static clients" +msgstr "" + +msgid "Enable this option if you want RaspAP to ignore any clients which are not specified in the static leases list." +msgstr "" + +msgid "This option adds dhcp-ignore to the dnsmasq configuration." +msgstr "" + +msgid "Clients with a particular hardware MAC address can always be allocated the same IP address." +msgstr "" + +msgid "This option adds dhcp-host entries to the dnsmasq configuration." +msgstr "" + +msgid "This toggles the gateway/nogateway option for this interface in the DHCPCD configuration." +msgstr "" #: includes/hostapd.php msgid "Basic" @@ -367,7 +486,7 @@ msgid "Encryption Type" msgstr "Tipo de Criptografia" msgid "PSK" -msgstr "PSK" +msgstr "" msgid "Advanced settings" msgstr "Configurações avançadas" @@ -426,28 +545,58 @@ msgstr "Arquivo de Log" msgid "WiFi client AP mode" msgstr "WiFi modo cliente AP" +msgid "Bridged AP mode" +msgstr "" + msgid "Hide SSID in broadcast" msgstr "Esconder SSID em transmissão" msgid "Maximum number of clients" msgstr "Número máximo de clientes" -msgid "Configures the max_num_sta option of hostapd. The default and maximum is 2007. If empty or 0, the default applies." -msgstr "Configura a opção max_num_sta do hostapd. O valor padrão e máximo é 2007. Se deixado vazio ou 0, o valor padrão é aplicado." +msgid "Configures the max_num_sta option of hostapd. The default and maximum is 2007. If empty or 0, the default applies." +msgstr "" + +msgid "Beacon interval" +msgstr "" + +msgid "Disable disassoc_low_ack" +msgstr "" + +msgid "Do not disassociate stations based on excessive transmission failures." +msgstr "" + +msgid "Executing RaspAP service start" +msgstr "" + +msgid "Close" +msgstr "" + +msgid "Enable this option to log hostapd activity." +msgstr "" + +msgid "Transmit power (dBm)" +msgstr "" + +msgid "Sets the txpower option for the AP interface and the configured country." +msgstr "" + +msgid "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW." +msgstr "" #: includes/networking.php msgid "Summary" msgstr "Sumário" +msgid "Internet connection" +msgstr "" + msgid "Current settings" msgstr "Configurações atuais" msgid "Default Gateway" msgstr "Gateway Padrão" -msgid "DNS Server" -msgstr "Servidor DNS" - msgid "Alternate DNS Server" msgstr "Servidor DNS Alternativo" @@ -469,12 +618,66 @@ msgstr "Desabilitado" msgid "Static IP Options" msgstr "Opções de IP Estático" +msgid "Metric" +msgstr "" + msgid "Apply settings" msgstr "Aplicar Configurações" msgid "Information provided by /sys/class/net" msgstr "Informação Provida por /sys/class/net" +msgid "Network Devices" +msgstr "" + +msgid "Mobile Data Settings" +msgstr "" + +msgid "Properties of network devices" +msgstr "" + +msgid "Device" +msgstr "" + +msgid "MAC" +msgstr "" + +msgid "USB vid/pid" +msgstr "" + +msgid "Device type" +msgstr "" + +msgid "Fixed name" +msgstr "" + +msgid "Change" +msgstr "" + +msgid "Settings for Mobile Data Devices" +msgstr "" + +msgid "PIN of SIM card" +msgstr "" + +msgid "APN Settings (Modem device ppp0)" +msgstr "" + +msgid "Access Point Name (APN)" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Successfully Updated Network Configuration" +msgstr "" + +msgid "Error saving network configuration to file" +msgstr "" + +msgid "Unable to detect interface" +msgstr "" + #: includes/system.php msgid "System Information" msgstr "Informação do sistema" @@ -492,10 +695,10 @@ msgid "Language setting saved" msgstr "Configuração de idioma salva" msgid "Console" -msgstr "Console" +msgstr "" msgid "Hostname" -msgstr "Hostname" +msgstr "" msgid "Pi Revision" msgstr "Revisão do Pi" @@ -521,6 +724,12 @@ msgstr "Sistema Reiniciando Agora!" msgid "System Shutting Down Now!" msgstr "Sistema Desligando Agora!" +msgid "Web server port" +msgstr "" + +msgid "Web server bind address" +msgstr "" + #: includes/themes.php msgid "Theme settings" msgstr "Configurações de tema" @@ -528,6 +737,9 @@ msgstr "Configurações de tema" msgid "Select a theme" msgstr "Selecione um tema" +msgid "Color" +msgstr "" + #: includes/data_usage.php msgid "Data usage" msgstr "Uso de dados" @@ -554,7 +766,7 @@ msgid "Monthly" msgstr "Por mês" msgid "interface" -msgstr "interface" +msgstr "" msgid "date" msgstr "data" @@ -606,7 +818,7 @@ msgid "Diffie Hellman parameters" msgstr "Parâmetros Diffie Hellman" msgid "KeepAlive" -msgstr "KeepAlive" +msgstr "" msgid "Server log" msgstr "Log do servidor" @@ -626,6 +838,66 @@ msgstr "Tentando iniciar openvpn" msgid "Attempting to stop openvpn" msgstr "Tentando parar openvpn" +msgid "Configurations" +msgstr "" + +msgid "Currently available OpenVPN client configurations are displayed below." +msgstr "" + +msgid "Activating a configuraton will restart the openvpn-client service." +msgstr "" + +msgid "Delete OpenVPN client" +msgstr "" + +msgid "Delete client configuration? This cannot be undone." +msgstr "" + +msgid "Activate OpenVPN client" +msgstr "" + +msgid "Activate client configuration? This will restart the openvpn-client service." +msgstr "" + +msgid "Activate" +msgstr "" + +msgid "Cancel" +msgstr "" + +msgid "Enable this option to log openvpn activity." +msgstr "" + +msgid "Authentification Method" +msgstr "" + +msgid "Username and password" +msgstr "" + +msgid "Certificates" +msgstr "" + +msgid "Enter username and password" +msgstr "" + +msgid "Certificates in the configuration file" +msgstr "" + +msgid "RaspAP supports certificates by including them in the configuration file." +msgstr "" + +msgid "Signing certification authority (CA) certificate (e.g. ca.crt): enclosed in <ca> ... </ca> tags." +msgstr "" + +msgid "Client certificate (public key) (e.g. client.crt): enclosed in <cert> ... </cert> tags." +msgstr "" + +msgid "Private key of the client certificate (e.g. client.key): enclosed in <key> ... </key> tags." +msgstr "" + +msgid "Configuration File" +msgstr "" + #: includes/torproxy.php msgid "TOR is not running" msgstr "TOR não está sendo executado" @@ -634,7 +906,7 @@ msgid "TOR is running" msgstr "TOR está sendo executado" msgid "Relay" -msgstr "Relay" +msgstr "" msgid "Relay settings" msgstr "Configurações de relay" @@ -660,6 +932,10 @@ msgstr "Tentando iniciar TOR" msgid "Attempting to stop TOR" msgstr "Tentando parar TOR" +#: template/dashboard.php +msgid "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." +msgstr "" + #: common form controls msgid "Save settings" msgstr "Salvar configurações" @@ -681,3 +957,250 @@ msgstr "cima" msgid "down" msgstr "baixo" + +msgid "adblock" +msgstr "" + +msgid "Ad Blocking" +msgstr "" + +msgid "Start Ad Blocking" +msgstr "" + +msgid "Restart Ad Blocking" +msgstr "" + +msgid "Blocklist settings" +msgstr "" + +msgid "Enable blocklists" +msgstr "" + +msgid "Enable this option if you want RaspAP to block DNS requests for ads, tracking and other virtual garbage. Blocklists are gathered from multiple, actively maintained sources and automatically updated, cleaned, optimized and moderated on a daily basis." +msgstr "" + +msgid "This option adds conf-file and addn-hosts to the dnsmasq configuration." +msgstr "" + +msgid "Choose a blocklist provider" +msgstr "" + +msgid "Hostnames blocklist last updated" +msgstr "" + +msgid "Domains blocklist last updated" +msgstr "" + +msgid "Update now" +msgstr "" + +msgid "Statistics" +msgstr "" + +msgid "Information provided by adblock" +msgstr "" + +msgid "Enable custom blocklist" +msgstr "" + +msgid "Define custom hosts to be blocked by entering an IPv4 or IPv6 address followed by any whitespace (spaces or tabs) and the host name." +msgstr "" + +msgid "IPv4 example: 0.0.0.0 badhost.com" +msgstr "" + +msgid "This option adds an addn-hosts directive to the dnsmasq configuration." +msgstr "" + +msgid "Custom blocklist not defined" +msgstr "" + +msgid "Invalid custom IP address found on line " +msgstr "" + +msgid "Invalid custom host found on line " +msgstr "" + +msgid "Tunnel settings" +msgstr "" + +msgid "Configuration Method" +msgstr "" + +msgid "Upload file" +msgstr "" + +msgid "Create manually" +msgstr "" + +msgid "Upload a WireGuard config" +msgstr "" + +msgid "This option uploads and installs an existing WireGuard .conf file on this device." +msgstr "" + +msgid "Apply iptables rules for AP interface" +msgstr "" + +msgid "Recommended if you wish to forward network traffic from the wg0 interface to clients connected on the AP interface." +msgstr "" + +msgid "This option adds iptables Postup and PostDown rules for the configured AP interface (%s)." +msgstr "" + +msgid "Select WireGuard configuration file (.conf)" +msgstr "" + +msgid "Create a local WireGuard config" +msgstr "" + +msgid "Enable server" +msgstr "" + +msgid "Enable this option to secure network traffic by creating an encrypted tunnel between RaspAP and configured peers." +msgstr "" + +msgid "This setting generates a new WireGuard .conf file on this device." +msgstr "" + +msgid "Local public key" +msgstr "" + +msgid "Local Port" +msgstr "" + +msgid "IP Address" +msgstr "" + +msgid "DNS" +msgstr "" + +msgid "Peer" +msgstr "" + +msgid "Enable peer" +msgstr "" + +msgid "Enable this option to encrypt traffic by creating a tunnel between RaspAP and this peer." +msgstr "" + +msgid "This option adds client.conf to the WireGuard configuration." +msgstr "" + +msgid "Peer public key" +msgstr "" + +msgid "Endpoint address" +msgstr "" + +msgid "Allowed IPs" +msgstr "" + +msgid "Persistent keepalive" +msgstr "" + +msgid "Enable this option to display an updated wg-quick debug log." +msgstr "" + +msgid "WireGuard debug log updated" +msgstr "" + +msgid "Scan this QR code with your client to connect to this tunnel" +msgstr "" + +msgid "or download the client.conf file to your device." +msgstr "" + +msgid "Download" +msgstr "" + +msgid "Start WireGuard" +msgstr "" + +msgid "Stop WireGuard" +msgstr "" + +msgid "Information provided by wireguard" +msgstr "" + +msgid "Attempting to start WireGuard" +msgstr "" + +msgid "Attempting to stop WireGuard" +msgstr "" + +msgid "WireGuard configuration updated successfully" +msgstr "" + +msgid "WireGuard configuration failed to be updated" +msgstr "" + +msgid "Client Firewall" +msgstr "" + +msgid "Firewall is ENABLED" +msgstr "" + +msgid "Firewall is OFF" +msgstr "" + +msgid "The default firewall will only allow outgoing and already established traffic." +msgstr "" + +msgid "No incoming UDP traffic is allowed." +msgstr "" + +msgid "There are no restrictions for the access point %s." +msgstr "" + +msgid "Exception: Service" +msgstr "" + +msgid "allow SSH access on port 22" +msgstr "" + +msgid "allow access to the RaspAP GUI on port 80 or 443" +msgstr "" + +msgid "Allow incoming connections for some services from the internet side." +msgstr "" + +msgid "Exception: network device" +msgstr "" + +msgid "Exclude device(s)" +msgstr "" + +msgid "Exclude the given network device(s) (separated by a blank or comma) from firewall rules." +msgstr "" + +msgid "Current client devices: %s" +msgstr "" + +msgid "The access point %s is per default excluded." +msgstr "" + +msgid "Exception: IP-Address" +msgstr "" + +msgid "Allow incoming connections from" +msgstr "" + +msgid "For the given IP-addresses (separated by a blank or comma) the incoming connection (via TCP and UDP) is accepted." +msgstr "" + +msgid "This is required for an OpenVPN via UDP or Wireguard connection." +msgstr "" + +msgid "The list of configured VPN server IP addresses: %s" +msgstr "" + +msgid "Disable Firewall" +msgstr "" + +msgid "Enable Firewall" +msgstr "" + +msgid "Apply changes" +msgstr "" + From 9d5088adf01c6f22ecd53603a02f7557d731009c Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 5 Jun 2022 13:42:00 +0100 Subject: [PATCH 27/27] Backup/apply auth + config with --upgrade. Related to #1162 --- installers/common.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index d24708d8..de7226e3 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -43,8 +43,8 @@ function _install_raspap() { _update_system_packages _install_dependencies _enable_php_lighttpd - _check_for_old_configs _create_raspap_directories + _check_for_old_configs _optimize_php _download_latest_files _change_file_ownership @@ -184,6 +184,13 @@ function _enable_php_lighttpd() { # Verifies existence and permissions of RaspAP directory function _create_raspap_directories() { + if [ "$upgrade" == 1 ]; then + if [ -f $raspap_dir/raspap.auth ]; then + _install_log "Moving existing raspap.auth file to /tmp" + sudo mv $raspap_dir/raspap.auth /tmp || _install_status 1 "Unable to backup raspap.auth to /tmp" + fi + fi + _install_log "Creating RaspAP directories" if [ -d "$raspap_dir" ]; then sudo mv $raspap_dir "$raspap_dir.`date +%F-%R`" || _install_status 1 "Unable to move old '$raspap_dir' out of the way" @@ -267,7 +274,6 @@ function _install_lighttpd_configs() { _install_status 0 } - # Prompt to install ad blocking function _prompt_install_adblock() { _install_log "Configure ad blocking (Beta)" @@ -275,7 +281,7 @@ function _prompt_install_adblock() { if [ "$assume_yes" == 0 ]; then read answer < /dev/tty if [ "$answer" != "${answer#[Nn]}" ]; then - echo -e + _install_status 0 "(Skipped)" else _install_adblock fi @@ -339,7 +345,7 @@ function _prompt_install_openvpn() { if [ "$assume_yes" == 0 ]; then read answer < /dev/tty if [ "$answer" != "${answer#[Nn]}" ]; then - echo -e + _install_status 0 "(Skipped)" else _install_openvpn fi @@ -357,7 +363,7 @@ function _prompt_install_wireguard() { if [ "$assume_yes" == 0 ]; then read answer < /dev/tty if [ "$answer" != "${answer#[Nn]}" ]; then - echo -e + _install_status 0 "(Skipped)" else _install_wireguard fi @@ -420,13 +426,14 @@ function _download_latest_files() { _install_log "Cloning latest files from github" git clone --branch $branch --depth 1 -c advice.detachedHead=false $git_source_url /tmp/raspap-webgui || _install_status 1 "Unable to download files from github" - sudo mv /tmp/raspap-webgui $webroot_dir || _install_status 1 "Unable to move raspap-webgui to web root" + if [ "$upgrade" == 1 ]; then _install_log "Applying existing configuration to ${webroot_dir}/includes" sudo mv /tmp/config.php $webroot_dir/includes || _install_status 1 "Unable to move config.php to ${webroot_dir}/includes" if [ -f /tmp/raspap.auth ]; then + _install_log "Applying existing authentication file to ${raspap_dir}" sudo mv /tmp/raspap.auth $raspap_dir || _install_status 1 "Unable to restore authentification credentials file to ${raspap_dir}" fi fi @@ -449,10 +456,6 @@ function _check_for_old_configs() { if [ "$upgrade" == 1 ]; then _install_log "Moving existing configuration to /tmp" sudo mv $webroot_dir/includes/config.php /tmp || _install_status 1 "Unable to move config.php to /tmp" - - if [ -f $raspap_dir/raspap.auth ]; then - sudo mv $raspap_dir/raspap.auth /tmp || _install_status 1 "Unable to backup raspap.auth to /tmp" - fi else _install_log "Backing up existing configs to ${raspap_dir}/backups" if [ -f /etc/network/interfaces ]; then @@ -577,7 +580,7 @@ function _configure_networking() { if [ "$assume_yes" == 0 ]; then read answer < /dev/tty if [ "$answer" != "${answer#[Nn]}" ]; then - echo -e + _install_status 0 "(Skipped)" else _enable_raspap_daemon fi