1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Merge billz/raspap-webgui master

This commit is contained in:
billz 2020-08-22 14:43:26 +01:00
commit 5be1ad5844
61 changed files with 2918 additions and 1936 deletions

View File

@ -8,29 +8,16 @@ matrix:
- php: '7.0'
- php: '7.1'
- php: '7.2'
- php: '7.3'
- php: '7.4'
- php: 'nightly'
allow_failures:
- php: nightly
before_install:
- if [[ "$SNIFF" == "1" ]]; then export PHPCS_DIR=/tmp/phpcs; fi
- if [[ "$SNIFF" == "1" ]]; then export PHPCOMPAT_DIR=/tmp/PHPCompatibility; fi
# Install PHP CodeSniffer
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR; fi
# Install PHP Compatibility Standard
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $PHPCOMPAT_DIR; fi
# Set install path for PHP Compatibility Standard
# @link https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options#setting-the-installed-standard-paths
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/bin/phpcs --config-set installed_paths $PHPCOMPAT_DIR; fi
# Refresh path
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
before_script:
- composer install --prefer-source --quiet --no-interaction
# Run test script commands.
# All commands must exit with code 0 on success. Anything else is considered failure.
script:
# Search for PHP syntax errors
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
# Run PHPCS
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/bin/phpcs . ; fi
- composer test

View File

@ -18,4 +18,6 @@ Recurring and one-time donors are vital to the continued development of this pro
Ray E - "This project is awesome and just works; saved me and my client tons of work. Thank you!" - $20
Erin C - "Just got Raspap up and running, looks very cool, thanks!" -$20 CAD
Ralf J - "Thanks for RaspAP including OpenVPN. It was a big help for me." -€15
Olivier G -€15 EUR
Felipe C - "Thanks for the good work on RaspAP!" -$6
Webagentur S - "Like what you and RaspAP are doing." -€20
Matthew B - "Great project, easy to set up." -£15

View File

