diff --git a/BACKERS.md b/BACKERS.md index fda9b737..2422a86a 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -17,12 +17,13 @@ You can [become a sponsor](https://github.com/sponsors/RaspAP) using your indivi ### Exclusive features When backers were asked which feature they'd most like to see added to RaspAP, the ability to manage multiple OpenVPN client configurations topped the list of requests. We think this is a great idea, so we're adding this as the first feature exclusive to insiders. -✅ Multiple OpenVPN client configs +✅ [Multiple OpenVPN client configs](https://docs.raspap.com/openvpn/#multiple-client-configs) +✅ [OpenVPN certificate authentication](https://docs.raspap.com/openvpn/#certificate-authentication) ✅ OpenVPN service logging ✅ Night mode toggle ✅ Restrict network to static clients -✅ WireGuard support -⚙️ Traffic shaping (in progress) +✅ [WireGuard support](https://docs.raspap.com/wireguard/) +✅ [Set AP transmit power](https://docs.raspap.com/ap-basics/#transmit-power) Look for the list above to grow as we add more exclusive features. @@ -30,22 +31,28 @@ Look for the list above to grow as we add more exclusive features. Below is a list of funding targets. When a funding target is reached, the features that are tied to it are merged back into RaspAP and released to the public for general availability. #### $500 -✅ Multiple OpenVPN client configs -✅ OpenVPN service logging -✅ Night mode toggle -✅ Restrict network to static clients -✅ WireGuard support -⚙️ Traffic shaping (in progress) +The first **Insiders Edition** includes the exclusive features listed above. ### Frequently asked questions +#### How do I install Insiders? +*How do I install Insiders?* + +Invoke the [Quick Installer](https://docs.raspap.com/quick/) with the `--insiders` switch, like so: + +``` +curl -sL https://install.raspap.com | bash -s -- --insiders +``` + +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. Simply invoke the [Quick Installer](https://docs.raspap.com/quick/) with the `--upgrade` switch, specifying the private Insiders repo, like so: +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 --repo raspap/raspap-insiders +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: diff --git a/ajax/networking/get_netcfg.php b/ajax/networking/get_netcfg.php index 7e7b8fa7..78c0013e 100644 --- a/ajax/networking/get_netcfg.php +++ b/ajax/networking/get_netcfg.php @@ -7,7 +7,7 @@ $interface = $_GET['iface']; if (isset($interface)) { // fetch dnsmasq.conf settings for interface - exec('cat '. RASPI_DNSMASQ_PREFIX.$interface.'.conf', $return); + exec('cat '. escapeshellarg(RASPI_DNSMASQ_PREFIX.$interface.'.conf'), $return); $conf = ParseConfig($return); $dhcpdata['DHCPEnabled'] = empty($conf) ? false : true; diff --git a/ajax/networking/wifi_stations.php b/ajax/networking/wifi_stations.php index 37d662ff..aca5bc89 100644 --- a/ajax/networking/wifi_stations.php +++ b/ajax/networking/wifi_stations.php @@ -15,4 +15,8 @@ nearbyWifiStations($networks, !isset($_REQUEST["refresh"])); connectedWifiStations($networks); sortNetworksByRSSI($networks); -echo renderTemplate('wifi_stations', compact('networks'), true); +$connected = array_filter($networks, function($n) { return $n['connected']; } ); +$known = array_filter($networks, function($n) { return !$n['connected'] && $n['configured']; } ); +$nearby = array_filter($networks, function($n) { return !$n['configured']; } ); + +echo renderTemplate('wifi_stations', compact('networks', 'connected', 'known', 'nearby'), true); diff --git a/app/css/custom.php b/app/css/custom.php index 273a9629..cec2f96b 100644 --- a/app/css/custom.php +++ b/app/css/custom.php @@ -16,6 +16,11 @@ body { color: #212529; } +.h-underlined { + border-bottom: 1px solid #e3e6f0; + padding-bottom: 0.3rem; +} + .page-header { margin: 20px 0 20px; } @@ -32,7 +37,6 @@ body { .row { margin-left: 0rem; margin-right: 0rem; } .col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; } .form-group.col-md-6 { margin-left: -0.5rem; } - .js-wifi-stations { margin-left: -0.5rem; margin-right: -0.5rem; } h4.mt-3 { margin-left: 0.5rem; } } @@ -141,6 +145,7 @@ i.fa.fa-bars:hover{ .service-status { border-width: 0; + align-items: center; } .service-status-up { @@ -190,8 +195,12 @@ pre.unstyled { width: 100%; } -.js-reload-wifi-stations { - min-width: 10rem; +@media (min-width: 576px) { + .card-grid { + display: grid; + grid-template-columns: minmax(0, 1fr) 50%; + grid-gap: 1rem; + } } .sidebar.toggled .nav-item .nav-link span { diff --git a/app/css/hackernews.css b/app/css/hackernews.css index 6aef443b..53ec065f 100644 --- a/app/css/hackernews.css +++ b/app/css/hackernews.css @@ -8,7 +8,6 @@ License: GNU General Public License v3.0 html * { font-family: Verdana, Geneva, sans-serif; - font-size: 0.9rem; color: #828282; } @@ -34,6 +33,11 @@ h5.card-title { color: #212529; } +.h-underlined { + border-bottom: 1px solid #e3e6f0; + padding-bottom: 0.3rem; +} + .card, .modal-dialog { border-radius: 1px; border-color: #ff6600; @@ -115,7 +119,6 @@ ul.nav-tabs, .nav-tabs .nav-link { .row { margin-left: 0rem; margin-right: 0rem; } .col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; } .form-group.col-md-6 { margin-left: -0.5rem; } - .js-wifi-stations { margin-left: -0.5rem; margin-right: -0.5rem; } h4.mt-3 { margin-left: 0.5rem; } } @@ -180,6 +183,7 @@ ul.nav-tabs, .nav-tabs .nav-link { .service-status { border-width: 0; + align-items: center; } .service-status-up { @@ -231,8 +235,12 @@ pre.unstyled { width: 100%; } -.js-reload-wifi-stations { - min-width: 10rem; +@media (min-width: 576px) { + .card-grid { + display: grid; + grid-template-columns: minmax(0, 1fr) 50%; + grid-gap: 1rem; + } } .sidebar.toggled .nav-item .nav-link { diff --git a/app/css/lightsout.css b/app/css/lightsout.css index 3e8e6e76..19ca7c5a 100644 --- a/app/css/lightsout.css +++ b/app/css/lightsout.css @@ -23,6 +23,11 @@ h5.card-title { font-size: 1.2rem; } +.h-underlined { + border-bottom: 1px solid #e3e6f0; + padding-bottom: 0.3rem; +} + .page-header { padding: 0 20px; border-left: .01rem solid #d2d2d2; @@ -53,7 +58,6 @@ h5.card-title { .row { margin-left: 0rem; margin-right: 0rem; } .col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; } .form-group.col-md-6 { margin-left: -0.5rem; } - .js-wifi-stations { margin-left: -0.5rem; margin-right: -0.5rem; } h4.mt-3 { margin-left: 0.5rem; } } @@ -374,15 +378,18 @@ tspan, rect { fill: #d2d2d2; } -small { - font-size: 80%; - font-weight: 400; +text-muted { + font-size: 0.8rem; } .fas.fa-circle { font-size: 0.5rem; } +.service-status { + align-items: center; +} + .service-status-up { color: #a1ec38 !important; } @@ -416,6 +423,20 @@ pre { margin-bottom: 0.5em; } +.loading-spinner { + background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent; + min-height: 150px; + width: 100%; +} + +@media (min-width: 576px) { + .card-grid { + display: grid; + grid-template-columns: minmax(0, 1fr) 50%; + grid-gap: 1rem; + } +} + .toggle-off.btn { padding-left: 1.2rem; font-size: 0.9rem!important; diff --git a/app/img/wifi-qr-code.php b/app/img/wifi-qr-code.php index 5661ae65..e2baf69b 100644 --- a/app/img/wifi-qr-code.php +++ b/app/img/wifi-qr-code.php @@ -28,7 +28,7 @@ $ssid = qr_encode($ssid); $password = qr_encode($password); $data = "WIFI:S:$ssid;T:$type;P:$password;$hidden;"; -$command = "qrencode -t svg -m 0 -o - " . mb_escapeshellarg($data); +$command = "qrencode -t svg -m 1 -o - " . mb_escapeshellarg($data); $svg = shell_exec($command); $config_mtime = filemtime(RASPI_HOSTAPD_CONFIG); diff --git a/app/js/custom.js b/app/js/custom.js index 3523fc56..b834aa30 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -202,8 +202,8 @@ Populates the DHCP server form fields Option toggles are set dynamically depending on the loaded configuration */ function loadInterfaceDHCPSelect() { - var iface = $('#cbxdhcpiface').val(); - $.get('ajax/networking/get_netcfg.php?iface='+iface,function(data){ + var strInterface = $('#cbxdhcpiface').val(); + $.get('ajax/networking/get_netcfg.php?iface='+strInterface,function(data){ jsonData = JSON.parse(data); $('#dhcp-iface')[0].checked = jsonData.DHCPEnabled; $('#txtipaddress').val(jsonData.StaticIP); diff --git a/config/dns-servers.json b/config/dns-servers.json index bce86846..68af4244 100644 --- a/config/dns-servers.json +++ b/config/dns-servers.json @@ -22,7 +22,8 @@ "208.67.222.222" ], "Quad9": [ - "9.9.9.9" + "9.9.9.9", + "149.112.112.112" ], "Yandex.DNS": [ "77.88.8.2", diff --git a/includes/configure_client.php b/includes/configure_client.php index 1bfc1576..540f0fef 100755 --- a/includes/configure_client.php +++ b/includes/configure_client.php @@ -19,6 +19,11 @@ function DisplayWPAConfig() $result = 0; exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' select_network '.strval($_POST['connect'])); $status->addMessage('New network selected', 'success'); + } elseif (isset($_POST['wpa_reinit'])) { + $status->addMessage('Reinitializing wpa_supplicant', 'info', false); + $force_remove = true; + $result = reinitializeWPA($force_remove); + $status->addMessage($result, 'info'); } elseif (isset($_POST['client_settings'])) { $tmp_networks = $networks; if ($wpa_file = fopen('/tmp/wifidata', 'w')) { @@ -93,10 +98,6 @@ function DisplayWPAConfig() } } - nearbyWifiStations($networks); - connectedWifiStations($networks); - sortNetworksByRSSI($networks); - $clientInterface = $_SESSION['wifi_client_interface']; exec('ip a show '.$clientInterface, $stdoutIp); diff --git a/includes/functions.php b/includes/functions.php index a3ffbf45..0b1a11c4 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -603,11 +603,10 @@ function mb_escapeshellarg($arg) { $isWindows = strtolower(substr(PHP_OS, 0, 3)) === 'win'; if ($isWindows) { - $escaped_arg = str_replace(array('"', '%'), '', $arg); + return '"' . str_replace(array('"', '%'), '', $arg) . '"'; } else { - $escaped_arg = str_replace("'", "'\\''", $arg); + return "'" . str_replace("'", "'\\''", $arg) . "'"; } - return "\"$escaped_arg\""; } function dnsServers() @@ -776,3 +775,11 @@ function qr_encode($str) { return preg_replace('/(? 63) - ) { + # NB: A pass-phrase is a sequence of between 8 and 63 ASCII-encoded characters (IEEE Std. 802.11i-2004) + # Each character in the pass-phrase must have an encoding in the range of 32 to 126 (decimal). (IEEE Std. 802.11i-2004, Annex H.4.1) + if ($_POST['wpa'] !== 'none' && (strlen($_POST['wpa_passphrase']) < 8 || strlen($_POST['wpa_passphrase']) > 63)) { $status->addMessage('WPA passphrase must be between 8 and 63 characters', 'danger'); $good_input = false; + } elseif (!ctype_print($_POST['wpa_passphrase'])) { + $status->addMessage('WPA passphrase must be comprised of printable ASCII characters', 'danger'); + $good_input = false; } if (isset($_POST['hiddenSSID'])) { diff --git a/includes/wifi_functions.php b/includes/wifi_functions.php index 7aa4cece..b7b543df 100755 --- a/includes/wifi_functions.php +++ b/includes/wifi_functions.php @@ -18,6 +18,7 @@ function knownWifiStations(&$networks) switch (strtolower($lineArr[0])) { case 'ssid': $ssid = trim($lineArr[1], '"'); + $network['ssid'] = $ssid; break; case 'psk': if (array_key_exists('passphrase', $network)) { @@ -69,17 +70,22 @@ function nearbyWifiStations(&$networks, $cached = true) foreach (explode("\n", $scan_results) as $network) { $arrNetwork = preg_split("/[\t]+/", $network); // split result into array - if (!array_key_exists(4, $arrNetwork) || - trim($arrNetwork[4]) == $ap_ssid) { + + $ssid = trim($arrNetwork[4]); + $ssid = evalHexSequence($ssid); + + // exclude raspap ssid + if (empty($ssid) || $ssid == $ap_ssid) { continue; } - $ssid = trim($arrNetwork[4]); - // filter SSID string: anything invisible in 7bit ASCII or quotes -> ignore network - if (preg_match('[\x00-\x1f\x7f-\xff\'\`\´\"]', $ssid)) { + // filter SSID string: unprintable 7bit ASCII control codes, delete or quotes -> ignore network + if (preg_match('[\x00-\x1f\x7f\'\`\´\"]', $ssid)) { continue; } + $networks[$ssid]['ssid'] = $ssid; + // If network is saved if (array_key_exists($ssid, $networks)) { $networks[$ssid]['visible'] = true; @@ -157,4 +163,20 @@ function getWifiInterface() } } -?> \ No newline at end of file +/* + * Reinitializes wpa_supplicant for the wireless client interface + * The 'force' parameter deletes the socket in /var/run/wpa_supplicant/ + * + * @param boolean $force + */ +function reinitializeWPA($force) +{ + if ($force == true) { + $cmd = escapeshellcmd("sudo /bin/rm /var/run/wpa_supplicant/".$_SESSION['wifi_client_interface']); + $result = exec($cmd); + } + $cmd = escapeshellcmd("sudo /sbin/wpa_supplicant -B -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf -i". $_SESSION['wifi_client_interface']); + $result = shell_exec($cmd); + return $result; +} + diff --git a/installers/common.sh b/installers/common.sh index 4988c113..e7d02af8 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -65,14 +65,14 @@ function _install_raspap() { # search for optional installation files names install_feature_*.sh function _install_mobile_clients() { if [ "$insiders" == 1 ]; then - echo -n "Installing support for mobile data clients" + _install_log "Installing support for mobile data clients" for feature in $(ls $webroot_dir/installers/install_feature_*.sh) ; do source $feature f=$(basename $feature) func="_${f%.*}" if declare -f -F $func > /dev/null; then - _install_log "Installing $func" - $func || _install_status 1 "Not able to install feature ($func)" + echo "Installing $func" + $func || _install_status 1 "Unable to install feature ($func)" else _install_status 1 "Install file $f is missing install function $func" fi @@ -213,7 +213,7 @@ function _create_hostapd_scripts() { # Move service control shell scripts sudo cp "$webroot_dir/installers/"service*.sh "$raspap_dir/hostapd" || _install_status 1 "Unable to move service control scripts" # Make enablelog.sh and disablelog.sh not writable by www-data group. - sudo chown -c root:"$raspap_user" "$raspap_dir/hostapd/"*.sh || _install_status 1 "Unable change owner and/or group" + sudo chown -c root:root "$raspap_dir/hostapd/"*.sh || _install_status 1 "Unable change owner and/or group" sudo chmod 750 "$raspap_dir/hostapd/"*.sh || _install_status 1 "Unable to change file permissions" _install_status 0 } @@ -228,7 +228,7 @@ function _create_lighttpd_scripts() { sudo cp "$webroot_dir/installers/"configport.sh "$raspap_dir/lighttpd" || _install_status 1 "Unable to move service control scripts" # Make configport.sh writable by www-data group echo "Changing file ownership" - sudo chown -c root:"$raspap_user" "$raspap_dir/lighttpd/"*.sh || _install_status 1 "Unable change owner and/or group" + sudo chown -c root:root "$raspap_dir/lighttpd/"*.sh || _install_status 1 "Unable change owner and/or group" sudo chmod 750 "$raspap_dir/lighttpd/"*.sh || _install_status 1 "Unable to change file permissions" _install_status 0 } @@ -310,8 +310,9 @@ function _install_adblock() { echo "Moving and setting permissions for blocklist update script" sudo cp "$webroot_dir/installers/"update_blocklist.sh "$raspap_dir/adblock" || _install_status 1 "Unable to move blocklist update script" - # Make blocklists and update script writable by www-data group - sudo chown -c root:"$raspap_user" "$raspap_dir/adblock/"*.* || _install_status 1 "Unable to change owner/group" + # Make blocklists writable by www-data group, restrict update scripts to root + sudo chown -c root:"$raspap_user" "$raspap_dir/adblock/"*.txt || _install_status 1 "Unable to change owner/group" + sudo chown -c root:root "$raspap_dir/adblock/"*.sh || _install_status 1 "Unable to change owner/group" sudo chmod 750 "$raspap_dir/adblock/"*.sh || install_error "Unable to change file permissions" # Create 090_adblock.conf and write values to /etc/dnsmasq.d @@ -376,7 +377,7 @@ function _install_wireguard() { echo 'deb http://ftp.debian.org/debian buster-backports main' | sudo tee /etc/apt/sources.list.d/buster-backports.list || _install_status 1 "Unable to add Debian backports repo" fi echo "Installing wireguard from apt" - sudo apt-get update && sudo apt-get install $apt_option wireguard || _install_status 1 "Unable to install wireguard" + sudo apt-get install -y wireguard || _install_status 1 "Unable to install wireguard" echo "Enabling wg-quick@wg0" sudo systemctl enable wg-quick@wg0 || _install_status 1 "Failed to enable wg-quick service" echo "Enabling WireGuard management option" @@ -400,11 +401,11 @@ function _create_openvpn_scripts() { _install_log "Creating OpenVPN control scripts" sudo mkdir $raspap_dir/openvpn || _install_status 1 "Unable to create directory '$raspap_dir/openvpn'" - # Move service auth control & logging shell scripts + # Move service auth control & logging shell scripts sudo cp "$webroot_dir/installers/"configauth.sh "$raspap_dir/openvpn" || _install_status 1 "Unable to move auth control script" sudo cp "$webroot_dir/installers/"openvpnlog.sh "$raspap_dir/openvpn" || _install_status 1 "Unable to move logging script" - # Make scripts executable by www-data group - sudo chown -c root:"$raspap_user" "$raspap_dir/openvpn/"*.sh || _install_status 1 "Unable change owner and/or group" + # Restrict script execution to root user + sudo chown -c root:root "$raspap_dir/openvpn/"*.sh || _install_status 1 "Unable change owner and/or group" sudo chmod 750 "$raspap_dir/openvpn/"*.sh || _install_status 1 "Unable to change file permissions" _install_status 0 } @@ -490,9 +491,10 @@ function _move_config_file() { _install_status 1 "'$raspap_dir' directory doesn't exist" fi + # Copy config file and make writable by www-data group _install_log "Moving configuration file to $raspap_dir" sudo cp "$webroot_dir"/raspap.php "$raspap_dir" || _install_status 1 "Unable to move files to '$raspap_dir'" - sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || _install_status 1 "Unable to change file ownership for '$raspap_dir'" + sudo chown -c $raspap_user:"$raspap_user" "$raspap_dir"/raspap.php || _install_status 1 "Unable change owner and/or group" } # Set up default configuration @@ -506,8 +508,8 @@ function _default_configuration() { sudo cp $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || _install_status 1 "Unable to move dhcpcd configuration file" sudo cp $webroot_dir/config/defaults.json $raspap_network || _install_status 1 "Unable to move defaults.json settings" - echo "Changing file ownership of $raspap_dir" - sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || _install_status 1 "Unable to change file ownership for '$raspap_dir'" + echo "Changing file ownership of ${raspap_network}/defaults.json" + sudo chown $raspap_user:$raspap_user "$raspap_network"/defaults.json || _install_status 1 "Unable to change file ownership for defaults.json" echo "Checking for existence of /etc/dnsmasq.d" [ -d /etc/dnsmasq.d ] || sudo mkdir /etc/dnsmasq.d diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index 355fd8eb..0886a2ac 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -4,6 +4,8 @@ www-data ALL=(ALL) NOPASSWD:/bin/cat /etc/wpa_supplicant/wpa_supplicant.conf www-data ALL=(ALL) NOPASSWD:/bin/cat /etc/wpa_supplicant/wpa_supplicant-wlan[0-9].conf www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant.conf www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant-wlan[0-9].conf +www-data ALL=(ALL) NOPASSWD:/sbin/wpa_supplicant -B -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan[0-9] +www-data ALL=(ALL) NOPASSWD:/bin/rm /var/run/wpa_supplicant/wlan[0-9] www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] scan_results www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] scan www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] reconfigure diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index a321f2b7..b1defed5 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -147,9 +147,33 @@ msgstr "Hide" msgid "Not configured" msgstr "Not configured" +msgid "Connected" +msgstr "Connected" + +msgid "Known" +msgstr "Known" + +msgid "Nearby" +msgstr "Nearby" + msgid "Note: WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP" msgstr "Note: WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP" +msgid "No Wifi stations found" +msgstr "No Wifi stations found" + +msgid "Reinitializing wpa_supplicant" +msgstr "Reinitializing wpa_supplicant" + +msgid "Click 'Rescan' to search for nearby Wifi stations." +msgstr "Click 'Rescan' to search for nearby Wifi stations." + +msgid "Click 'Reinitialize' to force reinitialize wpa_supplicant." +msgstr "Click 'Reinitialize' to force reinitialize wpa_supplicant." + +msgid "Reinitialize" +msgstr "Reinitialize" + #: includes/dashboard.php msgid "Interface Information" msgstr "Interface Information" diff --git a/templates/configure_client.php b/templates/configure_client.php index 21a23a75..aeca17bd 100755 --- a/templates/configure_client.php +++ b/templates/configure_client.php @@ -2,7 +2,7 @@
-
+
@@ -16,19 +16,23 @@
showMessages(); ?> -
+
-

+

-
- +
+ +
+
+
+
+
+ + +
+
-
- - -
-
diff --git a/templates/networking.php b/templates/networking.php index f497cb28..7e2099a9 100755 --- a/templates/networking.php +++ b/templates/networking.php @@ -21,65 +21,61 @@

-
-
-
-
- - - - - - - - - - - "; - } else { - foreach($routeInfo as $route) { - echo ""; - echo ""; - echo ""; - echo ""; - $status = $route["access-ip"] ? "fa-check" : "fa-times"; - echo ''; - $status = $route["access-dns"] ? "fa-check" : "fa-times"; - echo ''; - echo ""; - } - } - ?> - -
No route to the internet found
".$route["interface"]."".$route["ip-address"]."".$route["gateway"]."
".$route["gw-name"]."

'.RASPI_ACCESS_CHECK_IP.'

'.RASPI_ACCESS_CHECK_DNS.'
-
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
No route to the internet found

+

+ "> +

+

+ "> +

+
-

- - - -
-
-
-
-

+              
+                
+                  
+                  
+
+
+
+

+                      
+
-
-
- - + +
-
-
-
-
+ +
+
diff --git a/templates/openvpn.php b/templates/openvpn.php index 4e0adaba..40e084e8 100755 --- a/templates/openvpn.php +++ b/templates/openvpn.php @@ -46,6 +46,65 @@ +
+

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

+
+
+ '; + ?> +
+
+
+ + + ' , PHP_EOL; + } else { + echo '' , PHP_EOL; + } + ?> + + +
diff --git a/templates/system/basic.php b/templates/system/basic.php index 1079c2b4..dd7fc278 100644 --- a/templates/system/basic.php +++ b/templates/system/basic.php @@ -8,9 +8,19 @@ include('includes/sysstats.php');

-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+

-

+

+ +

wpa_supplicant.") ?>

+
+ +
+ " /> +
+
+
- + + -
- $network) : ?> -
-
-
- - -
-
-
- - - - - - - -
+ +

