mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-27 07:31:09 +01:00
Compare commits
39 Commits
3.4.0
...
3.4.3-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cf1ca564b | ||
|
|
29c1e7dda3 | ||
|
|
38ac6a12c6 | ||
|
|
2c896bbc12 | ||
|
|
ead886dffa | ||
|
|
66c04ec353 | ||
|
|
594ec2eec6 | ||
|
|
6772709141 | ||
|
|
23f32f9830 | ||
|
|
417f803411 | ||
|
|
f1dc6b3078 | ||
|
|
0114325a18 | ||
|
|
9e911847c5 | ||
|
|
4bc18f93e7 | ||
|
|
e514178b33 | ||
|
|
87d317db52 | ||
|
|
3b2396ec41 | ||
|
|
f7ac3d0b9d | ||
|
|
d4da4032b2 | ||
|
|
dc7122532f | ||
|
|
66b0a42576 | ||
|
|
08cc452e3d | ||
|
|
3eaa5b7801 | ||
|
|
bd53ef9ecc | ||
|
|
8bb18b43f8 | ||
|
|
23103c8c4b | ||
|
|
93b5dc4dac | ||
|
|
f7058b048a | ||
|
|
159e82dbd3 | ||
|
|
31303727a4 | ||
|
|
931086aecb | ||
|
|
a295dae059 | ||
|
|
a5a6747ced | ||
|
|
a36e3c7b57 | ||
|
|
f7e4b95ee2 | ||
|
|
a2c5eec53a | ||
|
|
66e2397ca0 | ||
|
|
6dd80575f4 | ||
|
|
73985333b0 |
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -15,8 +15,10 @@ jobs:
|
||||
include:
|
||||
- arch: "32-bit"
|
||||
pi_gen_version: "master"
|
||||
release: "trixie"
|
||||
- arch: "64-bit"
|
||||
pi_gen_version: "arm64"
|
||||
release: "trixie"
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -27,9 +29,10 @@ jobs:
|
||||
|
||||
- name: Build RaspAP Image
|
||||
id: build
|
||||
uses: usimd/pi-gen-action@v1
|
||||
uses: RaspAP/pi-gen-action@v1.11.0
|
||||
with:
|
||||
image-name: "raspap-bookworm-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}"
|
||||
release: ${{ matrix.release }}
|
||||
image-name: "raspap-${{ matrix.release }}-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}"
|
||||
enable-ssh: 1
|
||||
stage-list: stage0 stage1 stage2 ./stage-raspap
|
||||
verbose-output: true
|
||||
@@ -39,7 +42,7 @@ jobs:
|
||||
- name: Upload Artifact
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
asset_name: "raspap-bookworm-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}.img.zip"
|
||||
asset_name: "raspap-${{ matrix.release }}-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}.img.zip"
|
||||
file: ${{ steps.build.outputs.image-path }}
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.event.inputs.tag || github.ref }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||

