mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
Merge pull request #1900 from RaspAP/feat/insiders-2nd-edition
Feature: Insiders 2nd Edition goal reached 🎉
This commit is contained in:
@@ -69,9 +69,10 @@
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" id="default-route" type="checkbox" name="DefaultRoute" value="1" aria-describedby="default-route-description">
|
||||
<label class="form-check-label" for="default-route"><?php echo _("Install a default route for this interface") ?></label>
|
||||
<i class="fas fa-question-circle text-muted" data-bs-toggle="tooltip" data-bs-placement="auto" title="<?php echo _("Enable this only if you want your device to use this interface as its primary route to the internet."); ?>"></i>
|
||||
</div>
|
||||
<p class="mb-0" id="default-route-description">
|
||||
<small><?php echo _("This toggles the <code>gateway</code>/<code>nogateway</code> option for this interface in the DHCPCD configuration.") ?></small>
|
||||
<small><?php echo _("This toggles the <code>gateway</code>/<code>nogateway</code> option for this interface in the dhcpcd.conf file.") ?></small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,7 +85,7 @@
|
||||
<i class="fas fa-question-circle text-muted" data-bs-toggle="tooltip" data-bs-placement="auto" title="<?php echo _("If you manage wireless connections with wpa_supplicant itself, the hook may create unwanted connection events. This option disables the hook."); ?>"></i>
|
||||
</div>
|
||||
<p class="mb-0" id="hook-wpa-supplicant-description">
|
||||
<small><?php echo _("This toggles the <code>nohook wpa_supplicant</code> option for this interface in the DHCPCD configuration.") ?></small>
|
||||
<small><?php echo _("This toggles the <code>nohook wpa_supplicant</code> option for this interface in the dhcpcd.conf file.") ?></small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,15 +4,21 @@
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="cbxwpa"><?php echo _("Security type"); ?></label>
|
||||
<?php SelectorOptions('wpa', $arrSecurity, $arrConfig['wpa'], 'cbxwpa'); ?>
|
||||
<?php SelectorOptions('wpa', $arrSecurity, $arrConfig['wpa'], 'cbxwpa', 'load80211wSelect'); ?>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<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="mb-3">
|
||||
<label for="cbx80211w"><?php echo _("802.11w"); ?></label>
|
||||
<i class="fas fa-question-circle text-muted" data-bs-toggle="tooltip" data-bs-placement="auto" title="802.11w extends strong cryptographic protection to a select set of robust management frames, including Deauthentication, Disassociation and certain categories of Action Management frames. Collectively, this is known as Management Frame Protection (MFP)."></i>
|
||||
<?php SelectorOptions('80211w', $arr80211w, $arrConfig['ieee80211w'], 'cbx80211w'); ?>
|
||||
</div>
|
||||
|
||||
<label for="txtwpapassphrase"><?php echo _("Pre-shared key (PSK)"); ?></label>
|
||||
<div class="input-group has-validation">
|
||||
<input type="text" class="form-control" id="txtwpapassphrase" name="wpa_passphrase" value="<?php echo htmlspecialchars($arrConfig['wpa_passphrase'], ENT_QUOTES); ?>" aria-describedby="gen_wpa_passphrase" required />
|
||||
<input type="text" class="form-control" id="txtwpapassphrase" name="wpa_passphrase" value="<?php echo htmlspecialchars($arrConfig['wpa_passphrase'], ENT_QUOTES); ?>" required />
|
||||
<div class="input-group-text" id="gen_wpa_passphrase"><i class="fa-solid fa-wand-magic-sparkles"></i></div>
|
||||
<div class="invalid-feedback">
|
||||
<?php echo _("Please provide a valid PSK."); ?>
|
||||
@@ -22,7 +28,12 @@
|
||||
<div class="col-md-6 mt-3">
|
||||
<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>
|
||||
<figcaption class="figure-caption">
|
||||
<?php echo sprintf(_("Scan this QR code directly or %s %sprint a sign%s for your users."),
|
||||
'<i class="fas fa-print"></i>',
|
||||
'<a href="javascript:window.open(\'../app/lib/signprint.php\',\'Printable Wi-Fi sign\',\'width=550,height=670\')">',
|
||||
'</a>'); ?>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
@@ -9,96 +9,24 @@
|
||||
</div>
|
||||
</div><!-- ./row -->
|
||||
</div><!-- ./card-header -->
|
||||
|
||||
<div class="card-body">
|
||||
<?php $status->showMessages(); ?>
|
||||
<form role="form" action="network_conf" method="POST" class="needs-validation" novalidate>
|
||||
<?php echo \RaspAP\Tokens\CSRF::hiddenField(); ?>
|
||||
<div id="msgNetworking"></div>
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="nav-item"><a class="nav-link active" href="#summary" aria-controls="summary" role="tab" data-bs-toggle="tab"><?php echo _("Summary"); ?></a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="#summary" aria-controls="summary" role="tab" data-bs-toggle="tab"><?php echo _("Summary"); ?></a></li>
|
||||
<?php if (!$bridgedEnabled) : // no interface details when bridged ?>
|
||||
<li class="nav-item"><a class="nav-link" href="#diagnostic" aria-controls="diagnostic" role="tab" data-bs-toggle="tab"><?php echo _("Diagnostics"); ?></a></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<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="table-responsive">
|
||||
<table class="table">
|
||||
<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 if (isset($routeInfo["error"]) || empty($routeInfo)): ?>
|
||||
<tr><td colspan=5>No route to the internet found</td></tr>
|
||||
<?php else: ?>
|
||||
<?php foreach($routeInfo as $route): ?>
|
||||
<tr>
|
||||
<td><?php echo $route['interface'] ?></td>
|
||||
<td><?php echo $route['ip-address'] ?></td>
|
||||
<td><?php echo $route['gateway'] ?><br><?php $route['gw-name'] ?></td>
|
||||
<td>
|
||||
<p class="m-0">
|
||||
<i class="fas <?php echo $route["access-ip"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_IP ?>
|
||||
</p>
|
||||
<p class="m-0">
|
||||
<i class="fas <?php echo $route["access-dns"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_DNS ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="mt-3"><?php echo _("Routing table"); ?></h4>
|
||||
<div class="card h-100 w-100">
|
||||
<div class="card-header"><?php echo _("raw output") ?></div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<?php foreach($routeInfoRaw as $route): ?>
|
||||
<tr>
|
||||
<pre class="unstyled"><?php echo $route; ?></pre>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
|
||||
<div class="row">
|
||||
<?php if (!$bridgedEnabled) : // No interface details when bridged ?>
|
||||
<?php foreach ($interfaces as $if): ?>
|
||||
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
|
||||
<div class="col-md mb-3">
|
||||
<div class="card h-100 w-100">
|
||||
<div class="card-header"><?php echo $if_quoted ?></div>
|
||||
<div class="card-body">
|
||||
<pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</div><!-- /.row -->
|
||||
|
||||
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php echo renderTemplate("networking/general", $__template_data) ?>
|
||||
<?php echo renderTemplate("networking/diagnostics", $__template_data) ?>
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- /.card-body -->
|
||||
|
||||
<div class="card-footer"><?php echo _("Information provided by /sys/class/net"); ?></div>
|
||||
|
||||
95
templates/networking/diagnostics.php
Executable file
95
templates/networking/diagnostics.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<div role="tabpanel" class="tab-pane" id="diagnostic">
|
||||
|
||||
<h4 class="mt-3"><?php echo _("Speedtest") ?></h4>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
<div id="loading" class="visible">
|
||||
<p id="message"><span class="loadCircle"></span><?php echo _("Selecting a server"); ?>...</p>
|
||||
</div>
|
||||
<div id="testWrapper" class="hidden">
|
||||
<button id="startStopBtn" type="button" class="btn btn-outline btn-primary" onclick="startStop()"></button>
|
||||
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display=''"><?php echo _("Privacy"); ?></a>
|
||||
|
||||
<div class="col-sm-4 centered">
|
||||
<div id="serverArea">
|
||||
<?php echo _("Server"); ?>: <select id="server" class="form-select" onchange="s.setSelectedServer(SPEEDTEST_SERVERS[this.value]);"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="test">
|
||||
<div class="testGroup">
|
||||
<div class="testArea2">
|
||||
<div class="testName"><?php echo _("Ping"); ?></div>
|
||||
<div id="pingText" class="meterText" style="color:#AA6060"></div>
|
||||
<div class="unit"><?php echo _("ms"); ?></div>
|
||||
</div>
|
||||
<div class="testArea2">
|
||||
<div class="testName"><?php echo _("Jitter"); ?></div>
|
||||
<div id="jitText" class="meterText" style="color:#AA6060"></div>
|
||||
<div class="unit"><?php echo _("ms"); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="testGroup">
|
||||
<div class="testArea">
|
||||
<div class="testName"><?php echo _("Download"); ?></div>
|
||||
<canvas id="dlMeter" class="meter"></canvas>
|
||||
<div id="dlText" class="meterText"></div>
|
||||
<div class="unit"><?php echo _("Mbps"); ?></div>
|
||||
</div>
|
||||
<div class="testArea">
|
||||
<div class="testName"><?php echo _("Upload"); ?></div>
|
||||
<canvas id="ulMeter" class="meter"></canvas>
|
||||
<div id="ulText" class="meterText"></div>
|
||||
<div class="unit"><?php echo _("Mbps"); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ipArea">
|
||||
<span id="ip"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.testWrapper -->
|
||||
|
||||
<div id="privacyPolicy" style="display:none">
|
||||
<h4>Speedtest Privacy Policy</h4>
|
||||
<p>RaspAP's <a href="https://speedtest.raspap.com/">Speedtest server</a> is configured with telemetry enabled.</p>
|
||||
<h5>Data we collect</h5>
|
||||
<p>
|
||||
At the end of the test, the following data is collected and stored:
|
||||
<ul>
|
||||
<li>Test ID</li>
|
||||
<li>Time of testing</li>
|
||||
<li>Test results (download and upload speed, ping and jitter)</li>
|
||||
<li>IP address</li>
|
||||
<li>ISP information</li>
|
||||
<li>Approximate location (inferred from IP address, not GPS)</li>
|
||||
<li>User agent and browser locale</li>
|
||||
</ul>
|
||||
</p>
|
||||
<h5>How we use the data</h5>
|
||||
<p>
|
||||
Data collected through this service is used to:
|
||||
<ul>
|
||||
<li>Allow sharing of test results (sharable image for forums, etc.)</li>
|
||||
<li>To improve the service offered to you (for instance, to detect problems on our side)</li>
|
||||
</ul>
|
||||
No personal information is disclosed to third parties.
|
||||
</p>
|
||||
<h5>Your consent</h5>
|
||||
<p>
|
||||
By starting the test, you consent to the terms of this privacy policy.
|
||||
</p>
|
||||
<h5>Data removal</h5>
|
||||
<p>
|
||||
If you wish to have your information deleted, simply provide us with your IP address. Without this information we won't be able to comply with your request. Contact <a href="mailto:support@raspap.com">support@raspap.com</a> for all deletion requests.
|
||||
</p>
|
||||
<br/>
|
||||
<div class="closePrivacyPolicy">
|
||||
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display='none'">Close</a>
|
||||
</div>
|
||||
<br/>
|
||||
</div><!-- /.privacyPolicy -->
|
||||
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.tabpanel -->
|
||||
|
||||
92
templates/networking/general.php
Executable file
92
templates/networking/general.php
Executable file
@@ -0,0 +1,92 @@
|
||||
<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="table-responsive">
|
||||
<table class="table">
|
||||
<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 if (isset($routeInfo["error"]) || empty($routeInfo)): ?>
|
||||
<tr><td colspan=5>No route to the internet found</td></tr>
|
||||
<?php else: ?>
|
||||
<?php foreach($routeInfo as $route): ?>
|
||||
<tr>
|
||||
<td><?php echo $route['interface'] ?></td>
|
||||
<td><?php echo $route['ip-address'] ?></td>
|
||||
<td><?php echo $route['gateway'] ?><br><?php $route['gw-name'] ?></td>
|
||||
<?php if ($route['isAP']): ?>
|
||||
<td>
|
||||
<p class="m-0">Access point</p>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td>
|
||||
<p class="m-0" data-bs-toggle="tooltip" data-bs-placement="left" title="<?php echo "ping ".RASPI_ACCESS_CHECK_IP ?>">
|
||||
<i class="fas <?php echo $route["access-ip"] ? "fa-check" : "fa-times"; ?>" ></i> <?php echo "IP" ?>
|
||||
</p>
|
||||
<p class="m-0" data-bs-toggle="tooltip" data-bs-placement="left" title="<?php echo "ping ".RASPI_ACCESS_CHECK_DNS ?>">
|
||||
<i class="fas <?php echo $route["access-dns"] ? "fa-check" : "fa-times"; ?>" ></i> <?php echo "DNS" ?>
|
||||
</p>
|
||||
<p class="m-0" data-bs-toggle="tooltip" data-bs-placement="left" title="<?php echo RASPI_ACCESS_CHECK_URL ?>">
|
||||
<i class="fas <?php echo $route["access-url"] ? "fa-check" : "fa-times"; ?>" ></i> <?php echo "HTTP" ?>
|
||||
</p>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="mt-3"><?php echo _("Routing table"); ?></h4>
|
||||
<div class="card h-100 w-100">
|
||||
<div class="card-header"><?php echo _("raw output") ?></div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<?php foreach($routeInfoRaw as $route): ?>
|
||||
<tr>
|
||||
<pre class="unstyled"><?php echo $route; ?></pre>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
|
||||
<div class="row">
|
||||
<?php if (!$bridgedEnabled) : // No interface details when bridged ?>
|
||||
<?php foreach ($interfaces as $interface): ?>
|
||||
<?php $if_quoted = htmlspecialchars($interface, ENT_QUOTES) ?>
|
||||
<div class="col-md mb-3">
|
||||
<div class="card h-100 w-100">
|
||||
<div class="card-header"><?php echo $if_quoted ?></div>
|
||||
<div class="card-body">
|
||||
<pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</div><!-- /.row -->
|
||||
|
||||
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
||||
|
||||
</div><!-- /.tabpanel -->
|
||||
|
||||
@@ -39,9 +39,18 @@
|
||||
<i class="fas fa-question-circle text-muted" data-bs-toggle="tooltip" data-bs-placement="auto" title="<?php echo _("Recommended if you wish to forward network traffic from the wg0 interface to clients connected on a desired interface. The active AP interface is the default."); ?>"></i>
|
||||
<p id="wg-description">
|
||||
<small><?php echo _("This option adds <strong>iptables</strong> <code>Postup</code> and <code>PostDown</code> rules for the interface selected below."); ?></small>
|
||||
<div class="col-sm-6">
|
||||
</p>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<?php SelectorOptions('wgInterface', $interfaces, $_SESSION['ap_interface'], 'cbxinterface'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<?php $checked = $optKSwitch == 1 ? 'checked="checked"' : '' ?>
|
||||
<input class="form-check-input" id="chxwgkswitch" name="wgKSwitch" type="checkbox" value="1" <?php echo $checked ?> />
|
||||
<label class="form-check-label" for="chxwgkswitch"><?php echo _("Enable kill switch"); ?></label>
|
||||
<i class="fas fa-question-circle text-muted" data-bs-toggle="tooltip" data-bs-placement="auto" title="<?php echo _("Recommended if you wish to prevent the flow of unencrypted packets through non-WireGuard interfaces."); ?>"></i>
|
||||
<p id="wg-description">
|
||||
<small><?php echo _("This option adds <strong>iptables</strong> <code>PostUp</code> and <code>PreDown</code> rules for the configured interface."); ?></small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user