From 73985333b0293637e4ec3c52041b4932e491fd33 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 19 Aug 2025 17:17:27 -0700 Subject: [PATCH 01/27] Update class methods + js handler for custom path locations --- app/js/ui/main.js | 2 +- src/RaspAP/Auth/HTTPAuth.php | 3 ++- src/RaspAP/Exceptions/HtmlErrorRenderer.php | 2 +- src/RaspAP/Plugins/PluginInstaller.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/js/ui/main.js b/app/js/ui/main.js index c387ea50..008765c6 100644 --- a/app/js/ui/main.js +++ b/app/js/ui/main.js @@ -542,7 +542,7 @@ function disableValidation(form) { function updateActivityLED() { const threshold_bytes = 300; - fetch('/app/net_activity') + fetch('app/net_activity') .then(res => res.text()) .then(data => { const activity = parseInt(data.trim()); diff --git a/src/RaspAP/Auth/HTTPAuth.php b/src/RaspAP/Auth/HTTPAuth.php index d5fcf215..fe141ae0 100755 --- a/src/RaspAP/Auth/HTTPAuth.php +++ b/src/RaspAP/Auth/HTTPAuth.php @@ -82,9 +82,10 @@ class HTTPAuth session_regenerate_id(true); // generate a new session id session_unset(); // unset all session variables session_destroy(); // destroy the session + $basePath = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/'); $redirectUrl = $_SERVER['REQUEST_URI']; if (strpos($redirectUrl, '/login') === false) { - header('Location: /login?action=' . urlencode($redirectUrl)); + header('Location: ' . $basePath . '/login?action=' . urlencode(basename($redirectUrl))); exit(); } } diff --git a/src/RaspAP/Exceptions/HtmlErrorRenderer.php b/src/RaspAP/Exceptions/HtmlErrorRenderer.php index 058a2478..9d6b5612 100755 --- a/src/RaspAP/Exceptions/HtmlErrorRenderer.php +++ b/src/RaspAP/Exceptions/HtmlErrorRenderer.php @@ -19,7 +19,7 @@ class HtmlErrorRenderer public function __construct() { $this->charset = 'UTF-8'; - $this->projectDir = $_SERVER['DOCUMENT_ROOT']; + $this->projectDir = dirname(__DIR__, 3); $this->template = '/templates/exception.php'; $this->debug = true; } diff --git a/src/RaspAP/Plugins/PluginInstaller.php b/src/RaspAP/Plugins/PluginInstaller.php index 3df0b067..e6043c8e 100644 --- a/src/RaspAP/Plugins/PluginInstaller.php +++ b/src/RaspAP/Plugins/PluginInstaller.php @@ -32,7 +32,7 @@ class PluginInstaller $this->tempSudoers = '/tmp/090_'; $this->destSudoers = '/etc/sudoers.d/'; $this->refModules = '/refs/heads/master/.gitmodules'; - $this->rootPath = $_SERVER['DOCUMENT_ROOT']; + $this->rootPath = dirname(__DIR__, 3); $this->pluginsManifest = '/plugins/manifest.json'; $this->repoPublic = $this->getRepository(); $this->helperScriptPath = RASPI_CONFIG.'/plugins/plugin_helper.sh'; From 6dd80575f467491a380cc1dc4859d1aabffb269b Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Thu, 21 Aug 2025 21:35:16 +0200 Subject: [PATCH 02/27] Add torrent job to release.yml --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec50c0a9..4a57d545 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,3 +44,15 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.event.inputs.tag || github.ref }} overwrite: true + + torrent: + needs: build-raspap-image + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Generate torrents for release + uses: devopsx/action-torrent@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + local: false From 66e2397ca00f57e6d74763daea0067e8141e5f9b Mon Sep 17 00:00:00 2001 From: ruralmeltdown Date: Thu, 21 Aug 2025 15:37:09 -0700 Subject: [PATCH 03/27] added |rootCA\.pem to lighttpd.config --- config/50-raspap-router.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/50-raspap-router.conf b/config/50-raspap-router.conf index 1c10d26f..6f25bc3e 100644 --- a/config/50-raspap-router.conf +++ b/config/50-raspap-router.conf @@ -2,7 +2,7 @@ server.modules += ( "mod_rewrite", ) -$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" { +$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config|rootCA\.pem)).*" { url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" ) server.error-handler-404 = "/REPLACE_ME/index.php" } From f7e4b95ee278d7e345a6d87803db9c2ab0ba61e6 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 28 Aug 2025 08:28:00 -0700 Subject: [PATCH 04/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 523539fb..75a2326a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![RaspAP Custom OS images](https://github.com/user-attachments/assets/e871adf1-123c-450b-94eb-80a185c242cc) -[![Release 3.4.0](https://img.shields.io/badge/release-v3.4.0-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=Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![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) [![Reddit](https://img.shields.io/badge/%2Fr%2FRaspAP-e05d44?style=flat&logo=Reddit&logoColor=white&labelColor=e05d44&color=b14835)](https://reddit.com/r/RaspAP) [![Discord](https://img.shields.io/discord/642436993451819018?color=7289DA&label=Discord&logo=discord&style=flat)](https://discord.gg/KVAsaAR) +[![Release 3.4.1](https://img.shields.io/badge/release-v3.4.1-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=Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![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) [![Reddit](https://img.shields.io/badge/%2Fr%2FRaspAP-e05d44?style=flat&logo=Reddit&logoColor=white&labelColor=e05d44&color=b14835)](https://reddit.com/r/RaspAP) [![Discord](https://img.shields.io/discord/642436993451819018?color=7289DA&label=Discord&logo=discord&style=flat)](https://discord.gg/KVAsaAR) RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our [custom OS images](#pre-built-image), [Quick installer](#quick-installer) and [Docker container](#docker-support) create 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](https://docs.raspap.com/wireguard/), [Tailscale](https://docs.raspap.com/tailscale/) and [OpenVPN](https://docs.raspap.com/openvpn/) support, [SSL certificates](https://docs.raspap.com/ssl/), [ad blocking](#ad-blocking), 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 a07f5f3f..9995bdcb 100755 --- a/includes/defaults.php +++ b/includes/defaults.php @@ -7,7 +7,7 @@ if (!defined('RASPI_CONFIG')) { $defaults = [ 'RASPI_BRAND_TEXT' => 'RaspAP', 'RASPI_BRAND_TITLE' => RASPI_BRAND_TEXT.' Admin Panel', - 'RASPI_VERSION' => '3.4.0', + 'RASPI_VERSION' => '3.4.1', 'RASPI_CONFIG_NETWORK' => RASPI_CONFIG.'/networking/defaults.json', 'RASPI_CONFIG_PROVIDERS' => 'config/vpn-providers.json', 'RASPI_CONFIG_API' => RASPI_CONFIG.'/api', diff --git a/index.php b/index.php index 2e15ab58..a31e9c68 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 3.4.0 + * @version 3.4.1 * @link https://github.com/RaspAP/raspap-webgui/ * @link https://raspap.com/ * @see http://sirlagz.net/2013/02/08/raspap-webgui/ From a36e3c7b5767b865b5fe138db5686d9c76302e1c Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 3 Sep 2025 03:22:41 -0700 Subject: [PATCH 05/27] Update static svg logo w/ animation keyframes --- app/img/raspAP-logo.php | 67 ++++++++++++++++++----------------------- includes/functions.php | 2 +- 2 files changed, 31 insertions(+), 38 deletions(-) diff --git a/app/img/raspAP-logo.php b/app/img/raspAP-logo.php index c8115634..c43b7689 100755 --- a/app/img/raspAP-logo.php +++ b/app/img/raspAP-logo.php @@ -10,42 +10,35 @@ $color = getColorOpt(); xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - viewBox="0 0 490.66666 487.11066" - height="487.11066" - width="490.66666" + viewBox="0 180 352 290" xml:space="preserve" id="svg2" - version="1.1">image/svg+xml + version="1.1"> + + + + + + + + + + + + + + diff --git a/includes/functions.php b/includes/functions.php index 8b388cf4..121dcd0a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -915,7 +915,7 @@ function renderStatus($hostapd_led, $hostapd_status, $memused_led, $memused, $cp ?>
Status
From a5a6747ced77b8ab593dd58148c53d6ecea98a3a Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 3 Sep 2025 03:43:17 -0700 Subject: [PATCH 06/27] Tweak logo size + position --- app/css/all.css | 4 ++-- app/img/raspAP-logo.php | 7 ++++--- includes/functions.php | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/css/all.css b/app/css/all.css index f6aec2cd..ccd2e956 100644 --- a/app/css/all.css +++ b/app/css/all.css @@ -48,8 +48,8 @@ th { } .navbar-logo { - margin-top: 0.5em; - margin-left: 0.5em; + margin-top: 0.2em; + margin-left: 0.7em; } .page-header { diff --git a/app/img/raspAP-logo.php b/app/img/raspAP-logo.php index c43b7689..e356fe1d 100755 --- a/app/img/raspAP-logo.php +++ b/app/img/raspAP-logo.php @@ -37,8 +37,9 @@ $color = getColorOpt(); - - - + + + + diff --git a/includes/functions.php b/includes/functions.php index 121dcd0a..717cdaed 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -915,7 +915,7 @@ function renderStatus($hostapd_led, $hostapd_status, $memused_led, $memused, $cp ?>
Status
From a295dae059c49e154e836a3ff07095e7c135ca4c Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 3 Sep 2025 07:04:19 -0700 Subject: [PATCH 07/27] Add .login-logo class style --- app/css/all.css | 6 ++++++ templates/login.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/css/all.css b/app/css/all.css index ccd2e956..d34a7a52 100644 --- a/app/css/all.css +++ b/app/css/all.css @@ -52,6 +52,12 @@ th { margin-left: 0.7em; } +.login-logo { + width: 70px; + height: 70px; + margin-left: 1.2rem; +} + .page-header { font-size: 26pt; margin: 20px 0 20px; diff --git a/templates/login.php b/templates/login.php index 071876c7..990632ad 100755 --- a/templates/login.php +++ b/templates/login.php @@ -8,7 +8,7 @@
- +
From 931086aecbf1cd6bf1545108151aa67114b477e0 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 3 Sep 2025 07:04:58 -0700 Subject: [PATCH 08/27] Update w/ RASPI_UI_STATIC_LOGO user option --- app/img/raspAP-logo.php | 5 ++++- config/config.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/img/raspAP-logo.php b/app/img/raspAP-logo.php index e356fe1d..95de26d3 100755 --- a/app/img/raspAP-logo.php +++ b/app/img/raspAP-logo.php @@ -1,7 +1,9 @@ - + + diff --git a/config/config.php b/config/config.php index 2dd0223c..546441e6 100755 --- a/config/config.php +++ b/config/config.php @@ -69,6 +69,7 @@ define('RASPI_SYSTEM_ENABLED', true); define('RASPI_MONITOR_ENABLED', false); define('RASPI_RESTAPI_ENABLED', false); define('RASPI_PLUGINS_ENABLED', true); +define('RASPI_UI_STATIC_LOGO', false); // Locale settings define('LOCALE_ROOT', 'locale'); From 31303727a4b57228ab662ef3ca7f4d390ec58924 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 4 Sep 2025 06:06:36 -0700 Subject: [PATCH 09/27] Update w/ static param --- app/img/raspAP-logo.php | 19 ++++++++++++------- includes/functions.php | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/img/raspAP-logo.php b/app/img/raspAP-logo.php index 95de26d3..2b02519a 100755 --- a/app/img/raspAP-logo.php +++ b/app/img/raspAP-logo.php @@ -3,7 +3,8 @@ require_once '../../includes/config.php'; require_once '../../includes/functions.php'; $color = getColorOpt(); -$static = defined('RASPI_UI_STATIC_LOGO') && RASPI_UI_STATIC_LOGO === true; +$static = (isset($_GET['static']) && $_GET['static'] == '1') || + (defined('RASPI_UI_STATIC_LOGO') && RASPI_UI_STATIC_LOGO === true); ?> + diff --git a/includes/functions.php b/includes/functions.php index 717cdaed..38e972eb 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -915,7 +915,7 @@ function renderStatus($hostapd_led, $hostapd_status, $memused_led, $memused, $cp ?>
Status
From 159e82dbd3e4fcb9ed20aefd3682045f1dda880e Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 4 Sep 2025 06:07:14 -0700 Subject: [PATCH 10/27] Style tweak for login-logo --- app/css/all.css | 1 + 1 file changed, 1 insertion(+) diff --git a/app/css/all.css b/app/css/all.css index d34a7a52..e63272b5 100644 --- a/app/css/all.css +++ b/app/css/all.css @@ -56,6 +56,7 @@ th { width: 70px; height: 70px; margin-left: 1.2rem; + margin-bottom: -0.5rem; } .page-header { From f7058b048a27116e3c9209b837179e599fb8e9fa Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 5 Sep 2025 06:29:32 -0700 Subject: [PATCH 11/27] Fix: add cache-busting to theme CSS @import --- app/css/custom.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/css/custom.php b/app/css/custom.php index 9113ef39..da824ff1 100644 --- a/app/css/custom.php +++ b/app/css/custom.php @@ -2,6 +2,7 @@ /* Theme Name: RaspAP default @@ -11,7 +12,7 @@ Description: Default theme for RaspAP License: GNU General Public License v3.0 */ -@import url('all.css'); +@import url('?v='); :root { --raspap-theme-color: ; From 23103c8c4b2210c64824c1dc5584f83225e720f5 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 9 Sep 2025 09:52:13 -0700 Subject: [PATCH 12/27] Apply JSON linter changes --- config/defaults.json | 177 +++++++++++++++++++++++++------------------ 1 file changed, 102 insertions(+), 75 deletions(-) diff --git a/config/defaults.json b/config/defaults.json index 8713d5dd..5531594f 100644 --- a/config/defaults.json +++ b/config/defaults.json @@ -1,15 +1,15 @@ { - "hostapd":{ - "modes":{ - "n":{ - "settings":[ + "hostapd": { + "modes": { + "n": { + "settings": [ "hw_mode=g", "ieee80211n=1", "wmm_enabled=1" ] }, - "ac":{ - "settings":[ + "ac": { + "settings": [ "hw_mode=a", "# N", "ieee80211n=1", @@ -25,90 +25,117 @@ "vht_oper_centr_freq_seg0_idx={VHT_FREQ_IDX}" ] }, - "g":{ - "settings":[ + "g": { + "settings": [ "hw_mode=g", "ieee80211n=0" ] }, - "a":{ - "settings":[ + "a": { + "settings": [ "hw_mode=a", "ieee80211n=0" ] }, - "b":{ - "settings":[ + "b": { + "settings": [ "hw_mode=b", "ieee80211n=0" ] } + } + }, + "dhcp": { + "wlan0": { + "static ip_address": [ "10.3.141.1/24" ], + "static routers": [ "10.3.141.1" ], + "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], + "subnetmask": [ "255.255.255.0" ] }, - "dhcp":{ - "wlan0":{ - "static ip_address":[ "10.3.141.1/24" ], - "static routers":[ "10.3.141.1" ], - "static domain_name_server":[ "1.1.1.1 8.8.8.8" ], - "subnetmask":[ "255.255.255.0" ] - }, - "wlan1":{ - "static ip_address":[ "10.9.141.1/24" ], - "static routers":[ "10.9.141.1" ], - "static domain_name_server":[ "1.1.1.1 8.8.8.8" ], - "subnetmask":[ "255.255.255.0" ] - }, - "uap0":{ - "static ip_address":[ "192.168.50.1/24" ], - "static routers":[ "192.168.50.1" ], - "static domain_name_server":[ "1.1.1.1 8.8.8.8" ], - "subnetmask":[ "255.255.255.0" ] - }, - "options":{ - "# RaspAP default configuration":null, - "hostname":null, - "clientid":null, - "persistent":null, - "option rapid_commit":null, - "option domain_name_servers, domain_name, domain_search, host_name":null, - "option classless_static_routes":null, - "option ntp_servers":null, - "require dhcp_server_identifier":null, - "slaac private":null, - "nohook lookup-hostname":null - } + "wlan1": { + "static ip_address": [ "10.9.141.1/24" ], + "static routers": [ "10.9.141.1" ], + "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], + "subnetmask": [ "255.255.255.0" ] }, - "dnsmasq":{ - "wlan0":{ - "dhcp-range":[ "10.3.141.50,10.3.141.254,255.255.255.0,12h" ] - }, - "wlan1":{ - "dhcp-range":[ "10.9.141.50,10.9.141.254,255.255.255.0,12h" ] - }, - "uap0":{ - "dhcp-range":[ "192.168.50.50,192.168.50.150,12h" ] - } + "wlan2": { + "static ip_address": [ "10.6.141.1/24" ], + "static routers": [ "10.6.141.1" ], + "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], + "subnetmask": [ "255.255.255.0" ] }, - "wireguard":{ - "server":{ - "Address":[ "10.8.2.1/24" ], - "ListenPort":[ "51820" ], - "DNS":[ "9.9.9.9" ], - "PostUp":[ "iptables -A FORWARD -i wlan0 -o wg0 -j ACCEPT; iptables -A FORWARD -i wg0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE" ], - "PostDown":[ "iptables -D FORWARD -i wlan0 -o wg0 -j ACCEPT; iptables -D FORWARD -i wg0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -D POSTROUTING -o wg0 -j MASQUERADE" ], - "PostUpEx":[ "iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ], - "PreDown":[ "iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ] - }, - "peer":{ - "Address":[ "10.8.1.2/24" ], - "Endpoint":[ "10.8.2.1:51820" ], - "ListenPort":[ "21841" ], - "AllowedIPs":[ "10.8.2.0/24" ], - "PersistentKeepalive":[ "15" ] - } - }, - "txpower": { - "dbm": [ "auto", "30", "20", "17", "10", "6", "3", "1", "0" ] - } + "uap0": { + "static ip_address": ["192.168.50.1/24" ], + "static routers": [ "192.168.50.1" ], + "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], + "subnetmask": [ "255.255.255.0" ] + }, + "eth0": { + "static ip_address": [ "192.168.55.1/24" ], + "static routers": [ "192.168.55.1" ], + "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], + "subnetmask": [ "255.255.255.0" ] + }, + "enx": { + "static ip_address": [ "192.168.60.1/24" ], + "static routers": [ "192.168.60.1" ], + "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], + "subnetmask": [ "255.255.255.0" ] + }, + "options": { + "# RaspAP default configuration": null, + "hostname": null, + "clientid": null, + "persistent": null, + "option rapid_commit": null, + "option domain_name_servers, domain_name, domain_search, host_name": null, + "option classless_static_routes": null, + "option ntp_servers": null, + "require dhcp_server_identifier": null, + "slaac private": null, + "nohook lookup-hostname": null + } + }, + "dnsmasq": { + "wlan0": { + "dhcp-range": [ "10.3.141.50,10.3.141.254,255.255.255.0,12h" ] + }, + "wlan1": { + "dhcp-range": [ "10.9.141.50,10.9.141.254,255.255.255.0,12h" ] + }, + "wlan2": { + "dhcp-range": [ "10.6.141.50,10.6.141.254,255.255.255.0,12h" ] + }, + "uap0": { + "dhcp-range": [ "192.168.50.50,192.168.50.150,12h" ] + }, + "eth0": { + "dhcp-range": [ "192.168.55.50,192.168.55.150,12h" ] + }, + "enx": { + "dhcp-range": [ "192.168.60.50,192.168.60.150,12h" ] + } + }, + "wireguard": { + "server": { + "Address": [ "10.8.2.1/24" ], + "ListenPort": [ "51820" ], + "DNS": [ "9.9.9.9" ], + "PostUp": [ "iptables -A FORWARD -i wlan0 -o %i -j ACCEPT; iptables -A FORWARD -i %i -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -A POSTROUTING -o %i -j MASQUERADE" ], + "PostDown": [ "iptables -D FORWARD -i wlan0 -o %i -j ACCEPT; iptables -D FORWARD -i %i -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -D POSTROUTING -o %i -j MASQUERADE" ], + "PostUpEx": [ "iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ], + "PreDown": [ "iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ] + }, + "peer": { + "Address": [ "10.8.1.2/24" ], + "Endpoint": [ "10.8.2.1:51820" ], + "ListenPort": [ "21841" ], + "AllowedIPs": [ "10.8.2.0/24" ], + "PersistentKeepalive": [ "15" ] + } + }, + "txpower": { + "dbm": [ "auto", "30", "20", "17", "10", "6", "3", "1", "0" ] } } From 8bb18b43f8302d12c153c0a5a49b8310ca3f825e Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 11 Sep 2025 08:56:09 -0700 Subject: [PATCH 13/27] Fix: fallback by seeding default values for interface --- .../Networking/Hotspot/DhcpcdManager.php | 22 ++++++++++++++++++- .../Networking/Hotspot/DnsmasqManager.php | 11 +++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/RaspAP/Networking/Hotspot/DhcpcdManager.php b/src/RaspAP/Networking/Hotspot/DhcpcdManager.php index 9b8f58db..b49e9285 100644 --- a/src/RaspAP/Networking/Hotspot/DhcpcdManager.php +++ b/src/RaspAP/Networking/Hotspot/DhcpcdManager.php @@ -41,7 +41,7 @@ class DhcpcdManager { // determine static IP, routers, DNS $jsonData = $this->getInterfaceConfig($ap_iface); - //error_log("DhcpcdManager::buildConfig() jsonData =" . print_r($jsonData, true)); + $ip_address = empty($jsonData['StaticIP']) ? getDefaultNetValue('dhcp', $ap_iface, 'static ip_address') : $jsonData['StaticIP']; @@ -485,6 +485,21 @@ class DhcpcdManager } } } + } else { + // fallback to defaults + $rangeRaw = getDefaultNetValue('dnsmasq', $iface, 'dhcp-range'); + if ($rangeRaw) { + $result['DHCPEnabled'] = true; + $rangeParts = explode(',', $rangeRaw); + $result['RangeStart'] = $rangeParts[0] ?? null; + $result['RangeEnd'] = $rangeParts[1] ?? null; + $result['RangeMask'] = $rangeParts[2] ?? null; + $leaseSpec = $rangeParts[3] ?? null; + if ($leaseSpec && preg_match('/^(\d+)([smhd])?$/i', $leaseSpec, $m)) { + $result['leaseTime'] = $m[1]; + $result['leaseTimeInterval'] = $m[2] ?? 'h'; + } + } } // dhcpcd @@ -513,6 +528,11 @@ class DhcpcdManager $result['FallbackEnabled'] = (bool) preg_match('/fallback\s+static_' . preg_quote($iface, '/') . '/i', $block); $result['DefaultRoute'] = (bool) preg_match('/\bgateway\b/', $block); $result['NoHookWPASupplicant'] = (bool) preg_match('/nohook\s+wpa_supplicant/i', $block); + } else { + $result['StaticIP'] = getDefaultNetValue('dhcp', $iface, 'static ip_address'); + $result['SubnetMask'] = getDefaultNetValue('dhcp', $iface, 'subnetmask'); + $result['StaticRouters'] = getDefaultNetValue('dhcp', $iface, 'static routers'); + $result['StaticDNS'] = getDefaultNetValue('dhcp', $iface, 'static domain_name_server'); } } return $result; diff --git a/src/RaspAP/Networking/Hotspot/DnsmasqManager.php b/src/RaspAP/Networking/Hotspot/DnsmasqManager.php index 49bb8ee7..6076ff44 100644 --- a/src/RaspAP/Networking/Hotspot/DnsmasqManager.php +++ b/src/RaspAP/Networking/Hotspot/DnsmasqManager.php @@ -61,8 +61,17 @@ class DnsmasqManager * @return array $config * @throws \RuntimeException */ - public function buildConfig(array $syscfg, string $iface, bool $wifiAPEnable, bool $bridgedEnable): array + public function buildConfig(?array $syscfg, string $iface, bool $wifiAPEnable, bool $bridgedEnable): array { + // fallback: if no syscfg for interface seed with defaults + if ($syscfg === null) { + $syscfg = []; + $dhcp_range = getDefaultNetValue('dnsmasq', $iface, 'dhcp-range'); + if ($dhcp_range !== false) { + $syscfg['dhcp-range'] = $dhcp_range; + } + } + if ($wifiAPEnable == 1) { // Enable uap0 configuration for ap-sta mode // Set dhcp-range from system config, fallback to default if undefined From bd53ef9ecc85ea8039c4898295d7b17e37685b57 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 11 Sep 2025 08:57:49 -0700 Subject: [PATCH 14/27] Remove CIDR notation from static IP addresses --- config/defaults.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/defaults.json b/config/defaults.json index 5531594f..318f1310 100644 --- a/config/defaults.json +++ b/config/defaults.json @@ -53,31 +53,31 @@ "subnetmask": [ "255.255.255.0" ] }, "wlan1": { - "static ip_address": [ "10.9.141.1/24" ], + "static ip_address": [ "10.9.141.1" ], "static routers": [ "10.9.141.1" ], "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], "subnetmask": [ "255.255.255.0" ] }, "wlan2": { - "static ip_address": [ "10.6.141.1/24" ], + "static ip_address": [ "10.6.141.1" ], "static routers": [ "10.6.141.1" ], "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], "subnetmask": [ "255.255.255.0" ] }, "uap0": { - "static ip_address": ["192.168.50.1/24" ], + "static ip_address": ["192.168.50.1" ], "static routers": [ "192.168.50.1" ], "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], "subnetmask": [ "255.255.255.0" ] }, "eth0": { - "static ip_address": [ "192.168.55.1/24" ], + "static ip_address": [ "192.168.55.1" ], "static routers": [ "192.168.55.1" ], "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], "subnetmask": [ "255.255.255.0" ] }, "enx": { - "static ip_address": [ "192.168.60.1/24" ], + "static ip_address": [ "192.168.60.1" ], "static routers": [ "192.168.60.1" ], "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], "subnetmask": [ "255.255.255.0" ] From 3eaa5b7801d22d1daf7da6726a01f54e2b849f76 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 11 Sep 2025 09:19:42 -0700 Subject: [PATCH 15/27] Update dhcp wlan0 static IP address --- config/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/defaults.json b/config/defaults.json index 318f1310..c9770cc1 100644 --- a/config/defaults.json +++ b/config/defaults.json @@ -47,7 +47,7 @@ }, "dhcp": { "wlan0": { - "static ip_address": [ "10.3.141.1/24" ], + "static ip_address": [ "10.3.141.1" ], "static routers": [ "10.3.141.1" ], "static domain_name_server": [ "1.1.1.1 8.8.8.8" ], "subnetmask": [ "255.255.255.0" ] From 66b0a42576f098264f4f5d0c8a70311f4ea7483f Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 12 Sep 2025 23:08:48 -0700 Subject: [PATCH 16/27] Fix undefined vars in class methods + includes --- includes/dashboard.php | 1 + includes/wireguard.php | 4 +++- src/RaspAP/Networking/Hotspot/DnsmasqManager.php | 2 +- src/RaspAP/System/Sysinfo.php | 4 +++- src/RaspAP/UI/Dashboard.php | 12 +++++------- templates/wg/logging.php | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/includes/dashboard.php b/includes/dashboard.php index 303060f1..664536ad 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -88,6 +88,7 @@ function DisplayDashboard(&$extraFooterScripts): void } else { $firewallManaged = ''; $firewallStatus = ($dashboard->firewallEnabled() == true) ? "active" : ""; + $firewallUnavailable = null; } echo renderTemplate( diff --git a/includes/wireguard.php b/includes/wireguard.php index af6dbe28..0493510c 100755 --- a/includes/wireguard.php +++ b/includes/wireguard.php @@ -49,7 +49,9 @@ function DisplayWireGuardConfig() exec('sudo cat '. RASPI_WIREGUARD_CONFIG, $return); $conf = ParseConfig($return, $parseFlag); $wg_srvpubkey = exec('sudo cat '. RASPI_WIREGUARD_PATH .'wg-server-public.key', $return); - $wg_srvport = ($conf['ListenPort'] == '') ? getDefaultNetValue('wireguard','server','ListenPort') : $conf['ListenPort']; + $wg_srvport = ($conf['ListenPort'] ?? '') === '' + ? getDefaultNetValue('wireguard','server','ListenPort') + : $conf['ListenPort']; $wg_srvipaddress = ($conf['Address'] == '') ? getDefaultNetValue('wireguard','server','Address') : $conf['Address']; $wg_srvdns = ($conf['DNS'] == '') ? getDefaultNetValue('wireguard','server','DNS') : $conf['DNS']; if (is_array($wg_srvdns)) { diff --git a/src/RaspAP/Networking/Hotspot/DnsmasqManager.php b/src/RaspAP/Networking/Hotspot/DnsmasqManager.php index 6076ff44..ddfb1aa5 100644 --- a/src/RaspAP/Networking/Hotspot/DnsmasqManager.php +++ b/src/RaspAP/Networking/Hotspot/DnsmasqManager.php @@ -168,7 +168,7 @@ class DnsmasqManager if ($post_data['no-resolv'] == "1") { $config[] = "no-resolv"; } - foreach ($post_data['server'] as $server) { + foreach (($post_data['server'] ?? []) as $server) { $config[] = "server=$server"; } if (!empty($post_data['DNS1'])) { diff --git a/src/RaspAP/System/Sysinfo.php b/src/RaspAP/System/Sysinfo.php index 0e636709..b731503f 100755 --- a/src/RaspAP/System/Sysinfo.php +++ b/src/RaspAP/System/Sysinfo.php @@ -173,12 +173,14 @@ class Sysinfo { exec('cat '. RASPI_ADBLOCK_CONFIG, $return); $arrConf = ParseConfig($return); + $enabled = false; if (sizeof($arrConf) > 0) { $enabled = true; } exec('pidof dnsmasq | wc -l', $dnsmasq); $dnsmasq_state = ($dnsmasq[0] > 0); - $status = $dnsmasq_state && $enabled ? true : false; + + $status = $dnsmasq_state && $enabled; return $status; } diff --git a/src/RaspAP/UI/Dashboard.php b/src/RaspAP/UI/Dashboard.php index fea6804a..3f31811a 100644 --- a/src/RaspAP/UI/Dashboard.php +++ b/src/RaspAP/UI/Dashboard.php @@ -301,14 +301,12 @@ class Dashboard { */ public function firewallEnabled(): bool { - $conf = array(); - if (file_exists($this->firewallConfig) ) { - $conf = parse_ini_file($this->firewallConfig); + if (!file_exists($this->firewallConfig)) { + return false; } - if ($conf["firewall-enable"] == 1) { - return true; - } - return false; + + $conf = parse_ini_file($this->firewallConfig) ?: []; + return !empty($conf['firewall-enable']) && (int)$conf['firewall-enable'] === 1; } /* diff --git a/templates/wg/logging.php b/templates/wg/logging.php index 26ab9e5d..6e52e956 100644 --- a/templates/wg/logging.php +++ b/templates/wg/logging.php @@ -8,7 +8,7 @@ aria-describedby="wgLogEnable">
- '.htmlspecialchars($wg_log, ENT_QUOTES).''; + '.htmlspecialchars($log, ENT_QUOTES).''; ?>
From d4da4032b20e88c5ebe69cd9be211fdbb9b4c05a Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Tue, 16 Sep 2025 10:32:35 +0200 Subject: [PATCH 17/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75a2326a..6d2bd792 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![RaspAP Custom OS images](https://github.com/user-attachments/assets/e871adf1-123c-450b-94eb-80a185c242cc) +![RaspAP Moonbase](https://i.imgur.com/1dvkMDk.jpeg) [![Release 3.4.1](https://img.shields.io/badge/release-v3.4.1-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=Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![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) [![Reddit](https://img.shields.io/badge/%2Fr%2FRaspAP-e05d44?style=flat&logo=Reddit&logoColor=white&labelColor=e05d44&color=b14835)](https://reddit.com/r/RaspAP) [![Discord](https://img.shields.io/discord/642436993451819018?color=7289DA&label=Discord&logo=discord&style=flat)](https://discord.gg/KVAsaAR) RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our [custom OS images](#pre-built-image), [Quick installer](#quick-installer) and [Docker container](#docker-support) create 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](https://docs.raspap.com/wireguard/), [Tailscale](https://docs.raspap.com/tailscale/) and [OpenVPN](https://docs.raspap.com/openvpn/) support, [SSL certificates](https://docs.raspap.com/ssl/), [ad blocking](#ad-blocking), security audits, [captive portal integration](https://docs.raspap.com/captive/), themes and [multilingual options](https://docs.raspap.com/translations/) are included. From f7ac3d0b9df022633b6d67df88608d4395c6cea2 Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Mon, 22 Sep 2025 10:48:16 +0200 Subject: [PATCH 18/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6d2bd792..91425a1d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![RaspAP Moonbase](https://i.imgur.com/1dvkMDk.jpeg) +![RaspAP Hero](https://i.imgur.com/aNAG3Wa.jpeg) [![Release 3.4.1](https://img.shields.io/badge/release-v3.4.1-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=Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![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) [![Reddit](https://img.shields.io/badge/%2Fr%2FRaspAP-e05d44?style=flat&logo=Reddit&logoColor=white&labelColor=e05d44&color=b14835)](https://reddit.com/r/RaspAP) [![Discord](https://img.shields.io/discord/642436993451819018?color=7289DA&label=Discord&logo=discord&style=flat)](https://discord.gg/KVAsaAR) RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our [custom OS images](#pre-built-image), [Quick installer](#quick-installer) and [Docker container](#docker-support) create 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](https://docs.raspap.com/wireguard/), [Tailscale](https://docs.raspap.com/tailscale/) and [OpenVPN](https://docs.raspap.com/openvpn/) support, [SSL certificates](https://docs.raspap.com/ssl/), [ad blocking](#ad-blocking), security audits, [captive portal integration](https://docs.raspap.com/captive/), themes and [multilingual options](https://docs.raspap.com/translations/) are included. From 3b2396ec4161af17c179c4822afd93a13c148ef0 Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 22 Sep 2025 03:10:11 -0700 Subject: [PATCH 19/27] php 7.4 compatibility fix --- includes/dashboard.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/dashboard.php b/includes/dashboard.php index 664536ad..441cd052 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -82,7 +82,9 @@ function DisplayDashboard(&$extraFooterScripts): void $vpnStatus = $vpn ? "active" : "inactive"; $vpnManaged = $vpn ? $dashboard->getVpnManaged($vpn) : null; $firewallManaged = $firewallStatus = ""; - $firewallInstalled = array_filter($plugins, fn($p) => str_ends_with($p, 'Firewall')) ? true : false; + $firewallInstalled = (bool) array_filter($plugins, function($p) { + return substr($p, -strlen('Firewall')) === 'Firewall'; + }); if (!$firewallInstalled) { $firewallUnavailable = ''; } else { From e514178b33559519507540d9903d09898f1c604c Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 25 Sep 2025 01:52:09 -0700 Subject: [PATCH 20/27] Create ensureWpaSupplicantConf(), call from setKnownStationsWPA --- src/RaspAP/Networking/Hotspot/WiFiManager.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/RaspAP/Networking/Hotspot/WiFiManager.php b/src/RaspAP/Networking/Hotspot/WiFiManager.php index 316ba074..e61044a8 100644 --- a/src/RaspAP/Networking/Hotspot/WiFiManager.php +++ b/src/RaspAP/Networking/Hotspot/WiFiManager.php @@ -313,6 +313,8 @@ class WiFiManager */ public function setKnownStationsWPA($networks) { + $this->ensureWpaSupplicantConf(); + $iface = escapeshellarg($_SESSION['wifi_client_interface']); $output = shell_exec("sudo wpa_cli -i $iface list_networks 2>&1"); @@ -475,5 +477,42 @@ class WiFiManager return false; } + /** + * Ensures /etc/wpa_supplicant/wpa_supplicant.conf exists with minimal safe contents + * Does not overwrite an existing file + * + * @throws \RuntimeException on permission or write failure + */ + public function ensureWpaSupplicantConf(): void + { + $confPath = '/etc/wpa_supplicant/wpa_supplicant.conf'; + + if (file_exists($confPath)) { + // Already exists, do nothing + return; + } + + $contents = << Date: Thu, 25 Sep 2025 01:53:28 -0700 Subject: [PATCH 21/27] Set php_package = php8.4-fpm (trixie), exec lighty-enable-mod --- installers/common.sh | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index 28014b61..013018c7 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -149,21 +149,24 @@ function _get_linux_distro() { # Sets php package option based on Linux version, abort if unsupported distro function _set_php_package() { case $RELEASE in + 13) # Debian 13 trixie + php_package="php8.4-fpm" + phpiniconf="/etc/php/8.4/fpm/php.ini" ;; 23.05|12*) # Debian 12 & Armbian 23.05 php_package="php8.2-cgi" - phpcgiconf="/etc/php/8.2/cgi/php.ini" ;; + phpiniconf="/etc/php/8.2/cgi/php.ini" ;; 23.04) # Ubuntu Server 23.04 php_package="php8.1-cgi" - phpcgiconf="/etc/php/8.1/cgi/php.ini" ;; + phpiniconf="/etc/php/8.1/cgi/php.ini" ;; 22.04|20.04|18.04|19.10|11*) # Previous Ubuntu Server, Debian & Armbian distros php_package="php7.4-cgi" - phpcgiconf="/etc/php/7.4/cgi/php.ini" ;; + phpiniconf="/etc/php/7.4/cgi/php.ini" ;; 10*|11*) php_package="php7.3-cgi" - phpcgiconf="/etc/php/7.3/cgi/php.ini" ;; + phpiniconf="/etc/php/7.3/cgi/php.ini" ;; 9*) php_package="php7.0-cgi" - phpcgiconf="/etc/php/7.0/cgi/php.ini" ;; + phpiniconf="/etc/php/7.0/cgi/php.ini" ;; 8) _install_status 1 "${DESC} and php5 are not supported. Please upgrade." exit 1 ;; @@ -272,6 +275,12 @@ function _install_dependencies() { echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections sudo apt-get install -y lighttpd git hostapd dnsmasq iptables-persistent $php_package $dhcpcd_package $iw_package $rsync_package $network_tools $ifconfig_package vnstat qrencode jq isoquery || _install_status 1 "Unable to install dependencies" + + if [[ "$php_package" == *"-fpm" ]]; then + install_log "Enabling lighttpd fastcgi-php-fpm module for $php_package" + sudo lighty-enable-mod fastcgi-php-fpm || install_status 1 "Unable to enable fastcgi-php-fpm module" + fi + _install_status 0 } @@ -956,14 +965,14 @@ function _patch_system_files() { function _optimize_php() { if [ "$upgrade" == 0 ]; then _install_log "Optimize PHP configuration" - if [ ! -f "$phpcgiconf" ]; then + if [ ! -f "$phpiniconf" ]; then _install_status 2 "PHP configuration could not be found." return fi # Backup php.ini and create symlink for restoring. datetimephpconf=$(date +%F-%R) - sudo cp "$phpcgiconf" "$raspap_dir/backups/php.ini.$datetimephpconf" + sudo cp "$phpiniconf" "$raspap_dir/backups/php.ini.$datetimephpconf" sudo ln -sf "$raspap_dir/backups/php.ini.$datetimephpconf" "$raspap_dir/backups/php.ini" echo -n "Enable HttpOnly for session cookies (Recommended)? [Y/n]: " @@ -978,7 +987,7 @@ function _optimize_php() { if [ "$assume_yes" == 1 ] || [ "$php_session_cookie" == 1 ]; then echo "Php-cgi enabling session.cookie_httponly." - sudo sed -i -E 's/^session\.cookie_httponly\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/session.cookie_httponly = 1/' "$phpcgiconf" + sudo sed -i -E 's/^session\.cookie_httponly\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/session.cookie_httponly = 1/' "$phpiniconf" fi if [ "$php_package" = "php7.1-cgi" ]; then @@ -994,7 +1003,7 @@ function _optimize_php() { if [ "$assume_yes" == 1 ] || [ "$phpopcache" == 1 ]; then echo -e "Php-cgi enabling opcache.enable." - sudo sed -i -E 's/^;?opcache\.enable\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/opcache.enable = 1/' "$phpcgiconf" + sudo sed -i -E 's/^;?opcache\.enable\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/opcache.enable = 1/' "$phpiniconf" # Make sure opcache extension is turned on. if [ -f "/usr/sbin/phpenmod" ]; then sudo phpenmod opcache From 9e911847c54d2b061899c602e3d6a43e958eca40 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 25 Sep 2025 01:54:56 -0700 Subject: [PATCH 22/27] Fix: correctly capture curl exit status after wait --- installers/raspbian.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 6f667147..c65a3568 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -308,7 +308,10 @@ function _check_internet() { tput civis # hide cursor # run check in background - ( curl -Is --connect-timeout 3 --max-time 15 https://github.com | head -n 1 | grep "HTTP/2 200" >/dev/null ) & + ( + curl -Is --connect-timeout 3 --max-time 15 https://github.com \ + | grep -q "^HTTP/2 200" + ) & local pid=$! # display spinner while curl runs @@ -318,8 +321,9 @@ function _check_internet() { done printf "\r" - # check exit status of curl - wait $pid || exit_code=$? + # capture exit status + wait "$pid" + exit_code=$? tput cnorm # restore cursor From 0114325a18c4ff5e4ddf82d205bbc0f50e79c446 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 25 Sep 2025 01:56:53 -0700 Subject: [PATCH 23/27] Allow copy of temporary wpa_supplicant.conf --- installers/raspap.sudoers | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index bd073f33..b7a8a589 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -87,5 +87,6 @@ www-data ALL=(ALL) NOPASSWD:/usr/bin/nmap --script=broadcast-dhcp-discover -e [a www-data ALL=(ALL) NOPASSWD:/usr/bin/vnstat * www-data ALL=(ALL) NOPASSWD:/usr/sbin/visudo -cf * www-data ALL=(ALL) NOPASSWD:/etc/raspap/plugins/plugin_helper.sh -www-data ALL=(ALL) NOPASSWD: /bin/systemctl start raspap-network-activity@*.service -www-data ALL=(ALL) NOPASSWD: /bin/systemctl stop raspap-network-activity@*.service +www-data ALL=(ALL) NOPASSWD:/bin/systemctl start raspap-network-activity@*.service +www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop raspap-network-activity@*.service +www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wpa_conf_* /etc/wpa_supplicant/wpa_supplicant.conf From f1dc6b3078d522053e2015269a5e83da75cd2250 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 25 Sep 2025 03:02:02 -0700 Subject: [PATCH 24/27] Update uninstaller for Debian trixie --- installers/uninstall.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/installers/uninstall.sh b/installers/uninstall.sh index 9ee7b929..0d68545d 100755 --- a/installers/uninstall.sh +++ b/installers/uninstall.sh @@ -48,21 +48,24 @@ function _get_linux_distro() { # Sets php package option based on Linux version, abort if unsupported distro function _set_php_package() { case $RELEASE in + 13) # Debian 13 trixie + php_package="php8.4-fpm" + phpiniconf="/etc/php/8.4/fpm/php.ini" ;; 23.05|12*) # Debian 12 & Armbian 23.05 php_package="php8.2-cgi" - phpcgiconf="/etc/php/8.2/cgi/php.ini" ;; + phpiniconf="/etc/php/8.2/cgi/php.ini" ;; 23.04) # Ubuntu Server 23.04 php_package="php8.1-cgi" - phpcgiconf="/etc/php/8.1/cgi/php.ini" ;; + phpiniconf="/etc/php/8.1/cgi/php.ini" ;; 22.04|20.04|18.04|19.10|11*) # Previous Ubuntu Server, Debian & Armbian distros php_package="php7.4-cgi" - phpcgiconf="/etc/php/7.4/cgi/php.ini" ;; + phpiniconf="/etc/php/7.4/cgi/php.ini" ;; 10*|11*) php_package="php7.3-cgi" - phpcgiconf="/etc/php/7.3/cgi/php.ini" ;; + phpiniconf="/etc/php/7.3/cgi/php.ini" ;; 9*) php_package="php7.0-cgi" - phpcgiconf="/etc/php/7.0/cgi/php.ini" ;; + phpiniconf="/etc/php/7.0/cgi/php.ini" ;; 8) _install_error "${DESC} and php5 are unsupported." exit 1 ;; @@ -127,11 +130,11 @@ function _check_for_backups() { sudo cp "$raspap_dir/backups/dhcpcd.conf" /etc/dhcpcd.conf fi fi - if [ -f "$raspap_dir/backups/php.ini" ] && [ -f "$phpcgiconf" ]; then + if [ -f "$raspap_dir/backups/php.ini" ] && [ -f "$phpiniconf" ]; then echo -n "Restore the last php.ini file? [y/N]: " read answer if [[ $answer -eq 'y' ]]; then - sudo cp "$raspap_dir/backups/php.ini" "$phpcgiconf" + sudo cp "$raspap_dir/backups/php.ini" "$phpiniconf" fi fi fi From 417f8034112aff6338d1763ab0331ab9132b956d Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 26 Sep 2025 23:29:24 -0700 Subject: [PATCH 25/27] Minor: comments + rename method --- src/RaspAP/Networking/Hotspot/WiFiManager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/RaspAP/Networking/Hotspot/WiFiManager.php b/src/RaspAP/Networking/Hotspot/WiFiManager.php index e61044a8..1c69e49e 100644 --- a/src/RaspAP/Networking/Hotspot/WiFiManager.php +++ b/src/RaspAP/Networking/Hotspot/WiFiManager.php @@ -313,7 +313,7 @@ class WiFiManager */ public function setKnownStationsWPA($networks) { - $this->ensureWpaSupplicantConf(); + $this->ensureWpaSupplicant(); $iface = escapeshellarg($_SESSION['wifi_client_interface']); $output = shell_exec("sudo wpa_cli -i $iface list_networks 2>&1"); @@ -483,12 +483,11 @@ class WiFiManager * * @throws \RuntimeException on permission or write failure */ - public function ensureWpaSupplicantConf(): void + public function ensureWpaSupplicant(): void { $confPath = '/etc/wpa_supplicant/wpa_supplicant.conf'; if (file_exists($confPath)) { - // Already exists, do nothing return; } From 6772709141e1e884ba6ba82b5ed6a42a3f9d8030 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 26 Sep 2025 23:35:30 -0700 Subject: [PATCH 26/27] Update release version --- README.md | 2 +- includes/defaults.php | 2 +- index.php | 2 +- plugins | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 91425a1d..140796d9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![RaspAP Hero](https://i.imgur.com/aNAG3Wa.jpeg) -[![Release 3.4.1](https://img.shields.io/badge/release-v3.4.1-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=Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![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) [![Reddit](https://img.shields.io/badge/%2Fr%2FRaspAP-e05d44?style=flat&logo=Reddit&logoColor=white&labelColor=e05d44&color=b14835)](https://reddit.com/r/RaspAP) [![Discord](https://img.shields.io/discord/642436993451819018?color=7289DA&label=Discord&logo=discord&style=flat)](https://discord.gg/KVAsaAR) +[![Release 3.4.3](https://img.shields.io/badge/release-v3.4.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=Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![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) [![Reddit](https://img.shields.io/badge/%2Fr%2FRaspAP-e05d44?style=flat&logo=Reddit&logoColor=white&labelColor=e05d44&color=b14835)](https://reddit.com/r/RaspAP) [![Discord](https://img.shields.io/discord/642436993451819018?color=7289DA&label=Discord&logo=discord&style=flat)](https://discord.gg/KVAsaAR) RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our [custom OS images](#pre-built-image), [Quick installer](#quick-installer) and [Docker container](#docker-support) create 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](https://docs.raspap.com/wireguard/), [Tailscale](https://docs.raspap.com/tailscale/) and [OpenVPN](https://docs.raspap.com/openvpn/) support, [SSL certificates](https://docs.raspap.com/ssl/), [ad blocking](#ad-blocking), 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 9995bdcb..2be9ae80 100755 --- a/includes/defaults.php +++ b/includes/defaults.php @@ -7,7 +7,7 @@ if (!defined('RASPI_CONFIG')) { $defaults = [ 'RASPI_BRAND_TEXT' => 'RaspAP', 'RASPI_BRAND_TITLE' => RASPI_BRAND_TEXT.' Admin Panel', - 'RASPI_VERSION' => '3.4.1', + 'RASPI_VERSION' => '3.4.3', 'RASPI_CONFIG_NETWORK' => RASPI_CONFIG.'/networking/defaults.json', 'RASPI_CONFIG_PROVIDERS' => 'config/vpn-providers.json', 'RASPI_CONFIG_API' => RASPI_CONFIG.'/api', diff --git a/index.php b/index.php index a31e9c68..15c1c1d3 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 3.4.1 + * @version 3.4.3 * @link https://github.com/RaspAP/raspap-webgui/ * @link https://raspap.com/ * @see http://sirlagz.net/2013/02/08/raspap-webgui/ diff --git a/plugins b/plugins index 054f6bc0..b8e51de4 160000 --- a/plugins +++ b/plugins @@ -1 +1 @@ -Subproject commit 054f6bc0abe6999ddd629cc6878d5ada1749a6e8 +Subproject commit b8e51de4480fa502ab88e861604f13a91c2233a4 From 594ec2eec649717879db0fbcc544b51529a5b25a Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 1 Oct 2025 23:44:49 -0700 Subject: [PATCH 27/27] Maintenance: Update RaspAP custom font --- dist/raspap/css/fonts/RaspAP.eot | Bin 3356 -> 3532 bytes dist/raspap/css/fonts/RaspAP.svg | 1 + dist/raspap/css/fonts/RaspAP.ttf | Bin 3196 -> 3372 bytes dist/raspap/css/fonts/RaspAP.woff | Bin 3272 -> 3448 bytes dist/raspap/css/style.css | 34 ++++++++++-------------------- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/dist/raspap/css/fonts/RaspAP.eot b/dist/raspap/css/fonts/RaspAP.eot index 90b07249fcf54b0cc9e91e7f5d8361243a621d33..d23e5940a86e9e8e9b3c2af92456f3e54bf3ac45 100755 GIT binary patch delta 505 zcmbOubw--)3@-zN4(~)ZGnUsT#|}?)D6YT7z`(Evh!c`?6AQ${E_E|7FvU>j{5%xSQwZOFqi{%u(9(o zvV#d$QB^xeb3+3&b2D=w!_1tGolQ(!%utTe*pSs!RZU$FBxuKIYNDoW$aE{f!9Gb@ zMM6u8>E9nlQBH0~DIF16S$|_=M-66X2|)p7E;dHJe-Bv&`1v_Gbr_j=IGK4F#l+lo zb@YM*YK57#m>9V^`a(6-)a*n>*#d%sTD7!T*_pMOcyx8^Jw08S*qAwa7#M+`0OG^P zOkT(H+k9ojJx7X7hL?e%hG!z18B2Y)$J~hy#q}o`7#Q{daYAx#Vu5(rr7i{rMj0SKBt5aX z07we}`5>AjJ*P5lt>A|5Kz;>~yCWktF-7}1t1SZqmjO`TECVROevtVBke>nMt7PPs zREV(ySqxk~KtdrWKRJ<|g=G_vzXr$`%1x{&VBphZv;+zq04c~z%uUs?5Lg7{KLA=% zRghm?!oUoaVc>}Y$ulrB&z_vXXwS$zc>$w0BlG4rj4wFU7#JBC=6ZD3$Mf5KW#DE3 zDQ9?+l8}I){~uufKY1CqoCx!OkYW_TG5H3!f(lrOi$R1zj`0Rl1Jf}UkbNMf9E|1+ StYBHD$s2ivHyiWJWCQ^J21O|V diff --git a/dist/raspap/css/fonts/RaspAP.svg b/dist/raspap/css/fonts/RaspAP.svg index 774ff8c3..94922807 100755 --- a/dist/raspap/css/fonts/RaspAP.svg +++ b/dist/raspap/css/fonts/RaspAP.svg @@ -11,4 +11,5 @@ + \ No newline at end of file diff --git a/dist/raspap/css/fonts/RaspAP.ttf b/dist/raspap/css/fonts/RaspAP.ttf index 67097ef2e073ecd95579d92470ea7112b307e2e5..1288a9c7285d2d21b0962f1fb15c25e4f3a3612a 100755 GIT binary patch delta 504 zcmew(u|}$%fsuiMft#U$ftkU;KUm+0Ux@VSkbIlmYTX(i4jd zfV2RR5288Jb1KtBCj43fIfo0zzmp&X;JA*-pXnz|lH(2mj6L`~U{=~jS)eUh?@gq9T3 zzdwwkoZO63IwG>N{>H|R8qCZRf&$E3Y>ayU9-VCg=(m&*@=p>1q21PYH6{uGix*P=<3#cdb%>PF>~^OLmn9VhmV=Oj_0@e z%D~M6@)^TZ=Ce5n8sweHQCxB&KuJ(kAp_3IJzNSJ5M4lVE(Q?>ImR1I4NS*aVpukT Xm2)zhGq8g7FilS65#IcmYbGNAh%s9t delta 327 zcmZ1@^+%$ffsuiMft#U$ftkU;KUm+0Ux@VtP-G7fCnV=47Kn#k>SADElmYTX(i4jd zfV2RR5288Jb1Ku;3U2rgJ2FxeQ?#G6+A=V3835(YGJpc?2bnJb`58dIN=9x; zg%~@K#lY1ABouP;lN}S;Sy(m!1=ausgmM!r3K;kpErI+4AO(4exv4r90*iqB2S7`z z3i69ffDQ!$o*0lk12gmNi3jW%nI|!NGcs@XVSK@%2J+BckM8<-ew(ih+$z>% diff --git a/dist/raspap/css/fonts/RaspAP.woff b/dist/raspap/css/fonts/RaspAP.woff index 15e90438e0b83dc7c593cbf877b6ff6372faba2a..882e69aed504c6ba9cb1c207c2bd4d2705b29856 100755 GIT binary patch delta 531 zcmX>h`9n&q+~3WOfsp|Scqu)9JCKfO-FlGQHLO@tN>{54n zVlhZ;50K9R#RBO$m1#h+BMc0jDIhE|;n#|c)I=bgTLY-Z41{&n?uTXo1%YA-K)wnH zvmaunW9MUJ2NSHKs&Ifo0zzmp&X;JA*-pXnz|lH(2mj6L`~U{ z=~jS)eUh?@gq9T3zdwwkoZO63IwG>N{>H|R8qCZRf&$E3Y>ayU9-VCg=(m&*@=p>1q21PYH6{uGix*P=<3#cdb%>PF>~^O zqX-yHhmV=Oj_0@e%D~M6^b-TaQ|7Zd2pZ&_$;-IpM1Yb&#VCMt@(nJ9$zQm{gjhC# WB{><*8Cbzen1InOyjh=nCL;ibc3-Ce delta 383 zcmew%bwX0C+~3WOfsp|Scup{IgXtOu#>t7iViR?Q>rW)-CKfO-FlGQHLO@tN>{3^H zVlhZ;50K9R#RBO$m1#h+BS4`YAiP#^!}pBT#1sYwt{R{kGZ5B(&T5+h6a4ba`Kab>ioEV00o3Vn4N`XQ*L4f&|+>LkRmYVW3RRS0%08sfkg%R#U()htbnUy2C|r$XHVu~v}a_V?8E5I$h>(5;|q=m21W*k zxgOp1@%%Pl8Ms-1$`}})q$DID=>G?p|1%!|@;MloK%zhZ)Wdw>{{aRD7NA3c?EfGU k6u>dLg