@ -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.5](https://img.shields.io/badge/Release-2.5-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) [![Crowdin](https://badges.crowdin.net/raspap/localized.svg)](https://crowdin.com/project/raspap) [![Twitter URL](https://img.shields.io/twitter/url?label=%40RaspAP&logoColor=%23d8224c&url=https%3A%2F%2Ftwitter.com%2Frasp_ap)](https://twitter.com/rasp_ap) [![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/RaspAP?style=social)](https://www.reddit.com/r/RaspAP/)
RaspAP 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.
@ -7,7 +7,7 @@ RaspAP has been featured on sites such as [Instructables](http://www.instructabl
We hope you enjoy using RaspAP as much as we do creating it. Tell us how you use this with [your own projects](https://github.com/billz/raspap-awesome).
![](https://i.imgur.com/BdEinwg.gif)
![](https://i.imgur.com/ikWvsMG.gif)
![](https://i.imgur.com/EiIpdOS.gif)
![](https://i.imgur.com/eCjUS1H.gif)
![](https://i.imgur.com/5FT2BcS.gif)
@ -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) Lite](https://www.raspberrypi.org/downloads/raspbian/). The Raspberry Pi OS desktop and 64-bit beta distros are unsupported.
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 |
@ -120,7 +122,7 @@ The following translations are currently maintained by the project:
- Español
- Finnish
- Français
- ελληνικό (Greek)
- Ελληνικά (Greek)
- Indonesian
- Italiano
- 日本語 (Japanese)

View File

@ -6,18 +6,20 @@ require_once '../../includes/config.php';
require_once '../../includes/functions.php';
if (isset($_POST['generate'])) {
$cnfNetworking = array_diff(scandir(RASPI_CONFIG_NETWORKING, 1), array('..','.','dhcpcd.conf'));
$cnfNetworking = array_diff(scandir(RASPI_CONFIG_NETWORKING, 1), array('..','.','dhcpcd.conf','defaults'));
$cnfNetworking = array_combine($cnfNetworking, $cnfNetworking);
$strConfFile = "";
$strConfFile = file_get_contents(RASPI_CONFIG_NETWORKING.'/defaults')."\n";
foreach ($cnfNetworking as $index => $file) {
if ($index != "defaults") {
$cnfFile = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.$file, false, INI_SCANNER_RAW);
if ($cnfFile['static'] === 'true') {
$strConfFile .= "#Static IP configured for ".$cnfFile['interface']."\n";
$strConfFile .= "interface ".$cnfFile['interface']."\n";
$strConfFile .= "static ip_address=".$cnfFile['ip_address']."\n";
$strConfFile .= "static routers=".$cnfFile['routers']."\n";
$strConfFile .= "static domain_name_servers=".$cnfFile['domain_name_server']."\n";
$strConfFile .= "static domain_name_servers=".$cnfFile['domain_name_server']."\n\n";
} elseif ($cnfFile['static'] === 'false' && $cnfFile['failover'] === 'true') {
$strConfFile .= "#Failover static IP configured for ".$cnfFile['interface']."\n";
$strConfFile .= "profile static_".$cnfFile['interface']."\n";
$strConfFile .= "static ip_address=".$cnfFile['ip_address']."\n";
$strConfFile .= "static routers=".$cnfFile['routers']."\n";
@ -27,13 +29,11 @@ if (isset($_POST['generate'])) {
} else {
$strConfFile .= "#DHCP configured for ".$cnfFile['interface']."\n\n";
}
} else {
$strConfFile .= file_get_contents(RASPI_CONFIG_NETWORKING.'/'.$index)."\n\n";
}
}
if (file_put_contents(RASPI_CONFIG_NETWORKING.'/dhcpcd.conf', $strConfFile)) {
exec('sudo /bin/cp /etc/raspap/networking/dhcpcd.conf /etc/dhcpcd.conf');
exec('sudo /bin/cp '.RASPI_CONFIG_NETWORKING.'/dhcpcd.conf '.RASPI_DHCPCD_CONFIG);
$output = ['return'=>0,'output'=>'Settings successfully applied'];
} else {
$output = ['return'=>2,'output'=>'Unable to write to apply settings'];

View File

@ -13,5 +13,6 @@ $ssid = null;
knownWifiStations($networks);
nearbyWifiStations($networks, !isset($_REQUEST["refresh"]));
connectedWifiStations($networks);
sortNetworksByRSSI($networks);
echo renderTemplate('wifi_stations', compact('networks'));

View File

@ -1,3 +1,9 @@
<?php header("Content-Type: text/css; charset=utf-8"); ?>
<?php
require_once '../../includes/functions.php';
$color = getColorOpt();
?>
/*
Theme Name: RaspAP default
Author: @billz
@ -51,9 +57,15 @@ body {
}
.card .card-header {
border-color: #d8224c;
background-color: #d8224c;
border-color: <?php echo $color; ?>;
color: #fff;
background-color: <?php echo $color; ?>;
}
.btn-primary {
color: <?php echo $color; ?>;
border-color: <?php echo $color; ?>;
background-color: #fff;
}
.card-footer {
@ -86,9 +98,7 @@ a.nav-link.active {
}
.btn-primary {
color: #d8224c;
background-color: #fff;
border-color: #d8224c;
}
.btn-warning {
@ -96,8 +106,8 @@ a.nav-link.active {
}
.btn-primary:hover {
background-color: #c61931;
border-color: #c61931;
background-color: <?php echo $color; ?>;
border-color: <?php echo $color; ?>;
}
i.fa.fa-bars {
@ -123,21 +133,6 @@ i.fa.fa-bars:hover{
float: left;
}
.webconsole {
width:100%;
height:100%;
border:1px solid;
}
#console {
height:500px;
}
.systemtabcontent {
height:100%;
min-height:500px;
}
.service-status {
border-width: 0;
}
@ -232,10 +227,18 @@ canvas#divDBChartBandwidthhourly {
.check-updated {
opacity: 0;
color: #1cc88a;
color: #90ee90;
}
.check-progress {
color: #999;
}
.fa-check {
color: #90ee90;
}
.fa-times {
color: #ff4500;
}

View File

@ -271,3 +271,11 @@ canvas#divDBChartBandwidthhourly {
color: #999;
}
.fa-check {
color: #90ee90;
}
.fa-times {
color: #ff4500;
}

View File

@ -166,6 +166,10 @@ hr {
font-family: inherit;
}
.ra-raspap:before {
color: #ac1b3d !important;
}
.sidebar-light #sidebarToggle {
background-color: #202020;
border: 1px solid #afafaf !important
@ -353,16 +357,6 @@ color: #d2d2d2 !important
border-color: #404040;
}
.webconsole {
width: 100%;
height: 20rem;
border: 1px solid #404040;
}
#console {
height: 500px;
}
tspan, rect {
fill: #d2d2d2;
}
@ -452,3 +446,11 @@ canvas#divDBChartBandwidthhourly {
color: #999;
}
.fa-check {
color: #90ee90;
}
.fa-times {
color: #ff4500;
}

View File

@ -1,3 +1,8 @@
<?php header("Content-Type: image/svg+xml; charset=utf-8"); ?>
<?php
require_once '../../includes/functions.php';
$color = getColorOpt();
?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
@ -27,20 +32,20 @@
transform="translate(192.6768,123.4365)"
id="g20"><path
id="path22"
style="fill:#d8224c;fill-opacity:1;fill-rule:nonzero;stroke:none"
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,-37.169 -30.128,-67.3 -67.296,-67.3 -37.167,0 -67.294,30.131 -67.294,67.3 0,37.165 30.127,67.296 67.294,67.296 C -30.128,67.296 0,37.165 0,0" /></g><g
transform="translate(125.3823,219.0791)"
id="g24"><path
id="path26"
style="fill:#d8224c;fill-opacity:1;fill-rule:nonzero;stroke:none"
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -52.737,0 -95.641,-42.905 -95.641,-95.643 0,-52.74 42.904,-95.647 95.641,-95.647 52.737,0 95.642,42.907 95.642,95.647 C 95.642,-42.905 52.737,0 0,0 m 0,-217.29 c -67.073,0 -121.641,54.571 -121.641,121.647 C -121.641,-28.569 -67.073,26 0,26 67.074,26 121.642,-28.569 121.642,-95.643 121.642,-162.719 67.074,-217.29 0,-217.29" /></g><g
transform="translate(144.4277,271.9385)"
id="g28"><path
id="path30"
style="fill:#d8224c;fill-opacity:1;fill-rule:nonzero;stroke:none"
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 66.188,0 121.118,-49.055 130.392,-112.714 l 28.259,-1.874 C 150.044,-34.655 82.181,27.791 0,27.791 c -3.892,0 -7.75,-0.147 -11.571,-0.423 L -9.73,-0.397 C -6.513,-0.161 -3.275,0 0,0" /></g><g
transform="translate(144.4883,334.7588)"
id="g32"><path
id="path34"
style="fill:#d8224c;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 101.94,0 185.667,-79.438 192.56,-179.664 l 27.962,-1.857 C 214.513,-65.087 117.899,27.791 0,27.791 c -5.31,0 -10.576,-0.2 -15.792,-0.571 l 1.84,-27.728 C -9.343,-0.177 -4.691,0 0,0" /></g></g></g></g></svg>
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 101.94,0 185.667,-79.438 192.56,-179.664 l 27.962,-1.857 C 214.513,-65.087 117.899,27.791 0,27.791 c -5.31,0 -10.576,-0.2 -15.792,-0.571 l 1.84,-27.728 C -9.343,-0.177 -4.691,0 0,0" /></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -4,6 +4,12 @@ require_once '../../includes/config.php';
require_once '../../includes/defaults.php';
require_once '../../includes/functions.php';
// prevent direct file access
if (!isset($_SERVER['HTTP_REFERER'])) {
header('HTTP/1.0 403 Forbidden');
exit;
}
function qr_encode($str)
{
return preg_replace('/(?<!\\\)([\":;,])/', '\\\\\1', $str);

View File

@ -375,8 +375,9 @@ function getCookie(cname) {
return (value != null) ? unescape(value[1]) : null;
}
// Define themes
var themes = {
"default": "custom.css",
"default": "custom.php",
"hackernews" : "hackernews.css",
"lightsout" : "lightsout.css",
}

22
app/js/huebee.js Normal file
View File

@ -0,0 +1,22 @@
// Initialize Huebee color picker
var elem = document.querySelector('.color-input');
var hueb = new Huebee( elem, {
notation: 'hex',
saturations: 2,
customColors: [ '#d8224c', '#dd4814', '#ea0', '#19f', '#333' ],
className: 'light-picker',
hue0: 210
});
// Set custom color if defined
var color = getCookie('color');
if (color == null || color == '') {
color = '#d8224c';
}
hueb.setColor(color);
// Change event
hueb.on( 'change', function( color, hue, sat, lum ) {
setCookie('color',color,90);
})

31
composer.json Normal file
View File

@ -0,0 +1,31 @@
{
"name": "billz/raspap-webgui",
"description": "Simple AP setup and wifi mangement for Debian-based devices",
"license": "GPL-3.0",
"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",
"squizlabs/php_codesniffer": "^3.5.5"
},
"scripts": {
"lint": "parallel-lint . --exclude vendor",
"phpcs": "phpcs -p -s --config-set installed_paths vendor/phpcompatibility/php-compatibility .",
"test": [
"composer lint",
"composer phpcs"
]
}
}

View File

@ -1,10 +1,10 @@
<?php
define('RASPI_VERSION', '2.4');
define('RASPI_BRAND_TEXT', 'RaspAP');
define('RASPI_CONFIG', '/etc/raspap');
define('RASPI_CONFIG_NETWORKING', RASPI_CONFIG.'/networking');
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
define('RASPI_WIFI_CLIENT_INTERFACE', 'wlan0');
define('RASPI_WIFI_AP_INTERFACE', 'wlan0');
define('RASPI_CACHE_PATH', sys_get_temp_dir() . '/raspap');
// Constants for configuration file paths.
@ -25,9 +25,11 @@ define('RASPI_WIREGUARD_SERVER_CONFIG', '/etc/wireguard/wg0.conf');
define('RASPI_WIREGUARD_CLIENT_CONFIG', '/etc/wireguard/wg0-client.conf');
define('RASPI_TORPROXY_CONFIG', '/etc/tor/torrc');
define('RASPI_LIGHTTPD_CONFIG', '/etc/lighttpd/lighttpd.conf');
define('RASPI_ACCESS_CHECK_IP', '1.1.1.1');
define('RASPI_ACCESS_CHECK_DNS', 'one.one.one.one');
// Constant for the 5GHz wireless regulatory domain
define('RASPI_5GHZ_ISO_ALPHA2', array('US'));
define('RASPI_5GHZ_ISO_ALPHA2', array('NL','US'));
// Optional services, set to true to enable.
define('RASPI_WIFICLIENT_ENABLED', true);

View File

@ -6,11 +6,11 @@
"channels": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
},
"2_4GHz_max14ch": {
"countries": [ "JP" ],
"countries": [ "JP", "NL" ],
"channels": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
},
"5Ghz_max48ch": {
"countries": [ "US" ],
"countries": [ "NL","US" ],
"channels": [ 36, 40, 44, 48 ]
}
}}

83
dist/huebee/huebee.css vendored Normal file
View File

@ -0,0 +1,83 @@
/*! Huebee v2.1.0
https://huebee.buzz
---------------------------------------------- */
.huebee {
position: absolute;
z-index: 1;
transform: translateY(0px);
transition: opacity 0.15s, transform 0.15s;
}
.huebee.is-hidden {
opacity: 0;
transform: translateY(10px);
}
.huebee.is-static-open {
position: relative;
z-index: auto;
}
.huebee__container {
position: absolute;
left: 0;
top: 5px;
padding: 10px;
background: #EEE;
border-radius: 5px;
box-shadow: 0 5px 10px hsla(0, 0%, 0%, 0.3);
}
.huebee.is-static-open .huebee__container {
position: relative;
display: inline-block;
left: auto;
top: auto;
box-shadow: none;
}
.huebee__canvas {
display: block;
cursor: pointer;
}
.huebee__cursor {
width: 15px;
height: 15px;
position: absolute;
left: 0px;
top: 0px;
box-sizing: content-box;
border: 3px solid white;
border-radius: 5px;
pointer-events: none;
}
.huebee__cursor.is-hidden { opacity: 0; }
.huebee__close-button {
display: block;
position: absolute;
width: 24px;
height: 24px;
top: -9px;
right: -9px;
border-radius: 12px;
background: #222;
}
.huebee__close-button__x {
stroke: white;
stroke-width: 3;
stroke-linecap: round;
}
.huebee__close-button:hover {
background: white;
cursor: pointer;
}
.huebee__close-button:hover .huebee__close-button__x {
stroke: #222;
}

4
dist/huebee/huebee.min.css vendored Normal file
View File

@ -0,0 +1,4 @@
/*! Huebee v2.1.0
https://huebee.buzz
---------------------------------------------- */
.huebee{position:absolute;z-index:1;transform:translateY(0);transition:opacity .15s,transform .15s}.huebee.is-hidden{opacity:0;transform:translateY(10px)}.huebee.is-static-open{position:relative;z-index:auto}.huebee__container{position:absolute;left:0;top:5px;padding:10px;background:#eee;border-radius:5px;box-shadow:0 5px 10px hsla(0,0%,0%,.3)}.huebee.is-static-open .huebee__container{position:relative;display:inline-block;left:auto;top:auto;box-shadow:none}.huebee__canvas{display:block;cursor:pointer}.huebee__cursor{width:15px;height:15px;position:absolute;left:0;top:0;box-sizing:content-box;border:3px solid #fff;border-radius:5px;pointer-events:none}.huebee__cursor.is-hidden{opacity:0}.huebee__close-button{display:block;position:absolute;width:24px;height:24px;top:-9px;right:-9px;border-radius:12px;background:#222}.huebee__close-button__x{stroke:#fff;stroke-width:3;stroke-linecap:round}.huebee__close-button:hover{background:#fff;cursor:pointer}.huebee__close-button:hover .huebee__close-button__x{stroke:#222}

1125
dist/huebee/huebee.pkgd.js vendored Normal file

File diff suppressed because it is too large Load Diff

22
dist/huebee/huebee.pkgd.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -77,7 +77,10 @@ function modules() {
// SB Admin2 CSS
var sbadmin2CSS = gulp.src('./node_modules/startbootstrap-sb-admin-2/css/*')
.pipe(gulp.dest('./dist/sb-admin-2/css'));
return merge(bootstrapJS, bootstrapSCSS, chartJS, dataTables, fontAwesome, jquery, jqueryEasing, sbadmin2JS, sbadmin2CSS);
// Huebee
var huebee = gulp.src('./node_modules/huebee/dist/*')
.pipe(gulp.dest('./dist/huebee'));
return merge(bootstrapJS, bootstrapSCSS, chartJS, dataTables, fontAwesome, jquery, jqueryEasing, sbadmin2JS, sbadmin2CSS, huebee);
}
// CSS task

0
includes/adblock.php Normal file → Executable file
View File

View File

@ -12,11 +12,13 @@ function DisplayWPAConfig()
$status = new StatusMessages();
$networks = [];
getWifiInterface();
knownWifiStations($networks);
if (isset($_POST['connect'])) {
$result = 0;
exec('sudo wpa_cli -i ' . RASPI_WPA_CTRL_INTERFACE . ' select_network '.strval($_POST['connect']));
exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' select_network '.strval($_POST['connect']));
$status->addMessage('New network selected', 'success');
} elseif (isset($_POST['client_settings'])) {
$tmp_networks = $networks;
if ($wpa_file = fopen('/tmp/wifidata', 'w')) {
@ -75,7 +77,7 @@ function DisplayWPAConfig()
if ($ok) {
system('sudo cp /tmp/wifidata ' . RASPI_WPA_SUPPLICANT_CONFIG, $returnval);
if ($returnval == 0) {
exec('sudo wpa_cli -i ' . RASPI_WIFI_CLIENT_INTERFACE . ' reconfigure', $reconfigure_out, $reconfigure_return);
exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' reconfigure', $reconfigure_out, $reconfigure_return);
if ($reconfigure_return == 0) {
$status->addMessage('Wifi settings updated successfully', 'success');
$networks = $tmp_networks;
@ -93,6 +95,7 @@ function DisplayWPAConfig()
nearbyWifiStations($networks);
connectedWifiStations($networks);
sortNetworksByRSSI($networks);
echo renderTemplate("configure_client", compact("status"));
}

View File

@ -1,16 +1,17 @@
<?php
require_once 'config.php';
require_once 'includes/config.php';
require_once 'includes/wifi_functions.php';
/**
* Show dashboard page.
*/
function DisplayDashboard(&$extraFooterScripts)
{
getWifiInterface();
$status = new StatusMessages();
// Need this check interface name for proper shell execution.
if (!preg_match('/^([a-zA-Z0-9]+)$/', RASPI_WIFI_CLIENT_INTERFACE)) {
if (!preg_match('/^([a-zA-Z0-9]+)$/', $_SESSION['wifi_client_interface'])) {
$status->addMessage(_('Interface name invalid.'), 'danger');
$status->showMessages();
return;
@ -21,8 +22,7 @@ function DisplayDashboard(&$extraFooterScripts)
$status->showMessages();
return;
}
exec('ip a show '.RASPI_WIFI_CLIENT_INTERFACE, $stdoutIp);
exec('ip a show '.$_SESSION['ap_interface'], $stdoutIp);
$stdoutIpAllLinesGlued = implode(" ", $stdoutIp);
$stdoutIpWRepeatedSpaces = preg_replace('/\s\s+/', ' ', $stdoutIpAllLinesGlued);
@ -61,26 +61,26 @@ function DisplayDashboard(&$extraFooterScripts)
// Because of table layout used in the ip output we get the interface statistics directly from
// the system. One advantage of this is that it could work when interface is disable.
exec('cat /sys/class/net/'.RASPI_WIFI_CLIENT_INTERFACE.'/statistics/rx_packets ', $stdoutCatRxPackets);
exec('cat /sys/class/net/'.$_SESSION['ap_interface'].'/statistics/rx_packets ', $stdoutCatRxPackets);
$strRxPackets = _('No data');
if (ctype_digit($stdoutCatRxPackets[0])) {
$strRxPackets = $stdoutCatRxPackets[0];
}
exec('cat /sys/class/net/'.RASPI_WIFI_CLIENT_INTERFACE.'/statistics/tx_packets ', $stdoutCatTxPackets);
exec('cat /sys/class/net/'.$_SESSION['ap_interface'].'/statistics/tx_packets ', $stdoutCatTxPackets);
$strTxPackets = _('No data');
if (ctype_digit($stdoutCatTxPackets[0])) {
$strTxPackets = $stdoutCatTxPackets[0];
}
exec('cat /sys/class/net/'.RASPI_WIFI_CLIENT_INTERFACE.'/statistics/rx_bytes ', $stdoutCatRxBytes);
exec('cat /sys/class/net/'.$_SESSION['ap_interface'].'/statistics/rx_bytes ', $stdoutCatRxBytes);
$strRxBytes = _('No data');
if (ctype_digit($stdoutCatRxBytes[0])) {
$strRxBytes = $stdoutCatRxBytes[0];
$strRxBytes .= getHumanReadableDatasize($strRxBytes);
}
exec('cat /sys/class/net/'.RASPI_WIFI_CLIENT_INTERFACE.'/statistics/tx_bytes ', $stdoutCatTxBytes);
exec('cat /sys/class/net/'.$_SESSION['ap_interface'].'/statistics/tx_bytes ', $stdoutCatTxBytes);
$strTxBytes = _('No data');
if (ctype_digit($stdoutCatTxBytes[0])) {
$strTxBytes = $stdoutCatTxBytes[0];
@ -89,7 +89,7 @@ function DisplayDashboard(&$extraFooterScripts)
define('SSIDMAXLEN', 32);
// Warning iw comes with: "Do NOT screenscrape this tool, we don't consider its output stable."
exec('iw dev '.RASPI_WIFI_CLIENT_INTERFACE.' link ', $stdoutIw);
exec('iw dev ' .$_SESSION['wifi_client_interface']. ' link ', $stdoutIw);
$stdoutIwAllLinesGlued = implode(' ', $stdoutIw);
$stdoutIwWRepSpaces = preg_replace('/\s\s+/', ' ', $stdoutIwAllLinesGlued);
@ -121,7 +121,7 @@ function DisplayDashboard(&$extraFooterScripts)
$bitrate = empty($bitrate) ? "-" : $bitrate;
// txpower is now displayed on iw dev(..) info command, not on link command.
exec('iw dev '.RASPI_WIFI_CLIENT_INTERFACE.' info ', $stdoutIwInfo);
exec('iw dev '.$_SESSION['wifi_client_interface'].' info ', $stdoutIwInfo);
$stdoutIwInfoAllLinesGlued = implode(' ', $stdoutIwInfo);
$stdoutIpInfoWRepSpaces = preg_replace('/\s\s+/', ' ', $stdoutIwInfoAllLinesGlued);
@ -147,13 +147,12 @@ function DisplayDashboard(&$extraFooterScripts)
$classMsgDevicestatus = 'success';
}
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['ifdown_wlan0'])) {
// Pressed stop button
if ($interfaceState === 'UP') {
$status->addMessage(sprintf(_('Interface is going %s.'), _('down')), 'warning');
exec('sudo ip link set '.RASPI_WIFI_CLIENT_INTERFACE.' down');
exec('sudo ip link set '.$_SESSION['wifi_client_interface'].' down');
$wlan0up = false;
$status->addMessage(sprintf(_('Interface is now %s.'), _('down')), 'success');
} elseif ($interfaceState === 'unknown') {
@ -165,8 +164,8 @@ function DisplayDashboard(&$extraFooterScripts)
// Pressed start button
if ($interfaceState === 'DOWN') {
$status->addMessage(sprintf(_('Interface is going %s.'), _('up')), 'warning');
exec('sudo ip link set ' . RASPI_WIFI_CLIENT_INTERFACE . ' up');
exec('sudo ip -s a f label ' . RASPI_WIFI_CLIENT_INTERFACE);
exec('sudo ip link set ' .$_SESSION['wifi_client_interface']. ' up');
exec('sudo ip -s a f label ' . $_SESSION['wifi_client_interface']);
$wlan0up = true;
$status->addMessage(sprintf(_('Interface is now %s.'), _('up')), 'success');
} elseif ($interfaceState === 'unknown') {
@ -201,6 +200,7 @@ function DisplayDashboard(&$extraFooterScripts)
)
);
$extraFooterScripts[] = array('src'=>'app/js/dashboardchart.js', 'defer'=>false);
$extraFooterScripts[] = array('src'=>'app/js/linkquality.js', 'defer'=>false);
}

View File

@ -5,10 +5,11 @@ if (!defined('RASPI_CONFIG')) {
}
$defaults = [
'RASPI_VERSION' => '2.4',
'RASPI_BRAND_TEXT' => 'RaspAP',
'RASPI_VERSION' => '2.5',
'RASPI_CONFIG_NETWORKING' => RASPI_CONFIG.'/networking',
'RASPI_ADMIN_DETAILS' => RASPI_CONFIG.'/raspap.auth',
'RASPI_WIFI_CLIENT_INTERFACE' => 'wlan0',
'RASPI_WIFI_AP_INTERFACE' => 'wlan0',
'RASPI_CACHE_PATH' => sys_get_temp_dir() . '/raspap',
// Constants for configuration file paths.
@ -29,6 +30,8 @@ $defaults = [
'RASPI_WIREGUARD_CLIENT_CONFIG' => '/etc/wireguard/wg0-client.conf',
'RASPI_TORPROXY_CONFIG' => '/etc/tor/torrc',
'RASPI_LIGHTTPD_CONFIG' => '/etc/lighttpd/lighttpd.conf',
'RASPI_ACCESS_CHECK_IP' => '1.1.1.1',
'RASPI_ACCESS_CHECK_DNS' => 'one.one.one.one',
// Optional services, set to true to enable.
'RASPI_WIFICLIENT_ENABLED' => true,

View File

@ -417,3 +417,38 @@ function formatDateAgo($datetime, $full = false)
if (!$full) $string = array_slice($string, 0, 1);
return $string ? implode(', ', $string) . ' ago' : 'just now';
}
function getThemeOpt()
{
if (!isset($_COOKIE['theme'])) {
$theme = "custom.php";
} else {
$theme = $_COOKIE['theme'];
}
return 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
}
function getColorOpt()
{
if (!isset($_COOKIE['color'])) {
$color = "#d8224c";
} else {
$color = $_COOKIE['color'];
}
return $color;
}
function getSidebarState()
{
if ($_COOKIE['sidebarToggled'] == 'true' ) {
return"toggled";
}
}
// Returns bridged AP mode status
function getBridgedState()
{
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
// defaults to false
return $arrHostapdConf['BridgedEnable'];
}

View File

@ -1,8 +1,11 @@
<?php
require_once 'includes/status_messages.php';
require_once 'status_messages.php';
require_once 'app/lib/system.php';
require_once 'config.php';
require_once 'includes/wifi_functions.php';
require_once 'includes/config.php';
getWifiInterface();
/**
*
@ -24,6 +27,7 @@ function DisplayHostAPDConfig()
$arrEncType = array('TKIP' => 'TKIP', 'CCMP' => 'CCMP', 'TKIP CCMP' => 'TKIP+CCMP');
$managedModeEnabled = false;
exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces);
exec("iw reg get | awk '/country / { sub(/:/,\"\",$2); print $2 }'", $country_code);
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['SaveHostAPDSettings'])) {
@ -56,7 +60,7 @@ function DisplayHostAPDConfig()
}
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
exec('iwgetid '. RASPI_WIFI_CLIENT_INTERFACE. ' -r', $wifiNetworkID);
exec('iwgetid '. $_POST['interface']. ' -r', $wifiNetworkID);
if (!empty($wifiNetworkID[0])) {
$managedModeEnabled = true;
}
@ -74,6 +78,11 @@ function DisplayHostAPDConfig()
}
};
// assign country_code from iw reg if not set in config
if (!isset($arrConfig['country_code']) && isset($country_code[0])) {
$arrConfig['country_code'] = $country_code[0];
}
echo renderTemplate(
"hostapd", compact(
"status",
@ -146,27 +155,29 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status)
if ($arrHostapdConf['LogEnable'] == 0) {
if (isset($_POST['logEnable'])) {
$logEnable = 1;
exec('sudo /etc/raspap/hostapd/enablelog.sh');
exec('sudo '.RASPI_CONFIG.'/hostapd/enablelog.sh');
} else {
exec('sudo /etc/raspap/hostapd/disablelog.sh');
exec('sudo '.RASPI_CONFIG.'/hostapd/disablelog.sh');
}
} else {
if (isset($_POST['logEnable'])) {
$logEnable = 1;
exec('sudo /etc/raspap/hostapd/enablelog.sh');
exec('sudo '.RASPI_CONFIG.'/hostapd/enablelog.sh');
} else {
exec('sudo /etc/raspap/hostapd/disablelog.sh');
exec('sudo '.RASPI_CONFIG.'/hostapd/disablelog.sh');
}
}
$cfg = [];
$cfg['WifiInterface'] = $_POST['interface'];
$cfg['LogEnable'] = $logEnable;
// Save previous Client mode status when Bridged
$cfg['WifiAPEnable'] = ($bridgedEnable == 1 ?
$arrHostapdConf['WifiAPEnable'] : $wifiAPEnable);
$cfg['BridgedEnable'] = $bridgedEnable;
$cfg['WifiManaged'] = RASPI_WIFI_CLIENT_INTERFACE;
write_php_ini($cfg, '/etc/raspap/hostapd.ini');
$cfg['WifiManaged'] = $_POST['interface'];
write_php_ini($cfg, RASPI_CONFIG.'/hostapd.ini');
$_SESSION['ap_interface'] = $_POST['interface'];
// Verify input
if (empty($_POST['ssid']) || strlen($_POST['ssid']) > 32) {
@ -242,6 +253,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;
@ -252,7 +266,7 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status)
if ($wifiAPEnable == 1) {
$config.= 'interface=uap0'.PHP_EOL;
} elseif ($bridgedEnable == 1) {
$config.='interface='.RASPI_WIFI_CLIENT_INTERFACE.PHP_EOL;
$config.='interface='.$_POST['interface'].PHP_EOL;
$config.= 'bridge=br0'.PHP_EOL;
} else {
$config.= 'interface='.$_POST['interface'].PHP_EOL;
@ -300,11 +314,12 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status)
system('sudo cp /tmp/dnsmasqdata '.RASPI_DNSMASQ_CONFIG, $return);
// Set dnsmasq values from ini, fallback to default if undefined
$intConfig = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.RASPI_WIFI_CLIENT_INTERFACE.'.ini', false, INI_SCANNER_RAW);
$intConfig = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.$_POST['interface'].'.ini', false, INI_SCANNER_RAW);
$domain_name_server = ($intConfig['domain_name_server'] =='') ? '1.1.1.1 8.8.8.8' : $intConfig['domain_name_server'];
$routers = ($intConfig['routers'] == '') ? '10.3.141.1' : $intConfig['routers'];
$config = [ '# RaspAP wlan0 configuration' ];
// write options to dhcpcd.conf
$config = [ '# RaspAP '.$_POST['interface'].' configuration' ];
$config[] = 'hostname';
$config[] = 'clientid';
$config[] = 'persistent';
@ -327,12 +342,26 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status)
$config[] = 'static ip_address='.$ip_address;
$config[] = 'nohook wpa_supplicant';
} else {
// Default config
$ip_address = ($intConfig['ip_address'] == '') ? '10.3.141.1/24' : $intConfig['ip_address'];
$config[] = 'interface '.RASPI_WIFI_CLIENT_INTERFACE;
// Default config
$ip_address = "10.3.141.1/24"; // fallback IP
// default IP of the AP xxx.xxx.xxx.1/24 of the selected dhcp range
$def_ip = array();
if (preg_match("/^([0-9]{1,3}\.){3}/",$dhcp_range,$def_ip) ) $ip_address = $def_ip[0]."1/24";
// use static IP assigned to interface only, if consistent with the selected dhcp range
if (preg_match("/^([0-9]{1,3}\.){3}/",$intConfig['ip_address'],$int_ip) && $def_ip[0] === $int_ip[0]) $ip_address = $intConfig['ip_address'];
$config[] = 'interface '.$_POST['interface'];
$config[] = 'static ip_address='.$ip_address;
$config[] = 'static routers='.$routers;
$config[] = 'static domain_name_server='.$domain_name_server;
$config[] = PHP_EOL;
// write the static IP back to the $_POST['interface'].ini file
$intConfig['interface'] = $_POST['interface'];
$intConfig['ip_address'] = $ip_address;
$intConfig['domain_name_server'] = $domain_name_server;
$intConfig['routers'] = $routers;
$intConfig['static'] = "true";
$intConfig['failover'] = "false";
write_php_ini($intConfig, RASPI_CONFIG_NETWORKING.'/'.$_POST['interface'].".ini");
}
$config = join(PHP_EOL, $config);

30
includes/internetRoute.php Executable file
View File

@ -0,0 +1,30 @@
<?php
$rInfo=array();
// get all default routes
exec('ip route list | sed -rn "s/default via (([0-9]{1,3}\.){3}[0-9]{1,3}).*dev (\w*).*src (([0-9]{1,3}\.){3}[0-9]{1,3}).*/\3 \4 \1/p"', $routes);
if (!empty($routes) ) {
foreach ($routes as $i => $route) {
$prop=explode(' ', $route);
$rInfo[$i]["interface"]=$prop[0];
$rInfo[$i]["ip-address"]=$prop[1];
$rInfo[$i]["gateway"]=$prop[2];
// resolve the name of the gateway (if possible)
unset($host);
exec('host '.$prop[2].' | sed -rn "s/.*domain name pointer (.*)\./\1/p" | head -n 1', $host);
$rInfo[$i]["gw-name"] = empty($host) ? "*" : $host[0];
if (isset($checkAccess) && $checkAccess) {
// check internet connectivity w/ and w/o DNS resolution
unset($okip);
exec('ping -W1 -c 1 -I '.$prop[0].' '.RASPI_ACCESS_CHECK_IP.' | sed -rn "s/.*icmp_seq=1.*time=.*/OK/p"',$okip);
$rInfo[$i]["access-ip"] = empty($okip) ? false : true;
unset($okdns);
exec('ping -W1 -c 1 -I '.$prop[0].' '.RASPI_ACCESS_CHECK_DNS.' | sed -rn "s/.*icmp_seq=1.*time=.*/OK/p"',$okdns);
$rInfo[$i]["access-dns"] = empty($okdns) ? false : true;
}
}
} else {
$rInfo = array("error"=>"No route to the internet found");
}
$rInfo_json = json_encode($rInfo);
?>

View File

@ -1,7 +1,10 @@
<?php
require_once 'includes/status_messages.php';
require_once 'config.php';
require_once 'includes/config.php';
require_once 'includes/wifi_functions.php';
getWifiInterface();
/**
* Manage OpenVPN configuration
@ -146,7 +149,7 @@ function SaveOpenVPNConfig($status, $file, $authUser, $authPassword)
}
// Set iptables rules and, optionally, auth-user-pass
exec("sudo /etc/raspap/openvpn/configauth.sh $tmp_ovpnclient $auth_flag " .RASPI_WIFI_CLIENT_INTERFACE, $return);
exec("sudo /etc/raspap/openvpn/configauth.sh $tmp_ovpnclient $auth_flag " .$_SESSION['ap_interface'], $return);
foreach ($return as $line) {
$status->addMessage($line, 'info');
}

View File

@ -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';
}
}
}
@ -72,19 +77,36 @@ function DisplaySystem()
}
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['SaveServerPort'])) {
if (isset($_POST['SaveServerSettings'])) {
$good_input = true;
// Validate server port
if (isset($_POST['serverPort'])) {
if (strlen($_POST['serverPort']) > 4 || !is_numeric($_POST['serverPort'])) {
$status->addMessage('Invalid value for port number', 'danger');
$good_input = false;
} else {
$serverPort = escapeshellarg($_POST['serverPort']);
exec("sudo /etc/raspap/lighttpd/configport.sh $serverPort " .RASPI_LIGHTTPD_CONFIG. " ".$_SERVER['SERVER_NAME'], $return);
foreach ($return as $line) {
$status->addMessage($line, 'info');
}
}
}
// Validate server bind address
$serverBind = escapeshellarg('');
if ($_POST['serverBind'] && $_POST['serverBind'] !== null ) {
if (!filter_var($_POST['serverBind'], FILTER_VALIDATE_IP)) {
$status->addMessage('Invalid value for bind address', 'danger');
$good_input = false;
} else {
$serverBind = escapeshellarg($_POST['serverBind']);
}
}
// Save settings
if ($good_input) {
exec("sudo /etc/raspap/lighttpd/configport.sh $serverPort $serverBind " .RASPI_LIGHTTPD_CONFIG. " ".$_SERVER['SERVER_NAME'], $return);
foreach ($return as $line) {
$status->addMessage($line, 'info');
}
}
}
if (isset($_POST['system_reboot'])) {
$status->addMessage("System Rebooting Now!", "warning", false);
$result = shell_exec("sudo /sbin/reboot");
@ -101,7 +123,8 @@ function DisplaySystem()
}
exec('cat '. RASPI_LIGHTTPD_CONFIG, $return);
$conf = ParseConfig($return);
$ServerPort = $conf['server.port'];
$serverPort = $conf['server.port'];
$serverBind = str_replace('"', '',$conf['server.bind']);
// define locales
$arrLocales = array(
@ -127,5 +150,5 @@ function DisplaySystem()
'vi_VN.UTF-8' => 'Tiếng Việt (Vietnamese)'
);
echo renderTemplate("system", compact("arrLocales", "status", "system", "ServerPort"));
echo renderTemplate("system", compact("arrLocales", "status", "serverPort", "serverBind"));
}

View File

@ -3,7 +3,7 @@
*
*
*/
function DisplayThemeConfig()
function DisplayThemeConfig(&$extraFooterScripts)
{
$themes = [
"default" => "RaspAP (default)",
@ -11,11 +11,14 @@ function DisplayThemeConfig()
"lightsout" => "Lights Out"
];
$themeFiles = [
"default" => "custom.css",
"default" => "custom.php",
"hackernews" => "hackernews.css",
"lightsout" => "lightsout.css"
];
$selectedTheme = array_search($_COOKIE['theme'], $themeFiles);
echo renderTemplate("themes", compact("themes", "selectedTheme"));
$extraFooterScripts[] = array('src'=>'dist/huebee/huebee.pkgd.min.js', 'defer'=>false);
$extraFooterScripts[] = array('src'=>'app/js/huebee.js', 'defer'=>false);
}

File diff suppressed because one or more lines are too long

View File

@ -53,26 +53,40 @@ function nearbyWifiStations(&$networks, $cached = true)
$scan_results = cache(
$cacheKey, function () {
exec('sudo wpa_cli -i ' . RASPI_WIFI_CLIENT_INTERFACE . ' scan');
exec('sudo wpa_cli -i ' .$_SESSION['wifi_client_interface']. ' scan');
sleep(3);
exec('sudo wpa_cli -i ' . RASPI_WIFI_CLIENT_INTERFACE . ' scan_results', $stdout);
exec('sudo wpa_cli -i ' .$_SESSION['wifi_client_interface']. ' scan_results', $stdout);
array_shift($stdout);
return implode("\n", $stdout);
}
);
// 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]),
@ -82,19 +96,56 @@ 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];
}
}
}
}
function connectedWifiStations(&$networks)
{
exec('iwconfig ' . RASPI_WIFI_CLIENT_INTERFACE, $iwconfig_return);
exec('iwconfig ' .$_SESSION['wifi_client_interface'], $iwconfig_return);
foreach ($iwconfig_return as $line) {
if (preg_match('/ESSID:\"([^"]+)\"/i', $line, $iwconfig_ssid)) {
$networks[$iwconfig_ssid[1]]['connected'] = true;
}
}
}
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;
}
}
/*
* Determines the configured wireless AP interface
*
* If not saved in /etc/raspap/hostapd.ini, check for a second
* wireless interface with iw dev. Fallback to the constant
* value defined in config.php
*/
function getWifiInterface()
{
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
$iface = $_SESSION['ap_interface'] = isset($arrHostapdConf['WifiInterface']) ? $arrHostapdConf['WifiInterface'] : RASPI_WIFI_AP_INTERFACE;
// check for 2nd wifi interface -> wifi client on different interface
exec("iw dev | awk '$1==\"Interface\" && $2!=\"$iface\" {print $2}'",$iface2);
$_SESSION['wifi_client_interface'] = empty($iface2) ? $iface : trim($iface2[0]);
}

View File

@ -3,19 +3,24 @@
/**
* Raspbian WiFi Configuration Portal (RaspAP)
*
* Enables use of simple web interface rather than SSH to control wifi and hostapd on the Raspberry Pi.
* Recommended distribution is Raspbian Buster Lite. Specific instructions to install the supported software are
* Simple AP setup & WiFi management for Debian-based devices.
* Enables use of simple web interface rather than SSH to control WiFi and related services on the Raspberry Pi.
* Recommended distribution is Raspberry Pi OS (32-bit) Lite. Specific instructions to install the supported software are
* in the README and original post by @SirLagz. For a quick run through, the packages required for the WebGUI are:
* lighttpd (version 1.4.53 installed via apt)
* php-cgi (version 7.3.14-1 installed via apt)
* php-cgi (version 7.3.19-1 installed via apt)
* along with their supporting packages, php7.3 will also need to be enabled.
*
* @author Lawrence Yau <sirlagz@gmail.com>
* @author Bill Zimmerman <billzimmerman@gmail.com>
* @license GNU General Public License, version 3 (GPL-3.0)
* @version 2.4
* @link https://github.com/billz/raspap-webgui
* @version 2.5
* @link https://github.com/billz/raspap-webgui/
* @link https://raspap.com/
* @see http://sirlagz.net/2013/02/08/raspap-webgui/
*
* You are not obligated to bundle the LICENSE file with your RaspAP projects as long
* as you leave these references intact in the header comments of your source files.
*/
require 'includes/csrf.php';
@ -46,21 +51,9 @@ require_once 'includes/torproxy.php';
$output = $return = 0;
$page = $_GET['page'];
if (!isset($_COOKIE['theme'])) {
$theme = "custom.css";
} else {
$theme = $_COOKIE['theme'];
}
$theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
if ($_COOKIE['sidebarToggled'] == 'true' ) {
$toggleState = "toggled";
}
// Get Bridged AP mode status
$arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini');
// defaults to false
$bridgedEnabled = $arrHostapdConf['BridgedEnable'];
$theme_url = getThemeOpt();
$toggleState = getSidebarState();
$bridgedEnabled = getBridgedState();
?><!DOCTYPE html>
<html lang="en">
@ -83,7 +76,10 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable'];
<!-- DataTables CSS -->
<link href="dist/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
<!-- Font Awesome -->
<!-- Huebee CSS -->
<link href="dist/huebee/huebee.min.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="dist/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<!-- RaspAP Fonts -->
@ -116,13 +112,13 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable'];
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo (isset($toggleState)) ? $toggleState : null ; ?>" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php?page=wlan0_info">
<div class="sidebar-brand-text ml-1">RaspAP</div>
<div class="sidebar-brand-text ml-1"><?php echo RASPI_BRAND_TEXT; ?></div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<div class="row">
<div class="col-xs ml-3 sidebar-brand-icon">
<span class="ra-raspap"></span>
<img src="app/img/raspAP-logo.php" class="navbar-logo" width="64" height="64">
</div>
<div class="col-xs ml-2">
<div class="ml-1">Status</div>
@ -150,7 +146,7 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable'];
<a class="nav-link" href="index.php?page=dhcpd_conf"><i class="fas fa-exchange-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("DHCP Server"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_ADBLOCK_ENABLED) : ?>
<?php if (RASPI_ADBLOCK_ENABLED && !$bridgedEnabled) : ?>
<li class="nav-item">
<a class="nav-link" href="index.php?page=adblock_conf"><i class="far fa-hand-paper fa-fw mr-2"></i><span class="nav-label"><?php echo _("Ad Blocking"); ?></a>
</li>
@ -279,7 +275,7 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable'];
SaveTORAndVPNConfig();
break;
case "theme_conf":
DisplayThemeConfig();
DisplayThemeConfig($extraFooterScripts);
break;
case "data_use":
DisplayDataUsage($extraFooterScripts);
@ -330,14 +326,10 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable'];
<!-- Custom RaspAP JS -->
<script src="app/js/custom.js"></script>
<?php if ($page == "wlan0_info" || !isset($page)) { ?>
<!-- Link Quality Chart -->
<script src="app/js/linkquality.js"></script>
<?php }
<?php
// Load non default JS/ECMAScript in footer.
foreach ($extraFooterScripts as $script) {
echo ' <script type="text/javascript" src="' , $script['src'] , '"';
echo '<script type="text/javascript" src="' , $script['src'] , '"';
if ($script['defer']) {
echo ' defer="defer"';
}

View File

@ -30,12 +30,17 @@ git_source_url="https://github.com/$repo" # $repo from install.raspap.com
# Prompts user to set installation options
function _config_installation() {
_install_log "Configure installation"
if [ "$upgrade" == 1 ]; then
opt=(Upgrade Upgrading upgrade)
else
opt=(Install Installing installation)
fi
_install_log "Configure ${opt[2]}"
_get_linux_distro
echo "Detected OS: ${DESC}"
echo "Using GitHub repository: ${repo} ${branch} branch"
echo "Install directory: ${raspap_dir}"
echo -n "Install to lighttpd root: ${webroot_dir}? [Y/n]: "
echo "Configuration directory: ${raspap_dir}"
echo -n "lighttpd root: ${webroot_dir}? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
@ -44,8 +49,12 @@ function _config_installation() {
else
echo -e
fi
echo "Installing to lighttpd directory: ${webroot_dir}"
echo -n "Complete installation with these values? [Y/n]: "
echo "${opt[1]} lighttpd directory: ${webroot_dir}"
if [ "$upgrade" == 1 ]; then
echo "This will upgrade your existing install to version ${RASPAP_LATEST}"
echo "Your configuration will NOT be changed"
fi
echo -n "Complete ${opt[2]} with these values? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
@ -57,7 +66,7 @@ function _config_installation() {
fi
}
# Determines host Linux distrubtion details
# Determines host Linux distribution details
function _get_linux_distro() {
if type lsb_release >/dev/null 2>&1; then # linuxbase.org
OS=$(lsb_release -si)
@ -78,16 +87,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." ;;
@ -327,6 +336,11 @@ function _download_latest_files() {
git clone --branch $branch --depth 1 $git_source_url /tmp/raspap-webgui || _install_status 1 "Unable to download files from github"
sudo mv /tmp/raspap-webgui $webroot_dir || _install_status 1 "Unable to move raspap-webgui to web root"
if [ "$upgrade" == 1 ]; then
_install_log "Applying existing configuration to ${webroot_dir}/includes"
sudo mv /tmp/config.php $webroot_dir/includes || _install_status 1 "Unable to move config.php to ${webroot_dir}/includes"
fi
_install_status 0
}
@ -342,33 +356,39 @@ function _change_file_ownership() {
# Check for existing configuration files
function _check_for_old_configs() {
if [ -f /etc/network/interfaces ]; then
sudo cp /etc/network/interfaces "$raspap_dir/backups/interfaces.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/interfaces.`date +%F-%R`" "$raspap_dir/backups/interfaces"
fi
if [ -f /etc/hostapd/hostapd.conf ]; then
sudo cp /etc/hostapd/hostapd.conf "$raspap_dir/backups/hostapd.conf.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/hostapd.conf.`date +%F-%R`" "$raspap_dir/backups/hostapd.conf"
fi
if [ -f $raspap_dnsmasq ]; then
sudo cp $raspap_dnsmasq "$raspap_dir/backups/dnsmasq.conf.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/dnsmasq.conf.`date +%F-%R`" "$raspap_dir/backups/dnsmasq.conf"
fi
if [ -f /etc/dhcpcd.conf ]; then
sudo cp /etc/dhcpcd.conf "$raspap_dir/backups/dhcpcd.conf.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/dhcpcd.conf.`date +%F-%R`" "$raspap_dir/backups/dhcpcd.conf"
fi
for file in /etc/systemd/network/raspap-*.net*; do
if [ -f "${file}" ]; then
filename=$(basename $file)
sudo cp "$file" "${raspap_dir}/backups/${filename}.`date +%F-%R`"
sudo ln -sf "${raspap_dir}/backups/${filename}.`date +%F-%R`" "${raspap_dir}/backups/${filename}"
if [ "$upgrade" == 1 ]; then
_install_log "Moving existing configuration to /tmp"
sudo mv $webroot_dir/includes/config.php /tmp || _install_status 1 "Unable to move config.php to /tmp"
else
_install_log "Backing up existing configs to ${raspap_dir}/backups"
if [ -f /etc/network/interfaces ]; then
sudo cp /etc/network/interfaces "$raspap_dir/backups/interfaces.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/interfaces.`date +%F-%R`" "$raspap_dir/backups/interfaces"
fi
done
if [ -f /etc/hostapd/hostapd.conf ]; then
sudo cp /etc/hostapd/hostapd.conf "$raspap_dir/backups/hostapd.conf.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/hostapd.conf.`date +%F-%R`" "$raspap_dir/backups/hostapd.conf"
fi
if [ -f $raspap_dnsmasq ]; then
sudo cp $raspap_dnsmasq "$raspap_dir/backups/dnsmasq.conf.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/dnsmasq.conf.`date +%F-%R`" "$raspap_dir/backups/dnsmasq.conf"
fi
if [ -f /etc/dhcpcd.conf ]; then
sudo cp /etc/dhcpcd.conf "$raspap_dir/backups/dhcpcd.conf.`date +%F-%R`"
sudo ln -sf "$raspap_dir/backups/dhcpcd.conf.`date +%F-%R`" "$raspap_dir/backups/dhcpcd.conf"
fi
for file in /etc/systemd/network/raspap-*.net*; do
if [ -f "${file}" ]; then
filename=$(basename $file)
sudo cp "$file" "${raspap_dir}/backups/${filename}.`date +%F-%R`"
sudo ln -sf "${raspap_dir}/backups/${filename}.`date +%F-%R`" "${raspap_dir}/backups/${filename}"
fi
done
fi
_install_status 0
}
@ -385,29 +405,31 @@ function _move_config_file() {
# Set up default configuration
function _default_configuration() {
_install_log "Applying default configuration to installed services"
if [ -f /etc/default/hostapd ]; then
sudo mv /etc/default/hostapd /tmp/default_hostapd.old || _install_status 1 "Unable to remove old /etc/default/hostapd file"
if [ "$upgrade" == 0 ]; then
_install_log "Applying default configuration to installed services"
if [ -f /etc/default/hostapd ]; then
sudo mv /etc/default/hostapd /tmp/default_hostapd.old || _install_status 1 "Unable to remove old /etc/default/hostapd file"
fi
sudo cp $webroot_dir/config/default_hostapd /etc/default/hostapd || _install_status 1 "Unable to move hostapd defaults file"
sudo cp $webroot_dir/config/hostapd.conf /etc/hostapd/hostapd.conf || _install_status 1 "Unable to move hostapd configuration file"
sudo cp $webroot_dir/config/dnsmasq.conf $raspap_dnsmasq || _install_status 1 "Unable to move dnsmasq configuration file"
sudo cp $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || _install_status 1 "Unable to move dhcpcd configuration file"
echo "Checking for existence of /etc/dnsmasq.d"
[ -d /etc/dnsmasq.d ] || sudo mkdir /etc/dnsmasq.d
echo "Copying bridged AP config to /etc/systemd/network"
sudo systemctl stop systemd-networkd
sudo systemctl disable systemd-networkd
sudo cp $webroot_dir/config/raspap-bridge-br0.netdev /etc/systemd/network/raspap-bridge-br0.netdev || _install_status 1 "Unable to move br0 netdev file"
sudo cp $webroot_dir/config/raspap-br0-member-eth0.network /etc/systemd/network/raspap-br0-member-eth0.network || _install_status 1 "Unable to move br0 member file"
echo "Copying primary RaspAP config to includes/config.php"
if [ ! -f "$webroot_dir/includes/config.php" ]; then
sudo cp "$webroot_dir/config/config.php" "$webroot_dir/includes/config.php"
fi
_install_status 0
fi
sudo cp $webroot_dir/config/default_hostapd /etc/default/hostapd || _install_status 1 "Unable to move hostapd defaults file"
sudo cp $webroot_dir/config/hostapd.conf /etc/hostapd/hostapd.conf || _install_status 1 "Unable to move hostapd configuration file"
sudo cp $webroot_dir/config/dnsmasq.conf $raspap_dnsmasq || _install_status 1 "Unable to move dnsmasq configuration file"
sudo cp $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || _install_status 1 "Unable to move dhcpcd configuration file"
echo "Checking for existence of /etc/dnsmasq.d"
[ -d /etc/dnsmasq.d ] || sudo mkdir /etc/dnsmasq.d
echo "Copying bridged AP config to /etc/systemd/network"
sudo systemctl stop systemd-networkd
sudo systemctl disable systemd-networkd
sudo cp $webroot_dir/config/raspap-bridge-br0.netdev /etc/systemd/network/raspap-bridge-br0.netdev || _install_status 1 "Unable to move br0 netdev file"
sudo cp $webroot_dir/config/raspap-br0-member-eth0.network /etc/systemd/network/raspap-br0-member-eth0.network || _install_status 1 "Unable to move br0 member file"
echo "Copying primary RaspAP config to includes/config.php"
if [ ! -f "$webroot_dir/includes/config.php" ]; then
sudo cp "$webroot_dir/config/config.php" "$webroot_dir/includes/config.php"
fi
_install_status 0
}
# Install and enable RaspAP daemon
@ -490,58 +512,65 @@ function _patch_system_files() {
# Optimize configuration of php-cgi.
function _optimize_php() {
_install_log "Optimize PHP configuration"
if [ ! -f "$phpcgiconf" ]; then
_install_warning "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 ln -sf "$raspap_dir/backups/php.ini.$datetimephpconf" "$raspap_dir/backups/php.ini"
echo -n "Enable HttpOnly for session cookies (Recommended)? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
echo -e
else
php_session_cookie=1;
if [ "$upgrade" == 0 ]; then
_install_log "Optimize PHP configuration"
if [ ! -f "$phpcgiconf" ]; then
_install_warning "PHP configuration could not be found."
return
fi
fi
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"
fi
# Backup php.ini and create symlink for restoring.
datetimephpconf=$(date +%F-%R)
sudo cp "$phpcgiconf" "$raspap_dir/backups/php.ini.$datetimephpconf"
sudo ln -sf "$raspap_dir/backups/php.ini.$datetimephpconf" "$raspap_dir/backups/php.ini"
if [ "$php_package" = "php7.1-cgi" ]; then
echo -n "Enable PHP OPCache (Recommended)? [Y/n]: "
echo -n "Enable HttpOnly for session cookies (Recommended)? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
echo -e
else
php_opcache=1;
php_session_cookie=1;
fi
fi
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"
# Make sure opcache extension is turned on.
if [ -f "/usr/sbin/phpenmod" ]; then
sudo phpenmod opcache
else
_install_status 2 "phpenmod not found."
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"
fi
if [ "$php_package" = "php7.1-cgi" ]; then
echo -n "Enable PHP OPCache (Recommended)? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
echo -e
else
php_opcache=1;
fi
fi
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"
# Make sure opcache extension is turned on.
if [ -f "/usr/sbin/phpenmod" ]; then
sudo phpenmod opcache
else
_install_status 2 "phpenmod not found."
fi
fi
fi
fi
}
function _install_complete() {
_install_log "Installation completed!"
_install_log "Installation completed"
echo "This project needs your help! Please consider supporting RaspAP on Open Collective or GitHub:"
echo -e "${ANSI_RASPBERRY}"
echo "> https://opencollective.com/raspap"
echo "> https://github.com/sponsors/billz"
echo -e "${ANSI_RESET}"
if [ "$assume_yes" == 0 ]; then
# Prompt to reboot if wired ethernet (eth0) is connected.
# With default_configuration this will create an active AP on restart.

View File

@ -1,12 +1,20 @@
#!/bin/bash
#
# Updates lighttpd server.port and restarts the service
# Updates lighttpd config settings and restarts the service
# @author billz
# license: GNU General Public License v3.0
# Exit on error
set -o errexit
# Exit on error inside functions
set -o errtrace
# Turn on traces, disabled by default
#set -o xtrace
server_port=$1
lighttpd_conf=$2
host=$3
server_bind=$2
lighttpd_conf=$3
host=$4
restart_service=0
while :; do
@ -25,11 +33,22 @@ if [ "$restart_service" = 1 ]; then
echo "Restarting lighttpd in 3 seconds..."
sleep 3
systemctl restart lighttpd.service
else
echo "Changing lighttpd server.port to $server_port..."
fi
if [ -n "$server_port" ]; then
echo "Changing lighttpd server.port to $server_port ..."
sed -i "s/^\(server\.port *= *\)[0-9]*/\1$server_port/g" "$lighttpd_conf"
echo "RaspAP will now be available at $host:$server_port"
echo "Restart lighttpd for new setting to take effect"
echo "RaspAP will now be available at port $server_port"
conf_change=1
fi
if [ -n "$server_bind" ]; then
echo "Changing lighttpd server.bind to $server_bind ..."
grep -q 'server.bind' "$lighttpd_conf" && \
sed -i "s/^\(server\.bind.*= \)\".*\"*/\1\"$server_bind\"/g" "$lighttpd_conf" || \
printf "server.bind \t\t\t\t = \"$server_bind\"\n" >> "$lighttpd_conf"
echo "RaspAP will now be available at address $server_bind"
conf_change=1
fi
if [ "$conf_change" == 1 ]; then
echo "Restart lighttpd for new settings to take effect"
fi

View File

@ -7,7 +7,7 @@ www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_suppli
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
www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] select_network
www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] select_network [0-9]*
www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf
www-data ALL=(ALL) NOPASSWD:/bin/systemctl start hostapd.service
www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop hostapd.service

View File

@ -22,6 +22,8 @@
# Overrides the default git branch (master)
# -h, --help
# Outputs usage notes and exits
# -u, --upgrade
# Upgrades an existing installation to the latest release version
# -v, --version
# Outputs release info and exits
#
@ -39,6 +41,7 @@
repo="billz/raspap-webgui"
branch="master"
assume_yes=0
upgrade=0
ovpn_option=1
adblock_option=1
wg_option=1
@ -65,6 +68,7 @@ Usage: raspbian.sh [OPTION]\n
-r, --repo, --repository <name>\n\tOverrides the default GitHub repo (billz/raspap-webgui)
-b, --branch <name>\n\tOverrides the default git branch (master)
-h, --help\n\tOutputs usage notes and exits
-u, --upgrade\n\tUpgrades an existing installation to the latest release version
-v, --version\n\tOutputs release info and exits\n
EOF
)
@ -103,6 +107,9 @@ while :; do
printf "$usage"
exit 1
;;
-u|--upgrade)
upgrade=1
;;
-v|--version)
printf "RaspAP v${RASPAP_LATEST} - Simple AP setup & WiFi management for Debian-based devices\n"
exit 1
@ -141,6 +148,11 @@ function _install_log() {
echo -e "${ANSI_GREEN}RaspAP Install: $1${ANSI_RESET}"
}
# Outputs a RaspAP divider
function _install_divider() {
echo -e "\033[1;32m***************************************************************$*\033[m"
}
# Outputs a RaspAP status indicator
function _install_status() {
case $1 in

View File

@ -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

View File

@ -451,6 +451,9 @@ msgstr "Configures the max_num_sta option of hostapd. The default and maximum is
msgid "Summary"
msgstr "Summary"
msgid "Internet connection"
msgstr "Internet connection"
msgid "Current settings"
msgstr "Current settings"
@ -530,6 +533,12 @@ msgstr "System Rebooting Now!"
msgid "System Shutting Down Now!"
msgstr "System Shutting Down Now!"
msgid "Web server port"
msgstr "Web server port"
msgid "Web server bind address"
msgstr "Web server bind address"
#: includes/themes.php
msgid "Theme settings"
msgstr "Theme settings"
@ -537,6 +546,9 @@ msgstr "Theme settings"
msgid "Select a theme"
msgstr "Select a theme"
msgid "Color"
msgstr "Color"
#: includes/data_usage.php
msgid "Data usage"
msgstr "Data usage"

Binary file not shown.

View File

@ -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 <billzimmerman@gmail.com>\n"
"POT-Creation-Date: 2017-10-19 08:56+0000\n"
"PO-Revision-Date: 2019-10-21 23:15+0000\n"
"PO-Revision-Date: 2020-04-14 08:51\n"
"Last-Translator: Bill Zimmerman <billzimmerman@gmail.com>\n"
"Language-Team: Bastien STEVENOOT\n"
"Language-Team: French\n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Crowdin-Project: raspap\n"
"X-Crowdin-Language: fr\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 "Client WiFi"
msgid "Hotspot"
msgstr "Hotspot"
msgid "Memory Use"
msgstr ""
msgid "CPU Temp"
msgstr ""
msgid "Networking"
msgstr "Réseau"
@ -117,8 +120,8 @@ msgstr "Les paramètres Wifi sont mis à jour mais ne peuvent pas redémarrer (i
msgid "Wifi settings failed to be updated"
msgstr "Les paramètres Wifi n'ont pas été mis à jour"
msgid "Failed to updated wifi settings"
msgstr "Erreur durant la mise à jour des paramètres Wifi"
msgid "Failed to update wifi settings"
msgstr "échec de la mise a jour des paramètres wifi"
msgid "Rescan"
msgstr "Actualiser"
@ -178,8 +181,8 @@ msgstr "Paquets transférés"
msgid "Transferred Bytes"
msgstr "Octets transférés"
msgid "Wireless Information"
msgstr "Informations sans fil"
msgid "Wireless Client"
msgstr ""
msgid "Connected To"
msgstr "Connecté à"
@ -188,7 +191,7 @@ msgid "AP Mac Address"
msgstr "AP Mac Adresse"
msgid "Bitrate"
msgstr "Bitrate"
msgstr "Débit binaire"
msgid "Signal Level"
msgstr "Niveau du signal"
@ -248,6 +251,9 @@ msgstr "Liste des clients"
msgid "Interface"
msgstr "Interface"
msgid "DNS Server"
msgstr "Serveur DNS"
msgid "Starting IP Address"
msgstr "Adresse IP de départ"
@ -290,6 +296,9 @@ msgstr "Arrêtez dnsmasq"
msgid "Start dnsmasq"
msgstr "Démarrer dnsmasq"
msgid "Dnsmasq configuration updated successfully"
msgstr "Configuration de Dnsmasq mise à jour avec succès"
msgid "dnsmasq already running"
msgstr "Dnsmasq est déjà en cours d'exécution"
@ -315,31 +324,31 @@ msgid "Dnsmasq is not running"
msgstr "Dnsmasq n'est pas en fonctionnement"
msgid "Upstream DNS servers"
msgstr "Upstream DNS servers"
msgstr "Serveurs DNS amont"
msgid "Only ever query DNS servers configured below"
msgstr "Only ever query DNS servers configured below"
msgstr "Uniquement les serveurs DNS de requête configurés ci-dessous"
msgid "Enable this option if you want RaspAP to <b>send DNS queries to the servers configured below exclusively</b>. By default RaspAP also uses its upstream DHCP server's name servers."
msgstr "Enable this option if you want RaspAP to <b>send DNS queries to the servers configured below exclusively</b>. By default RaspAP also uses its upstream DHCP server's name servers."
msgstr "Activer cette option si tu veux que RaspAP <b>envoie des requêtes DNS aux serveurs configurés ci-dessous exclusivement</b>. Par défaut, RaspAP utilise aussi les serveurs de noms du serveur DHCP amont."
msgid "This option adds <code>no-resolv</code> to the dnsmasq configuration."
msgstr "This option adds <code>no-resolv</code> to the dnsmasq configuration."
msgstr "Cette option ajoute <code>no-resolv</code> à la configuration dnsmasq."
msgid "Add upstream DNS server"
msgstr "Add upstream DNS server"
msgstr "Ajouter un serveur DNS amont"
msgid "Format"
msgstr "Format"
msgid "Choose a hosted server"
msgstr "Choose a hosted server"
msgstr "Choisissez un serveur hébergé"
msgid "Log DHCP requests"
msgstr "Log DHCP requests"
msgstr "Journaliser les requêtes DHCP"
msgid "Log DNS queries"
msgstr "Log DNS queries"
msgstr "Journaliser les requêtes DNS"
#: includes/hostapd.php
msgid "Basic"
@ -423,6 +432,9 @@ msgstr "Sortie de journal"
msgid "WiFi client AP mode"
msgstr "Mode AP client WiFi"
msgid "Bridged AP mode"
msgstr "Mode AP ponté"
msgid "Hide SSID in broadcast"
msgstr "Masquer le SSID en diffusion"
@ -442,9 +454,6 @@ msgstr "Paramètres actuels"
msgid "Default Gateway"
msgstr "Passerelle par défaut"
msgid "DNS Server"
msgstr "Serveur DNS"
msgid "Alternate DNS Server"
msgstr "Serveur DNS alternatif"
@ -603,7 +612,7 @@ msgid "Diffie Hellman parameters"
msgstr "Paramètres Diffie Hellman"
msgid "KeepAlive"
msgstr "KeepAlive"
msgstr "Maintenir en vie"
msgid "Server log"
msgstr "Journal du serveur"
@ -657,6 +666,10 @@ msgstr "Essai de démarrage de TOR"
msgid "Attempting to stop TOR"
msgstr "Essai d'arrêt de TOR"
#: template/dashboard.php
msgid "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page."
msgstr "Le mode AP ponté est activé. Pour le nom d'hôte et l'IP, consultez la page d'administration de votre routeur."
#: common form controls
msgid "Save settings"
msgstr "Enregistrer les paramètres"
@ -678,3 +691,46 @@ msgstr "vers le haut"
msgid "down"
msgstr "vers le bas"
msgid "adblock"
msgstr "AdBlock"
msgid "Ad Blocking"
msgstr "Blocage de la pub"
msgid "Start Ad Blocking"
msgstr "Lancer le blocage des publicités"
msgid "Restart Ad Blocking"
msgstr "Redémarrer le blocage des publicités"
msgid "Blocklist settings"
msgstr "Paramètres anti-spam"
msgid "Enable blocklists"
msgstr "Activer les listes noires"
msgid "Enable this option if you want RaspAP to <b>block DNS requests for ads, tracking and other virtual garbage</b>. Blocklists are gathered from multiple, actively maintained sources and automatically updated, cleaned, optimized and moderated on a daily basis."
msgstr "Activer cette option si tu veux que RaspAP <b>bloque les requêtes DNS pour les publicités, le suivi et d'autres déchets virtuels</b>. Les listes de blocage sont rassemblées à partir de sources multiples, activement maintenues et mises à jour automatiquement, nettoyées, optimisées et modérées quotidiennement."
msgid "This option adds <code>conf-file</code> and <code>addn-hosts</code> to the dnsmasq configuration."
msgstr "Cette option ajoute <code>conf-file</code> et <code>addn-hosts</code> à la configuration de dnsmasq."
msgid "Choose a blocklist provider"
msgstr "Choisir un fournisseur de liste noire"
msgid "Hostnames blocklist last updated"
msgstr ""
msgid "Domains blocklist last updated"
msgstr ""
msgid "Update now"
msgstr "Mettre à jour"
msgid "Statistics"
msgstr "Statistiques"
msgid "Information provided by adblock"
msgstr "Informations fournies par adblock"

Binary file not shown.

View File

@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: raspap\n"
"Report-Msgid-Bugs-To: Bill Zimmerman <billzimmerman@gmail.com>\n"
"POT-Creation-Date: 2017-10-19 08:56+0000\n"
"PO-Revision-Date: 2020-04-12 10:21\n"
"PO-Revision-Date: 2020-04-14 08:51\n"
"Last-Translator: Marco Fantauzzo <marco97pa@live.it>\n"
"Language-Team: Italian\n"
"Language: it_IT\n"
@ -112,19 +112,19 @@ msgid "Passphrase"
msgstr "Chiave di sicurezza"
msgid "Wifi settings updated successfully"
msgstr "Impostazioni WiFi aggiornate con successo"
msgstr "Impostazioni Wifi aggiornate con successo"
msgid "Wifi settings updated but cannot restart (cannot execute 'wpa_cli reconfigure')"
msgstr "Impostazioni WiFi aggiornate, ma non è stato possibile riavviare (impossibile eseguire 'wpa_cli reconfigure')"
msgid "Wifi settings failed to be updated"
msgstr "Non è stato possibile aggiornare le impostazioni WiFi"
msgstr "Non è stato possibile aggiornare le impostazioni Wifi"
msgid "Failed to update wifi settings"
msgstr "Impossibile aggiornare le impostazioni WiFi"
msgstr "Impossibile aggiornare le impostazioni Wifi"
msgid "Rescan"
msgstr "Riscansiona"
msgstr "Ripeti la scan"
msgid "Update"
msgstr "Aggiorna"
@ -181,8 +181,8 @@ msgstr "Pacchetti trasmessi"
msgid "Transferred Bytes"
msgstr "Bytes trasmessi"
msgid "Wireless Information"
msgstr "Informazioni wireless"
msgid "Wireless Client"
msgstr ""
msgid "Connected To"
msgstr "Connesso a"
@ -206,13 +206,13 @@ msgid "Link Quality"
msgstr "Qualità collegamento"
msgid "Information provided by ip and iw and from system"
msgstr "Informazioni fornite da ip, iw e dal sistema"
msgstr "Informazioni fornite dall'ip e iw a dal sistema"
msgid "No MAC Address Found"
msgstr "Indirizzo MAC non trovato"
msgid "No IP Address Found"
msgstr "Indirizzo IP non trovato"
msgstr "Indirizzo IP no trovato"
msgid "No Subnet Mask Found"
msgstr "Subnet mask non trovata"
@ -288,7 +288,7 @@ msgid "Client ID"
msgstr "ID client"
msgid "Information provided by Dnsmasq"
msgstr "Informazioni fornite da dnsmasq"
msgstr "Informazioni fornite da Dnsmasq"
msgid "Stop dnsmasq"
msgstr "Ferma dnsmasq"
@ -300,22 +300,22 @@ msgid "Dnsmasq configuration updated successfully"
msgstr "Configurazione Dnsmasq aggiornata con successo"
msgid "dnsmasq already running"
msgstr "Dnsmasq è già in esecuzione"
msgstr "dnsmasq è già in esecuzione"
msgid "Successfully started dnsmasq"
msgstr "Dnsmasq è stato avviato con successo"
msgstr "dnsmasq avviato con successo"
msgid "Failed to start dnsmasq"
msgstr "Impossibile avviare dnsmasq"
msgid "Successfully stopped dnsmasq"
msgstr "Dnsmasq è stato fermato con successo"
msgstr "dnsmasq fermato con successo"
msgid "Failed to stop dnsmasq"
msgstr "Impossibile fermare dnsmasq"
msgid "dnsmasq already stopped"
msgstr "Dnsmasq è già stoppato"
msgstr "dnsmasq è già stoppato"
msgid "Dnsmasq is running"
msgstr "Dnsmasq è in esecuzione"
@ -406,13 +406,13 @@ msgid "Unknown interface"
msgstr "Interfaccia sconosciuta"
msgid "Country code must be blank or two characters"
msgstr "Il codice paese deve essere vuoto o di due caratteri"
msgstr "Il codice paese deve essere o vuoto o di due caratteri"
msgid "Wifi Hotspot settings saved"
msgstr "Impostazioni hotspot WiFi salvate"
msgstr "Impostazioni hotspot Wifi salvate"
msgid "Unable to save wifi hotspot settings"
msgstr "Impossibile salvare le impostazioni dell'hotspot WiFi"
msgstr "Impossibile salvare le impostazioni dell'hotspot Wifi"
msgid "Start hotspot"
msgstr "Avvia l'hotspot"
@ -436,7 +436,7 @@ msgid "Bridged AP mode"
msgstr "Modalità AP Bridged"
msgid "Hide SSID in broadcast"
msgstr "Nascondi la trasmissione del SSID"
msgstr "Nascondere la trasmissione del SSID"
msgid "Maximum number of clients"
msgstr "Numero massimo di client"
@ -461,7 +461,7 @@ msgid "Adapter IP Address Settings"
msgstr "Impostazioni dell'indirizzo IP dell'adattatore"
msgid "Enable Fallback to Static Option"
msgstr "Abilita il fallback alle Opzioni IP statiche"
msgstr "Abilita l'opzione statica di fallback"
msgid "Static IP"
msgstr "IP statico"
@ -504,7 +504,7 @@ msgid "Hostname"
msgstr "Nome host"
msgid "Pi Revision"
msgstr "Modello Pi"
msgstr "Revisione Pi"
msgid "Uptime"
msgstr "Tempo di attività"
@ -566,10 +566,10 @@ msgid "date"
msgstr "data"
msgid "Send MB"
msgstr "MB inviati"
msgstr "Invia MB"
msgid "Receive MB"
msgstr "MB ricevuti"
msgstr "Ricevi MB"
msgid "Information provided by vnstat"
msgstr "Informazioni fornite da vnstat"
@ -624,13 +624,13 @@ msgid "Stop OpenVPN"
msgstr "Arresta OpenVPN"
msgid "Information provided by openvpn"
msgstr "Informazioni fornite da OpenVPN"
msgstr "Informazioni fornite da openvpn"
msgid "Attempting to start openvpn"
msgstr "Tentativo di avviare OpenVPN in corso"
msgstr "Tentativo di avviare openvpn in corso"
msgid "Attempting to stop openvpn"
msgstr "Tentativo di arrestare OpenVPN in corso"
msgstr "Tentativo di arrestare openvpn in corso"
#: includes/torproxy.php
msgid "TOR is not running"
@ -658,7 +658,7 @@ msgid "Stop TOR"
msgstr "Arresta TOR"
msgid "Information provided by tor"
msgstr "Informazioni fornite da TOR"
msgstr "Informazioni fornite da tor"
msgid "Attempting to start TOR"
msgstr "Tentativo di avviare TOR in corso"
@ -687,10 +687,10 @@ msgid "Remove"
msgstr "Rimuovi"
msgid "up"
msgstr "attivo"
msgstr "su"
msgid "down"
msgstr "disattivo"
msgstr "giù"
msgid "adblock"
msgstr "AdBlock"

Binary file not shown.

View File

@ -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 <billzimmerman@gmail.com>\n"
"POT-Creation-Date: 2017-10-19 08:56+0000\n"
"PO-Revision-Date: 2019-10-21 23:15+0000\n"
"Last-Translator: Betep <betep@list.ru>\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 <b>send DNS queries to the servers configured below exclusively</b>. By default RaspAP also uses its upstream DHCP server's name servers."
msgstr "Enable this option if you want RaspAP to <b>send DNS queries to the servers configured below exclusively</b>. By default RaspAP also uses its upstream DHCP server's name servers."
msgstr "Включите эту опцию, если вы хотите, чтобы RaspAP <b>отправлял DNS-запросы только на серверы, настроенные ниже</b>. По умолчанию RaspAP также использует восходящие DNS-серверы, назначенные через DHCP."
msgid "This option adds <code>no-resolv</code> to the dnsmasq configuration."
msgstr "This option adds <code>no-resolv</code> to the dnsmasq configuration."
msgstr "Этот параметр добавляет <code>no-resolv</code> в конфигурацию 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 <b>block DNS requests for ads, tracking and other virtual garbage</b>. Blocklists are gathered from multiple, actively maintained sources and automatically updated, cleaned, optimized and moderated on a daily basis."
msgstr "Включите эту опцию, если вы хотите, чтобы RaspAP <b>блокировал DNS запросы для рекламы, отслеживания и другого виртуального мусора</b>. Блокирующие списки собираются из множества активно поддерживаемых источников и автоматически обновляются, очищаются, оптимизируются и модерируются ежедневно."
msgid "This option adds <code>conf-file</code> and <code>addn-hosts</code> to the dnsmasq configuration."
msgstr "Эта опция добавляет в конфигурацию dnsmasq <code>conf-file</code> и <code>addn-hosts</code>."
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"

View File

@ -1,7 +1,7 @@
{
"title": "RaspAP WiFi Configuration Portal",
"name": "raspap-webgui",
"version": "2.1",
"version": "2.5.0",
"scripts": {
"start": "node_modules/.bin/gulp watch"
},
@ -20,7 +20,7 @@
"bugs": {
"url": "https://github.com/billz/raspap-webgui/issues"
},
"license": "MIT",
"license": "GPL-3.0",
"author": "RaspAP Developers",
"contributors": [
"Bill Zimmerman (https://github.com/billz)"
@ -29,20 +29,26 @@
"type": "git",
"url": "https://github.com/billz/raspap-webgui.git"
},
"dependencies": {
"startbootstrap-sb-admin-2": "4.0.7"
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"devDependencies": {
"dependencies": {
"browser-sync": "^2.26.7",
"del": "^5.1.0",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-clean-css": "^4.2.0",
"gulp-clean-css": "^4.3.0",
"gulp-header": "^2.0.9",
"gulp-plumber": "^1.2.1",
"gulp-rename": "1.4.0",
"gulp-sass": "^4.0.2",
"gulp-rename": "^2.0.0",
"gulp-uglify": "^3.0.2",
"merge-stream": "^2.0.0"
"huebee": "^2.1.0",
"jquery": "^3.5.0",
"merge-stream": "^2.0.0",
"node-gyp": "^7.0.0",
"startbootstrap-sb-admin-2": "4.0.7"
},
"devDependencies": {
"gulp-sass": "^4.0.2"
}
}

View File

@ -2,8 +2,8 @@
<div class="tab-pane active" id="aboutgeneral">
<div class="row">
<div class="col-md-8">
<h2 class="mt-3"><?php echo _("RaspAP") . " v" . RASPI_VERSION; ?></h2>
<div class="ml-5 mt-3"><img class="about-logo" src="app/img/raspAP-logo.png" style="width: 175px; height:175px"></div>
<h2 class="mt-3"><?php echo _("RaspAP") ." v".RASPI_VERSION; ?></h2>
<div class="ml-5 mt-3"><img class="about-logo" src="app/img/raspAP-logo.php" style="width: 175px; height:175px"></div>
<div class="mt-3">RaspAP is a co-creation of <a href="https://github.com/billz">billz</a> and <a href="https://github.com/sirlagz">SirLagz</a>
with the contributions of our <a href="https://github.com/billz/raspap-webgui/graphs/contributors">developer community</a>
and <a href="https://crowdin.com/project/raspap">language translators</a>.</div>

View File

@ -1,17 +1,18 @@
<?php
$arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini');
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
if ($arrHostapdConf['WifiAPEnable'] == 1) {
$client_iface = 'uap0';
$client_interface = 'uap0';
} else {
$client_iface = RASPI_WIFI_CLIENT_INTERFACE;
$client_interface = $_SESSION['wifi_client_interface'];
}
$ap_iface = $_SESSION['ap_interface'];
$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"';
if ($arrHostapdConf['BridgedEnable'] == 1) {
$moreLink = "index.php?page=hostapd_conf";
exec('iw dev '.$client_iface.' station dump | grep -oE '.$MACPattern, $clients);
$moreLink = "index.php?page=hostapd_conf";
exec('iw dev '.$ap_iface.' station dump | grep -oE '.$MACPattern, $clients);
} else {
$moreLink = "index.php?page=dhcpd_conf";
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(iw dev '.$client_iface.' station dump | grep -oE '.$MACPattern.' | paste -sd "|")', $clients);
$moreLink = "index.php?page=dhcpd_conf";
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(iw dev '.$ap_iface.' station dump | grep -oE '.$MACPattern.' | paste -sd "|")', $clients);
}
$ifaceStatus = $wlan0up ? "up" : "down";
?>
@ -26,7 +27,7 @@ $ifaceStatus = $wlan0up ? "up" : "down";
<div class="col">
<button class="btn btn-light btn-icon-split btn-sm service-status float-right">
<span class="icon"><i class="fas fa-circle service-status-<?php echo $ifaceStatus ?>"></i></span>
<span class="text service-status"><?php echo strtolower($client_iface) .' '. _($ifaceStatus) ?></span>
<span class="text service-status"><?php echo strtolower($ap_iface) .' '. _($ifaceStatus) ?></span>
</button>
</div>
</div><!-- /.row -->
@ -39,7 +40,7 @@ $ifaceStatus = $wlan0up ? "up" : "down";
<div class="card mb-3">
<div class="card-body">
<h4><?php echo _("Hourly traffic amount"); ?></h4>
<div id="divInterface" class="d-none"><?php echo RASPI_WIFI_CLIENT_INTERFACE; ?></div>
<div id="divInterface" class="d-none"><?php echo $_SESSION['ap_interface']; ?></div>
<div class="col-md-12">
<canvas id="divDBChartBandwidthhourly"></canvas>
</div>
@ -126,9 +127,9 @@ $ifaceStatus = $wlan0up ? "up" : "down";
<?php echo CSRFTokenFieldTag() ?>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<?php if (!$wlan0up) : ?>
<input type="submit" class="btn btn-success" value="<?php echo _("Start").' '.RASPI_WIFI_CLIENT_INTERFACE ?>" name="ifup_wlan0" />
<input type="submit" class="btn btn-success" value="<?php echo _("Start").' '.$client_interface ?>" name="ifup_wlan0" />
<?php else : ?>
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop").' '.RASPI_WIFI_CLIENT_INTERFACE ?>" name="ifdown_wlan0" />
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop").' '.$client_interface ?>" name="ifdown_wlan0" />
<?php endif ?>
<?php endif ?>
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>

View File

@ -1,455 +1,61 @@
<?php ob_start() ?>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-outline btn-primary" name="SaveHostAPDSettings" value="<?php echo _("Save settings"); ?>" />
<?php if ($hostapdstatus[0] == 0) : ?>
<input type="submit" class="btn btn-success" name="StartHotspot" value="<?php echo _("Start hotspot") ?>"/>
<?php else : ?>
<input type="submit" class="btn btn-warning" name="StopHotspot" value="<?php echo _("Stop hotspot") ?>"/>
<input type ="submit" class="btn btn-warning" name="RestartHotspot" value="<?php echo _("Restart hotspot") ?>"/>
<?php endif ?>
<?php endif ?>
<?php $buttons = ob_get_clean(); ob_end_clean() ?>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col">
<i class="far fa-dot-circle mr-2"></i><?php echo _("Hotspot"); ?>
</div>
<div class="col">
<button class="btn btn-light btn-icon-split btn-sm service-status float-right">
<span class="icon text-gray-600"><i class="fas fa-circle service-status-<?php echo $serviceStatus ?>"></i></span>
<span class="text service-status">hostapd <?php echo _($serviceStatus) ?></span>
</button>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body">
<?php $status->showMessages(); ?>
<form role="form" action="?page=hostapd_conf" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="basictab" href="#basic" aria-controls="basic" data-toggle="tab"><?php echo _("Basic"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="securitytab" href="#security" data-toggle="tab"><?php echo _("Security"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="advancedtab" href="#advanced" data-toggle="tab"><?php echo _("Advanced"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="logoutputtab" href="#logoutput" data-toggle="tab"><?php echo _("Logfile output"); ?></a></li>
</ul>
<div class="col-lg-12">
<div class="card">
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="basic">
<div class="card-header">
<div class="row">
<div class="col">
<i class="far fa-dot-circle mr-2"></i><?php echo _("Hotspot"); ?>
</div>
<div class="col">
<button class="btn btn-light btn-icon-split btn-sm service-status float-right">
<span class="icon text-gray-600"><i class="fas fa-circle service-status-<?php echo $serviceStatus ?>"></i></span>
<span class="text service-status">hostapd <?php echo _($serviceStatus) ?></span>
</button>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<h4 class="mt-3"><?php echo _("Basic settings") ;?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxinterface"><?php echo _("Interface") ;?></label>
<?php
SelectorOptions('interface', $interfaces, $arrConfig['interface'], 'cbxinterface');
?>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="txtssid"><?php echo _("SSID"); ?></label>
<input type="text" id="txtssid" class="form-control" name="ssid" value="<?php echo htmlspecialchars($arrConfig['ssid'], ENT_QUOTES); ?>" />
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxhwmode"><?php echo _("Wireless Mode") ;?></label>
<?php
$countries_5Ghz_max48ch = RASPI_5GHZ_ISO_ALPHA2;
$selectedHwMode = $arrConfig['hw_mode'];
if (isset($arrConfig['ieee80211n'])) {
if (strval($arrConfig['ieee80211n']) === '1') {
$selectedHwMode = 'n';
}
}
if (isset($arrConfig['ieee80211ac'])) {
if (strval($arrConfig['ieee80211ac']) === '1') {
$selectedHwMode = 'ac';
}
}
if (!in_array($arrConfig['country_code'], $countries_5Ghz_max48ch)) {
$hwModeDisabled = 'ac';
if ($selectedHwMode === $hwModeDisabled) {
unset($selectedHwMode);
}
}
SelectorOptions('hw_mode', $arr80211Standard, $selectedHwMode, 'cbxhwmode', 'loadChannelSelect', $hwModeDisabled); ?>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxchannel"><?php echo _("Channel"); ?></label>
<?php
$selectablechannels = Array();
SelectorOptions('channel', $selectablechannels, intval($arrConfig['channel']), 'cbxchannel'); ?>
</div>
</div>
</div>
<div class="tab-pane fade" id="security">
<h4 class="mt-3"><?php echo _("Security settings"); ?></h4>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="cbxwpa"><?php echo _("Security type"); ?></label>
<?php SelectorOptions('wpa', $arrSecurity, $arrConfig['wpa'], 'cbxwpa'); ?>
</div>
<div class="form-group">
<label for="cbxwpapairwise"><?php echo _("Encryption Type"); ?></label>
<?php SelectorOptions('wpa_pairwise', $arrEncType, $arrConfig['wpa_pairwise'], 'cbxwpapairwise'); ?>
</div>
<label for="txtwpapassphrase"><?php echo _("PSK"); ?></label>
<div class="input-group">
<input type="text" class="form-control" id="txtwpapassphrase" name="wpa_passphrase" value="<?php echo htmlspecialchars($arrConfig['wpa_passphrase'], ENT_QUOTES); ?>" />
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id="gen_wpa_passphrase"><i class="fas fa-magic"></i></button>
</div>
</div>
</div>
<div class="col-md-6">
<figure class="figure">
<img src="/app/img/wifi-qr-code.php" class="figure-img img-fluid" alt="RaspAP Wifi QR code" style="width:100%;">
<figcaption class="figure-caption"><?php echo _("Scan this QR code with your phone to connect to this RaspAP."); ?></figcaption>
</figure>
</div>
</div>
</div>
<div class="tab-pane fade" id="logoutput">
<h4 class="mt-3"><?php echo _("Logfile output"); ?></h4>
<div class="row">
<div class="form-group col-md-8">
<?php
if ($arrHostapdConf['LogEnable'] == 1) {
exec('sudo /bin/chmod o+r /tmp/hostapd.log');
$log = file_get_contents('/tmp/hostapd.log');
echo '<br /><textarea class="logoutput">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
} else {
echo "<br />Logfile output not enabled";
}
?>
</div>
</div>
</div>
<div class="tab-pane fade" id="advanced">
<h4 class="mt-3"><?php echo _("Advanced settings"); ?></h4>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['BridgedEnable'] == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxbridgedenable" name="bridgedEnable" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxbridgedenable"><?php echo _("Bridged AP mode"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['WifiAPEnable'] == 1 ? 'checked="checked"' : '' ?>
<?php $disabled = $managedModeEnabled == false && $arrHostapdConf['WifiAPEnable'] != 1 || $arrHostapdConf['BridgedEnable'] == 1 ? 'disabled="disabled"' : '' ?>
<input class="custom-control-input" id="chxwificlientap" name="wifiAPEnable" type="checkbox" value="1" <?php echo $checked ?> <?php echo $disabled ?> />
<label class="custom-control-label" for="chxwificlientap"><?php echo _("WiFi client AP mode"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['LogEnable'] == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxlogenable" name="logEnable" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxlogenable"><?php echo _("Logfile output"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrConfig['ignore_broadcast_ssid'] == 1 || $arrConfig['ignore_broadcast_ssid'] == 2 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxhiddenssid" name="hiddenSSID" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxhiddenssid"><?php echo _("Hide SSID in broadcast"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="max_num_sta"><?php echo _("Maximum number of clients") ?></label>
<input type="text" id="max_num_sta" class="form-control" name="max_num_sta" placeholder="2007" value="<?php echo $arrConfig["max_num_sta"] ?>" aria-describedby="max_num_sta_help">
<small id="max_num_sta_help" class="text-muted"><?php echo _("Configures the max_num_sta option of hostapd. The default and maximum is 2007. If empty or 0, the default applies.") ?></small>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxcountries"><?php echo _("Country Code"); ?></label>
<input type="hidden" id="selected_country" value="<?php echo htmlspecialchars($arrConfig['country_code'], ENT_QUOTES); ?>">
<select class="form-control" id="cbxcountries" name="country_code" onchange="loadChannelSelect()">
<option value="AF">Afghanistan</option>
<option value="AX">Åland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
<option value="AG">Antigua and Barbuda</option>
<option value="AR">Argentina</option>
<option value="AM">Armenia</option>
<option value="AW">Aruba</option>
<option value="AU">Australia</option>
<option value="AT">Austria</option>
<option value="AZ">Azerbaijan</option>
<option value="BS">Bahamas</option>
<option value="BH">Bahrain</option>
<option value="BD">Bangladesh</option>
<option value="BB">Barbados</option>
<option value="BY">Belarus</option>
<option value="BE">Belgium</option>
<option value="BZ">Belize</option>
<option value="BJ">Benin</option>
<option value="BM">Bermuda</option>
<option value="BT">Bhutan</option>
<option value="BO">Bolivia, Plurinational State of</option>
<option value="BQ">Bonaire, Sint Eustatius and Saba</option>
<option value="BA">Bosnia and Herzegovina</option>
<option value="BW">Botswana</option>
<option value="BV">Bouvet Island</option>
<option value="BR">Brazil</option>
<option value="IO">British Indian Ocean Territory</option>
<option value="BN">Brunei Darussalam</option>
<option value="BG">Bulgaria</option>
<option value="BF">Burkina Faso</option>
<option value="BI">Burundi</option>
<option value="KH">Cambodia</option>
<option value="CM">Cameroon</option>
<option value="CA">Canada</option>
<option value="CV">Cape Verde</option>
<option value="KY">Cayman Islands</option>
<option value="CF">Central African Republic</option>
<option value="TD">Chad</option>
<option value="CL">Chile</option>
<option value="CN">China</option>
<option value="CX">Christmas Island</option>
<option value="CC">Cocos (Keeling) Islands</option>
<option value="CO">Colombia</option>
<option value="KM">Comoros</option>
<option value="CG">Congo</option>
<option value="CD">Congo, the Democratic Republic of the</option>
<option value="CK">Cook Islands</option>
<option value="CR">Costa Rica</option>
<option value="CI">Côte d'Ivoire</option>
<option value="HR">Croatia</option>
<option value="CU">Cuba</option>
<option value="CW">Curaçao</option>
<option value="CY">Cyprus</option>
<option value="CZ">Czech Republic</option>
<option value="DK">Denmark</option>
<option value="DJ">Djibouti</option>
<option value="DM">Dominica</option>
<option value="DO">Dominican Republic</option>
<option value="EC">Ecuador</option>
<option value="EG">Egypt</option>
<option value="SV">El Salvador</option>
<option value="GQ">Equatorial Guinea</option>
<option value="ER">Eritrea</option>
<option value="EE">Estonia</option>
<option value="ET">Ethiopia</option>
<option value="FK">Falkland Islands (Malvinas)</option>
<option value="FO">Faroe Islands</option>
<option value="FJ">Fiji</option>
<option value="FI">Finland</option>
<option value="FR">France</option>
<option value="GF">French Guiana</option>
<option value="PF">French Polynesia</option>
<option value="TF">French Southern Territories</option>
<option value="GA">Gabon</option>
<option value="GM">Gambia</option>
<option value="GE">Georgia</option>
<option value="DE">Germany</option>
<option value="GH">Ghana</option>
<option value="GI">Gibraltar</option>
<option value="GR">Greece</option>
<option value="GL">Greenland</option>
<option value="GD">Grenada</option>
<option value="GP">Guadeloupe</option>
<option value="GU">Guam</option>
<option value="GT">Guatemala</option>
<option value="GG">Guernsey</option>
<option value="GN">Guinea</option>
<option value="GW">Guinea-Bissau</option>
<option value="GY">Guyana</option>
<option value="HT">Haiti</option>
<option value="HM">Heard Island and McDonald Islands</option>
<option value="VA">Holy See (Vatican City State)</option>
<option value="HN">Honduras</option>
<option value="HK">Hong Kong</option>
<option value="HU">Hungary</option>
<option value="IS">Iceland</option>
<option value="IN">India</option>
<option value="ID">Indonesia</option>
<option value="IR">Iran, Islamic Republic of</option>
<option value="IQ">Iraq</option>
<option value="IE">Ireland</option>
<option value="IM">Isle of Man</option>
<option value="IL">Israel</option>
<option value="IT">Italy</option>
<option value="JM">Jamaica</option>
<option value="JP">Japan</option>
<option value="JE">Jersey</option>
<option value="JO">Jordan</option>
<option value="KZ">Kazakhstan</option>
<option value="KE">Kenya</option>
<option value="KI">Kiribati</option>
<option value="KP">Korea, Democratic People's Republic of</option>
<option value="KR">Korea, Republic of</option>
<option value="KW">Kuwait</option>
<option value="KG">Kyrgyzstan</option>
<option value="LA">Lao People's Democratic Republic</option>
<option value="LV">Latvia</option>
<option value="LB">Lebanon</option>
<option value="LS">Lesotho</option>
<option value="LR">Liberia</option>
<option value="LY">Libya</option>
<option value="LI">Liechtenstein</option>
<option value="LT">Lithuania</option>
<option value="LU">Luxembourg</option>
<option value="MO">Macao</option>
<option value="MK">Macedonia, the former Yugoslav Republic of</option>
<option value="MG">Madagascar</option>
<option value="MW">Malawi</option>
<option value="MY">Malaysia</option>
<option value="MV">Maldives</option>
<option value="ML">Mali</option>
<option value="MT">Malta</option>
<option value="MH">Marshall Islands</option>
<option value="MQ">Martinique</option>
<option value="MR">Mauritania</option>
<option value="MU">Mauritius</option>
<option value="YT">Mayotte</option>
<option value="MX">Mexico</option>
<option value="FM">Micronesia, Federated States of</option>
<option value="MD">Moldova, Republic of</option>
<option value="MC">Monaco</option>
<option value="MN">Mongolia</option>
<option value="ME">Montenegro</option>
<option value="MS">Montserrat</option>
<option value="MA">Morocco</option>
<option value="MZ">Mozambique</option>
<option value="MM">Myanmar</option>
<option value="NA">Namibia</option>
<option value="NR">Nauru</option>
<option value="NP">Nepal</option>
<option value="NL">Netherlands</option>
<option value="NC">New Caledonia</option>
<option value="NZ">New Zealand</option>
<option value="NI">Nicaragua</option>
<option value="NE">Niger</option>
<option value="NG">Nigeria</option>
<option value="NU">Niue</option>
<option value="NF">Norfolk Island</option>
<option value="MP">Northern Mariana Islands</option>
<option value="NO">Norway</option>
<option value="OM">Oman</option>
<option value="PK">Pakistan</option>
<option value="PW">Palau</option>
<option value="PS">Palestinian Territory, Occupied</option>
<option value="PA">Panama</option>
<option value="PG">Papua New Guinea</option>
<option value="PY">Paraguay</option>
<option value="PE">Peru</option>
<option value="PH">Philippines</option>
<option value="PN">Pitcairn</option>
<option value="PL">Poland</option>
<option value="PT">Portugal</option>
<option value="PR">Puerto Rico</option>
<option value="QA">Qatar</option>
<option value="RE">Réunion</option>
<option value="RO">Romania</option>
<option value="RU">Russian Federation</option>
<option value="RW">Rwanda</option>
<option value="BL">Saint Barthélemy</option>
<option value="SH">Saint Helena, Ascension and Tristan da Cunha</option>
<option value="KN">Saint Kitts and Nevis</option>
<option value="LC">Saint Lucia</option>
<option value="MF">Saint Martin (French part)</option>
<option value="PM">Saint Pierre and Miquelon</option>
<option value="VC">Saint Vincent and the Grenadines</option>
<option value="WS">Samoa</option>
<option value="SM">San Marino</option>
<option value="ST">Sao Tome and Principe</option>
<option value="SA">Saudi Arabia</option>
<option value="SN">Senegal</option>
<option value="RS">Serbia</option>
<option value="SC">Seychelles</option>
<option value="SL">Sierra Leone</option>
<option value="SG">Singapore</option>
<option value="SX">Sint Maarten (Dutch part)</option>
<option value="SK">Slovakia</option>
<option value="SI">Slovenia</option>
<option value="SB">Solomon Islands</option>
<option value="SO">Somalia</option>
<option value="ZA">South Africa</option>
<option value="GS">South Georgia and the South Sandwich Islands</option>
<option value="SS">South Sudan</option>
<option value="ES">Spain</option>
<option value="LK">Sri Lanka</option>
<option value="SD">Sudan</option>
<option value="SR">Suriname</option>
<option value="SJ">Svalbard and Jan Mayen</option>
<option value="SZ">Swaziland</option>
<option value="SE">Sweden</option>
<option value="CH">Switzerland</option>
<option value="SY">Syrian Arab Republic</option>
<option value="TW">Taiwan, Province of China</option>
<option value="TJ">Tajikistan</option>
<option value="TZ">Tanzania, United Republic of</option>
<option value="TH">Thailand</option>
<option value="TL">Timor-Leste</option>
<option value="TG">Togo</option>
<option value="TK">Tokelau</option>
<option value="TO">Tonga</option>
<option value="TT">Trinidad and Tobago</option>
<option value="TN">Tunisia</option>
<option value="TR">Turkey</option>
<option value="TM">Turkmenistan</option>
<option value="TC">Turks and Caicos Islands</option>
<option value="TV">Tuvalu</option>
<option value="UG">Uganda</option>
<option value="UA">Ukraine</option>
<option value="AE">United Arab Emirates</option>
<option value="GB">United Kingdom</option>
<option value="US">United States</option>
<option value="UM">United States Minor Outlying Islands</option>
<option value="UY">Uruguay</option>
<option value="UZ">Uzbekistan</option>
<option value="VU">Vanuatu</option>
<option value="VE">Venezuela, Bolivarian Republic of</option>
<option value="VN">Viet Nam</option>
<option value="VG">Virgin Islands, British</option>
<option value="VI">Virgin Islands, U.S.</option>
<option value="WF">Wallis and Futuna</option>
<option value="EH">Western Sahara</option>
<option value="YE">Yemen</option>
<option value="ZM">Zambia</option>
<option value="ZW">Zimbabwe</option>
</select>
<script type="text/javascript">
var country = document.getElementById("selected_country").value;
var countries = document.getElementById("cbxcountries");
var ops = countries.getElementsByTagName("option");
for (var i = 0; i < ops.length; ++i) {
if(ops[i].value == country){
ops[i].selected=true;
break;
}
}
</script>
</div>
</div><!-- /.card-body -->
</div><!-- /.card -->
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-outline btn-primary" name="SaveHostAPDSettings" value="<?php echo _("Save settings"); ?>" />
<?php
if ($hostapdstatus[0] == 0) {
echo '<input type="submit" class="btn btn-success" name="StartHotspot" value="' . _("Start hotspot") . '"/>' , PHP_EOL;
} else {
echo '<input type="submit" class="btn btn-warning" name="StopHotspot" value="' . _("Stop hotspot") . '"/>' , PHP_EOL;
echo '<input type ="submit" class="btn btn-warning" name="RestartHotspot" value="' . _("Restart hotspot") . '"/>' , PHP_EOL;
};
endif ?>
</form>
</div></div><!-- /.card -->
<div class="card-footer"> <?php echo _("Information provided by hostapd"); ?></div>
</div><!-- /.col-lg-12 -->
<div class="card-body">
<?php $status->showMessages(); ?>
<form role="form" action="?page=hostapd_conf" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="basictab" href="#basic" aria-controls="basic" data-toggle="tab"><?php echo _("Basic"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="securitytab" href="#security" data-toggle="tab"><?php echo _("Security"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="advancedtab" href="#advanced" data-toggle="tab"><?php echo _("Advanced"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="logoutputtab" href="#logoutput" data-toggle="tab"><?php echo _("Logging"); ?></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<?php echo renderTemplate("hostapd/basic", $__template_data) ?>
<?php echo renderTemplate("hostapd/security", $__template_data) ?>
<?php echo renderTemplate("hostapd/advanced", $__template_data) ?>
<?php echo renderTemplate("hostapd/logging", $__template_data) ?>
</div><!-- /.tab-content -->
<?php echo $buttons ?>
</form>
</div><!-- /.card-body -->
<div class="card-footer"> <?php echo _("Information provided by hostapd"); ?></div>
</div><!-- /.card -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->

View File

@ -0,0 +1,315 @@
<div class="tab-pane fade" id="advanced">
<h4 class="mt-3"><?php echo _("Advanced settings"); ?></h4>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['BridgedEnable'] == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxbridgedenable" name="bridgedEnable" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxbridgedenable"><?php echo _("Bridged AP mode"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['WifiAPEnable'] == 1 ? 'checked="checked"' : '' ?>
<?php $disabled = $managedModeEnabled == false && $arrHostapdConf['WifiAPEnable'] != 1 || $arrHostapdConf['BridgedEnable'] == 1 ? 'disabled="disabled"' : '' ?>
<input class="custom-control-input" id="chxwificlientap" name="wifiAPEnable" type="checkbox" value="1" <?php echo $checked ?> <?php echo $disabled ?> />
<label class="custom-control-label" for="chxwificlientap"><?php echo _("WiFi client AP mode"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['LogEnable'] == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxlogenable" name="logEnable" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxlogenable"><?php echo _("Logfile output"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrConfig['ignore_broadcast_ssid'] == 1 || $arrConfig['ignore_broadcast_ssid'] == 2 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxhiddenssid" name="hiddenSSID" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxhiddenssid"><?php echo _("Hide SSID in broadcast"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="max_num_sta"><?php echo _("Maximum number of clients") ?></label>
<input type="text" id="max_num_sta" class="form-control" name="max_num_sta" placeholder="2007" value="<?php echo $arrConfig["max_num_sta"] ?>" aria-describedby="max_num_sta_help">
<small id="max_num_sta_help" class="text-muted"><?php echo _("Configures the max_num_sta option of hostapd. The default and maximum is 2007. If empty or 0, the default applies.") ?></small>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxcountries"><?php echo _("Country Code"); ?></label>
<input type="hidden" id="selected_country" value="<?php echo htmlspecialchars($arrConfig['country_code'], ENT_QUOTES); ?>">
<select class="form-control" id="cbxcountries" name="country_code" onchange="loadChannelSelect()">
<option value="AF">Afghanistan</option>
<option value="AX">Åland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
<option value="AG">Antigua and Barbuda</option>
<option value="AR">Argentina</option>
<option value="AM">Armenia</option>
<option value="AW">Aruba</option>
<option value="AU">Australia</option>
<option value="AT">Austria</option>
<option value="AZ">Azerbaijan</option>
<option value="BS">Bahamas</option>
<option value="BH">Bahrain</option>
<option value="BD">Bangladesh</option>
<option value="BB">Barbados</option>
<option value="BY">Belarus</option>
<option value="BE">Belgium</option>
<option value="BZ">Belize</option>
<option value="BJ">Benin</option>
<option value="BM">Bermuda</option>
<option value="BT">Bhutan</option>
<option value="BO">Bolivia, Plurinational State of</option>
<option value="BQ">Bonaire, Sint Eustatius and Saba</option>
<option value="BA">Bosnia and Herzegovina</option>
<option value="BW">Botswana</option>
<option value="BV">Bouvet Island</option>
<option value="BR">Brazil</option>
<option value="IO">British Indian Ocean Territory</option>
<option value="BN">Brunei Darussalam</option>
<option value="BG">Bulgaria</option>
<option value="BF">Burkina Faso</option>
<option value="BI">Burundi</option>
<option value="KH">Cambodia</option>
<option value="CM">Cameroon</option>
<option value="CA">Canada</option>
<option value="CV">Cape Verde</option>
<option value="KY">Cayman Islands</option>
<option value="CF">Central African Republic</option>
<option value="TD">Chad</option>
<option value="CL">Chile</option>
<option value="CN">China</option>
<option value="CX">Christmas Island</option>
<option value="CC">Cocos (Keeling) Islands</option>
<option value="CO">Colombia</option>
<option value="KM">Comoros</option>
<option value="CG">Congo</option>
<option value="CD">Congo, the Democratic Republic of the</option>
<option value="CK">Cook Islands</option>
<option value="CR">Costa Rica</option>
<option value="CI">Côte d'Ivoire</option>
<option value="HR">Croatia</option>
<option value="CU">Cuba</option>
<option value="CW">Curaçao</option>
<option value="CY">Cyprus</option>
<option value="CZ">Czech Republic</option>
<option value="DK">Denmark</option>
<option value="DJ">Djibouti</option>
<option value="DM">Dominica</option>
<option value="DO">Dominican Republic</option>
<option value="EC">Ecuador</option>
<option value="EG">Egypt</option>
<option value="SV">El Salvador</option>
<option value="GQ">Equatorial Guinea</option>
<option value="ER">Eritrea</option>
<option value="EE">Estonia</option>
<option value="ET">Ethiopia</option>
<option value="FK">Falkland Islands (Malvinas)</option>
<option value="FO">Faroe Islands</option>
<option value="FJ">Fiji</option>
<option value="FI">Finland</option>
<option value="FR">France</option>
<option value="GF">French Guiana</option>
<option value="PF">French Polynesia</option>
<option value="TF">French Southern Territories</option>
<option value="GA">Gabon</option>
<option value="GM">Gambia</option>
<option value="GE">Georgia</option>
<option value="DE">Germany</option>
<option value="GH">Ghana</option>
<option value="GI">Gibraltar</option>
<option value="GR">Greece</option>
<option value="GL">Greenland</option>
<option value="GD">Grenada</option>
<option value="GP">Guadeloupe</option>
<option value="GU">Guam</option>
<option value="GT">Guatemala</option>
<option value="GG">Guernsey</option>
<option value="GN">Guinea</option>
<option value="GW">Guinea-Bissau</option>
<option value="GY">Guyana</option>
<option value="HT">Haiti</option>
<option value="HM">Heard Island and McDonald Islands</option>
<option value="VA">Holy See (Vatican City State)</option>
<option value="HN">Honduras</option>
<option value="HK">Hong Kong</option>
<option value="HU">Hungary</option>
<option value="IS">Iceland</option>
<option value="IN">India</option>
<option value="ID">Indonesia</option>
<option value="IR">Iran, Islamic Republic of</option>
<option value="IQ">Iraq</option>
<option value="IE">Ireland</option>
<option value="IM">Isle of Man</option>
<option value="IL">Israel</option>
<option value="IT">Italy</option>
<option value="JM">Jamaica</option>
<option value="JP">Japan</option>
<option value="JE">Jersey</option>
<option value="JO">Jordan</option>
<option value="KZ">Kazakhstan</option>
<option value="KE">Kenya</option>
<option value="KI">Kiribati</option>
<option value="KP">Korea, Democratic People's Republic of</option>
<option value="KR">Korea, Republic of</option>
<option value="KW">Kuwait</option>
<option value="KG">Kyrgyzstan</option>
<option value="LA">Lao People's Democratic Republic</option>
<option value="LV">Latvia</option>
<option value="LB">Lebanon</option>
<option value="LS">Lesotho</option>
<option value="LR">Liberia</option>
<option value="LY">Libya</option>
<option value="LI">Liechtenstein</option>
<option value="LT">Lithuania</option>
<option value="LU">Luxembourg</option>
<option value="MO">Macao</option>
<option value="MK">Macedonia, the former Yugoslav Republic of</option>
<option value="MG">Madagascar</option>
<option value="MW">Malawi</option>
<option value="MY">Malaysia</option>
<option value="MV">Maldives</option>
<option value="ML">Mali</option>
<option value="MT">Malta</option>
<option value="MH">Marshall Islands</option>
<option value="MQ">Martinique</option>
<option value="MR">Mauritania</option>
<option value="MU">Mauritius</option>
<option value="YT">Mayotte</option>
<option value="MX">Mexico</option>
<option value="FM">Micronesia, Federated States of</option>
<option value="MD">Moldova, Republic of</option>
<option value="MC">Monaco</option>
<option value="MN">Mongolia</option>
<option value="ME">Montenegro</option>
<option value="MS">Montserrat</option>
<option value="MA">Morocco</option>
<option value="MZ">Mozambique</option>
<option value="MM">Myanmar</option>
<option value="NA">Namibia</option>
<option value="NR">Nauru</option>
<option value="NP">Nepal</option>
<option value="NL">Netherlands</option>
<option value="NC">New Caledonia</option>
<option value="NZ">New Zealand</option>
<option value="NI">Nicaragua</option>
<option value="NE">Niger</option>
<option value="NG">Nigeria</option>
<option value="NU">Niue</option>
<option value="NF">Norfolk Island</option>
<option value="MP">Northern Mariana Islands</option>
<option value="NO">Norway</option>
<option value="OM">Oman</option>
<option value="PK">Pakistan</option>
<option value="PW">Palau</option>
<option value="PS">Palestinian Territory, Occupied</option>
<option value="PA">Panama</option>
<option value="PG">Papua New Guinea</option>
<option value="PY">Paraguay</option>
<option value="PE">Peru</option>
<option value="PH">Philippines</option>
<option value="PN">Pitcairn</option>
<option value="PL">Poland</option>
<option value="PT">Portugal</option>
<option value="PR">Puerto Rico</option>
<option value="QA">Qatar</option>
<option value="RE">Réunion</option>
<option value="RO">Romania</option>
<option value="RU">Russian Federation</option>
<option value="RW">Rwanda</option>
<option value="BL">Saint Barthélemy</option>
<option value="SH">Saint Helena, Ascension and Tristan da Cunha</option>
<option value="KN">Saint Kitts and Nevis</option>
<option value="LC">Saint Lucia</option>
<option value="MF">Saint Martin (French part)</option>
<option value="PM">Saint Pierre and Miquelon</option>
<option value="VC">Saint Vincent and the Grenadines</option>
<option value="WS">Samoa</option>
<option value="SM">San Marino</option>
<option value="ST">Sao Tome and Principe</option>
<option value="SA">Saudi Arabia</option>
<option value="SN">Senegal</option>
<option value="RS">Serbia</option>
<option value="SC">Seychelles</option>
<option value="SL">Sierra Leone</option>
<option value="SG">Singapore</option>
<option value="SX">Sint Maarten (Dutch part)</option>
<option value="SK">Slovakia</option>
<option value="SI">Slovenia</option>
<option value="SB">Solomon Islands</option>
<option value="SO">Somalia</option>
<option value="ZA">South Africa</option>
<option value="GS">South Georgia and the South Sandwich Islands</option>
<option value="SS">South Sudan</option>
<option value="ES">Spain</option>
<option value="LK">Sri Lanka</option>
<option value="SD">Sudan</option>
<option value="SR">Suriname</option>
<option value="SJ">Svalbard and Jan Mayen</option>
<option value="SZ">Swaziland</option>
<option value="SE">Sweden</option>
<option value="CH">Switzerland</option>
<option value="SY">Syrian Arab Republic</option>
<option value="TW">Taiwan, Province of China</option>
<option value="TJ">Tajikistan</option>
<option value="TZ">Tanzania, United Republic of</option>
<option value="TH">Thailand</option>
<option value="TL">Timor-Leste</option>
<option value="TG">Togo</option>
<option value="TK">Tokelau</option>
<option value="TO">Tonga</option>
<option value="TT">Trinidad and Tobago</option>
<option value="TN">Tunisia</option>
<option value="TR">Turkey</option>
<option value="TM">Turkmenistan</option>
<option value="TC">Turks and Caicos Islands</option>
<option value="TV">Tuvalu</option>
<option value="UG">Uganda</option>
<option value="UA">Ukraine</option>
<option value="AE">United Arab Emirates</option>
<option value="GB">United Kingdom</option>
<option value="US">United States</option>
<option value="UM">United States Minor Outlying Islands</option>
<option value="UY">Uruguay</option>
<option value="UZ">Uzbekistan</option>
<option value="VU">Vanuatu</option>
<option value="VE">Venezuela, Bolivarian Republic of</option>
<option value="VN">Viet Nam</option>
<option value="VG">Virgin Islands, British</option>
<option value="VI">Virgin Islands, U.S.</option>
<option value="WF">Wallis and Futuna</option>
<option value="EH">Western Sahara</option>
<option value="YE">Yemen</option>
<option value="ZM">Zambia</option>
<option value="ZW">Zimbabwe</option>
</select>
<script type="text/javascript">
var country = document.getElementById("selected_country").value;
var countries = document.getElementById("cbxcountries");
var ops = countries.getElementsByTagName("option");
for (var i = 0; i < ops.length; ++i) {
if(ops[i].value == country){
ops[i].selected=true;
break;
}
}
</script>
</div>
</div>
</div><!-- /.tab-pane | advanded tab -->

View File

@ -0,0 +1,56 @@
<div class="tab-pane active" id="basic">
<h4 class="mt-3"><?php echo _("Basic settings") ;?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxinterface"><?php echo _("Interface") ;?></label>
<?php
SelectorOptions('interface', $interfaces, $arrConfig['interface'], 'cbxinterface');
?>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="txtssid"><?php echo _("SSID"); ?></label>
<input type="text" id="txtssid" class="form-control" name="ssid" value="<?php echo htmlspecialchars($arrConfig['ssid'], ENT_QUOTES); ?>" />
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxhwmode"><?php echo _("Wireless Mode") ;?></label>
<?php
$countries_5Ghz_max48ch = RASPI_5GHZ_ISO_ALPHA2;
$selectedHwMode = $arrConfig['hw_mode'];
if (isset($arrConfig['ieee80211n'])) {
if (strval($arrConfig['ieee80211n']) === '1') {
$selectedHwMode = 'n';
}
}
if (isset($arrConfig['ieee80211ac'])) {
if (strval($arrConfig['ieee80211ac']) === '1') {
$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) {
unset($selectedHwMode);
}
}
SelectorOptions('hw_mode', $arr80211Standard, $selectedHwMode, 'cbxhwmode', 'loadChannelSelect', $hwModeDisabled); ?>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="cbxchannel"><?php echo _("Channel"); ?></label>
<?php
$selectablechannels = Array();
SelectorOptions('channel', $selectablechannels, intval($arrConfig['channel']), 'cbxchannel'); ?>
</div>
</div>
</div><!-- /.tab-pane | basic tab -->

View File

@ -0,0 +1,17 @@
<!-- logfile output tab -->
<div class="tab-pane fade" id="logoutput">
<h4 class="mt-3"><?php echo _("Logging"); ?></h4>
<div class="row">
<div class="form-group col-md-8">
<?php
if ($arrHostapdConf['LogEnable'] == 1) {
exec('sudo /bin/chmod o+r /tmp/hostapd.log');
$log = file_get_contents('/tmp/hostapd.log');
echo '<br /><textarea class="logoutput">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
} else {
echo "<br />Logfile output not enabled";
}
?>
</div>
</div>
</div><!-- /.tab-pane | logging tab -->

View File

@ -0,0 +1,28 @@
<div class="tab-pane fade" id="security">
<h4 class="mt-3"><?php echo _("Security settings"); ?></h4>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="cbxwpa"><?php echo _("Security type"); ?></label>
<?php SelectorOptions('wpa', $arrSecurity, $arrConfig['wpa'], 'cbxwpa'); ?>
</div>
<div class="form-group">
<label for="cbxwpapairwise"><?php echo _("Encryption Type"); ?></label>
<?php SelectorOptions('wpa_pairwise', $arrEncType, $arrConfig['wpa_pairwise'], 'cbxwpapairwise'); ?>
</div>
<label for="txtwpapassphrase"><?php echo _("PSK"); ?></label>
<div class="input-group">
<input type="text" class="form-control" id="txtwpapassphrase" name="wpa_passphrase" value="<?php echo htmlspecialchars($arrConfig['wpa_passphrase'], ENT_QUOTES); ?>" />
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id="gen_wpa_passphrase"><i class="fas fa-magic"></i></button>
</div>
</div>
</div>
<div class="col-md-6">
<figure class="figure">
<img src="/app/img/wifi-qr-code.php" class="figure-img img-fluid" alt="RaspAP Wifi QR code" style="width:100%;">
<figcaption class="figure-caption"><?php echo _("Scan this QR code with your phone to connect to this RaspAP."); ?></figcaption>
</figure>
</div>
</div>
</div><!-- /.tab-pane | security tab -->

View File

@ -17,21 +17,62 @@
$arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini');
// defaults to false
$bridgedEnabled = $arrHostapdConf['BridgedEnable'];
?>
<?php if (!$bridgedEnabled): // no interface details when bridged ?>
<?php foreach ($interfaces as $if): ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
?>
<?php if (!$bridgedEnabled) : // no interface details when bridged ?>
<?php foreach ($interfaces as $if): ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<li role="presentation" class="nav-item"><a class="nav-link" href="#<?php echo $if_quoted ?>" aria-controls="<?php echo $if_quoted ?>" role="tab" data-toggle="tab"><?php echo $if_quoted ?></a></li>
<?php endforeach ?>
<?php endforeach ?>
<?php endif ?>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="summary">
<h4 class="mt-3"><?php echo _("Internet connection"); ?></h4>
<div class="row">
<div class="col-sm-12"">
<div class="card ">
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th><?php echo _("Interface"); ?></th>
<th><?php echo _("IP Address"); ?></th>
<th><?php echo _("Gateway"); ?></th>
<th colspan="2"><?php echo _("Internet Access"); ?></th>
</tr>
</thead>
<tbody>
<?php
$checkAccess=true;
require "includes/internetRoute.php";
if (isset($rInfo["error"]) || empty($rInfo)) {
echo "<tr><td colspan=5>No route to the internet found</td></tr>";
} else {
foreach($rInfo as $route) {
echo "<tr>";
echo "<td>".$route["interface"]."</td>";
echo "<td>".$route["ip-address"]."</td>";
echo "<td>".$route["gateway"]."<br>".$route["gw-name"]."</td>";
$status = $route["access-ip"] ? "fa-check" : "fa-times";
echo '<td><i class="fas '.$status.'"></i><br>'.RASPI_ACCESS_CHECK_IP.'</td>';
$status = $route["access-dns"] ? "fa-check" : "fa-times";
echo '<td><i class="fas '.$status.'"></i><br>'.RASPI_ACCESS_CHECK_DNS.'</td>';
echo "</tr>";
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
<div class="row">
<?php foreach ($interfaces as $if): ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<div class="col-md-6 mb-3">
<div class="card">
<div class="card-header"><?php echo $if_quoted ?></div>
@ -50,7 +91,7 @@
</div><!-- /.tab-pane -->
<?php foreach ($interfaces as $if): ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<div role="tabpanel" class="tab-pane fade in" id="<?php echo $if_quoted ?>">
<div class="row">
<div class="col-lg-6">
@ -100,10 +141,10 @@
<div class="form-group">
<label for="<?php echo $if_quoted ?>-dnssvralt"><?php echo _("Alternate DNS Server") ?></label>
<input type="text" class="form-control" id="<?php echo $if_quoted ?>-dnssvralt" placeholder="0.0.0.0">
</div>
<?php if (!RASPI_MONITOR_ENABLED): ?>
</div>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<a href="#" class="btn btn-outline btn-primary intsave" data-int="<?php echo $if_quoted ?>"><?php echo _("Save settings") ?></a>
<a href="#" class="btn btn-warning intapply" data-int="<?php echo $if_quoted ?>"><?php echo _("Apply settings") ?></a>
<a href="#" class="btn btn-warning intapply" data-int="<?php echo $if_quoted ?>"><?php echo _("Apply settings") ?></a>
<?php endif ?>
</form>

View File

@ -1,8 +1,3 @@
<?php
include('includes/sysstats.php');
?>
<div class="row">
<div class="col-lg-12">
<div class="card">
@ -18,94 +13,16 @@ include('includes/sysstats.php');
<form role="form" action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="nav-item"><a class="nav-link active" id="systemtab" href="#system" aria-controls="system" role="tab" data-toggle="tab"><?php echo _("System"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link active" id="basictab" href="#basic" aria-controls="basic" role="tab" data-toggle="tab"><?php echo _("Basic"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link" id="languagetab" href="#language" aria-controls="language" role="tab" data-toggle="tab"><?php echo _("Language"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link" id="advancedtab" href="#advanced" aria-controls="advanced" role="tab" data-toggle="tab"><?php echo _("Advanced"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link" id="consoletab" href="#console" aria-controls="console" role="tab" data-toggle="tab"><?php echo _("Console"); ?></a></li>
</ul>
<div class="systemtabcontent tab-content">
<div role="tabpanel" class="tab-pane active" id="system">
<div class="row">
<div class="col-lg-6">
<h4 class="mt-3"><?php echo _("System Information"); ?></h4>
<div class="info-item"><?php echo _("Hostname"); ?></div><div><?php echo htmlspecialchars($hostname, ENT_QUOTES); ?></div>
<div class="info-item"><?php echo _("Pi Revision"); ?></div><div><?php echo htmlspecialchars(RPiVersion(), ENT_QUOTES); ?></div>
<div class="info-item"><?php echo _("Uptime"); ?></div><div><?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></div>
<div class="mb-1"><?php echo _("Memory Used"); ?></div>
<div class="progress mb-2" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($memused_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($memused, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%
</div>
</div>
<div class="mb-1"><?php echo _("CPU Load"); ?></div>
<div class="progress mb-2" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($cpuload_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%
</div>
</div>
<div class="mb-1"><?php echo _("CPU Temp"); ?></div>
<div class="progress mb-4" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($cputemp_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($cputemp, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars(($cputemp*1.2), ENT_QUOTES); ?>%"><?php echo htmlspecialchars($cputemp, ENT_QUOTES); ?>°C
</div>
</div>
<form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-warning" name="system_reboot" value="<?php echo _("Reboot"); ?>" />
<input type="submit" class="btn btn-warning" name="system_shutdown" value="<?php echo _("Shutdown"); ?>" />
<?php endif ?>
</form>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="language">
<h4 class="mt-3"><?php echo _("Language settings") ;?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="code"><?php echo _("Select a language"); ?></label>
<?php SelectorOptions('locale', $arrLocales, $_SESSION['locale']); ?>
</div>
</div>
<input type="submit" class="btn btn-outline btn-primary" name="SaveLanguage" value="<?php echo _("Save settings"); ?>" />
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</div>
<div role="tabpanel" class="tab-pane" id="advanced">
<h4 class="mt-3"><?php echo _("Advanced settings") ;?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="code"><?php echo _("Web server port") ;?></label>
<form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="text" class="form-control" name="serverPort" value="<?php echo htmlspecialchars($ServerPort, ENT_QUOTES); ?>" />
<?php endif ?>
</div>
</div>
<input type="submit" class="btn btn-outline btn-primary" name="SaveServerPort" value="<?php echo _("Save settings"); ?>" />
<input type="submit" class="btn btn-warning" name="RestartLighttpd" value="<?php echo _("Restart lighttpd"); ?>" />
</div>
<div role="tabpanel" class="tab-pane" id="console">
<div class="row">
<div class="col-lg-12 mt-3">
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<iframe src="includes/webconsole.php" class="webconsole"></iframe>
<?php endif ?>
</div>
</div>
</div>
</div><!-- /.systemtabcontent -->
<!-- Tab panes -->
<div class="tab-content">
<?php echo renderTemplate("system/basic", $__template_data) ?>
<?php echo renderTemplate("system/language", $__template_data) ?>
<?php echo renderTemplate("system/advanced", $__template_data) ?>
</div><!-- /.tab-content -->
</form>
</div><!-- /.card-body -->
<div class="card-footer"></div>

View File

@ -0,0 +1,25 @@
<!-- advanced tab -->
<div role="tabpanel" class="tab-pane" id="advanced">
<h4 class="mt-3"><?php echo _("Advanced settings") ;?></h4>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<div class="row">
<div class="form-group col-md-6">
<label for="code"><?php echo _("Web server port") ;?></label>
<input type="text" class="form-control" name="serverPort" value="<?php echo htmlspecialchars($serverPort, ENT_QUOTES); ?>" />
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="code"><?php echo _("Web server bind address") ;?></label>
<input type="text" class="form-control" name="serverBind" value="<?php echo htmlspecialchars($serverBind, ENT_QUOTES); ?>" />
</div>
</div>
<input type="submit" class="btn btn-outline btn-primary" name="SaveServerSettings" value="<?php echo _("Save settings"); ?>" />
<input type="submit" class="btn btn-warning" name="RestartLighttpd" value="<?php echo _("Restart lighttpd"); ?>" />
</form>
<?php endif ?>
</div>

View File

@ -0,0 +1,48 @@
<?php
include('includes/sysstats.php');
?>
<!-- basic tab -->
<div role="tabpanel" class="tab-pane active" id="basic">
<div class="row">
<div class="col-lg-6">
<h4 class="mt-3"><?php echo _("System Information"); ?></h4>
<div class="info-item"><?php echo _("Hostname"); ?></div><div><?php echo htmlspecialchars($hostname, ENT_QUOTES); ?></div>
<div class="info-item"><?php echo _("Pi Revision"); ?></div><div><?php echo htmlspecialchars(RPiVersion(), ENT_QUOTES); ?></div>
<div class="info-item"><?php echo _("Uptime"); ?></div><div><?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></div>
<div class="mb-1"><?php echo _("Memory Used"); ?></div>
<div class="progress mb-2" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($memused_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($memused, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%
</div>
</div>
<div class="mb-1"><?php echo _("CPU Load"); ?></div>
<div class="progress mb-2" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($cpuload_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%
</div>
</div>
<div class="mb-1"><?php echo _("CPU Temp"); ?></div>
<div class="progress mb-4" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($cputemp_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($cputemp, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars(($cputemp*1.2), ENT_QUOTES); ?>%"><?php echo htmlspecialchars($cputemp, ENT_QUOTES); ?>°C
</div>
</div>
<form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-warning" name="system_reboot" value="<?php echo _("Reboot"); ?>" />
<input type="submit" class="btn btn-warning" name="system_shutdown" value="<?php echo _("Shutdown"); ?>" />
<?php endif ?>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,13 @@
<!-- language tab -->
<div role="tabpanel" class="tab-pane" id="language">
<h4 class="mt-3"><?php echo _("Language settings") ;?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="code"><?php echo _("Select a language"); ?></label>
<?php SelectorOptions('locale', $arrLocales, $_SESSION['locale']); ?>
</div>
</div>
<input type="submit" class="btn btn-outline btn-primary" name="SaveLanguage" value="<?php echo _("Save settings"); ?>" />
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</div>

View File

@ -11,10 +11,14 @@
<div class="card-body">
<h4><?php echo _("Theme settings"); ?></h4>
<div class="row">
<div class="form-group col-md-6">
<div class="form-group col-xs-3 col-sm-3">
<label for="code"><?php echo _("Select a theme"); ?></label>
<?php SelectorOptions("theme", $themes, $selectedTheme, "theme-select") ?>
</div>
<div class="col-xs-3 col-sm-3">
<label for="code"><?php echo _("Color"); ?></label>
<input class="form-control color-input" value="#d8224c" aria-label="color" />
</div>
</div>
<form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>

View File

@ -16,41 +16,46 @@
} ?>
<h5 class="card-title"><?php echo htmlspecialchars($ssid, ENT_QUOTES); ?></h5>
<div class="info-item-wifi"><?php echo _("Status"); ?></div>
<div class="info-item-wifi"><?php echo _("Status"); ?></div>
<div>
<?php if ($network['configured']) { ?>
<i class="fas fa-check-circle"></i>
<?php } ?>
<?php if ($network['connected']) { ?>
<i class="fas fa-exchange-alt"></i>
<?php } ?>
<?php if (!$network['configured'] && !$network['connected']) {
echo _("Not configured");
<?php if ($network['configured']) { ?>
<i class="fas fa-check-circle"></i>
<?php } ?>
<?php if ($network['connected']) { ?>
<i class="fas fa-exchange-alt"></i>
<?php } ?>
<?php if (!$network['configured'] && !$network['connected']) {
echo _("Not configured");
} ?>
</div>
<div class="info-item-wifi"><?php echo _("Channel"); ?></div>
<div class="info-item-wifi"><?php echo _("Channel"); ?></div>
<div>
<?php if ($network['visible']) { ?>
<?php echo htmlspecialchars($network['channel'], ENT_QUOTES) ?>
<?php } else { ?>
<span class="label label-warning"> X </span>
<?php } ?>
<?php if ($network['visible']) { ?>
<?php echo htmlspecialchars($network['channel'], ENT_QUOTES) ?>
<?php } else { ?>
<span class="label label-warning"> X </span>
<?php } ?>
</div>
<div class="info-item-wifi"><?php echo _("RSSI"); ?></div>
<div class="info-item-wifi"><?php echo _("RSSI"); ?></div>
<div>
<?php 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 "%)";
?>
<?php
if (isset($network['RSSI']) && $network['RSSI'] >= -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 ";
}
?>
</div>
<?php if (array_key_exists('priority', $network)) { ?>
@ -58,35 +63,35 @@
<?php } ?>
<input type="hidden" name="protocol<?php echo $index ?>" value="<?php echo htmlspecialchars($network['protocol'], ENT_QUOTES); ?>" />
<div class="info-item-wifi"><?php echo _("Security"); ?></div>
<div class="info-item-wifi"><?php echo _("Security"); ?></div>
<div><?php echo $network['protocol'] ?></div>
<div class="form-group">
<div class="info-item-wifi"><?php echo _("Passphrase"); ?></div>
<div class="form-group">
<div class="info-item-wifi"><?php echo _("Passphrase"); ?></div>
<div class="input-group">
<?php if ($network['protocol'] === 'Open') { ?>
<input type="password" disabled class="form-control" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="" />
<?php } else { ?>
<input type="password" class="form-control js-validate-psk" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="<?php echo $network['passphrase'] ?>" data-target="#update<?php echo $index ?>" data-colors="#ffd0d0,#d0ffd0">
<div class="input-group-append">
<button class="btn btn-outline-secondary js-toggle-password" type="button" data-target="[name=passphrase<?php echo $index ?>]" data-toggle-with="<?php echo _("Hide") ?>">Show</button>
</div>
<?php } ?>
</div>
</div>
<?php if ($network['protocol'] === 'Open') { ?>
<input type="password" disabled class="form-control" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="" />
<?php } else { ?>
<input type="password" class="form-control js-validate-psk" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="<?php echo $network['passphrase'] ?>" data-target="#update<?php echo $index ?>" data-colors="#ffd0d0,#d0ffd0">
<div class="input-group-append">
<button class="btn btn-outline-secondary js-toggle-password" type="button" data-target="[name=passphrase<?php echo $index ?>]" data-toggle-with="<?php echo _("Hide") ?>">Show</button>
</div>
<?php } ?>
</div>
</div>
<div class="btn-group btn-block ">
<?php if ($network['configured']) { ?>
<input type="submit" class="col-xs-4 col-md-4 btn btn-warning" value="<?php echo _("Update"); ?>" id="update<?php echo $index ?>" name="update<?php echo $index ?>"<?php echo ($network['protocol'] === 'Open' ? ' disabled' : '')?> />
<button type="submit" class="col-xs-4 col-md-4 btn btn-info" value="<?php echo $index?>" ><?php echo _("Connect"); ?></button>
<?php } else { ?>
<input type="submit" class="col-xs-4 col-md-4 btn btn-info" value="<?php echo _("Add"); ?>" id="update<?php echo $index ?>" name="update<?php echo $index ?>" <?php echo ($network['protocol'] === 'Open' ? '' : ' disabled')?> />
<?php } ?>
<input type="submit" class="col-xs-4 col-md-4 btn btn-danger" value="<?php echo _("Delete"); ?>" name="delete<?php echo $index ?>"<?php echo ($network['configured'] ? '' : ' disabled')?> />
</div><!-- /.btn-group -->
<div class="btn-group btn-block ">
<?php if ($network['configured']) { ?>
<input type="submit" class="col-xs-4 col-md-4 btn btn-warning" value="<?php echo _("Update"); ?>" id="update<?php echo $index ?>" name="update<?php echo $index ?>"<?php echo ($network['protocol'] === 'Open' ? ' disabled' : '')?> />
<button type="submit" class="col-xs-4 col-md-4 btn btn-info" value="<?php echo $index?>" name="connect"><?php echo _("Connect"); ?></button>
<?php } else { ?>
<input type="submit" class="col-xs-4 col-md-4 btn btn-info" value="<?php echo _("Add"); ?>" id="update<?php echo $index ?>" name="update<?php echo $index ?>" <?php echo ($network['protocol'] === 'Open' ? '' : ' disabled')?> />
<?php } ?>
<input type="submit" class="col-xs-4 col-md-4 btn btn-danger" value="<?php echo _("Delete"); ?>" name="delete<?php echo $index ?>"<?php echo ($network['configured'] ? '' : ' disabled')?> />
</div><!-- /.btn-group -->
</div><!-- /.card-body -->
</div><!-- /.card -->
</div><!-- /.col-sm -->
<?php $index += 1; ?>
<?php endforeach ?>
<?php $index += 1; ?>
<?php endforeach ?>
</div><!-- /.row -->

211
yarn.lock
View File

@ -709,6 +709,11 @@ chownr@^1.1.1:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142"
integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==
chownr@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
class-utils@^0.3.5:
version "0.3.6"
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@ -719,10 +724,10 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
clean-css@4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==
clean-css@4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78"
integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==
dependencies:
source-map "~0.6.0"
@ -1232,6 +1237,11 @@ engine.io@~3.2.0:
engine.io-parser "~2.1.0"
ws "~3.3.1"
env-paths@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43"
integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==
error-ex@^1.2.0:
version "1.3.2"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
@ -1290,6 +1300,11 @@ etag@1.8.1, etag@^1.8.1, etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
ev-emitter@^1.0.1, ev-emitter@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ev-emitter/-/ev-emitter-1.1.1.tgz#8f18b0ce5c76a5d18017f71c0a795c65b9138f2a"
integrity sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q==
eventemitter3@1.x.x:
version "1.2.0"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
@ -1547,6 +1562,13 @@ fs-minipass@^1.2.5:
dependencies:
minipass "^2.6.0"
fs-minipass@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==
dependencies:
minipass "^3.0.0"
fs-mkdirp-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb"
@ -1681,6 +1703,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.1.4:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
global-modules@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
@ -1736,6 +1770,11 @@ graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6,
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02"
integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==
graceful-fs@^4.2.3:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
gulp-autoprefixer@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/gulp-autoprefixer/-/gulp-autoprefixer-7.0.1.tgz#3c0dc26afc802d317e7560a7f760a0399049075a"
@ -1748,12 +1787,12 @@ gulp-autoprefixer@^7.0.1:
through2 "^3.0.1"
vinyl-sourcemaps-apply "^0.2.1"
gulp-clean-css@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-4.2.0.tgz#915ec258dc6d3e6a50043f610066d5c2eac4f54e"
integrity sha512-r4zQsSOAK2UYUL/ipkAVCTRg/2CLZ2A+oPVORopBximRksJ6qy3EX1KGrIWT4ZrHxz3Hlobb1yyJtqiut7DNjA==
gulp-clean-css@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-4.3.0.tgz#5b1e73f2fca46703eb636014cdd4553cea65146d"
integrity sha512-mGyeT3qqFXTy61j0zOIciS4MkYziF2U594t2Vs9rUnpkEHqfu6aDITMp8xOvZcvdX61Uz3y1mVERRYmjzQF5fg==
dependencies:
clean-css "4.2.1"
clean-css "4.2.3"
plugin-error "1.0.1"
through2 "3.0.1"
vinyl-sourcemaps-apply "0.2.1"
@ -1802,10 +1841,10 @@ gulp-plumber@^1.2.1:
plugin-error "^0.1.2"
through2 "^2.0.3"
gulp-rename@1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd"
integrity sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==
gulp-rename@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-2.0.0.tgz#9bbc3962b0c0f52fc67cd5eaff6c223ec5b9cf6c"
integrity sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==
gulp-sass@^4.0.2:
version "4.0.2"
@ -1859,7 +1898,7 @@ har-schema@^2.0.0:
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
har-validator@~5.1.0:
har-validator@~5.1.0, har-validator@~5.1.3:
version "5.1.3"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
@ -1989,6 +2028,14 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"
huebee@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/huebee/-/huebee-2.1.0.tgz#bd266f66f08250dd4774435d0e8738ce64423766"
integrity sha512-2im03Zw7MosL/h389ZwyMFv71JTglM4XvoahPRApajVthqBDS9Ro00zgTv6VKW5AXwZ83pNMDhCXC4TMluCSlg==
dependencies:
ev-emitter "^1.1.1"
unipointer "^2.3.0"
iconv-lite@0.4.24, iconv-lite@^0.4.4:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@ -2321,6 +2368,11 @@ jquery@3.4.1, jquery@>=1.7:
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2"
integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==
jquery@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.0.tgz#9980b97d9e4194611c36530e7dc46a58d7340fc9"
integrity sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==
js-base64@^2.1.8:
version "2.5.1"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121"
@ -2502,9 +2554,9 @@ lodash.templatesettings@^4.0.0:
lodash._reinterpolate "^3.0.0"
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@~4.17.10:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
loud-rejection@^1.0.0:
version "1.6.0"
@ -2668,6 +2720,13 @@ minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
safe-buffer "^5.1.2"
yallist "^3.0.0"
minipass@^3.0.0:
version "3.1.3"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==
dependencies:
yallist "^4.0.0"
minizlib@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
@ -2675,6 +2734,14 @@ minizlib@^1.2.1:
dependencies:
minipass "^2.9.0"
minizlib@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3"
integrity sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA==
dependencies:
minipass "^3.0.0"
yallist "^4.0.0"
mitt@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.1.3.tgz#528c506238a05dce11cd914a741ea2cc332da9b8"
@ -2695,6 +2762,11 @@ mixin-deep@^1.2.0:
dependencies:
minimist "0.0.8"
mkdirp@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
moment@^2.10.2:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
@ -2774,6 +2846,22 @@ node-gyp@^3.8.0:
tar "^2.0.0"
which "1"
node-gyp@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.0.0.tgz#2e88425ce84e9b1a4433958ed55d74c70fffb6be"
integrity sha512-ZW34qA3CJSPKDz2SJBHKRvyNQN0yWO5EGKKksJc+jElu9VA468gwJTyTArC1iOXU7rN3Wtfg/CMt/dBAOFIjvg==
dependencies:
env-paths "^2.2.0"
glob "^7.1.4"
graceful-fs "^4.2.3"
nopt "^4.0.3"
npmlog "^4.1.2"
request "^2.88.2"
rimraf "^2.6.3"
semver "^7.3.2"
tar "^6.0.1"
which "^2.0.2"
node-pre-gyp@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149"
@ -2835,6 +2923,14 @@ nopt@^4.0.1:
abbrev "1"
osenv "^0.1.4"
nopt@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48"
integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==
dependencies:
abbrev "1"
osenv "^0.1.4"
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
@ -2882,7 +2978,7 @@ npm-packlist@^1.1.6:
ignore-walk "^3.0.1"
npm-bundled "^1.0.1"
"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2:
"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
@ -3244,6 +3340,11 @@ psl@^1.1.24:
resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2"
integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==
psl@^1.1.28:
version "1.8.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==
pump@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909"
@ -3266,7 +3367,7 @@ punycode@^1.4.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
punycode@^2.1.0:
punycode@^2.1.0, punycode@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
@ -3456,6 +3557,32 @@ request@^2.87.0, request@^2.88.0:
tunnel-agent "^0.6.0"
uuid "^3.3.2"
request@^2.88.2:
version "2.88.2"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
caseless "~0.12.0"
combined-stream "~1.0.6"
extend "~3.0.2"
forever-agent "~0.6.1"
form-data "~2.3.2"
har-validator "~5.1.3"
http-signature "~1.2.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
oauth-sign "~0.9.0"
performance-now "^2.1.0"
qs "~6.5.2"
safe-buffer "^5.1.2"
tough-cookie "~2.5.0"
tunnel-agent "^0.6.0"
uuid "^3.3.2"
require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
@ -3516,7 +3643,7 @@ reusify@^1.0.0:
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
rimraf@2, rimraf@^2.6.1:
rimraf@2, rimraf@^2.6.1, rimraf@^2.6.3:
version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
@ -3609,6 +3736,11 @@ semver@^6.3.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.3.2:
version "7.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
semver@~5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
@ -4070,6 +4202,18 @@ tar@^4:
safe-buffer "^5.1.2"
yallist "^3.0.3"
tar@^6.0.1:
version "6.0.2"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.2.tgz#5df17813468a6264ff14f766886c622b84ae2f39"
integrity sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
minipass "^3.0.0"
minizlib "^2.1.0"
mkdirp "^1.0.3"
yallist "^4.0.0"
tfunk@^3.0.1:
version "3.1.0"
resolved "https://registry.yarnpkg.com/tfunk/-/tfunk-3.1.0.tgz#38e4414fc64977d87afdaa72facb6d29f82f7b5b"
@ -4171,6 +4315,14 @@ tough-cookie@~2.4.3:
psl "^1.1.24"
punycode "^1.4.1"
tough-cookie@~2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
dependencies:
psl "^1.1.28"
punycode "^2.1.1"
trim-newlines@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
@ -4258,6 +4410,13 @@ union-value@^1.0.0:
is-extendable "^0.1.1"
set-value "^2.0.1"
unipointer@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/unipointer/-/unipointer-2.3.0.tgz#ba0dc462ce31c2a88e80810e19c3bae0ce47ed9f"
integrity sha512-m85sAoELCZhogI1owtJV3Dva7GxkHk2lI7A0otw3o0OwCuC/Q9gi7ehddigEYIAYbhkqNdri+dU1QQkrcBvirQ==
dependencies:
ev-emitter "^1.0.1"
unique-stream@^2.0.2:
version "2.3.1"
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac"
@ -4417,6 +4576,13 @@ which@1, which@^1.2.14, which@^1.2.9:
dependencies:
isexe "^2.0.0"
which@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"
wide-align@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
@ -4483,6 +4649,11 @@ yallist@^3.0.0, yallist@^3.0.3:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yargs-parser@^4.1.0, yargs-parser@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c"