+
+ + + + +
+ -
-
- - - - X - -
- -
-
- = -200) { - echo htmlspecialchars($network['RSSI'], ENT_QUOTES); - echo "dB ("; - if ($network['RSSI'] >= -50) { - echo 100; - } elseif ($network['RSSI'] <= -100) { - echo 0; - } else { - echo 2*($network['RSSI'] + 100); - } - echo "%)"; - } else { - echo " not found "; - } - ?> -
- - - - - - -
-
- -
-
-
- - - - -
- -
- -
-
- -
- - " id="update" name="update" data-toggle="modal" data-target="#configureClientModal" /> - - - " id="update" name="update" data-toggle="modal" data-target="#configureClientModal" /> - - " name="delete" data-toggle="modal" data-target="#configureClientModal" /> -
-
-
-
- - -
+ +

+
+ + + + +
+ + +

+
+ + + + +
+ diff --git a/templates/wifi_stations/network.php b/templates/wifi_stations/network.php new file mode 100644 index 00000000..e0a9684c --- /dev/null +++ b/templates/wifi_stations/network.php @@ -0,0 +1,83 @@ +
+
+ + +
+ +
+
+ + + + + + + +
+ +
+
+ + + + X + +
+ +
+
+ = -200) { + echo htmlspecialchars($network['RSSI'], ENT_QUOTES); + echo "dB ("; + if ($network['RSSI'] >= -50) { + echo 100; + } elseif ($network['RSSI'] <= -100) { + echo 0; + } else { + echo 2*($network['RSSI'] + 100); + } + echo "%)"; + } else { + echo " not found "; + } + ?> +
+ + + + + + +
+
+ +
+
+
+ + + + +
+ +
+ +
+
+ +
+ + " id="update" name="update" data-toggle="modal" data-target="#configureClientModal" /> + + + " id="update" name="update" data-toggle="modal" data-target="#configureClientModal" /> + + " name="delete" data-toggle="modal" data-target="#configureClientModal" /> +
+
+