diff --git a/README.md b/README.md index 4e145be6..26953185 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![](https://i.imgur.com/xeKD93p.png) -[![Release 2.4](https://img.shields.io/badge/Release-2.4-green.svg)](https://github.com/billz/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi) [![Financial Contributors on Open Collective](https://opencollective.com/raspap/all/badge.svg?label=financial+contributors)](https://opencollective.com/raspap) ![https://travis-ci.com/billz/raspap-webgui/](https://img.shields.io/travis/com/billz/raspap-webgui/master) [![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.4.1](https://img.shields.io/badge/Release-2.4.1-green.svg)](https://github.com/billz/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi) [![Financial Contributors on Open Collective](https://opencollective.com/raspap/all/badge.svg?label=financial+contributors)](https://opencollective.com/raspap) ![https://travis-ci.com/billz/raspap-webgui/](https://img.shields.io/travis/com/billz/raspap-webgui/master) [![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 lets you quickly get a WiFi access point up and running to share the connectivity of many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our popular [Quick installer](#quick-installer) creates a known-good default configuration that "just works" on all current Raspberry Pis with onboard wireless. A responsive interface gives you control over the relevant services and networking options. Advanced DHCP settings, OpenVPN client support, SSL, security audits, themes and multilingual options are included. @@ -31,7 +31,7 @@ We hope you enjoy using RaspAP as much as we do creating it. Tell us how you use - [License](#license) ## Prerequisites -Start with a clean install of the [latest release of Raspbian](https://www.raspberrypi.org/downloads/raspbian/) (currently Buster). Raspbian Buster Lite is recommended. +Start with a clean install of the [latest release of Raspberry Pi OS (32-bit)](https://www.raspberrypi.org/downloads/raspbian/). Raspberry Pi OS (32-bit) Lite is recommended. 1. Update Raspbian, including the kernel and firmware, followed by a reboot: ``` @@ -61,7 +61,9 @@ configured as an access point as follows: * SSID: `raspi-webgui` * Password: ChangeMe -**Note:** As the name suggests, the Quick Installer is a great way to quickly setup a new AP. However, it does not automagically detect the unique configuration of your system. Best results are obtained by connecting to ethernet (`eth0`) or as a WiFi client, also known as managed mode, with `wlan0`. For the latter, refer to [this FAQ](https://github.com/billz/raspap-webgui/wiki/FAQs#how-do-i-prepare-the-sd-card-to-connect-to-wifi-in-headless-mode). Please [read this](https://github.com/billz/raspap-webgui/wiki/Reporting-issues) before reporting an issue. +**Note:** As the name suggests, the Quick Installer is a great way to quickly setup a new AP. However, it does not automagically detect the unique configuration of your system. Best results are obtained by connecting to ethernet (`eth0`) or as a WiFi client, also known as managed mode, with `wlan0`. For the latter, refer to [this FAQ](https://github.com/billz/raspap-webgui/wiki/FAQs#how-do-i-prepare-the-sd-card-to-connect-to-wifi-in-headless-mode). Special instructions for the Pi Zero W are [available here](https://github.com/billz/raspap-webgui/wiki/RPi-Zero-W-AP-STA-mode). + +Please [read this](https://github.com/billz/raspap-webgui/wiki/Reporting-issues) before reporting an issue. ## Ad Blocking This feature uses DNS blacklisting to block requests for ads, trackers and other undesirable hosts. To enable ad blocking, simply respond to the prompt during the installation. As a beta release, we encourage testing and feedback from users of RaspAP. @@ -78,9 +80,9 @@ By default RaspAP configures a routed AP for your clients to connect to. A bridg More information on Bridged AP mode is provided [on our wiki](https://github.com/billz/raspap-webgui/wiki/Bridged-AP-mode). ## Simultaneous AP and Wifi client -RaspAP lets you easily create an AP with a Wifi client configuration. With your system configured in managed mode, enable the AP from the **Advanced** tab of **Configure hotspot** by sliding the **Wifi client AP mode** toggle. Save settings and start the hotspot. The managed mode AP is functional without restart. +RaspAP lets you create an AP with a Wifi client configuration, often called AP-STA mode. With your system configured in managed mode, enable the AP from the **Advanced** tab of **Configure hotspot** by sliding the **Wifi client AP mode** toggle. Save settings and start the hotspot. The managed mode AP is functional without restart. -**Note:** This option is disabled until you configure your system as a wireless client. For a device operating in [managed mode](https://github.com/billz/raspap-webgui/wiki/FAQs#how-do-i-prepare-the-sd-card-to-connect-to-wifi-in-headless-mode) without an `eth0` connection, this configuration must be enabled _before_ a reboot. +**Note:** This option is disabled until you configure your system as a wireless client. For a device operating in [managed mode](https://github.com/billz/raspap-webgui/wiki/FAQs#how-do-i-prepare-the-sd-card-to-connect-to-wifi-in-headless-mode) without an `eth0` connection, this configuration must be enabled [_before_ a reboot](https://github.com/billz/raspap-webgui/wiki/RPi-Zero-W-AP-STA-mode). ## Support us RaspAP is free software, but powered by your support. If you find RaspAP useful for your personal or commercial projects, please [become a GitHub sponsor](https://github.com/sponsors/billz), join the project on [Open Collective](https://opencollective.com/raspap) or make a one-time donation with [PayPal](https://www.paypal.com/paypalme2/billzgithub). Any of these options makes a big difference! @@ -98,7 +100,7 @@ RaspAP was originally made for Raspbian, but now also installs on the following | Distribution | Release | Architecture | Support | |---|:---:|:---:|:---:| -| Raspbian | Buster | ARM | Official | +| Raspberry Pi OS | (32-bit) Lite Buster | ARM | Official | | Armbian | Buster | [ARM](https://docs.armbian.com/#supported-chips) | Official | | Debian | Buster | ARM / x86_64 | Beta | | Ubuntu | 18.04 LTS / 19.10 | ARM / x86_64 | Beta | diff --git a/ajax/networking/wifi_stations.php b/ajax/networking/wifi_stations.php index a867b6b5..7d9bb82e 100644 --- a/ajax/networking/wifi_stations.php +++ b/ajax/networking/wifi_stations.php @@ -13,5 +13,6 @@ $ssid = null; knownWifiStations($networks); nearbyWifiStations($networks, !isset($_REQUEST["refresh"])); connectedWifiStations($networks); +sortNetworksByRSSI($networks); echo renderTemplate('wifi_stations', compact('networks')); diff --git a/composer.json b/composer.json index 2d1021ca..4b0f48c0 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,20 @@ { "name": "billz/raspap-webgui", - "homepage": "https://raspap.com/", + "description": "Simple AP setup and wifi mangement for Debian-based devices", "license": "GPL-3.0", - "keywords": ["raspberrypi"], + "homepage": "https://raspap.com/", + "keywords": ["raspberrypi", "debian", "armbian", "wifi"], + "type": "raspap-core", + "authors": [ + { + "name": "RaspAP Team", + "email": "billzimmerman@gmail.com", + "homepage": "https://raspap.com/" + } + ], + "require": { + "php": "^7.0" + }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2.0", "phpcompatibility/php-compatibility": "^9.3.5", diff --git a/config/config.php b/config/config.php index f638b2a7..faa08855 100755 --- a/config/config.php +++ b/config/config.php @@ -1,6 +1,6 @@ '2.4', + 'RASPI_VERSION' => '2.4.1', 'RASPI_CONFIG_NETWORKING' => RASPI_CONFIG.'/networking', 'RASPI_ADMIN_DETAILS' => RASPI_CONFIG.'/raspap.auth', 'RASPI_WIFI_CLIENT_INTERFACE' => 'wlan0', diff --git a/includes/hostapd.php b/includes/hostapd.php index d50283bc..8ae41091 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -245,6 +245,9 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status) $config.= 'vht_capab=[MAX-AMSDU-3839][SHORT-GI-80]'.PHP_EOL; $config.= 'vht_oper_chwidth=1'.PHP_EOL; $config.= 'vht_oper_centr_freq_seg0_idx=42'.PHP_EOL.PHP_EOL; + } elseif ($_POST['hw_mode'] === 'w') { + $config.= 'ieee80211w=2'.PHP_EOL; + $config.= 'wpa_key_mgmt=WPA-EAP-SHA256'.PHP_EOL; } else { $config.= 'hw_mode='.$_POST['hw_mode'].PHP_EOL; $config.= 'ieee80211n=0'.PHP_EOL; diff --git a/includes/system.php b/includes/system.php index a5e86010..1d885b1e 100755 --- a/includes/system.php +++ b/includes/system.php @@ -51,7 +51,12 @@ function RPiVersion() if (array_key_exists($rev, $revisions)) { return $revisions[$rev]; } else { - return 'Unknown Pi'; + exec('cat /proc/device-tree/model', $model); + if (isset($model[0])) { + return $model[0]; + } else { + return 'Unknown Device'; + } } } diff --git a/includes/wifi_functions.php b/includes/wifi_functions.php index 1125c0e2..3041bbde 100755 --- a/includes/wifi_functions.php +++ b/includes/wifi_functions.php @@ -64,16 +64,30 @@ function nearbyWifiStations(&$networks, $cached = true) } ); + // get the name of the AP. Should be excluded from nearby networks + exec('cat '.RASPI_HOSTAPD_CONFIG.' | sed -rn "s/ssid=(.*)\s*$/\1/p" ', $ap_ssid); + $ap_ssid = $ap_ssid[0]; + 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) { + 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)) { + continue; + } // If network is saved - if (array_key_exists(4, $arrNetwork) && array_key_exists($arrNetwork[4], $networks)) { - $networks[$arrNetwork[4]]['visible'] = true; - $networks[$arrNetwork[4]]['channel'] = ConvertToChannel($arrNetwork[1]); + if (array_key_exists($ssid, $networks)) { + $networks[$ssid]['visible'] = true; + $networks[$ssid]['channel'] = ConvertToChannel($arrNetwork[1]); // TODO What if the security has changed? } else { - $networks[$arrNetwork[4]] = array( + $networks[$ssid] = array( 'configured' => false, 'protocol' => ConvertToSecurity($arrNetwork[3]), 'channel' => ConvertToChannel($arrNetwork[1]), @@ -83,9 +97,11 @@ function nearbyWifiStations(&$networks, $cached = true) ); } - // Save RSSI - if (array_key_exists(4, $arrNetwork)) { - $networks[$arrNetwork[4]]['RSSI'] = $arrNetwork[2]; + // Save RSSI, if the current value is larger than the already stored + if (array_key_exists(4, $arrNetwork) && array_key_exists($arrNetwork[4], $networks)) { + if (! array_key_exists('RSSI', $networks[$arrNetwork[4]]) || $networks[$ssid]['RSSI'] < $arrNetwork[2]) { + $networks[$ssid]['RSSI'] = $arrNetwork[2]; + } } } } @@ -100,6 +116,24 @@ function connectedWifiStations(&$networks) } } +function sortNetworksByRSSI(&$networks) +{ + $valRSSI = array(); + foreach ($networks as $SSID => $net) { + if (!array_key_exists('RSSI', $net)) { + $net['RSSI'] = -1000; + } + $valRSSI[$SSID] = $net['RSSI']; + } + $nets = $networks; + arsort($valRSSI); + $networks = array(); + foreach ($valRSSI as $SSID => $RSSI) { + $networks[$SSID] = $nets[$SSID]; + $networks[$SSID]['RSSI'] = $RSSI; + } +} + function getWifiInterface() { if (empty($_SESSION['client_iface'])) { diff --git a/index.php b/index.php index c2fe13ee..d6682b8e 100755 --- a/index.php +++ b/index.php @@ -13,7 +13,7 @@ * @author Lawrence Yau * @author Bill Zimmerman * @license GNU General Public License, version 3 (GPL-3.0) - * @version 2.4 + * @version 2.4.1 * @link https://github.com/billz/raspap-webgui * @see http://sirlagz.net/2013/02/08/raspap-webgui/ */ @@ -146,7 +146,7 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable']; - + diff --git a/installers/common.sh b/installers/common.sh index a64e8d1c..b27b0684 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -78,16 +78,16 @@ function _get_linux_distro() { # Sets php package option based on Linux version, abort if unsupported distro function _set_php_package() { case $RELEASE in - "18.04"|"19.10") # Ubuntu Server + 18.04|19.10) # Ubuntu Server php_package="php7.4-cgi" phpcgiconf="/etc/php/7.4/cgi/php.ini" ;; - "10") + 10*) php_package="php7.3-cgi" phpcgiconf="/etc/php/7.3/cgi/php.ini" ;; - "9") + 9*) php_package="php7.0-cgi" phpcgiconf="/etc/php/7.0/cgi/php.ini" ;; - "8") + 8) _install_status 1 "${DESC} and php5 are not supported. Please upgrade." ;; *) _install_status 1 "${DESC} is unsupported. Please install on a supported distro." ;; diff --git a/installers/uninstall.sh b/installers/uninstall.sh index e89ece5c..542ddc65 100755 --- a/installers/uninstall.sh +++ b/installers/uninstall.sh @@ -20,6 +20,7 @@ readonly raspap_user="www-data" readonly raspap_sudoers="/etc/sudoers.d/090_raspap" readonly raspap_dnsmasq="/etc/dnsmasq.d/090_raspap.conf" readonly raspap_sysctl="/etc/sysctl.d/90_raspap.conf" +readonly raspap_network="/etc/systemd/network/" readonly rulesv4="/etc/iptables/rules.v4" webroot_dir="/var/www/html" @@ -44,13 +45,13 @@ function _get_linux_distro() { # Sets php package option based on Linux version, abort if unsupported distro function _set_php_package() { case $RELEASE in - "18.04"|"19.10") # Ubuntu Server + 18.04|19.10) # Ubuntu Server php_package="php7.4-cgi" phpcgiconf="/etc/php/7.4/cgi/php.ini" ;; - "10") + 10*) php_package="php7.3-cgi" phpcgiconf="/etc/php/7.3/cgi/php.ini" ;; - "9") + 9*) php_package="php7.0-cgi" phpcgiconf="/etc/php/7.0/cgi/php.ini" ;; esac @@ -148,7 +149,7 @@ function _remove_raspap_service() { function _restore_networking() { _install_log "Restoring networking config to pre-install defaults" echo "Disabling IP forwarding in $raspap_sysctl" - sudo rm $raspap_sysctl || _install_error "Unable to remove $raspap_sysctl" + sudo rm "$raspap_sysctl" || _install_error "Unable to remove $raspap_sysctl" sudo /etc/init.d/procps restart || _install_error "Unable to execute procps" echo "Checking iptables rules" rules=( @@ -169,6 +170,11 @@ function _restore_networking() { sudo iptables-save | sudo tee $rulesv4 > /dev/null || _install_error "Unable to execute iptables-save" fi echo "Done." + # Remove dnsmasq and bridge configs + echo "Removing 090_raspap.conf from dnsmasq" + sudo rm "$raspap_dnsmasq" || _install_error "Unable to remove $raspap_dnsmasq" + echo "Removing raspap bridge configurations" + sudo rm "$raspap_network"/raspap* || _install_error "Unable to remove bridge config" } # Removes installed packages diff --git a/locale/ru_RU/LC_MESSAGES/messages.mo b/locale/ru_RU/LC_MESSAGES/messages.mo index fe97cb78..8c5c4d55 100644 Binary files a/locale/ru_RU/LC_MESSAGES/messages.mo and b/locale/ru_RU/LC_MESSAGES/messages.mo differ diff --git a/locale/ru_RU/LC_MESSAGES/messages.po b/locale/ru_RU/LC_MESSAGES/messages.po index bbd6115a..8516ff52 100644 --- a/locale/ru_RU/LC_MESSAGES/messages.po +++ b/locale/ru_RU/LC_MESSAGES/messages.po @@ -1,22 +1,19 @@ -# RaspAP Portable Object file -# Project home: https://github.com/billz/raspap-webgui -# Licensed under the GNU General Public License v3.0 -# This file is distributed under the same license as the RaspAP package -# FIRST AUTHOR billzimmerman@gmail.com, 2017 -# -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: 1.2.1\n" +"Project-Id-Version: raspap\n" "Report-Msgid-Bugs-To: Bill Zimmerman \n" "POT-Creation-Date: 2017-10-19 08:56+0000\n" -"PO-Revision-Date: 2019-10-21 23:15+0000\n" -"Last-Translator: Betep \n" -"Language-Team: \n" -"Language: en_US\n" +"PO-Revision-Date: 2020-05-19 15:29\n" +"Last-Translator: Denis Trifiniuc\n" +"Language-Team: Russian\n" +"Language: ru_RU\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n" +"X-Crowdin-Project: raspap\n" +"X-Crowdin-Language: ru\n" +"X-Crowdin-File: /master/locale/en_US/LC_MESSAGES/messages.po\n" #: index.php msgid "RaspAP Wifi Configuration Portal" @@ -37,6 +34,12 @@ msgstr "WiFi клиента" msgid "Hotspot" msgstr "Точка доступа" +msgid "Memory Use" +msgstr "Использование RAM" + +msgid "CPU Temp" +msgstr "Температура ЦП" + msgid "Networking" msgstr "Сетевые" @@ -178,8 +181,8 @@ msgstr "Переданные пакеты" msgid "Transferred Bytes" msgstr "Передано Байт" -msgid "Wireless Information" -msgstr "Беспроводная информация" +msgid "Wireless Client" +msgstr "WiFi клиент" msgid "Connected To" msgstr "Подключено к" @@ -248,6 +251,9 @@ msgstr "Список клиентов" msgid "Interface" msgstr "Интерфейс" +msgid "DNS Server" +msgstr "DNS сервер" + msgid "Starting IP Address" msgstr "Начальный IP-адрес" @@ -318,31 +324,31 @@ msgid "Dnsmasq is not running" msgstr "Dnsmasq не запущена" msgid "Upstream DNS servers" -msgstr "Upstream DNS servers" +msgstr "Пользовательские DNS-серверы" msgid "Only ever query DNS servers configured below" -msgstr "Only ever query DNS servers configured below" +msgstr "Использовать только DNS-серверы, настроенные ниже" 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 "Включите эту опцию, если вы хотите, чтобы RaspAP отправлял DNS-запросы только на серверы, настроенные ниже. По умолчанию RaspAP также использует восходящие DNS-серверы, назначенные через DHCP." msgid "This option adds no-resolv to the dnsmasq configuration." -msgstr "This option adds no-resolv to the dnsmasq configuration." +msgstr "Этот параметр добавляет no-resolv в конфигурацию dnsmasq." msgid "Add upstream DNS server" -msgstr "Add upstream DNS server" +msgstr "Добавить сервер DNS" msgid "Format" -msgstr "Format" +msgstr "Формат" msgid "Choose a hosted server" -msgstr "Choose a hosted server" +msgstr "Общедоступный DNS-сервер" msgid "Log DHCP requests" -msgstr "Log DHCP requests" +msgstr "Журнал DHCP-запросов" msgid "Log DNS queries" -msgstr "Log DNS queries" +msgstr "Журнал DNS-запросов" #: includes/hostapd.php msgid "Basic" @@ -426,6 +432,9 @@ msgstr "Записи журнала" msgid "WiFi client AP mode" msgstr "Режим AP WiFi-клиента" +msgid "Bridged AP mode" +msgstr "Режим моста ТОЧКИ ДОСТУПА" + msgid "Hide SSID in broadcast" msgstr "Скрыть SSID при трансляции" @@ -445,9 +454,6 @@ msgstr "Текущие настройки" msgid "Default Gateway" msgstr "Основной шлюз" -msgid "DNS Server" -msgstr "DNS сервер" - msgid "Alternate DNS Server" msgstr "Альтернативный DNS-сервер" @@ -660,6 +666,10 @@ msgstr "Попытка запуска TOR" msgid "Attempting to stop TOR" msgstr "Попытка остановить TOR" +#: template/dashboard.php +msgid "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." +msgstr "Мостовой режим ТОЧКИ ДОСТУПА включен. Для хоста и IP-адреса см. страницу администрирования маршрутизатора." + #: common form controls msgid "Save settings" msgstr "Сохранить настройки" @@ -682,3 +692,45 @@ msgstr "вверх" msgid "down" msgstr "вниз" +msgid "adblock" +msgstr "Adblock" + +msgid "Ad Blocking" +msgstr "Ad Blocking" + +msgid "Start Ad Blocking" +msgstr "Запустить Ad Blocking" + +msgid "Restart Ad Blocking" +msgstr "Перезапустить Ad Blocking" + +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 "Включите эту опцию, если вы хотите, чтобы RaspAP блокировал DNS запросы для рекламы, отслеживания и другого виртуального мусора. Блокирующие списки собираются из множества активно поддерживаемых источников и автоматически обновляются, очищаются, оптимизируются и модерируются ежедневно." + +msgid "This option adds conf-file and addn-hosts to the dnsmasq configuration." +msgstr "Эта опция добавляет в конфигурацию dnsmasq conf-file и addn-hosts." + +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 "Информация получена от Adblock" + diff --git a/templates/hostapd.php b/templates/hostapd.php index d3d7786e..9fcbd8c1 100755 --- a/templates/hostapd.php +++ b/templates/hostapd.php @@ -61,6 +61,12 @@ $selectedHwMode = 'ac'; } } + if (isset($arrConfig['ieee80211w'])) { + if (strval($arrConfig['ieee80211w']) === '2') { + $selectedHwMode = 'w'; + } + } + if (!in_array($arrConfig['country_code'], $countries_5Ghz_max48ch)) { $hwModeDisabled = 'ac'; if ($selectedHwMode === $hwModeDisabled) { diff --git a/templates/wifi_stations.php b/templates/wifi_stations.php index 1769cc9e..d6705628 100755 --- a/templates/wifi_stations.php +++ b/templates/wifi_stations.php @@ -16,41 +16,46 @@ } ?>
-
+
- - - - - - - + + + + + +
-
+
- - - - X - + + + + X +
-
+
- = -50) { - echo 100; - } elseif ($network['RSSI'] <= -100) { - echo 0; - } else { - echo 2*($network['RSSI'] + 100); - } - echo "%)"; - ?> + = -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 "; + } + ?>
@@ -58,35 +63,35 @@ -
+
-
-
+
+
- - - - -
- -
- -
-
+ + + + +
+ +
+ +
+ -
- - " id="update" name="update" /> - - - " id="update" name="update" /> - - " name="delete" /> -
+
+ + " id="update" name="update" /> + + + " id="update" name="update" /> + + " name="delete" /> +
- - + +