|
||||
[](https://github.com/raspap/raspap-webgui/releases) [](https://github.com/thibmaek/awesome-raspberry-pi) [](https://github.com/sponsors/RaspAP) [](https://app.travis-ci.com/RaspAP/raspap-webgui) [](https://crowdin.com/project/raspap) [](https://twitter.com/rasp_ap) [](https://reddit.com/r/RaspAP) [](https://discord.gg/KVAsaAR)
|
||||

|
||||
[](https://github.com/raspap/raspap-webgui/releases) [](https://github.com/thibmaek/awesome-raspberry-pi) [](https://github.com/sponsors/RaspAP) [](https://app.travis-ci.com/RaspAP/raspap-webgui) [](https://crowdin.com/project/raspap) [](https://twitter.com/rasp_ap) [](https://reddit.com/r/RaspAP) [](https://discord.gg/KVAsaAR)
|
||||
|
||||
RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our [custom OS images](#pre-built-image), [Quick installer](#quick-installer) and [Docker container](#docker-support) create a known-good default configuration for all current Raspberry Pis with onboard wireless. A fully responsive, mobile-ready interface gives you control over the relevant services and networking options. Advanced DHCP settings, [WireGuard](https://docs.raspap.com/wireguard/), [Tailscale](https://docs.raspap.com/tailscale/) and [OpenVPN](https://docs.raspap.com/openvpn/) support, [SSL certificates](https://docs.raspap.com/ssl/), [ad blocking](#ad-blocking), security audits, [captive portal integration](https://docs.raspap.com/captive/), themes and [multilingual options](https://docs.raspap.com/translations/) are included.
|
||||
|
||||
@@ -139,6 +139,8 @@ RaspAP was originally made for Raspbian, but now also installs on the following
|
||||
|
||||
| Distribution | Release | Architecture | Support |
|
||||
|---|:---:|:---:|:---:|
|
||||
| Raspberry Pi OS | (64-bit) Lite Trixie | ARM | Official |
|
||||
| Raspberry Pi OS | (32-bit) Lite Trixie | ARM | Official |
|
||||
| Raspberry Pi OS | (64-bit) Lite Bookworm | ARM | Official |
|
||||
| Raspberry Pi OS | (32-bit) Lite Bookworm | ARM | Official |
|
||||
| Raspberry Pi OS | (64-bit) Desktop Bookworm | ARM | Official |
|
||||
|
||||
@@ -48,8 +48,15 @@ th {
|
||||
}
|
||||
|
||||
.navbar-logo {
|
||||
margin-top: 0.5em;
|
||||
margin-left: 0.5em;
|
||||
margin-top: 0.2em;
|
||||
margin-left: 0.7em;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
margin-left: 1.2rem;
|
||||
margin-bottom: -0.5rem;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<?php
|
||||
require_once '../../includes/functions.php';
|
||||
$color = getColorOpt();
|
||||
$allCss = 'all.css';
|
||||
?>
|
||||
/*
|
||||
Theme Name: RaspAP default
|
||||
@@ -11,7 +12,7 @@ Description: Default theme for RaspAP
|
||||
License: GNU General Public License v3.0
|
||||
*/
|
||||
|
||||
@import url('all.css');
|
||||
@import url('<?= $allCss ?>?v=<?= filemtime($allCss); ?>');
|
||||
|
||||
:root {
|
||||
--raspap-theme-color: <?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<?php header("Content-Type: image/svg+xml; charset=utf-8"); ?>
|
||||
<?php
|
||||
require_once '../../includes/config.php';
|
||||
require_once '../../includes/functions.php';
|
||||
$color = getColorOpt();
|
||||
$static = (isset($_GET['static']) && $_GET['static'] == '1') ||
|
||||
(defined('RASPI_UI_STATIC_LOGO') && RASPI_UI_STATIC_LOGO === true);
|
||||
?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
@@ -10,42 +13,41 @@ $color = getColorOpt();
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 490.66666 487.11066"
|
||||
height="487.11066"
|
||||
width="490.66666"
|
||||
viewBox="0 180 352 290"
|
||||
xml:space="preserve"
|
||||
id="svg2"
|
||||
version="1.1"><metadata
|
||||
id="metadata8"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs6"><clipPath
|
||||
id="clipPath18"
|
||||
clipPathUnits="userSpaceOnUse"><path
|
||||
id="path16"
|
||||
d="M 0,365.333 H 368 V 0 H 0 Z" /></clipPath></defs><g
|
||||
transform="matrix(1.3333333,0,0,-1.3333333,0,487.11067)"
|
||||
id="g10"><g
|
||||
id="g12"><g
|
||||
clip-path="url(#clipPath18)"
|
||||
id="g14"><g
|
||||
transform="translate(192.6768,123.4365)"
|
||||
id="g20"><path
|
||||
id="path22"
|
||||
style="fill:<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>;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:<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>;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:<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>;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:<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>;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>
|
||||
version="1.1">
|
||||
<style>
|
||||
<?php if (!$static): ?>
|
||||
.wave {
|
||||
opacity: 0.4;
|
||||
animation: pulse 1.8s infinite;
|
||||
}
|
||||
.wave1 { animation-delay: 0.3s; }
|
||||
.wave2 { animation-delay: 0.6s; }
|
||||
|
||||
@keyframes pulse {
|
||||
0% { opacity: 0.4; }
|
||||
20% { opacity: 1; }
|
||||
60% { opacity: 0.4; }
|
||||
100% { opacity: 0.4; }
|
||||
}
|
||||
<?php else: ?>
|
||||
.wave {
|
||||
opacity: 1.0;
|
||||
}
|
||||
<?php endif; ?>
|
||||
</style>
|
||||
|
||||
<!-- inner solid circle -->
|
||||
<circle cx="128" cy="384" r="60" fill="<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>"/>
|
||||
|
||||
<!-- outer ring -->
|
||||
<circle cx="128" cy="384" r="100" fill="none" stroke="<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>" stroke-width="25"/>
|
||||
|
||||
<!-- arcs -->
|
||||
<path class="wave wave1" d="M128 234 A 150 150 0 0 1 278 384" fill="none" stroke="<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>" stroke-width="25"/>
|
||||
<path class="wave wave2" d="M128 184 A 200 200 0 0 1 328 384" fill="none" stroke="<?php echo htmlspecialchars($color, ENT_QUOTES, 'UTF-8'); ?>" stroke-width="25"/>
|
||||
|
||||
</svg>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ server.modules += (
|
||||
"mod_rewrite",
|
||||
)
|
||||
|
||||
$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" {
|
||||
$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config|rootCA\.pem)).*" {
|
||||
url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" )
|
||||
server.error-handler-404 = "/REPLACE_ME/index.php"
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ define('RASPI_SYSTEM_ENABLED', true);
|
||||
define('RASPI_MONITOR_ENABLED', false);
|
||||
define('RASPI_RESTAPI_ENABLED', false);
|
||||
define('RASPI_PLUGINS_ENABLED', true);
|
||||
define('RASPI_UI_STATIC_LOGO', false);
|
||||
|
||||
// Locale settings
|
||||
define('LOCALE_ROOT', 'locale');
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"hostapd":{
|
||||
"modes":{
|
||||
"n":{
|
||||
"settings":[
|
||||
"hostapd": {
|
||||
"modes": {
|
||||
"n": {
|
||||
"settings": [
|
||||
"hw_mode=g",
|
||||
"ieee80211n=1",
|
||||
"wmm_enabled=1"
|
||||
]
|
||||
},
|
||||
"ac":{
|
||||
"settings":[
|
||||
"ac": {
|
||||
"settings": [
|
||||
"hw_mode=a",
|
||||
"# N",
|
||||
"ieee80211n=1",
|
||||
@@ -25,90 +25,117 @@
|
||||
"vht_oper_centr_freq_seg0_idx={VHT_FREQ_IDX}"
|
||||
]
|
||||
},
|
||||
"g":{
|
||||
"settings":[
|
||||
"g": {
|
||||
"settings": [
|
||||
"hw_mode=g",
|
||||
"ieee80211n=0"
|
||||
]
|
||||
},
|
||||
"a":{
|
||||
"settings":[
|
||||
"a": {
|
||||
"settings": [
|
||||
"hw_mode=a",
|
||||
"ieee80211n=0"
|
||||
]
|
||||
},
|
||||
"b":{
|
||||
"settings":[
|
||||
"b": {
|
||||
"settings": [
|
||||
"hw_mode=b",
|
||||
"ieee80211n=0"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dhcp": {
|
||||
"wlan0": {
|
||||
"static ip_address": [ "10.3.141.1" ],
|
||||
"static routers": [ "10.3.141.1" ],
|
||||
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask": [ "255.255.255.0" ]
|
||||
},
|
||||
"dhcp":{
|
||||
"wlan0":{
|
||||
"static ip_address":[ "10.3.141.1/24" ],
|
||||
"static routers":[ "10.3.141.1" ],
|
||||
"static domain_name_server":[ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask":[ "255.255.255.0" ]
|
||||
},
|
||||
"wlan1":{
|
||||
"static ip_address":[ "10.9.141.1/24" ],
|
||||
"static routers":[ "10.9.141.1" ],
|
||||
"static domain_name_server":[ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask":[ "255.255.255.0" ]
|
||||
},
|
||||
"uap0":{
|
||||
"static ip_address":[ "192.168.50.1/24" ],
|
||||
"static routers":[ "192.168.50.1" ],
|
||||
"static domain_name_server":[ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask":[ "255.255.255.0" ]
|
||||
},
|
||||
"options":{
|
||||
"# RaspAP default configuration":null,
|
||||
"hostname":null,
|
||||
"clientid":null,
|
||||
"persistent":null,
|
||||
"option rapid_commit":null,
|
||||
"option domain_name_servers, domain_name, domain_search, host_name":null,
|
||||
"option classless_static_routes":null,
|
||||
"option ntp_servers":null,
|
||||
"require dhcp_server_identifier":null,
|
||||
"slaac private":null,
|
||||
"nohook lookup-hostname":null
|
||||
}
|
||||
"wlan1": {
|
||||
"static ip_address": [ "10.9.141.1" ],
|
||||
"static routers": [ "10.9.141.1" ],
|
||||
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask": [ "255.255.255.0" ]
|
||||
},
|
||||
"dnsmasq":{
|
||||
"wlan0":{
|
||||
"dhcp-range":[ "10.3.141.50,10.3.141.254,255.255.255.0,12h" ]
|
||||
},
|
||||
"wlan1":{
|
||||
"dhcp-range":[ "10.9.141.50,10.9.141.254,255.255.255.0,12h" ]
|
||||
},
|
||||
"uap0":{
|
||||
"dhcp-range":[ "192.168.50.50,192.168.50.150,12h" ]
|
||||
}
|
||||
"wlan2": {
|
||||
"static ip_address": [ "10.6.141.1" ],
|
||||
"static routers": [ "10.6.141.1" ],
|
||||
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask": [ "255.255.255.0" ]
|
||||
},
|
||||
"wireguard":{
|
||||
"server":{
|
||||
"Address":[ "10.8.2.1/24" ],
|
||||
"ListenPort":[ "51820" ],
|
||||
"DNS":[ "9.9.9.9" ],
|
||||
"PostUp":[ "iptables -A FORWARD -i wlan0 -o wg0 -j ACCEPT; iptables -A FORWARD -i wg0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE" ],
|
||||
"PostDown":[ "iptables -D FORWARD -i wlan0 -o wg0 -j ACCEPT; iptables -D FORWARD -i wg0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -D POSTROUTING -o wg0 -j MASQUERADE" ],
|
||||
"PostUpEx":[ "iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ],
|
||||
"PreDown":[ "iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ]
|
||||
},
|
||||
"peer":{
|
||||
"Address":[ "10.8.1.2/24" ],
|
||||
"Endpoint":[ "10.8.2.1:51820" ],
|
||||
"ListenPort":[ "21841" ],
|
||||
"AllowedIPs":[ "10.8.2.0/24" ],
|
||||
"PersistentKeepalive":[ "15" ]
|
||||
}
|
||||
},
|
||||
"txpower": {
|
||||
"dbm": [ "auto", "30", "20", "17", "10", "6", "3", "1", "0" ]
|
||||
}
|
||||
"uap0": {
|
||||
"static ip_address": ["192.168.50.1" ],
|
||||
"static routers": [ "192.168.50.1" ],
|
||||
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask": [ "255.255.255.0" ]
|
||||
},
|
||||
"eth0": {
|
||||
"static ip_address": [ "192.168.55.1" ],
|
||||
"static routers": [ "192.168.55.1" ],
|
||||
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask": [ "255.255.255.0" ]
|
||||
},
|
||||
"enx": {
|
||||
"static ip_address": [ "192.168.60.1" ],
|
||||
"static routers": [ "192.168.60.1" ],
|
||||
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||
"subnetmask": [ "255.255.255.0" ]
|
||||
},
|
||||
"options": {
|
||||
"# RaspAP default configuration": null,
|
||||
"hostname": null,
|
||||
"clientid": null,
|
||||
"persistent": null,
|
||||
"option rapid_commit": null,
|
||||
"option domain_name_servers, domain_name, domain_search, host_name": null,
|
||||
"option classless_static_routes": null,
|
||||
"option ntp_servers": null,
|
||||
"require dhcp_server_identifier": null,
|
||||
"slaac private": null,
|
||||
"nohook lookup-hostname": null
|
||||
}
|
||||
},
|
||||
"dnsmasq": {
|
||||
"wlan0": {
|
||||
"dhcp-range": [ "10.3.141.50,10.3.141.254,255.255.255.0,12h" ]
|
||||
},
|
||||
"wlan1": {
|
||||
"dhcp-range": [ "10.9.141.50,10.9.141.254,255.255.255.0,12h" ]
|
||||
},
|
||||
"wlan2": {
|
||||
"dhcp-range": [ "10.6.141.50,10.6.141.254,255.255.255.0,12h" ]
|
||||
},
|
||||
"uap0": {
|
||||
"dhcp-range": [ "192.168.50.50,192.168.50.150,12h" ]
|
||||
},
|
||||
"eth0": {
|
||||
"dhcp-range": [ "192.168.55.50,192.168.55.150,12h" ]
|
||||
},
|
||||
"enx": {
|
||||
"dhcp-range": [ "192.168.60.50,192.168.60.150,12h" ]
|
||||
}
|
||||
},
|
||||
"wireguard": {
|
||||
"server": {
|
||||
"Address": [ "10.8.2.1/24" ],
|
||||
"ListenPort": [ "51820" ],
|
||||
"DNS": [ "9.9.9.9" ],
|
||||
"PostUp": [ "iptables -A FORWARD -i wlan0 -o %i -j ACCEPT; iptables -A FORWARD -i %i -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -A POSTROUTING -o %i -j MASQUERADE" ],
|
||||
"PostDown": [ "iptables -D FORWARD -i wlan0 -o %i -j ACCEPT; iptables -D FORWARD -i %i -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -D POSTROUTING -o %i -j MASQUERADE" ],
|
||||
"PostUpEx": [ "iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ],
|
||||
"PreDown": [ "iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -d %s -j REJECT" ]
|
||||
},
|
||||
"peer": {
|
||||
"Address": [ "10.8.1.2/24" ],
|
||||
"Endpoint": [ "10.8.2.1:51820" ],
|
||||
"ListenPort": [ "21841" ],
|
||||
"AllowedIPs": [ "10.8.2.0/24" ],
|
||||
"PersistentKeepalive": [ "15" ]
|
||||
}
|
||||
},
|
||||
"txpower": {
|
||||
"dbm": [ "auto", "30", "20", "17", "10", "6", "3", "1", "0" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
dist/raspap/css/fonts/RaspAP.eot
vendored
BIN
dist/raspap/css/fonts/RaspAP.eot
vendored
Binary file not shown.
1
dist/raspap/css/fonts/RaspAP.svg
vendored
1
dist/raspap/css/fonts/RaspAP.svg
vendored
@@ -11,4 +11,5 @@
|
||||
<glyph unicode="" glyph-name="raspap" horiz-adv-x="1031" d="M540.058 281.983c0-104.182-84.446-188.637-188.625-188.637-104.176 0-188.62 84.455-188.62 188.637 0 104.171 84.444 188.625 188.62 188.625 104.179 0 188.625-84.455 188.625-188.625zM351.437 550.062c-147.818 0-268.074-120.259-268.074-268.080 0-147.826 120.257-268.091 268.074-268.091s268.077 120.265 268.077 268.091c0 147.821-120.259 268.080-268.077 268.080zM351.437-58.985c-188 0-340.95 152.958-340.95 340.967 0 188.003 152.95 340.956 340.95 340.956 188.003 0 340.953-152.953 340.953-340.956 0-188.009-152.95-340.967-340.953-340.967zM404.82 698.222c185.52 0 339.484-137.497 365.479-315.929l79.208-5.253c-24.125 224.046-214.339 399.077-444.686 399.077-10.909 0-21.723-0.412-32.433-1.186l5.16-77.823c9.017 0.661 18.093 1.113 27.272 1.113zM404.989 874.303c285.73 0 520.41-222.659 539.731-503.584l78.375-5.205c-16.843 326.355-287.644 586.685-618.106 586.685-14.884 0-29.644-0.561-44.264-1.6l5.157-77.719c12.919 0.928 25.958 1.424 39.106 1.424z" />
|
||||
<glyph unicode="" glyph-name="tailscale" d="M131.2 323.8c70.6 0 127.8 57.2 127.8 127.8s-57.2 127.8-127.8 127.8-127.6-57.4-127.6-127.8 57.2-127.8 127.6-127.8zM514.4 323.8c70.6 0 127.8 57.2 127.8 127.8s-57.2 127.8-127.8 127.8c-70.6 0-127.8-57.2-127.8-127.8s57.2-127.8 127.8-127.8zM514.4-64c70.6 0 127.8 57.2 127.8 127.8s-57.2 127.8-127.8 127.8c-70.6 0-127.8-57.2-127.8-127.8s57.2-127.8 127.8-127.8zM892.8 323.8c70.6 0 127.8 57.2 127.8 127.8s-57.2 127.8-127.8 127.8c-70.6 0-127.8-57.2-127.8-127.8s57.2-127.8 127.8-127.8z" />
|
||||
<glyph unicode="" glyph-name="torproxy" d="M750.016 439.488c-32.512 29.504-73.504 53.344-115.328 77.152-19.008 10.496-77.344 56.16-57.152 120.992l-36.32 15.328c57.152 88.672 131.68 176.32 223.008 258.336-73.344-24.672-138.176-62.848-186.848-130.496 28.672 60 75.328 119.168 126.848 179.168-70.496-50.496-131.488-107.68-169.664-184l26.656 106.848c-38.176-68.672-64.832-138.336-75.328-207.84l-56.16 22.848-9.504-7.68c49.504-88.672 23.84-135.328-0.992-151.68-49.504-33.344-120.992-76.16-157.344-113.344-68.672-70.656-88.672-137.344-82.016-226.016 6.656-113.504 89.664-207.84 199.328-244.992 48.672-16.32 93.344-18.176 143.008-18.176 80 0 162.016 20.992 222.176 71.488 63.84 52.992 100.832 131.488 100.992 214.496 0.32 82.656-34.336 161.664-95.328 217.504zM598.336 60.832c-3.84-17.152-16.16-38.176-31.328-57.152 5.664 10.496 10.496 20.992 13.344 32.512 23.84 84.832 34.336 123.84 22.848 217.344-1.824 9.504-5.664 40-20 73.344-20 50.656-50.496 98.336-54.336 108.832-6.656 16.16-16.16 84.832-17.152 131.488 0.992-40 3.84-113.344 14.336-142.016 2.848-9.664 30.496-52.512 50.496-104.832 13.344-36.32 16.16-69.664 19.008-79.168 9.664-43.008-1.824-115.488-16.992-184-4.832-24.832-18.176-53.504-35.328-75.328 9.504 13.344 17.152 30.496 22.848 50.496 11.488 40 16.16 91.488 15.168 124-0.832 19.008-9.504 60-23.84 97.152-8.512 20-20.992 40.992-29.504 55.328-9.504 14.336-9.504 45.664-13.344 82.016 0.832-39.168-2.848-59.168 6.656-86.848 5.664-16.16 26.656-39.008 32.32-60.992 8.672-29.504 17.152-62.016 16.32-82.016 0-22.848-0.992-64.832-11.488-110.656-6.656-34.176-22.016-63.84-46.656-82.848 10.496 13.344 16.16 26.656 19.008 40 3.84 20 4.832 39.168 6.656 63.008 2.016 24.512 0.32 49.344-4.672 73.344-7.68 34.336-20 68.672-25.824 92.512 0.992-26.656 11.488-60 16.32-95.328 3.68-25.824 1.824-51.488 0.832-74.336-0.832-26.656-9.504-73.504-20.992-96.32-11.488 4.832-15.168 11.488-22.848 20.992-9.664 12.32-15.328 25.664-20.992 40.992-5.344 12.672-9.504 25.664-12.512 39.008-4.512 33.504 4.16 67.168 23.84 94.496 20 28.672 24 30.496 30.496 63.84-9.504-29.504-16.16-32.32-37.152-57.152-23.84-27.68-27.488-67.68-27.488-100.16 0-13.344 5.664-28.672 10.496-43.008 5.664-15.168 11.328-30.336 19.008-41.824 5.664-9.504 13.344-16.16 20-20.992-24.832 6.656-50.496 16.16-66.656 29.504-40 34.496-75.328 92.512-80.16 144-3.84 42.016 34.336 103.008 88.672 133.504 45.824 26.656 56.32 56.32 65.824 104.992-13.344-42.016-26.656-78.336-70.656-100.16-62.848-34.336-95.328-89.664-92.32-143.008 4.672-67.68 31.328-114.496 85.824-151.68 12.32-8.672 29.504-17.152 47.68-23.84-67.84 16.16-76.32 25.664-99.168 52.32 0 2.016-5.824 5.824-5.824 6.656-30.496 34.336-68.512 93.504-82.016 147.84-4.672 19.008-9.504 39.008-3.68 58.176 24.672 89.664 79.008 124 133.344 160.992 13.504 9.664 26.848 18.176 39.168 27.68 30.496 24 38.176 85.824 44.832 121.152-12.32-43.008-25.824-96.32-49.664-113.504-12.32-9.504-27.68-17.152-40-25.664-56.16-38.176-112.512-74.496-138.176-166.848-5.824-24-2.016-41.152 3.68-64 14.336-56.16 52.512-117.152 84.992-153.504l5.664-5.664c14.336-16.32 32.512-28.672 54.336-37.152-19.168 4.512-37.664 11.168-55.328 20-88.672 42.848-147.68 135.328-151.488 210.656-7.68 153.504 65.824 198.336 134.336 254.656 38.176 31.328 91.68 46.656 122.176 102.848 5.664 12.512 9.504 39.168 1.824 67.84-2.848 9.504-17.152 43.84-22.848 51.488l84.832-37.344c-1.824-40-2.848-72.32 4.672-102.016 8.672-32.32 50.656-79.008 67.84-133.504 33.344-102.848 24.832-237.152 0.832-342.176z" />
|
||||
<glyph unicode="" glyph-name="wireshark" d="M729.968 781.328c-214.016-3.36-335.76-129.28-399.568-251.616-55.952-106.816-67.744-198.88-70.688-224.032l-259.712-2.576v-42.208l277.376 2.56c10.861 0.224 19.694 8.612 20.618 19.265l0.006 0.079s10.8 113.6 69.696 227.36c54.976 106.24 151.2 209.504 324.8 225.696-107.008-213.44 10.8-460.832 10.8-460.832 3.38-7.112 10.427-11.983 18.631-12.176h0.025l302.048-2.528v42.208l-287.168 2.56c-13.76 32.208-105.040 261.040 10.8 443.84 2.048 3.197 3.265 7.097 3.265 11.281 0 11.597-9.347 21.011-20.919 21.119h-0.010z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.4 KiB |
BIN
dist/raspap/css/fonts/RaspAP.ttf
vendored
BIN
dist/raspap/css/fonts/RaspAP.ttf
vendored
Binary file not shown.
BIN
dist/raspap/css/fonts/RaspAP.woff
vendored
BIN
dist/raspap/css/fonts/RaspAP.woff
vendored
Binary file not shown.
34
dist/raspap/css/style.css
vendored
34
dist/raspap/css/style.css
vendored
@@ -1,16 +1,15 @@
|
||||
@font-face {
|
||||
font-family: 'RaspAP';
|
||||
src: url('fonts/RaspAP.eot?3vjloy');
|
||||
src: url('fonts/RaspAP.eot?3vjloy#iefix') format('embedded-opentype'),
|
||||
url('fonts/RaspAP.ttf?3vjloy') format('truetype'),
|
||||
url('fonts/RaspAP.woff?3vjloy') format('woff'),
|
||||
url('fonts/RaspAP.svg?3vjloy#RaspAP') format('svg');
|
||||
src: url('fonts/RaspAP.eot?8h3d6d');
|
||||
src: url('fonts/RaspAP.eot?8h3d6d#iefix') format('embedded-opentype'),
|
||||
url('fonts/RaspAP.ttf?8h3d6d') format('truetype'),
|
||||
url('fonts/RaspAP.woff?8h3d6d') format('woff'),
|
||||
url('fonts/RaspAP.svg?8h3d6d#RaspAP') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
|
||||
[class^="ra-"], [class*=" ra-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'RaspAP' !important;
|
||||
@@ -26,10 +25,15 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.ra-wireshark:before {
|
||||
font-size: 1.3rem;
|
||||
font-weight: bold;
|
||||
content: "\e904";
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.ra-wireguard:before {
|
||||
font-size: 1.1rem;
|
||||
content: "\e900";
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ra-raspap:before {
|
||||
content: "\e901";
|
||||
@@ -46,19 +50,3 @@
|
||||
content: "\e903";
|
||||
vertical-align: top;
|
||||
}
|
||||
.card-header .ra-wireguard:before,
|
||||
.card-header .ra-tailscale:before,
|
||||
.card-header .ra-torproxy:before {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sidebar .nav-item.active .nav-link span.ra-wireguard:before,
|
||||
.sidebar .nav-item.active .nav-link span.ra-tailscale:before,
|
||||
.sidebar .nav-item.active .nav-link span.ra-torproxy:before {
|
||||
color: #6e707e;
|
||||
}
|
||||
|
||||
.sb-nav-link-icon .ra-tailscale {
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,12 +82,15 @@ function DisplayDashboard(&$extraFooterScripts): void
|
||||
$vpnStatus = $vpn ? "active" : "inactive";
|
||||
$vpnManaged = $vpn ? $dashboard->getVpnManaged($vpn) : null;
|
||||
$firewallManaged = $firewallStatus = "";
|
||||
$firewallInstalled = array_filter($plugins, fn($p) => str_ends_with($p, 'Firewall')) ? true : false;
|
||||
$firewallInstalled = (bool) array_filter($plugins, function($p) {
|
||||
return substr($p, -strlen('Firewall')) === 'Firewall';
|
||||
});
|
||||
if (!$firewallInstalled) {
|
||||
$firewallUnavailable = '<i class="fas fa-slash fa-stack-1x"></i>';
|
||||
} else {
|
||||
$firewallManaged = '<a href="/plugin__Firewall">';
|
||||
$firewallStatus = ($dashboard->firewallEnabled() == true) ? "active" : "";
|
||||
$firewallUnavailable = null;
|
||||
}
|
||||
|
||||
echo renderTemplate(
|
||||
|
||||
@@ -7,7 +7,7 @@ if (!defined('RASPI_CONFIG')) {
|
||||
$defaults = [
|
||||
'RASPI_BRAND_TEXT' => 'RaspAP',
|
||||
'RASPI_BRAND_TITLE' => RASPI_BRAND_TEXT.' Admin Panel',
|
||||
'RASPI_VERSION' => '3.4.0',
|
||||
'RASPI_VERSION' => '3.4.3',
|
||||
'RASPI_CONFIG_NETWORK' => RASPI_CONFIG.'/networking/defaults.json',
|
||||
'RASPI_CONFIG_PROVIDERS' => 'config/vpn-providers.json',
|
||||
'RASPI_CONFIG_API' => RASPI_CONFIG.'/api',
|
||||
|
||||
@@ -915,7 +915,7 @@ function renderStatus($hostapd_led, $hostapd_status, $memused_led, $memused, $cp
|
||||
?>
|
||||
<div class="row g-0">
|
||||
<div class="col-4 ms-2 sidebar-brand-icon">
|
||||
<img src="app/img/raspAP-logo.php" class="navbar-logo" width="60" height="60">
|
||||
<img src="app/img/raspAP-logo.php?static=1" class="navbar-logo" width="70" height="70">
|
||||
</div>
|
||||
<div class="col ml-2">
|
||||
<div class="ml-1 sb-status">Status</div>
|
||||
|
||||
@@ -49,7 +49,9 @@ function DisplayWireGuardConfig()
|
||||
exec('sudo cat '. RASPI_WIREGUARD_CONFIG, $return);
|
||||
$conf = ParseConfig($return, $parseFlag);
|
||||
$wg_srvpubkey = exec('sudo cat '. RASPI_WIREGUARD_PATH .'wg-server-public.key', $return);
|
||||
$wg_srvport = ($conf['ListenPort'] == '') ? getDefaultNetValue('wireguard','server','ListenPort') : $conf['ListenPort'];
|
||||
$wg_srvport = ($conf['ListenPort'] ?? '') === ''
|
||||
? getDefaultNetValue('wireguard','server','ListenPort')
|
||||
: $conf['ListenPort'];
|
||||
$wg_srvipaddress = ($conf['Address'] == '') ? getDefaultNetValue('wireguard','server','Address') : $conf['Address'];
|
||||
$wg_srvdns = ($conf['DNS'] == '') ? getDefaultNetValue('wireguard','server','DNS') : $conf['DNS'];
|
||||
if (is_array($wg_srvdns)) {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Lawrence Yau <sirlagz@gmail.com>
|
||||
* @author Bill Zimmerman <billzimmerman@gmail.com>
|
||||
* @license GNU General Public License, version 3 (GPL-3.0)
|
||||
* @version 3.4.0
|
||||
* @version 3.4.3
|
||||
* @link https://github.com/RaspAP/raspap-webgui/
|
||||
* @link https://raspap.com/
|
||||
* @see http://sirlagz.net/2013/02/08/raspap-webgui/
|
||||
|
||||
@@ -149,21 +149,24 @@ function _get_linux_distro() {
|
||||
# Sets php package option based on Linux version, abort if unsupported distro
|
||||
function _set_php_package() {
|
||||
case $RELEASE in
|
||||
13) # Debian 13 trixie
|
||||
php_package="php8.4-fpm"
|
||||
phpiniconf="/etc/php/8.4/fpm/php.ini" ;;
|
||||
23.05|12*) # Debian 12 & Armbian 23.05
|
||||
php_package="php8.2-cgi"
|
||||
phpcgiconf="/etc/php/8.2/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/8.2/cgi/php.ini" ;;
|
||||
23.04) # Ubuntu Server 23.04
|
||||
php_package="php8.1-cgi"
|
||||
phpcgiconf="/etc/php/8.1/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/8.1/cgi/php.ini" ;;
|
||||
22.04|20.04|18.04|19.10|11*) # Previous Ubuntu Server, Debian & Armbian distros
|
||||
php_package="php7.4-cgi"
|
||||
phpcgiconf="/etc/php/7.4/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/7.4/cgi/php.ini" ;;
|
||||
10*|11*)
|
||||
php_package="php7.3-cgi"
|
||||
phpcgiconf="/etc/php/7.3/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/7.3/cgi/php.ini" ;;
|
||||
9*)
|
||||
php_package="php7.0-cgi"
|
||||
phpcgiconf="/etc/php/7.0/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/7.0/cgi/php.ini" ;;
|
||||
8)
|
||||
_install_status 1 "${DESC} and php5 are not supported. Please upgrade."
|
||||
exit 1 ;;
|
||||
@@ -272,6 +275,12 @@ function _install_dependencies() {
|
||||
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
|
||||
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
|
||||
sudo apt-get install -y lighttpd git hostapd dnsmasq iptables-persistent $php_package $dhcpcd_package $iw_package $rsync_package $network_tools $ifconfig_package vnstat qrencode jq isoquery || _install_status 1 "Unable to install dependencies"
|
||||
|
||||
if [[ "$php_package" == *"-fpm" ]]; then
|
||||
install_log "Enabling lighttpd fastcgi-php-fpm module for $php_package"
|
||||
sudo lighty-enable-mod fastcgi-php-fpm || install_status 1 "Unable to enable fastcgi-php-fpm module"
|
||||
fi
|
||||
|
||||
_install_status 0
|
||||
}
|
||||
|
||||
@@ -956,14 +965,14 @@ function _patch_system_files() {
|
||||
function _optimize_php() {
|
||||
if [ "$upgrade" == 0 ]; then
|
||||
_install_log "Optimize PHP configuration"
|
||||
if [ ! -f "$phpcgiconf" ]; then
|
||||
if [ ! -f "$phpiniconf" ]; then
|
||||
_install_status 2 "PHP configuration could not be found."
|
||||
return
|
||||
fi
|
||||
|
||||
# Backup php.ini and create symlink for restoring.
|
||||
datetimephpconf=$(date +%F-%R)
|
||||
sudo cp "$phpcgiconf" "$raspap_dir/backups/php.ini.$datetimephpconf"
|
||||
sudo cp "$phpiniconf" "$raspap_dir/backups/php.ini.$datetimephpconf"
|
||||
sudo ln -sf "$raspap_dir/backups/php.ini.$datetimephpconf" "$raspap_dir/backups/php.ini"
|
||||
|
||||
echo -n "Enable HttpOnly for session cookies (Recommended)? [Y/n]: "
|
||||
@@ -978,7 +987,7 @@ function _optimize_php() {
|
||||
|
||||
if [ "$assume_yes" == 1 ] || [ "$php_session_cookie" == 1 ]; then
|
||||
echo "Php-cgi enabling session.cookie_httponly."
|
||||
sudo sed -i -E 's/^session\.cookie_httponly\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/session.cookie_httponly = 1/' "$phpcgiconf"
|
||||
sudo sed -i -E 's/^session\.cookie_httponly\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/session.cookie_httponly = 1/' "$phpiniconf"
|
||||
fi
|
||||
|
||||
if [ "$php_package" = "php7.1-cgi" ]; then
|
||||
@@ -994,7 +1003,7 @@ function _optimize_php() {
|
||||
|
||||
if [ "$assume_yes" == 1 ] || [ "$phpopcache" == 1 ]; then
|
||||
echo -e "Php-cgi enabling opcache.enable."
|
||||
sudo sed -i -E 's/^;?opcache\.enable\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/opcache.enable = 1/' "$phpcgiconf"
|
||||
sudo sed -i -E 's/^;?opcache\.enable\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/opcache.enable = 1/' "$phpiniconf"
|
||||
# Make sure opcache extension is turned on.
|
||||
if [ -f "/usr/sbin/phpenmod" ]; then
|
||||
sudo phpenmod opcache
|
||||
|
||||
@@ -87,5 +87,6 @@ www-data ALL=(ALL) NOPASSWD:/usr/bin/nmap --script=broadcast-dhcp-discover -e [a
|
||||
www-data ALL=(ALL) NOPASSWD:/usr/bin/vnstat *
|
||||
www-data ALL=(ALL) NOPASSWD:/usr/sbin/visudo -cf *
|
||||
www-data ALL=(ALL) NOPASSWD:/etc/raspap/plugins/plugin_helper.sh
|
||||
www-data ALL=(ALL) NOPASSWD: /bin/systemctl start raspap-network-activity@*.service
|
||||
www-data ALL=(ALL) NOPASSWD: /bin/systemctl stop raspap-network-activity@*.service
|
||||
www-data ALL=(ALL) NOPASSWD:/bin/systemctl start raspap-network-activity@*.service
|
||||
www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop raspap-network-activity@*.service
|
||||
www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wpa_conf_* /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
|
||||
@@ -308,7 +308,10 @@ function _check_internet() {
|
||||
tput civis # hide cursor
|
||||
|
||||
# run check in background
|
||||
( curl -Is --connect-timeout 3 --max-time 15 https://github.com | head -n 1 | grep "HTTP/2 200" >/dev/null ) &
|
||||
(
|
||||
curl -Is --connect-timeout 3 --max-time 15 https://github.com \
|
||||
| grep -q "^HTTP/2 200"
|
||||
) &
|
||||
local pid=$!
|
||||
|
||||
# display spinner while curl runs
|
||||
@@ -318,8 +321,9 @@ function _check_internet() {
|
||||
done
|
||||
printf "\r"
|
||||
|
||||
# check exit status of curl
|
||||
wait $pid || exit_code=$?
|
||||
# capture exit status
|
||||
wait "$pid"
|
||||
exit_code=$?
|
||||
|
||||
tput cnorm # restore cursor
|
||||
|
||||
|
||||
@@ -48,21 +48,24 @@ function _get_linux_distro() {
|
||||
# Sets php package option based on Linux version, abort if unsupported distro
|
||||
function _set_php_package() {
|
||||
case $RELEASE in
|
||||
13) # Debian 13 trixie
|
||||
php_package="php8.4-fpm"
|
||||
phpiniconf="/etc/php/8.4/fpm/php.ini" ;;
|
||||
23.05|12*) # Debian 12 & Armbian 23.05
|
||||
php_package="php8.2-cgi"
|
||||
phpcgiconf="/etc/php/8.2/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/8.2/cgi/php.ini" ;;
|
||||
23.04) # Ubuntu Server 23.04
|
||||
php_package="php8.1-cgi"
|
||||
phpcgiconf="/etc/php/8.1/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/8.1/cgi/php.ini" ;;
|
||||
22.04|20.04|18.04|19.10|11*) # Previous Ubuntu Server, Debian & Armbian distros
|
||||
php_package="php7.4-cgi"
|
||||
phpcgiconf="/etc/php/7.4/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/7.4/cgi/php.ini" ;;
|
||||
10*|11*)
|
||||
php_package="php7.3-cgi"
|
||||
phpcgiconf="/etc/php/7.3/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/7.3/cgi/php.ini" ;;
|
||||
9*)
|
||||
php_package="php7.0-cgi"
|
||||
phpcgiconf="/etc/php/7.0/cgi/php.ini" ;;
|
||||
phpiniconf="/etc/php/7.0/cgi/php.ini" ;;
|
||||
8)
|
||||
_install_error "${DESC} and php5 are unsupported."
|
||||
exit 1 ;;
|
||||
@@ -127,11 +130,11 @@ function _check_for_backups() {
|
||||
sudo cp "$raspap_dir/backups/dhcpcd.conf" /etc/dhcpcd.conf
|
||||
fi
|
||||
fi
|
||||
if [ -f "$raspap_dir/backups/php.ini" ] && [ -f "$phpcgiconf" ]; then
|
||||
if [ -f "$raspap_dir/backups/php.ini" ] && [ -f "$phpiniconf" ]; then
|
||||
echo -n "Restore the last php.ini file? [y/N]: "
|
||||
read answer
|
||||
if [[ $answer -eq 'y' ]]; then
|
||||
sudo cp "$raspap_dir/backups/php.ini" "$phpcgiconf"
|
||||
sudo cp "$raspap_dir/backups/php.ini" "$phpiniconf"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
2
plugins
2
plugins
Submodule plugins updated: 054f6bc0ab...b8e51de448
@@ -41,7 +41,7 @@ class DhcpcdManager
|
||||
{
|
||||
// determine static IP, routers, DNS
|
||||
$jsonData = $this->getInterfaceConfig($ap_iface);
|
||||
//error_log("DhcpcdManager::buildConfig() jsonData =" . print_r($jsonData, true));
|
||||
|
||||
$ip_address = empty($jsonData['StaticIP'])
|
||||
? getDefaultNetValue('dhcp', $ap_iface, 'static ip_address')
|
||||
: $jsonData['StaticIP'];
|
||||
@@ -485,6 +485,21 @@ class DhcpcdManager
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// fallback to defaults
|
||||
$rangeRaw = getDefaultNetValue('dnsmasq', $iface, 'dhcp-range');
|
||||
if ($rangeRaw) {
|
||||
$result['DHCPEnabled'] = true;
|
||||
$rangeParts = explode(',', $rangeRaw);
|
||||
$result['RangeStart'] = $rangeParts[0] ?? null;
|
||||
$result['RangeEnd'] = $rangeParts[1] ?? null;
|
||||
$result['RangeMask'] = $rangeParts[2] ?? null;
|
||||
$leaseSpec = $rangeParts[3] ?? null;
|
||||
if ($leaseSpec && preg_match('/^(\d+)([smhd])?$/i', $leaseSpec, $m)) {
|
||||
$result['leaseTime'] = $m[1];
|
||||
$result['leaseTimeInterval'] = $m[2] ?? 'h';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dhcpcd
|
||||
@@ -513,6 +528,11 @@ class DhcpcdManager
|
||||
$result['FallbackEnabled'] = (bool) preg_match('/fallback\s+static_' . preg_quote($iface, '/') . '/i', $block);
|
||||
$result['DefaultRoute'] = (bool) preg_match('/\bgateway\b/', $block);
|
||||
$result['NoHookWPASupplicant'] = (bool) preg_match('/nohook\s+wpa_supplicant/i', $block);
|
||||
} else {
|
||||
$result['StaticIP'] = getDefaultNetValue('dhcp', $iface, 'static ip_address');
|
||||
$result['SubnetMask'] = getDefaultNetValue('dhcp', $iface, 'subnetmask');
|
||||
$result['StaticRouters'] = getDefaultNetValue('dhcp', $iface, 'static routers');
|
||||
$result['StaticDNS'] = getDefaultNetValue('dhcp', $iface, 'static domain_name_server');
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
@@ -61,8 +61,17 @@ class DnsmasqManager
|
||||
* @return array $config
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function buildConfig(array $syscfg, string $iface, bool $wifiAPEnable, bool $bridgedEnable): array
|
||||
public function buildConfig(?array $syscfg, string $iface, bool $wifiAPEnable, bool $bridgedEnable): array
|
||||
{
|
||||
// fallback: if no syscfg for interface seed with defaults
|
||||
if ($syscfg === null) {
|
||||
$syscfg = [];
|
||||
$dhcp_range = getDefaultNetValue('dnsmasq', $iface, 'dhcp-range');
|
||||
if ($dhcp_range !== false) {
|
||||
$syscfg['dhcp-range'] = $dhcp_range;
|
||||
}
|
||||
}
|
||||
|
||||
if ($wifiAPEnable == 1) {
|
||||
// Enable uap0 configuration for ap-sta mode
|
||||
// Set dhcp-range from system config, fallback to default if undefined
|
||||
@@ -159,7 +168,7 @@ class DnsmasqManager
|
||||
if ($post_data['no-resolv'] == "1") {
|
||||
$config[] = "no-resolv";
|
||||
}
|
||||
foreach ($post_data['server'] as $server) {
|
||||
foreach (($post_data['server'] ?? []) as $server) {
|
||||
$config[] = "server=$server";
|
||||
}
|
||||
if (!empty($post_data['DNS1'])) {
|
||||
|
||||
@@ -313,6 +313,8 @@ class WiFiManager
|
||||
*/
|
||||
public function setKnownStationsWPA($networks)
|
||||
{
|
||||
$this->ensureWpaSupplicant();
|
||||
|
||||
$iface = escapeshellarg($_SESSION['wifi_client_interface']);
|
||||
$output = shell_exec("sudo wpa_cli -i $iface list_networks 2>&1");
|
||||
|
||||
@@ -475,5 +477,41 @@ class WiFiManager
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures /etc/wpa_supplicant/wpa_supplicant.conf exists with minimal safe contents
|
||||
* Does not overwrite an existing file
|
||||
*
|
||||
* @throws \RuntimeException on permission or write failure
|
||||
*/
|
||||
public function ensureWpaSupplicant(): void
|
||||
{
|
||||
$confPath = '/etc/wpa_supplicant/wpa_supplicant.conf';
|
||||
|
||||
if (file_exists($confPath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$contents = <<<CONF
|
||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||
update_config=1
|
||||
CONF;
|
||||
|
||||
$tmpFile = tempnam(sys_get_temp_dir(), 'wpa_conf_');
|
||||
if ($tmpFile === false) {
|
||||
throw new \RuntimeException("Failed to create temporary file for wpa_supplicant.conf");
|
||||
}
|
||||
|
||||
file_put_contents($tmpFile, $contents);
|
||||
chmod($tmpFile, 0600);
|
||||
|
||||
$cmd = escapeshellcmd("sudo cp $tmpFile $confPath");
|
||||
exec($cmd, $output, $exitCode);
|
||||
unlink($tmpFile);
|
||||
|
||||
if ($exitCode !== 0) {
|
||||
throw new \RuntimeException("Failed to initialize wpa_supplicant.conf: " . implode("\n", $output));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -173,12 +173,14 @@ class Sysinfo
|
||||
{
|
||||
exec('cat '. RASPI_ADBLOCK_CONFIG, $return);
|
||||
$arrConf = ParseConfig($return);
|
||||
$enabled = false;
|
||||
if (sizeof($arrConf) > 0) {
|
||||
$enabled = true;
|
||||
}
|
||||
exec('pidof dnsmasq | wc -l', $dnsmasq);
|
||||
$dnsmasq_state = ($dnsmasq[0] > 0);
|
||||
$status = $dnsmasq_state && $enabled ? true : false;
|
||||
|
||||
$status = $dnsmasq_state && $enabled;
|
||||
return $status;
|
||||
}
|
||||
|
||||
|
||||
@@ -301,14 +301,12 @@ class Dashboard {
|
||||
*/
|
||||
public function firewallEnabled(): bool
|
||||
{
|
||||
$conf = array();
|
||||
if (file_exists($this->firewallConfig) ) {
|
||||
$conf = parse_ini_file($this->firewallConfig);
|
||||
if (!file_exists($this->firewallConfig)) {
|
||||
return false;
|
||||
}
|
||||
if ($conf["firewall-enable"] == 1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
$conf = parse_ini_file($this->firewallConfig) ?: [];
|
||||
return !empty($conf['firewall-enable']) && (int)$conf['firewall-enable'] === 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="col-12">
|
||||
<!-- branding -->
|
||||
<div class="text-center mb-3">
|
||||
<img src="app/img/raspAP-logo.php" class="navbar-logo" alt="RaspAP logo" class="img-fluid" style="max-width: 100px;">
|
||||
<img src="app/img/raspAP-logo.php" class="login-logo" alt="RaspAP logo" class="img-fluid" style="max-width: 100px;">
|
||||
<h2 class="login-brand"><?php echo htmlspecialchars(RASPI_BRAND_TEXT); ?></h2>
|
||||
<div class="mt-2 admin-login"><?php echo _("Administrator login") ?></div>
|
||||
<div class="text-center text-danger mt-1 mb-3"><?php echo $status ?></div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<input class="form-check-input" id="wgLogEnable" type="checkbox" name="wgLogEnable" value="1" <?php echo $optLogEnable ? ' checked="checked"' : "" ?> aria-describedby="wgLogEnable">
|
||||
<label class="form-check-label" for="wgLogEnable"><?php echo _("Logfile output") ?></label>
|
||||
</div>
|
||||
<?php echo '<textarea class="logoutput text-secondary my-3">'.htmlspecialchars($wg_log, ENT_QUOTES).'</textarea>';
|
||||
<?php echo '<textarea class="logoutput text-secondary my-3">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
|
||||
?>
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
||||
Reference in New Issue
Block a user