Compare commits

...

188 Commits

Author SHA1 Message Date
billz 81875fae10 Update release version 2023-10-09 08:59:20 +02:00
Bill Zimmerman 509af62586
Merge pull request #1411 from RaspAP/fix/wpa-passphrase
Correctly handle 64 hex digit passkey
2023-10-09 08:43:22 +02:00
Bill Zimmerman c331ef9aaf
Merge pull request #1412 from RaspAP/fix/sys-functions
Ajaxifies system reboot + shutdown
2023-10-09 08:42:34 +02:00
Bill Zimmerman 03118b9918
Merge pull request #1409 from RaspAP/maint/blocklists
Replaces ad block no-tracking lists w/ new sources
2023-10-08 20:30:59 +02:00
billz c208ad9357 Add modal dialogs for system reboot/shutdown 2023-10-08 19:54:56 +02:00
billz bd506f6831 Update system msgs + compile .mo 2023-10-08 19:54:26 +02:00
billz 21f703b5a9 Ajaxify system reboot/shutdown 2023-10-08 19:21:43 +02:00
billz ff3f6ddb90 fwrite priority to wpa network if defined 2023-10-08 11:49:56 +02:00
billz deac75af89 Fix: handle 64 char passkey in absence of 8-63 char passhprase 2023-10-08 11:46:12 +02:00
billz a0ff530318 Replace notracking w/ updated blocklist host + domain lists 2023-10-06 14:43:28 +02:00
billz 2e8d2b1e16 Update adblock logging regex 2023-10-06 14:42:33 +02:00
billz 911a6a3145 Update template blocklist ids + cbxblocklist option val 2023-10-06 14:41:55 +02:00
billz 104b8c340c Update set local file timestamp to when it was downloaded 2023-10-06 14:40:16 +02:00
billz 3e491c17f4 Update fetch remote blocklists 2023-10-06 10:58:54 +02:00
billz 1f5d4b0830 Replace notracking lists w/ alternatives 2023-10-06 09:11:13 +02:00
billz 2ac5f94594 Hotfix: delete _move_config_file (obsolete) 2023-10-02 15:12:39 +01:00
billz 2270fe4953 Update release version 2023-10-02 10:22:57 +01:00
Bill Zimmerman f11dbb1b28
Merge pull request #1404 from RaspAP/maint/translations
Updates ko_KR and pt_BR locales
2023-10-02 11:19:33 +02:00
billz 1e0405a91e Update pt_BR locale 100% - thanks @Osuppa 2023-10-02 10:11:41 +01:00
billz 5028c7aa0a Update ko_KR locale 100% - thanks @dansunmi 2023-10-02 10:09:36 +01:00
Bill Zimmerman 10637efee3
Merge pull request #1395 from RaspAP/security/sanitize-ajax-posts
Sanitize post with escapeshellcmd()
2023-09-17 07:44:34 -07:00
billz e87e7d1d3a Sanitize post with escapeshellcmd() 2023-09-17 16:33:23 +02:00
Bill Zimmerman 3575d1d185
Merge pull request #1394 from RaspAP/fix/theme-select
Fix theme select for material variants
2023-09-17 07:24:42 -07:00
billz a4e8beabdf Fix theme select for material variants 2023-09-17 10:38:01 +02:00
Bill Zimmerman 4f2a43365b
Merge pull request #1393 from RaspAP/maint/authenticate
Refactors existing auth mechanism
2023-09-16 05:12:34 -07:00
billz 33c596189d Apply autoloader support for status messages 2023-09-16 11:46:11 +02:00
billz 07b950cf65 Migrate includes/status_message.php to RaspAP/Messages 2023-09-16 11:43:40 +02:00
billz c2d740ef44 Implement PSR-4 compliant class autoloader 2023-09-16 10:43:05 +02:00
billz 93166171db Update additional ajax posts w/ csrf_token 2023-09-16 10:39:14 +02:00
billz 0116d87445 Create loadFooterScripts(), update page_actions + formatting 2023-09-15 20:02:37 +02:00
billz 66b3b20bf4 Update ajax post data w/ csrf_token 2023-09-14 19:56:36 +02:00
billz 8ff2a89cac Update sidebar items, formatting + bump reported php-cgi version 2023-09-14 19:47:37 +02:00
billz f9d27e3bae Reorg index components into includes 2023-09-14 15:14:02 +02:00
billz 8044bc8cb1 Minor: untabify 2023-09-13 21:45:12 +02:00
billz 1347cd7bfa Swap fas hide/show icons 2023-09-13 21:34:12 +02:00
billz 1e5ac9b3fc Apply patch from RaspAP/raspap-insiders#209 2023-09-13 21:26:19 +02:00
billz 7831afa29a Update release version 2023-09-10 10:11:12 +02:00
billz 434e8dc3f4 Set backgroundColor: transparent for theme compatibility 2023-09-10 10:09:23 +02:00
Bill Zimmerman 67df02fe4c
Merge pull request #1388 from RaspAP/maint/php-strict-types
Fixes php8 strict_types errors + numerous warnings
2023-09-06 03:54:21 -07:00
billz ceea867c69 Fix php warning + undefined var notice 2023-09-06 12:25:39 +02:00
billz c64bdb42c8 Fix php notices w/ proper var checks 2023-09-06 09:54:20 +02:00
billz 55c0a49911 Fix php warnings + general code cleanup 2023-09-03 09:47:51 +02:00
billz 5457855aa1 Unambiguously typecast to expected datatype 2023-09-03 09:46:50 +02:00
billz cc6fa1d8d0 Install iw package on Debian 12 2023-09-03 09:44:43 +02:00
Bill Zimmerman 16a413aa9f
Merge pull request #1380 from marek-guran/material-theme
Dynamic Material Theme (Dark/Light)
2023-08-30 01:24:44 -07:00
Marek Guráň a259a4f868
Small fix (removed forgotten insiders part) 2023-08-30 10:00:15 +02:00
Marek Guráň 877ed4698e
Removed mistakenly added insiders code 2023-08-30 09:54:26 +02:00
Marek Guráň dd2c648a78
Update linkquality.js
Added hard coded colors to material theme. Now it is more readable on dark and light versions.
2023-08-30 09:52:59 +02:00
Marek Guráň 5bd2ef1edc
Fixed missing padding to cards 2023-08-29 12:28:51 +02:00
Marek Guráň 49634a4e58
Renamed theme to Material 2023-08-29 12:28:08 +02:00
Marek Guráň 2828b09d54
Fixed visual errors and improved some visuals
1. The rounded corners issue is gone
2. Fixed light theme status indicator, so on latest insiders it wont hide active green button
3. Added new visuals to navigation menu to make it more clear what card is active
2023-08-29 10:36:11 +02:00
Marek Guráň 7a1900d814
Update custom.js
Updated dark theme switcher so now it can switch between dark and light material theme while keeping it's functionality to stock theme.
2023-08-28 23:17:31 +02:00
Marek Guráň 3cf88d98b2
Small changes to system.php
Removed dark theme since it will be enabled by switch at top bar
2023-08-28 23:12:04 +02:00
Bill Zimmerman dee77c7597
Update features list 2023-08-28 15:16:03 +02:00
Marek Guráň aec2e3b7bf
Added themes to custom.js
Still cant change themes in settings
2023-08-28 14:31:23 +02:00
Bill Zimmerman 4bb1873f7b
Merge pull request #1385 from RaspAP/maint/locales
Template + locales maintenance
2023-08-26 06:14:20 -07:00
billz 36be6e3980 Typo fix in gettext string, update locales + compile .mo files 2023-08-26 15:05:07 +02:00
Bill Zimmerman f7f67023f4
Merge pull request #1384 from RaspAP/maint/translations
Update pt_BR translation 100%
2023-08-25 07:17:46 -07:00
Bill Zimmerman 8739acdccd
Merge pull request #1383 from RaspAP/maint/installer
Updates Quick installer w/ doc link to authentication (Insiders)
2023-08-25 03:36:00 -07:00
billz 8a1f0aad1d Update pt_BR translation 100% - thx @Osuppa 2023-08-25 12:33:34 +02:00
billz 2ea85a741a Typo fix 2023-08-23 20:01:34 +02:00
billz d035fc804d Update _install_status w/ ! important + add Insiders note 2023-08-23 19:44:59 +02:00
billz 9d0b565155 Revert "Add Insiders to raspi_version"
This reverts commit 563e0216cc.
2023-08-16 03:53:40 +02:00
billz 563e0216cc Add Insiders to raspi_version 2023-08-16 03:50:36 +02:00
billz 470debb945 Minor: compile sk_SK messages.po 2023-08-13 17:03:10 +02:00
Bill Zimmerman 64454a8b23
Merge pull request #1375 from RaspAP/locale-update/sk_SK
Add locale support for sk_SK
2023-08-13 07:56:40 -07:00
Marek Guráň 69967f6dd9
Updated forgotten button - light theme 2023-08-08 06:35:25 +02:00
Marek Guráň f831794a55
Updated forgotten button - dark theme 2023-08-08 06:34:43 +02:00
Marek Guráň 5970ee397b
Fixed insiders dashboard - light theme 2023-08-07 18:37:58 +02:00
Marek Guráň 2f3582d952
Fixed shadows and fixed insiders dashboard 2023-08-07 18:36:56 +02:00
Marek Guráň 7c0e4b73db
Small fix to dashboard text 2023-08-07 18:27:11 +02:00
Marek Guráň bd7c07ff22
Small fix to dashboard text 2023-08-07 18:26:47 +02:00
Marek Guráň 7b07869d68
Added themes to settings 2023-08-07 12:14:53 +02:00
Marek Guráň bb0a82acbc
Update and rename materialdark.php to material-dark.php 2023-08-07 12:03:29 +02:00
Marek Guráň 6b11b3593f
Create material-light.php 2023-08-07 12:03:08 +02:00
Marek Guráň d8ef9943d9
Last touch to dark theme 2023-08-07 11:16:44 +02:00
Marek Guráň ac019d6eff
Updated missing stuff 2023-08-07 10:17:25 +02:00
Marek Guráň e137bb67e9
Final Dark Version
Fixed few issues and restyled back to top button
2023-08-07 10:02:25 +02:00
Marek Guráň b0ef54a6e0
Small styling fix for static leases 2023-08-07 09:51:55 +02:00
Marek Guráň 5234e0bb8e
Added dynamic theming 2023-08-07 09:35:55 +02:00
Marek Guráň a77168c745
Create materialdark.php 2023-08-06 18:31:38 +02:00
Bill Zimmerman f51be6538b
Merge pull request #1378 from marek-guran/locale-update/sk_SK
Small fix to Slovakian translation
2023-08-05 06:56:15 -07:00
marek-guran 090a2a6c76 Fixed translations
Once seen on WEB GUI, I had to fix those.
2023-08-05 07:40:41 +02:00
billz 5cbc70cd6f Add locale support for sk_SK - thx @marek-guran 2023-08-03 18:19:36 +02:00
billz fd201207b4 Update release version 2023-08-01 06:06:02 +02:00
Bill Zimmerman 41445b191d
Merge pull request #1354 from RaspAP/maint/debian12-distros
Extend support to latest Debian distros (non-RPi OS)
2023-07-31 20:55:11 -07:00
Bill Zimmerman 16309a1fbc
Update README.md 2023-06-24 15:46:12 +02:00
Bill Zimmerman c65a3d4140
Merge pull request #1359 from RaspAP/maint/translations
Update de_DE locale + compile .mo
2023-06-23 08:17:34 +00:00
billz 593515cac6 Update de_DE locale + compile .mo 2023-06-23 09:08:43 +02:00
Bill Zimmerman d9249d85e2
Merge pull request #1358 from RaspAP/maint/translations
Update de_DE locale
2023-06-22 15:58:07 +00:00
billz 1a782e468d Update de_DE locale 100% - thx Jonas Stiegler 2023-06-22 13:08:34 +02:00
billz 9c79bf2368 Update link to translations doc 2023-06-10 06:01:41 +00:00
billz ebed27a0bd Update about w/ Gitter link 2023-06-09 16:00:39 +00:00
Bill Zimmerman 51da8020ee
Update README.md w/ gitter badge 2023-06-09 08:46:59 +02:00
Bill Zimmerman c3f7b17ef3
Merge pull request #1355 from RaspAP/feat/system-time
Adds system time to System > Basic tab
2023-06-05 06:37:50 +00:00
billz da091b9142 Add system time to System > Basic tab 2023-06-04 15:27:54 +00:00
billz 186af54185 Add iw_package when OS = ubuntu 2023-06-04 15:11:25 +00:00
billz 6b01e6afae Fix php8 uncaught fatal error: Unsupported operand types string * int 2023-06-04 14:19:28 +00:00
billz a69bf2c6dd Add _check_notify_ubuntu() 2023-06-04 12:26:15 +00:00
billz 5c9e842244 Fix php8 uncaught fatal error: ($value) must be of type Countable 2023-06-03 18:47:53 +00:00
billz e3a9919af1 Set php_package for Ubuntu 23.04 2023-06-03 18:43:55 +00:00
billz 20414b9ef1 Detect latest distro releases + set php_package 2023-06-02 12:52:52 +00:00
billz 5ee8270f47 Fix fatal error in php8 parse_ini_file() 2023-06-02 12:51:13 +00:00
billz 47cbd520d0 Update BACKERS.md 2023-05-21 15:46:08 +01:00
Bill Zimmerman 9ddff8f245
Merge pull request #1350 from RaspAP/feat/nohook-toggle
Implements nohook wpa_supplicant flag
2023-05-19 16:05:34 +00:00
billz 98d392d473 Implements nohook wpa_supplicant flag 2023-05-19 12:18:25 +01:00
billz c971c5c9bc Installer hotfix + update release version 2023-04-12 21:09:01 +01:00
billz c5eb4bc068 Update release version 2023-04-11 23:31:00 +01:00
billz c838a33deb Update _install_dependencies() 2023-04-11 23:29:04 +01:00
billz 810114613b Update release version 2023-04-11 10:14:22 +02:00
Bill Zimmerman dd6ff1ca92
Merge pull request #1337 from RaspAP/fix/installer
Fix: update _install_dependencies()
2023-04-11 08:10:53 +00:00
billz cb79429f27 Fix: update _install_dependencies() 2023-04-11 10:03:52 +02:00
Bill Zimmerman 9af19a9b74
Create SECURITY.md 2023-04-07 21:50:29 +02:00
Bill Zimmerman f17cb126fa
Merge pull request #1333 from RaspAP/security/wpa_cli
Input sanitization for wpa client
2023-04-07 10:39:52 +00:00
billz 157f29b858 Update sanitize wifi_client_interface var 2023-04-07 12:32:01 +02:00
Bill Zimmerman b70bce0d7b
Merge pull request #1335 from ldevillez/master
missing = in install script
2023-04-06 14:02:08 +00:00
ldevillez ac08a2cfaf missing = 2023-04-06 14:38:23 +02:00
billz 7adbfe143d Update connect var sanitization 2023-04-06 11:42:11 +02:00
Bill Zimmerman 6a295d46b8
Update Travis CI embed status image 2023-04-06 10:20:23 +02:00
Bill Zimmerman 9d3007194e
Merge pull request #1334 from RaspAP/feat/resetbtn
Feature: Restore settings
2023-04-06 06:22:40 +00:00
billz 11278542d1 Update label + en_US locale message 2023-04-05 20:11:37 +02:00
billz 7b43f64e87 Code scan fix: escape text before interpreting as html 2023-04-05 17:03:12 +02:00
billz 4bf83d4411 Update label w/ relevant doc link 2023-04-05 08:59:51 +02:00
billz 8f3ae2b376 Update en_US locale messages + compile .mo 2023-04-04 22:36:51 +02:00
billz 13a113f717 Add gettext strings to model data-message fields, error handling 2023-04-04 22:30:03 +02:00
billz 2499c7a712 Update modal dialog 2023-04-04 22:06:00 +02:00
billz bde68d8e30 Add system-reset ajax handler 2023-04-04 22:05:25 +02:00
billz 0d0aee916e Initial commit 2023-04-04 22:04:17 +02:00
billz bfcb420524 Update w/ reset tab + modal dialog 2023-04-03 18:48:45 +02:00
billz 55cd332861 Add js-system-reset-confirm handler 2023-04-03 18:47:58 +02:00
billz a07be6e3bd Input sanitization for wpa client 2023-04-03 15:20:01 +02:00
Bill Zimmerman ce7e84ec61
Merge pull request #1326 from eldstal/master
Input sanitization for wpa client, Fix for #1325
2023-04-01 00:19:23 +02:00
eldstal db6bf4c6b4 Additional type check on sensitive network ID parameter 2023-03-31 22:20:10 +02:00
billz 10738f5b7b Minor: add missing mkcert option to help 2023-03-30 18:43:24 +02:00
eldstal 30e35574a1 Input sanitization for wpa client, Fix for #1325 2023-03-30 12:18:38 +02:00
billz 592bce02bf Update release version 2023-03-29 10:16:51 +02:00
Bill Zimmerman fa22327719
Update BACKERS.md 2023-03-29 09:45:56 +02:00
Bill Zimmerman 238e1670fc
Merge pull request #1322 from RaspAP/maint/security
Sanitize hostapd input
2023-03-29 09:44:17 +02:00
billz 7760a1d7cb Update sanitize var method 2023-03-29 09:35:25 +02:00
billz 1e52ff598b Sanitize input with escapeshellarg() 2023-03-29 08:25:18 +02:00
Bill Zimmerman dda1fe6bbb
Merge pull request #1319 from RaspAP/feat/minwrite
Adds minimal SD card write support to installer
2023-03-28 21:33:00 +02:00
billz 454e5d7ea8 Update remove_packages + disable_services 2023-03-28 18:43:36 +02:00
billz b64faff248 Update w/ apt-get, install_status 2 (warning) on service disable 2023-03-26 12:01:38 +02:00
billz 0ba7833804 Add proceed check to _install_logger() 2023-03-26 10:08:01 +02:00
billz 33d99a0148 Minor: comments 2023-03-25 18:09:41 +01:00
billz 040160564f Create _install_minwrite() + functions 2023-03-25 17:51:00 +01:00
billz 41d21477fd Add -m --minwrite option and loader support 2023-03-25 17:49:52 +01:00
Bill Zimmerman 1532b3e58f
Merge pull request #1317 from RaspAP/maint/system-tab
Move theme UI under System tab
2023-03-25 12:05:28 +01:00
Bill Zimmerman fc95d844f3
Merge pull request #1318 from RaspAP/feat/signal-bars
Updates wifi client UI w/ RSSI signal bars
2023-03-25 12:01:57 +01:00
billz 7a2b319830 Set pointer-events prop for button w/ fas icon 2023-03-25 11:56:44 +01:00
billz fcdd966619 Update w/ gettext 2023-03-25 08:52:56 +01:00
billz 18c0623649 Apply misc styles from insiders 2023-03-24 15:42:05 +01:00
billz b20a4f012d Style + layout tweaks 2023-03-24 15:27:44 +01:00
billz 8b6e3e5edb Remove obsolete images 2023-03-24 15:11:02 +01:00
billz 6df78d125c Move common declarations to all.css 2023-03-24 15:09:41 +01:00
billz b01c005596 Initial commit 2023-03-24 15:08:49 +01:00
billz dbc0d0d65f Update w/ getSignalBars, hide/show passphrase glyphs 2023-03-24 12:04:34 +01:00
billz 162dbf74e0 Update js-toggle-password w/ fontawesome glyphs 2023-03-24 12:02:50 +01:00
billz 4850354630 Add .signal-icon + .signal-bar classes 2023-03-24 12:02:19 +01:00
billz 26bde30e95 Create getSignalBars(), add max/min RSSI constants 2023-03-24 12:01:47 +01:00
billz 39d7151da4 Move theme UI under System tab 2023-03-22 20:39:00 +01:00
Bill Zimmerman 8be62bb811
Merge pull request #1314 from RaspAP/mode-compatibility
Wireless mode tooltip
2023-03-21 08:44:08 +01:00
billz 7b3a7dba1d Move template logic to includes + code cleanup 2023-03-20 20:14:42 +01:00
billz 24abe9c53c Update wireless mode items 2023-03-20 20:00:28 +01:00
billz e95f12e91e Add 802.11ac tooltip help text, update messages + compile .mo 2023-03-20 19:14:24 +01:00
billz 9bc54336c2 Update messages + compile .mo 2023-03-19 16:53:40 +01:00
billz d5eb3c510e Update en_US locale w/ new messsages 2023-03-19 16:47:55 +01:00
billz 01af3d1c52 Add setHardwareModeTooltip(), fix webmanifest src attr 2023-03-19 16:47:30 +01:00
billz 6faa6d749a Return messages from ajax handler for gettext locale support 2023-03-19 16:45:56 +01:00
billz 2bfbbd4a47 Update templates w/ getTooltip(), add setHardwareModeTooltip 2023-03-19 16:45:09 +01:00
billz 67bf364b04 Add function getTooltip() 2023-03-19 16:44:18 +01:00
billz d4b107a07f Initial commit 2023-03-19 15:27:12 +01:00
billz fce63f1c35 Update release version 2023-03-09 11:36:20 +01:00
Bill Zimmerman 7cf64f7893
Merge pull request #1308 from RaspAP/maint/translations
Update de_DE messages + compile .mo
2023-02-23 15:35:10 +01:00
Bill Zimmerman 99de55778d
Merge pull request #1304 from RaspAP/feat/nav-insiders
Navbar icon linked to Insiders
2023-02-22 10:10:52 +01:00
billz 68c3e64a7c Update de_DE messages + compile .mo 2023-02-22 09:20:54 +01:00
billz b69147fb8d Add linked navbar icon 2023-02-18 16:19:41 +01:00
billz 122172a329 Update features list 2023-02-18 16:18:58 +01:00
Bill Zimmerman f969236d93
Merge pull request #1303 from RaspAP/fix/sanitize-input
Sanitize post data w/ escapeshellcmd()
2023-02-18 08:33:53 +01:00
billz 1fabc48169 Sanitize post data w/ escapeshellcmd() 2023-02-17 19:05:36 +01:00
Bill Zimmerman d19249757e
Merge pull request #1302 from RaspAP/fix/ajax-csrf
Fix: Update ajax files w/ CSRF check
2023-02-17 07:26:14 +01:00
billz 6a199aa581 Update require includes/csrf 2023-02-16 23:25:43 +01:00
Bill Zimmerman 7862d37279
Merge pull request #1300 from RaspAP/fix/passphrase
Fix: Limit preg_split to 2 parts
2023-02-09 19:03:10 +01:00
billz 65c1e58f77 Limit preg_split to 2 parts 2023-02-09 18:27:51 +01:00
Bill Zimmerman 2dcdbbd34e
Merge pull request #1294 from RaspAP/fix/getnetcfg
Resolve local server in getNetConfig() + minor fixes
2023-02-08 16:09:04 +01:00
Bill Zimmerman e8d2b6d707
Update feature_request.md 2023-02-08 09:04:09 +01:00
billz fd976a5dce Fix relative form action path 2023-02-05 13:53:18 +01:00
billz 3e1fbdf298 Fix for getNetConfig() resolving local server 2023-02-05 13:52:42 +01:00
97 changed files with 5467 additions and 2228 deletions

View File

@ -7,14 +7,14 @@ assignees: ''
---
**Is your feature request related to a problem? Please describe.**
## Is your feature request related to a problem?
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
## Describe the solution you'd like
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
## Additional context
Add any other context or screenshots about the feature request here.

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ yarn-error.log
*.swp
includes/config.php
rootCA.pem
vendor

View File

@ -10,7 +10,7 @@ Don't want to sponsor? No problem, RaspAP already has tons of features available
## How to become a sponsor
You can become a sponsor using your individual or organization's GitHub account. Just pick any tier from $10/month and complete the checkout. Then, after a few hours, you will be added as a team member to the super-secret private GitHub repository containing the Insiders edition, which has all exclusive features. In addition, you get access to Insiders-only team discussions and content.
> :information_source: **Important**: If you're sponsoring [RaspAP](https://github.com/RaspAP/sponsors) through a GitHub organization, please send a short email to [sponsors@raspap.com](mailto:sponsors@raspap.com) with the name of your organization and the account that should be added as a collaborator.
**Important**: If you're sponsoring [RaspAP](https://github.com/RaspAP/sponsors) through a GitHub organization, please send a short email to [sponsors@raspap.com](mailto:sponsors@raspap.com) with the name of your organization and the account that should be added as a collaborator.
## Exclusive features
The following features are currently available exclusively to sponsors. A tangible side benefit of sponsorship is that Insiders are able to help steer future development of RaspAP. This is done through Insiders' access to discussions, feature requests, issues and pull requests in the private GitHub repository.
@ -21,7 +21,11 @@ The following features are currently available exclusively to sponsors. A tangib
✅ [802.11w Protected Management Frames](https://docs.raspap.com/ap-basics/#80211w)
✅ [Printable Wi-Fi signs](https://docs.raspap.com/ap-basics/#printable-signs)
✅ [Drag & drop dashboard widgets](https://docs.raspap.com/ap-basics/#drag-drop-widgets)
⚙️ Traffic shaping (in progress)
✅ [MAC address cloning](https://docs.raspap.com/net-devices/#changing-the-mac-address)
✅ [Network diagnostics](https://docs.raspap.com/net-devices/#diagnostics)
✅ [WireGuard VPN kill switch](https://docs.raspap.com/wireguard/#kill-switch)
✅ [Dynamic DNS](https://docs.raspap.com/dynamicdns/)
✅ [Multiple WireGuard configs](https://docs.raspap.com/wireguard/#multiple-configs)
Look for the list above to grow as we add more exclusive features. Be sure to visit this page from time to time to learn about what's new, check the [Insiders docs page](https://docs.raspap.com/insiders/) and follow [@RaspAP on Twitter](https://twitter.com/rasp_ap) to stay updated.

View File

@ -1,5 +1,5 @@
![](https://i.imgur.com/xeKD93p.png)
[![Release 2.8.7](https://img.shields.io/badge/release-v2.8.7-green)](https://github.com/raspap/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi) [![Join Insiders](https://img.shields.io/static/v1?label=Join%20Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) ![https://travis-ci.com/github/raspap/raspap-webgui/](https://api.travis-ci.org/RaspAP/raspap-webgui.svg) [![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/)
[![Release 2.9.6](https://img.shields.io/badge/release-v2.9.6-green)](https://github.com/raspap/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi) [![Join Insiders](https://img.shields.io/static/v1?label=Join%20Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![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/) [![Join the chat at https://app.gitter.im/#/room/#RaspAP:gitter.im](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://app.gitter.im/#/room/#RaspAP:gitter.im)
RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our popular [Quick installer](#quick-installer) creates 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 and OpenVPN support, [SSL certificates](https://docs.raspap.com/ssl-quick/), security audits, [captive portal integration](https://docs.raspap.com/captive/), themes and [multilingual options](https://docs.raspap.com/translations/) are included.
@ -32,7 +32,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 Raspberry Pi OS (32-bit) Lite](https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit). The Raspberry Pi OS desktop and 64-bit beta distros are unsupported.
Start with a clean install of the [latest release of Raspberry Pi OS Lite](https://www.raspberrypi.com/software/operating-systems/). Both the 32- and 64-bit Lite versions are supported. The Raspberry Pi OS desktop distro is [unsupported](https://docs.raspap.com/faq/#distros).
1. Update Raspbian, including the kernel and firmware, followed by a reboot:
```

27
SECURITY.md Normal file
View File

@ -0,0 +1,27 @@
# Security Policy
The RaspAP team and community take all security vulnerabilities seriously. This document outlines security procedures and general policies for the RaspAP open source projects as found on https://github.com/RaspAP/.
If you believe you have found a security vulnerability in any RaspAP-owned repository, please report it to us as described below.
## Reporting a vulnerability in RaspAP
Thank you for improving the security of our open source software.
We appreciate your efforts and responsible disclosure, and will make every effort to acknowledge your contributions.
Please report (suspected) security vulnerabilities to [security@raspap.com](mailto:security@raspap.com). The requested information listed below will help us better understand the nature and scope of the possible issue:
1. Type of issue (eg. shell exploit, cross-site scripting, etc.)
2. Full paths of source file(s) related to the manifestation of the issue
3. The location of the affected source code (tag/branch/commit or direct URL)
4. Any special configuration required to reproduce the issue
5. Step-by-step instructions to reproduce the issue
6. Proof-of-concept or exploit code (if possible)
7. Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
You will receive a response from us within 48 hours. Developers may ask for additional information or clarity on your report.
If the issue is confirmed, we will release a patch as soon as possible depending on complexity, but historically within a few days.
## Third-party modules
Report security vulnerabilities in third-party modules to the person or team maintaining the module.

View File

@ -4,21 +4,50 @@ require '../../includes/csrf.php';
require_once '../../includes/config.php';
if (isset($_POST['blocklist_id'])) {
$blocklist_id = $_POST['blocklist_id'];
$notracking_url = "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/";
$blocklist_id = escapeshellcmd($_POST['blocklist_id']);
switch ($blocklist_id) {
case "notracking-hostnames":
$file = "hostnames.txt";
break;
case "notracking-domains":
$file = "domains.txt";
break;
case "StevenBlack/hosts \(default\)":
$list_url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts";
$dest_file = "hostnames.txt";
break;
case "badmojr/1Hosts \(Mini\)":
$list_url = "https://badmojr.github.io/1Hosts/mini/hosts.txt";
$dest_file = "hostnames.txt";
break;
case "badmojr/1Hosts \(Lite\)":
$list_url = "https://badmojr.github.io/1Hosts/Lite/hosts.txt";
$dest_file = "hostnames.txt";
break;
case "badmojr/1Hosts \(Pro\)":
$list_url = "https://badmojr.github.io/1Hosts/Pro/hosts.txt";
$dest_file = "hostnames.txt";
break;
case "badmojr/1Hosts \(Xtra\)":
$list_url = "https://badmojr.github.io/1Hosts/Xtra/hosts.txt";
$dest_file = "hostnames.txt";
break;
case "oisd/big \(default\)":
$list_url = "https://big.oisd.nl/dnsmasq";
$dest_file = "domains.txt";
break;
case "oisd/small":
$list_url = "https://small.oisd.nl/dnsmasq";
$dest_file = "domains.txt";
break;
case "oisd/nsfw":
$list_url = "https://nsfw.oisd.nl/dnsmasq";
$dest_file = "domains.txt";
break;
}
$blocklist = $notracking_url . $file;
$blocklist = $list_url . $dest_file;
$dest = substr($dest_file, 0, strrpos($dest_file, "."));
exec("sudo /etc/raspap/adblock/update_blocklist.sh $blocklist $file " .RASPI_ADBLOCK_LISTPATH, $return);
$jsonData = ['return'=>$return];
exec("sudo /etc/raspap/adblock/update_blocklist.sh $list_url $dest_file " .RASPI_ADBLOCK_LISTPATH, $return);
$jsonData = ['return'=>$return,'list'=>$dest];
echo json_encode($jsonData);
} else {
$jsonData = ['return'=>2,'output'=>['Error getting data']];
echo json_encode($jsonData);
}

View File

@ -3,12 +3,6 @@
require '../../includes/csrf.php';
require_once '../../includes/config.php';
require_once RASPI_CONFIG.'/raspap.php';
header('X-Frame-Options: DENY');
header("Content-Security-Policy: default-src 'none'; connect-src 'self'");
require_once '../../includes/authenticate.php';
$interface = filter_input(INPUT_GET, 'inet', FILTER_SANITIZE_SPECIAL_CHARS);
if (empty($interface)) {

View File

@ -1,10 +1,11 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/config.php';
require_once '../../includes/functions.php';
if (isset($_POST['logfile'])) {
$logfile = $_POST['logfile'];
$logfile = escapeshellcmd($_POST['logfile']);
// truncate requested log file
exec("sudo truncate -s 0 $logfile", $return);

View File

@ -0,0 +1,35 @@
<?php
require_once '../../includes/config.php';
require_once '../../includes/session.php';
require_once '../../includes/functions.php';
if (isset($_POST['csrf_token'])) {
if (csrfValidateRequest() && !CSRFValidate()) {
handleInvalidCSRFToken();
}
$return = 0;
$path = "../../config";
$configs = array(
array("src" => $path .'/hostapd.conf', "tmp" => "/tmp/hostapddata", "dest" => RASPI_HOSTAPD_CONFIG),
array("src" => $path .'/dhcpcd.conf', "tmp" => "/tmp/dhcpddata", "dest" => RASPI_DHCPCD_CONFIG),
array("src" => $path .'/090_wlan0.conf', "tmp" => "/tmp/dnsmasqdata", "dest" => RASPI_DNSMASQ_PREFIX.'wlan0.conf'),
array("src" => $path .'/090_raspap.conf', "tmp" => "/tmp/dnsmasqdata", "dest" => RASPI_DNSMASQ_PREFIX.'raspap.conf'),
);
foreach ($configs as $config) {
try {
$tmp = file_get_contents($config["src"]);
file_put_contents($config["tmp"], $tmp);
system("sudo cp ".$config["tmp"]. " ".$config["dest"]);
} catch (Exception $e) {
$return = $e->getCode();
}
}
$jsonData = ['return'=>$return];
echo json_encode($jsonData);
} else {
handleInvalidCSRFToken();
}

View File

@ -0,0 +1,43 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/config.php';
require_once '../../includes/locale.php';
if (isset($_POST['interface'])) {
define( 'NL80211_BAND_24GHZ', 0x1 );
define( 'NL80211_BAND_5GHZ', 0x2 );
$iface = escapeshellcmd($_POST['interface']);
$flags = 0;
// get physical device for selected interface
exec("iw dev | awk '/$iface/ {print line}{line = $0}'", $return);
$phy = $return[0];
// get frequencies supported by device
exec('iw '.$phy.' info | sed -rn "s/^.*\*\s([0-9]{4})\sMHz.*/\1/p"', $frequencies);
if (count(preg_grep('/^24[0-9]{2}/i', $frequencies)) >0) {
$flags += NL80211_BAND_24GHZ;
}
if (count(preg_grep('/^5[0-9]{3}/i', $frequencies)) >0) {
$flags += NL80211_BAND_5GHZ;
}
switch ($flags) {
case NL80211_BAND_24GHZ:
$msg = sprintf(_("The selected interface (%s) has support for the 2.4 GHz wireless band only."), $iface);
break;
case NL80211_BAND_5GHZ:
$msg = sprintf(_("The selected interface (%s) has support for the 5 GHz wireless band only."), $iface);
break;
case NL80211_BAND_24GHZ | NL80211_BAND_5GHZ:
$msg = sprintf(_("The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."), $iface);
break;
default:
$msg = sprintf(_("The selected interface (%s) does not support wireless mode operation."), $iface);
}
echo json_encode($msg);
}

View File

@ -46,6 +46,7 @@ if (isset($interface)) {
preg_match('/static\sdomain_name_server=(.*)/', $matched[0], $static_dns);
preg_match('/fallback\sstatic_'.$interface.'/', $matched[0], $fallback);
preg_match('/(?:no)?gateway/', $matched[0], $gateway);
preg_match('/nohook\swpa_supplicant/', $matched[0], $nohook_wpa_supplicant);
$dhcpdata['Metric'] = $metric[1];
$dhcpdata['StaticIP'] = strpos($static_ip[1],'/') ? substr($static_ip[1], 0, strpos($static_ip[1],'/')) : $static_ip[1];
$dhcpdata['SubnetMask'] = cidr2mask($static_ip[1]);
@ -53,6 +54,7 @@ if (isset($interface)) {
$dhcpdata['StaticDNS'] = $static_dns[1];
$dhcpdata['FallbackEnabled'] = empty($fallback) ? false: true;
$dhcpdata['DefaultRoute'] = $gateway[0] == "gateway";
$dhcpdata['NoHookWPASupplicant'] = $nohook_wpa_supplicant[0] == "nohook wpa_supplicant";
echo json_encode($dhcpdata);
}

View File

@ -3,7 +3,7 @@
require '../../includes/csrf.php';
require_once '../../includes/config.php';
$entity = $_POST['entity'];
$entity = escapeshellcmd($_POST['entity']);
if (isset($entity)) {

View File

@ -1,10 +1,11 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/config.php';
require_once '../../includes/functions.php';
if (isset($_POST['cfg_id'])) {
$ovpncfg_id = $_POST['cfg_id'];
$ovpncfg_id = escapeshellcmd($_POST['cfg_id']);
$ovpncfg_client = RASPI_OPENVPN_CLIENT_PATH.$ovpncfg_id.'_client.conf';
$ovpncfg_login = RASPI_OPENVPN_CLIENT_PATH.$ovpncfg_id.'_login.conf';

View File

@ -1,10 +1,11 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/config.php';
require_once '../../includes/functions.php';
if (isset($_POST['cfg_id'])) {
$ovpncfg_id = $_POST['cfg_id'];
$ovpncfg_id = escapeshellcmd($_POST['cfg_id']);
$ovpncfg_files = pathinfo(RASPI_OPENVPN_CLIENT_LOGIN, PATHINFO_DIRNAME).'/'.$ovpncfg_id.'_*.conf';
exec("sudo rm $ovpncfg_files", $return);
$jsonData = ['return'=>$return];

View File

@ -0,0 +1,21 @@
<?php
require '../../includes/csrf.php';
$action = escapeshellcmd($_POST['a']);
if (isset($action)) {
switch($action) {
case "reboot":
$response = shell_exec("sudo /sbin/reboot");
break;
case "shutdown":
$response = shell_exec("sudo /sbin/shutdown -h now");
break;
default:
$response = 'Unknown action: '.$action;
}
echo json_encode($response);
}

235
app/css/all.css Normal file
View File

@ -0,0 +1,235 @@
/*
Name: all.css
Author: @billz
Author URI: https://github.com/billz
Description: Classes shared by all themes
License: GNU General Public License v3.0
*/
/* Small devices (portrait phones, up to 576px) */
@media (max-width: 576px) {
.container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; }
.card .card-header { padding: .75rem .5rem; font-size: 1.0rem; }
.row { margin-left: 0rem; margin-right: 0rem; }
.col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; }
.form-group.col-md-6 { margin-left: -0.5rem; }
h4.mt-3 { margin-left: 0.5rem; }
}
.sidebar-brand-text {
text-transform: none;
color: #212529;
font-size: 2.0rem;
font-weight: 500;
font-family: Helvetica, Arial, sans-serif;
}
.h-underlined {
border-bottom: 1px solid #e3e6f0;
padding-bottom: 0.3rem;
}
.navbar-logo {
margin-top: 0.5em;
margin-left: 0.5em;
}
.page-header {
font-size: 26pt;
margin: 20px 0 20px;
}
.info-item {
text-transform: uppercase;
font-size: 0.7em;
color: #858796;
}
.info-value {
font-size: 0.7rem;
margin-left: 0.7rem;
}
.info-item-xs {
font-size: 0.7rem;
margin-left: 0.3rem;
}
.info-item-wifi {
width: 6rem;
float: left;
}
.service-status {
border-width: 0;
align-items: center;
}
.service-status-up {
color: #a1ec38 !important;
}
.service-status-warn {
color: #f6f044 !important;
}
.service-status-down {
color: #f80107 !important;
animation: flash 1s linear infinite;
}
@keyframes flash {
50% {
opacity: 0;
}
}
.logoutput {
width:100%;
height: 20rem;
border: 1px solid #d1d3e2;
border-radius: .35rem;
}
.dhcp-static-leases {
margin-top: 1em;
margin-bottom: 1em;
}
.dhcp-static-lease-row {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.loading-spinner {
background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent;
min-height: 450px;
width: 100%;
}
@media (min-width: 576px) {
.card-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 50%;
grid-gap: 1rem;
}
}
.toggle-off.btn {
padding-left: 1.2rem;
font-size: 0.9rem!important;
}
.toggle-on.btn {
font-size: 0.9rem!important;
}
canvas#divDBChartBandwidthhourly {
height: 350px!important;
}
.chart-container {
height: 150px;
width: 200px;
}
.dbChart {
display: flex;
height: 80%;
}
.table {
margin-bottom: 0rem;
}
.check-hidden {
visibility: hidden;
}
.check-progress {
color: #999;
}
.fa-check {
color: #90ee90;
}
.fa-times {
color: #ff4500;
}
button.btn.btn-light.js-toggle-password {
border: 1px solid lightgrey;
}
.signal-icon {
margin-top: 2px;
height: 16px;
width: 16px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: baseline;
}
.signal-icon .signal-bar {
width: 4px;
border-radius: 1px;
opacity: 30%;
background: <?php echo $color; ?>;
}
.signal-icon .signal-bar:nth-child(1) { height: 40%; }
.signal-icon .signal-bar:nth-child(2) { height: 70%; }
.signal-icon .signal-bar:nth-child(3) { height: 100%; }
.signal-icon.weak .signal-bar:nth-child(1),
.signal-icon.medium .signal-bar:nth-child(1),
.signal-icon.medium .signal-bar:nth-child(2),
.signal-icon.strong .signal-bar:nth-child(1),
.signal-icon.strong .signal-bar:nth-child(2),
.signal-icon.strong .signal-bar:nth-child(3)
{ opacity: 100%; }.signal-icon {
margin-top: 2px;
height: 16px;
width: 16px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: baseline;
}
.signal-icon .signal-bar {
width: 4px;
border-radius: 1px;
opacity: 30%;
}
.signal-icon .signal-bar:nth-child(1) { height: 40%; }
.signal-icon .signal-bar:nth-child(2) { height: 70%; }
.signal-icon .signal-bar:nth-child(3) { height: 100%; }
.signal-icon.weak .signal-bar:nth-child(1),
.signal-icon.medium .signal-bar:nth-child(1),
.signal-icon.medium .signal-bar:nth-child(2),
.signal-icon.strong .signal-bar:nth-child(1),
.signal-icon.strong .signal-bar:nth-child(2),
.signal-icon.strong .signal-bar:nth-child(3)
{ opacity: 100%; }
.gs-edit {
border: 1px dashed #ccc;
background-color: #f1faee;
border-radius: 4px;
}
figcaption.figure-caption a {
color: #858796;
}
button > i.fas {
pointer-events: none;
}
.close {
font-weight: 400;
font-size: 1.3rem;
}

View File

@ -12,46 +12,16 @@ Description: Default theme for RaspAP
License: GNU General Public License v3.0
*/
@import url('all.css');
body {
color: #212529;
}
.h-underlined {
border-bottom: 1px solid #e3e6f0;
padding-bottom: 0.3rem;
}
.page-header {
margin: 20px 0 20px;
}
.navbar-logo {
margin-top: 0.5em;
margin-left: 0.5em;
}
/* Small devices (portrait phones, up to 576px) */
@media (max-width: 576px) {
.container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; }
.card .card-header { padding: .75rem .5rem; font-size: 1.0rem; }
.row { margin-left: 0rem; margin-right: 0rem; }
.col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; }
.form-group.col-md-6 { margin-left: -0.5rem; }
h4.mt-3 { margin-left: 0.5rem; }
}
.sidebar {
background-color: #f8f9fc;
}
.sidebar-brand-text {
text-transform: none;
color: #212529;
font-size: 2.0rem;
font-weight: 500;
font-family: Helvetica, Arial, sans-serif;
}
.sidebar .nav-item.active .nav-link {
font-weight: 500;
}
@ -122,87 +92,12 @@ i.fa.fa-bars:hover{
color: #6e707e;
}
.info-item {
text-transform: uppercase;
font-size: 0.7em;
color: #858796;
}
.info-value {
font-size: 0.7rem;
margin-left: 0.7rem;
}
.info-item-xs {
font-size: 0.7rem;
margin-left: 0.3rem;
}
.info-item-wifi {
width: 6rem;
float: left;
}
.service-status {
border-width: 0;
align-items: center;
}
.service-status-up {
color: #a1ec38;
}
.service-status-warn {
color: #f6f044;
}
.service-status-down {
color: #f80107;
animation: flash 1s linear infinite;
}
@keyframes flash {
50% {
opacity: 0;
}
}
.logoutput {
width:100%;
height: 20rem;
border: 1px solid #d1d3e2;
border-radius: .35rem;
}
pre.unstyled {
border-width: 0;
background-color: transparent;
padding: 0;
}
.dhcp-static-leases {
margin-top: 1em;
margin-bottom: 1em;
}
.dhcp-static-lease-row {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.loading-spinner {
background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent;
min-height: 150px;
width: 100%;
}
@media (min-width: 576px) {
.card-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 50%;
grid-gap: 1rem;
}
}
.sidebar.toggled .nav-item .nav-link span {
display: none;
} .sidebar .nav-item .nav-link i,
@ -214,46 +109,7 @@ pre.unstyled {
color: #000;
}
.toggle-off.btn {
padding-left: 1.2rem;
font-size: 0.9rem!important;
}
.toggle-on.btn {
font-size: 0.9rem!important;
}
canvas#divDBChartBandwidthhourly {
height: 350px!important;
}
.chart-container {
height: 150px;
width: 200px;
}
.table {
margin-bottom: 0rem;
}
.check-hidden {
visibility: hidden;
}
.check-updated {
opacity: 0;
color: #90ee90;
}
.check-progress {
color: #999;
}
.fa-check {
color: #90ee90;
}
.fa-times {
color: #ff4500;
.signal-icon .signal-bar {
background: <?php echo $color; ?>;
}

View File

@ -6,6 +6,8 @@ Description: A theme inspired by HackerNews for RaspAP
License: GNU General Public License v3.0
*/
@import url('all.css');
html * {
font-family: Verdana, Geneva, sans-serif;
color: #828282;
@ -33,13 +35,8 @@ h5.card-title {
color: #212529;
}
.h-underlined {
border-bottom: 1px solid #e3e6f0;
padding-bottom: 0.3rem;
}
.card, .modal-dialog {
border-radius: 1px;
border-radius: 3px;
border-color: #ff6600;
}
@ -71,14 +68,6 @@ h5.card-title {
border-radius: 0px;
}
.sidebar-brand-text {
text-transform: none;
color: #212529;
font-size: 2.0rem;
font-weight: 500;
font-family: Verdana, Geneva, sans-serif;
}
.sidebar-light hr.sidebar-divider {
padding-top: 0.5rem;
}
@ -90,38 +79,19 @@ ul.nav-tabs, .nav-tabs .nav-link {
.sidebar .nav-item .nav-link {
padding: 0.6rem;
margin-left: 0.6rem;
}
.sidebar-light .nav-item.active .nav-link {
font-weight: 300;
}
.page-header {
font-size: 26pt;
margin: 10px 0 20px;
}
.navbar-logo {
margin-top: 0.5em;
margin-left: 0.5em;
}
#wrapper,#page-wrapper,
#wrapper #content-wrapper,
.nav>li>a,.nav {
background-color: #fff;
}
/* Small devices (portrait phones, up to 576px) */
@media (max-width: 576px) {
.container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; }
.card .card-header { padding: .75rem .5rem; font-size: 1.0rem; }
.row { margin-left: 0rem; margin-right: 0rem; }
.col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; }
.form-group.col-md-6 { margin-left: -0.5rem; }
h4.mt-3 { margin-left: 0.5rem; }
}
.card-body {
background-color: #f6f6ef;
}
@ -152,60 +122,8 @@ ul.nav-tabs, .nav-tabs .nav-link {
color: #eee;
}
.info-item {
text-transform: uppercase;
font-size: 0.7em;
color: #858796;
}
.info-value {
font-size: 0.7rem;
margin-left: 0.7rem;
}
.info-item-xs {
font-size: 0.7rem;
margin-left: 0.3rem;
line-height: 1.5em;
}
.info-item-wifi {
width: 6rem;
float: left;
}
.logoutput {
width: 100%;
height: 20rem;
border: 1px solid #d1d3e2;
border-radius: .35rem;
}
.service-status {
border-width: 0;
align-items: center;
}
.service-status-up {
color: #a1ec38!important;
}
.service-status-warn {
color: #f6f044!important;
}
.service-status-down {
color: #f80107!important;
animation: flash 1s linear infinite;
}
@keyframes flash {
50% {
opacity: 0;
}
}
.fas.fa-circle {
font-size: 0.5rem;
font-size: 0.7rem;
}
.logoutput {
@ -219,30 +137,6 @@ pre.unstyled {
padding: 0;
}
.dhcp-static-leases {
margin-top: 1em;
margin-bottom: 1em;
}
.dhcp-static-lease-row {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.loading-spinner {
background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent;
min-height: 150px;
width: 100%;
}
@media (min-width: 576px) {
.card-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 50%;
grid-gap: 1rem;
}
}
.sidebar.toggled .nav-item .nav-link {
text-align: center;
padding: .6rem 1rem;
@ -260,45 +154,7 @@ pre.unstyled {
color: #000;
}
.toggle-off.btn {
padding-left: 0.9rem;
font-size: 0.9rem!important;
}
.toggle-on.btn {
font-size: 0.9rem!important;
}
canvas#divDBChartBandwidthhourly {
height: 350px!important;
}
.chart-container {
height: 150px;
width: 200px;
}
.table {
margin-bottom: 0rem;
}
.check-hidden {
visibility: hidden;
}
.check-updated {
opacity: 0;
color: #1cc88a;
}
.check-progress {
color: #999;
}
.fa-check {
color: #90ee90;
}
.fa-times {
color: #ff4500;
.signal-icon .signal-bar {
background: #ff6600;
}

View File

@ -6,6 +6,8 @@ Description: A dark mode theme for RaspAP
License: GNU General Public License v3.0
*/
@import url('all.css');
html * {
font-family: Helvetica,Arial,sans-serif;
color: #afafaf;
@ -23,20 +25,9 @@ h5.card-title {
font-size: 1.2rem;
}
.h-underlined {
border-bottom: 1px solid #e3e6f0;
padding-bottom: 0.3rem;
}
.page-header {
padding: 0 20px;
border-left: .01rem solid #d2d2d2;
}
.navbar-logo {
margin-top: 0.5em;
margin-left: 0.5em;
filter: brightness(70%);
border-bottom: .01rem solid #d2d2d2;
}
.sidebar-light .nav-item.active .nav-link i {
@ -51,16 +42,6 @@ h5.card-title {
background-color: #202020;
}
/* Small devices (portait phones, up to 576px) */
@media (max-width: 576px) {
.container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; }
.card .card-header { padding: .75rem .5rem; font-size: 1.0rem; }
.row { margin-left: 0rem; margin-right: 0rem; }
.col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; }
.form-group.col-md-6 { margin-left: -0.5rem; }
h4.mt-3 { margin-left: 0.5rem; }
}
.topbar {
background-color: #202020;
}
@ -95,7 +76,6 @@ h5.card-title {
}
#content, .navbar, .sidebar, .footer, .sticky-footer {
background-image: url('/app/img/bg.png');
background-attachment: scroll;
background-repeat: repeat;
background-size: auto;
@ -159,18 +139,8 @@ hr {
border-top: .01rem solid #d2d2d2;
}
.page-header {
font-size: 24pt;
margin: 10px 0 20px;
border-bottom: .01rem solid #d2d2d2;
}
.sidebar-brand-text {
text-transform: none;
color: #ac1b3d;
font-size: 2.0rem;
font-weight: 500;
font-family: inherit;
color: #2b8080 !important;
}
.ra-raspap:before {
@ -252,28 +222,6 @@ hr {
border-right: 1px solid #404040;
}
.info-item {
text-transform: uppercase;
font-size: 0.7em;
color: #858796;
}
.info-value {
font-size: 0.7rem;
margin-left: 0.7rem;
}
.info-item-xs {
font-size: 0.7rem;
line-height: 1.5em;
margin-left: 0.5rem;
}
.info-item-wifi {
width: 6rem;
float: left;
}
.label-warning {
background-color: #d2d2d2;
}
@ -367,15 +315,25 @@ color: #d2d2d2 !important
background-color: #d2d2d2;
}
.logoutput {
width: 100%;
height: 300px;
background-color: #202020;
border-color: #404040;
.figure-img {
filter: opacity(0.7);
}
tspan, rect {
fill: #d2d2d2;
.ra-wireguard:before {
color: #404040 !important;
}
.ra-wireguard:hover:before {
color: #d1d3e2 !important;
}
.sidebar .nav-item.active .nav-link span.ra-wireguard:before {
color: #d2d2d2 !important;
}
.logoutput {
background-color: #202020;
border-color: #404040;
}
.text-muted {
@ -383,29 +341,7 @@ tspan, rect {
}
.fas.fa-circle {
font-size: 0.5rem;
}
.service-status {
align-items: center;
}
.service-status-up {
color: #a1ec38 !important;
}
.service-status-warn {
color: #f6f044 !important;
}
.service-status-down {
color: #f80107 !important;
animation: flash 1s linear infinite;
}
@keyframes flash {
50% {
opacity: 0;
}
font-size: 0.7rem;
}
pre {
@ -413,74 +349,12 @@ pre {
border: #202020;
}
.dhcp-static-leases {
margin-top: 1em;
margin-bottom: 1em;
button.btn.btn-light.js-toggle-password {
border: 1px solid #343434;
}
.dhcp-static-lease-row {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.loading-spinner {
background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent;
min-height: 150px;
width: 100%;
}
@media (min-width: 576px) {
.card-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 50%;
grid-gap: 1rem;
}
}
.toggle-off.btn {
padding-left: 1.2rem;
font-size: 0.9rem!important;
}
.toggle-on.btn {
font-size: 0.9rem!important;
}
canvas#divDBChartBandwidthhourly {
height: 350px!important;
}
.chart-container {
height: 150px;
width: 200px;
}
.table {
margin-bottom: 0rem;
}
.figure, .authors {
filter: brightness(70%) !important;
}
.check-hidden {
visibility: hidden;
}
.check-updated {
opacity: 0;
color: #1cc88a;
}
.check-progress {
color: #999;
}
.fa-check {
color: #90ee90;
}
.fa-times {
color: #ff4500;
.signal-icon .signal-bar {
background: #2b8080;
}

627
app/css/material-dark.php Normal file
View File

@ -0,0 +1,627 @@
<?php header("Content-Type: text/css; charset=utf-8"); ?>
<?php
require_once '../../includes/functions.php';
$color = getColorOpt();
?>
/*
Theme Name: Material Dark
Author: @marek-guran
Author URI: https://github.com/marek-guran
Description: Inspired by Google's Material You Design
License: GNU General Public License v3.0
*/
<?php
// Base color
$baseColor = $color;
// Function to darken a color by a percentage
function darkenColor($color, $percent)
{
$percent /= 100;
$r = hexdec(substr($color, 1, 2));
$g = hexdec(substr($color, 3, 2));
$b = hexdec(substr($color, 5, 2));
$r = round($r * (1 - $percent));
$g = round($g * (1 - $percent));
$b = round($b * (1 - $percent));
return sprintf("#%02x%02x%02x", $r, $g, $b);
}
// Function to lighten a color by a percentage
function lightenColor($color, $percent)
{
$percent /= 100;
$r = hexdec(substr($color, 1, 2));
$g = hexdec(substr($color, 3, 2));
$b = hexdec(substr($color, 5, 2));
$r = round($r + (255 - $r) * $percent);
$g = round($g + (255 - $g) * $percent);
$b = round($b + (255 - $b) * $percent);
return sprintf("#%02x%02x%02x", $r, $g, $b);
}
$textColor = lightenColor($baseColor, 95);
// Create other color variables
$cardsColor = darkenColor($baseColor, 60);
$secondaryColor = lightenColor($baseColor, 30);
$primaryColor = $baseColor;
$backgroundColor = darkenColor($baseColor, 90);
?>
@import url('all.css');
body {
background-color: <?php echo $backgroundColor; ?>;
}
html * {
font-family: Helvetica,Arial,sans-serif;
color: <?php echo $textColor; ?>;
}
.nav-item.active .nav-link {
position: relative;
background-color: <?php echo $secondaryColor; ?>;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
border-top-right-radius: 18px;
border-bottom-right-radius: 18px;
}
h2 {
font-size: 2rem !important;
}
h4 {
font-size: 1.3rem;
}
h5.card-title {
font-size: 1.2rem;
}
.page-header {
border-left: .01rem solid <?php echo $secondaryColor; ?>;
border-bottom: .01rem solid <?php echo $secondaryColor; ?>;
}
.sidebar-light .nav-item.active .nav-link i {
color: <?php echo $textColor; ?>;
}
.sidebar .nav-item.active .nav-link {
font-weight: 400;
}
.sidebar .nav-item .nav-link span:hover {
color: <?php echo $textColor; ?>!important;
}
#wrapper #content-wrapper #content {
background-color: <?php echo $backgroundColor; ?>;
}
.topbar {
background-color: <?php echo $backgroundColor; ?>;
}
.col {
color: <?php echo $textColor; ?>;
}
.card-header .col i.fa-tachometer-alt,
.card-header .col i.fa-dot-circle,
.card-header .col i.fa-wifi,
.card-header .col i.fa-exchange-alt,
.card-header .col i.fa-hand-paper,
.card-header .col i.fa-network-wired,
.card-header .col i.fa-key,
.card-header .ra-wireguard,
.card-header .ra-wireguard:before,
.card-header .col i.fa-user-lock,
.card-header .col i.fa-chart-bar,
.card-header .col i.fa-cube,
.card-header .col i.fa-info-circle,
.card-header .col i.fa-globe,
.card-header .col i.fa-shield-alt {
color: <?php echo $textColor; ?>;
}
i.fa-bars {
color: <?php echo $primaryColor; ?>;
}
.nav-tabs {
border-bottom: 1px solid <?php echo $secondaryColor; ?>;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link {
font-size: 1.0rem;
border-top-left-radius: 18px;
border-top-right-radius: 18px;
}
.nav-tabs .nav-link:hover {
border-color: transparent;
}
.navbar-default .navbar-brand:hover {
color: #d2d2d2;
}
.navbar-default .navbar-toggle {
border-color: transparent;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #d2d2d2;
}
.navbar-default .navbar-toggle:focus,
.navbar-default .navbar-toggle:hover {
background-color: <?php echo $backgroundColor; ?>;
}
#content, .navbar, .sidebar, .footer, .sticky-footer {
background-attachment: scroll;
background-repeat: repeat;
background-size: auto;
background-position: 0 0;
background-origin: padding-box;
background-clip: border-box;
}
.sticky-footer {
background-position: 30px 0;
}
.sidebar {
background-position: 0 20px;
}
.nav-tabs .nav-link.active {
color: <?php echo $textColor; ?>;
background-color: <?php echo $secondaryColor; ?>;
border-color: transparent;
}
a:focus, a:hover {
color: #d2d2d2;
}
.card>.card-header, .modal-content, .modal-header {
border-color: transparent;
background-color: <?php echo $primaryColor; ?>;
color: <?php echo $textColor; ?>;
border-radius: 18px;
font-size: 1.0rem;
font-weight: 400;
}
.modal-body {
background-color: <?php echo $backgroundColor; ?>;
}
.card-header {
border-bottom-left-radius: 0px!important;
border-bottom-right-radius: 0px!important;
position: relative;
margin-bottom: -18px;
}
.card>.card-header .fa {
color: <?php echo $backgroundColor; ?>;
}
.card-header [class^="fa"] {
color: <?php echo $textColor; ?>;
font-size: 1.0rem;
}
.card, .card-body {
border-color: transparent;
border-radius: 18px;
background-color: <?php echo $cardsColor; ?>;
box-shadow: 0px -5px 5px rgba(0, 0, 0, 0.1),
0px 4px 6px rgba(0, 0, 0, 0.1);
}
.card-body {
padding-top: 36px; /* 18px to move down + 18px space at the top */
padding-bottom: 36px; /* 18px space at the bottom */
}
.unstyled {
background-color: <?php echo $cardsColor; ?>;
color: <?php echo $textColor; ?>;
}
hr {
border-top: .01rem solid <?php echo $secondaryColor; ?>;
}
.sidebar-brand-text {
color: <?php echo $secondaryColor; ?>;
}
.ra-raspap:before {
color: #ac1b3d !important;
}
.sidebar-light #sidebarToggle {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>; !important
}
.sidebar-light #sidebarToggle::after {
color: <?php echo $textColor; ?>;
}
.sidebar-light .nav-item .nav-link:hover i {
color: <?php echo $textColor; ?>;
}
.sidebar-light #sidebarToggle:hover {
background-color: <?php echo $secondaryColor; ?>;
}
.sidebar.toggled .nav-item .nav-link span {
display: none;
}
.sidebar.toggled .nav-item .nav-link {
text-align: center;
padding: .6rem 1rem;
width: 6.5rem;
}
.card-footer, .modal-footer {
background-color: <?php echo $primaryColor; ?>;
color: <?php echo $textColor; ?>;
border-top: 0px;
border-bottom-right-radius: 18px!important;
border-bottom-left-radius: 18px!important;
position: relative;
margin-top: -18px;
}
.modal-footer {
border-radius: 18px;
}
.card>.card-header::before, .navbar-default::before {
content: " ";
display: block;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 2;
background-size: 100% 2px, 3px 100%;
pointer-events: none;
}
.sidebar-light, .sticky-footer {
background-color: <?php echo $backgroundColor; ?>;
}
.sidebar-light .nav-item .nav-link i {
color: rgba(230, 230, 230, .3);
}
.sidebar .nav-item .nav-link {
padding: 0.6rem;
padding-left: 1.2rem;
}
.sidebar-light hr.sidebar-divider {
border-top: 1px solid <?php echo $secondaryColor; ?>;
padding-top: 0.5rem;
}
.sidebar .nav-item .nav-link span {
font-size: 1.0rem;
}
.topbar .topbar-divider {
border-right: 1px solid <?php echo $secondaryColor; ?>;
}
.label-warning {
background-color: #d2d2d2;
}
span.label.label-warning {
color: <?php echo $backgroundColor; ?>;
}
.table>tbody>tr>td,
.table>tbody>tr>th,
.table>tfoot>tr>td,
.table>tfoot>tr>th,
.table>thead>tr>td,
.table>thead>tr>th {
background-color: <?php echo $primaryColor; ?>;
border-top: .01rem solid <?php echo $backgroundColor; ?>;
}
.table{
border-radius: 18px;
overflow: hidden;
}
.table>thead>tr>th {
vertical-align: bottom;
border-bottom: 0 solid <?php echo $secondaryColor; ?>;
}
[class*="btn"], [class*="btn"]:focus, [class*="btn"]:disabled {
background-color: <?php echo $secondaryColor; ?>;
border-color: transparent;
border-radius: 18px;
color: <?php echo $textColor; ?>;
}
[class*="btn"]:hover {
border-radius: 18px;
color: <?php echo $textColor; ?>;
background-color: <?php echo $backgroundColor; ?>;
border-color: transparent;
}
[class*="btn"]:hover .disabled {
background-color:red;
}
[class*="alert"] {
border-radius: 18px;
color: <?php echo $textColor; ?>;
background-color: <?php echo $backgroundColor; ?>;
border: 1px solid #404040;
}
.close {
font-size: 1.2em;
font-weight: 400;
text-shadow: none;
color: <?php echo $textColor; ?>;
}
.form-control,
.form-control:focus,
.custom-select {
color: <?php echo $textColor; ?>;
background-color: <?php echo $backgroundColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>;
border-radius: 18px;
}
.form-control:disabled,
.form-control[readonly] {
background-color: <?php echo $backgroundColor; ?>;
opacity: 0.5;
}
.form-control::-webkit-input-placeholder { color: #d2d2d2; }
.form-control:-moz-placeholder { color: #d2d2d2; }
.form-control::-moz-placeholder { color: #d2d2d2; }
.form-control:-ms-input-placeholder { color: #d2d2d2; }
.form-control::-ms-input-placeholder { color: #d2d2d2; }
.form-control option {
font-size: 1em;
}
input[type="text"]{
color: <?php echo $textColor; ?>; !important
}
.progress {
background-color: <?php echo $backgroundColor; ?>;
border-radius: 18px;
}
.progress-bar {
color: <?php echo $backgroundColor; ?>;
}
#progressBar {
background-color: <?php echo $secondaryColor; ?>!important;
}
.progress-bar.bg-success {
background-color: <?php echo $primaryColor; ?>!important;
color: <?php echo $textColor; ?>!important;
}
.progress .progress-bar {
padding-left: 5px;
}
.progress-bar.progress-bar-info.progress-bar-striped.active {
background-color: <?php echo $secondaryColor; ?>;
}
.figure-img {
filter: opacity(0.7);
}
.ra-wireguard:before {
color: #404040 !important;
}
.ra-wireguard:hover:before {
color: #d1d3e2 !important;
}
.sidebar .nav-item.active .nav-link span.ra-wireguard:before {
color: #d2d2d2 !important;
}
.custom-control-input:checked ~ .custom-control-label::before {
background-color: <?php echo $secondaryColor; ?>;
}
.custom-control-input:checked ~ .custom-control-label::before {
background-color: <?php echo $primaryColor; ?>;
border-color: <?php echo $primaryColor; ?>;
}
.wg-keygen {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid yellow <?php echo $secondaryColor; ?>;
border-top-right-radius: 18px !important;
border-bottom-right-radius: 18px !important;
}
.btn.btn-outline-secondary.js-add-dhcp-upstream-server {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>;
border-top-right-radius: 18px !important;
border-bottom-right-radius: 18px !important;
}
.btn.btn-outline-success.js-add-dhcp-static-lease {
border: 1px solid <?php echo $secondaryColor; ?>;
}
.btn.btn-outline-success.js-add-dhcp-static-lease:hover {
background-color: <?php echo $primaryColor; ?>;
}
.text-muted {
font-size: 0.8rem;
}
.fas.fa-circle {
font-size: 0.7rem;
}
pre {
background-color: <?php echo $backgroundColor; ?>;
border: <?php echo $backgroundColor; ?>;
}
button.btn.btn-light.js-toggle-password {
border: 1px solid <?php echo $secondaryColor; ?>;
}
.btn-primary {
border-color: transparent;
background-color: <?php echo $primaryColor; ?>;
}
.btn-primary:hover {
background-color: <?php echo $secondaryColor; ?>;
border-color: transparent;
}
.btn.service-status {
background-color: <?php echo $backgroundColor; ?>;
}
input.btn.btn-success {
background-color: <?php echo $secondaryColor; ?>;
}
input.btn.btn-success:hover {
background-color: <?php echo $backgroundColor; ?>;
border-color: transparent;
}
.signal-icon .signal-bar {
background: <?php echo $secondaryColor; ?>;
}
.figure-img {
border-radius: 18px;
}
.logoutput {
border-radius: 18px!important;
background-color: <?php echo $backgroundColor; ?>;
border: 1px solid <?php echo $primaryColor; ?>!important;
}
.btn-sm {
border-top-right-radius: 18px!important;
border-bottom-right-radius: 18px!important;
}
.signal-icon .signal-bar {
background: <?php echo $secondaryColor; ?>;
}
input.btn.btn-warning {
background-color: <?php echo $secondaryColor; ?>;
}
input.btn.btn-warning:hover {
background-color: <?php echo $backgroundColor; ?>;!important
}
button.btn.btn-danger {
background-color: <?php echo $secondaryColor; ?>;
}
button.btn.btn-danger:hover {
background-color: <?php echo $backgroundColor; ?>;!important
}
.btn-group label.active {
background-color: <?php echo $primaryColor; ?>!important;
border-color:transparent!important;
color: <?php echo $textColor; ?>;!important
}
.btn-group {
background-color: <?php echo $cardsColor; ?>;!important
}
.btn-group:hover {
background-color: <?php echo $cardsColor; ?>;!important
}
.btn.btn-outline-secondary#gen_wpa_passphrase {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>;
border-top-right-radius: 18px !important;
border-bottom-right-radius: 18px !important;
}
a.scroll-to-top.rounded {
display: inline;
background-color: <?php echo $secondaryColor; ?>;
border-radius: 18px!important;
}
a.scroll-to-top.rounded i.fas.fa-angle-up {
color: <?php echo $textColor; ?>;
}
.btn.btn-sm.btn-outline-secondary.rounded-right {
border: 1px solid <?php echo $secondaryColor; ?>;
background-color: <?php echo $primaryColor; ?>;
}
.info-item.col-xs-3 {
color: <?php echo $textColor; ?>;
}
.text-muted {
color: <?php echo $textColor; ?>!important;
}
.grid-stack-item-content {
width: 100%;
height: 100%;
padding: 5px;
box-sizing: border-box;
}

633
app/css/material-light.php Normal file
View File

@ -0,0 +1,633 @@
<?php header("Content-Type: text/css; charset=utf-8"); ?>
<?php
require_once '../../includes/functions.php';
$color = getColorOpt();
?>
/*
Theme Name: Material Light
Author: @marek-guran
Author URI: https://github.com/marek-guran
Description: Inspired by Google's Material You Design
License: GNU General Public License v3.0
*/
<?php
// Base color
$baseColor = $color;
// Function to darken a color by a percentage
function darkenColor($color, $percent)
{
$percent /= 100;
$r = hexdec(substr($color, 1, 2));
$g = hexdec(substr($color, 3, 2));
$b = hexdec(substr($color, 5, 2));
$r = round($r * (1 - $percent));
$g = round($g * (1 - $percent));
$b = round($b * (1 - $percent));
return sprintf("#%02x%02x%02x", $r, $g, $b);
}
// Function to lighten a color by a percentage
function lightenColor($color, $percent)
{
$percent /= 100;
$r = hexdec(substr($color, 1, 2));
$g = hexdec(substr($color, 3, 2));
$b = hexdec(substr($color, 5, 2));
$r = round($r + (255 - $r) * $percent);
$g = round($g + (255 - $g) * $percent);
$b = round($b + (255 - $b) * $percent);
return sprintf("#%02x%02x%02x", $r, $g, $b);
}
$textColor = lightenColor($baseColor, 95);
// Create other color variables
$cardsColor = lightenColor($baseColor, 50);
$secondaryColor = lightenColor($baseColor, 30);
$primaryColor = $baseColor;
$backgroundColor = lightenColor($baseColor, 60);
?>
@import url('all.css');
body {
background-color: <?php echo $backgroundColor; ?>;
}
html * {
font-family: Helvetica,Arial,sans-serif;
color: <?php echo $textColor; ?>;
}
.nav-item.active .nav-link {
position: relative;
background-color: <?php echo $secondaryColor; ?>;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
border-top-right-radius: 18px;
border-bottom-right-radius: 18px;
}
h2 {
font-size: 2rem !important;
}
h4 {
font-size: 1.3rem;
}
h5.card-title {
font-size: 1.2rem;
}
.page-header {
border-left: .01rem solid <?php echo $secondaryColor; ?>;
border-bottom: .01rem solid <?php echo $secondaryColor; ?>;
}
.sidebar-light .nav-item.active .nav-link i {
color: <?php echo $textColor; ?>;
}
.sidebar .nav-item.active .nav-link {
font-weight: 400;
color: <?php echo $primaryColor; ?>;
}
#wrapper #content-wrapper #content {
background-color: <?php echo $backgroundColor; ?>;
}
.topbar {
background-color: <?php echo $backgroundColor; ?>;
}
.col {
color: <?php echo $textColor; ?>;
}
.card-header .col i.fa-tachometer-alt,
.card-header .col i.fa-dot-circle,
.card-header .col i.fa-wifi,
.card-header .col i.fa-exchange-alt,
.card-header .col i.fa-hand-paper,
.card-header .col i.fa-network-wired,
.card-header .col i.fa-key,
.card-header .ra-wireguard,
.card-header .ra-wireguard:before,
.card-header .col i.fa-user-lock,
.card-header .col i.fa-chart-bar,
.card-header .col i.fa-cube,
.card-header .col i.fa-info-circle,
.card-header .col i.fa-globe,
.card-header .col i.fa-shield-alt {
color: <?php echo $textColor; ?>;
}
i.fa-bars {
color: <?php echo $primaryColor; ?>;
}
.nav-tabs {
border-bottom: 1px solid <?php echo $secondaryColor; ?>;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link {
font-size: 1.0rem;
border-top-left-radius: 18px;
border-top-right-radius: 18px;
}
.nav-tabs .nav-link:hover {
border-color: transparent;
}
.navbar-default .navbar-brand:hover {
color: #d2d2d2;
}
.navbar-default .navbar-toggle {
border-color: transparent;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #d2d2d2;
}
.navbar-default .navbar-toggle:focus,
.navbar-default .navbar-toggle:hover {
background-color: <?php echo $backgroundColor; ?>;
}
#content, .navbar, .sidebar, .footer, .sticky-footer {
background-attachment: scroll;
background-repeat: repeat;
background-size: auto;
background-position: 0 0;
background-origin: padding-box;
background-clip: border-box;
}
.sticky-footer {
background-position: 30px 0;
}
.sidebar {
background-position: 0 20px;
}
.nav-tabs .nav-link.active {
color: <?php echo $textColor; ?>;
background-color: <?php echo $secondaryColor; ?>;
border-color: transparent;
}
a:focus, a:hover {
color: #d2d2d2;
}
.card>.card-header, .modal-content, .modal-header {
border-color: transparent;
background-color: <?php echo $primaryColor; ?>;
color: <?php echo $textColor; ?>;
border-radius: 18px;
font-size: 1.0rem;
font-weight: 400;
}
.modal-body {
background-color: <?php echo $backgroundColor; ?>;
}
.card-header {
border-bottom-left-radius: 0px!important;
border-bottom-right-radius: 0px!important;
position: relative;
margin-bottom: -18px;
}
.card>.card-header .fa {
color: <?php echo $backgroundColor; ?>;
}
.card-header [class^="fa"] {
color: <?php echo $textColor; ?>;
font-size: 1.0rem;
}
.card, .card-body {
border-color: transparent;
border-radius: 18px;
background-color: <?php echo $cardsColor; ?>;
box-shadow: 0px -5px 5px rgba(0, 0, 0, 0.1),
0px 4px 6px rgba(0, 0, 0, 0.1);
}
.card-body {
padding-top: 36px; /* 18px to move down + 18px space at the top */
padding-bottom: 36px; /* 18px space at the bottom */
}
.unstyled {
background-color: <?php echo $cardsColor; ?>;
color: <?php echo $textColor; ?>;
}
hr {
border-top: .01rem solid <?php echo $secondaryColor; ?>;
}
.sidebar-brand-text {
color: <?php echo $primaryColor; ?>;
}
.ra-raspap:before {
color: #ac1b3d !important;
}
.sidebar-light #sidebarToggle {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>; !important
}
.sidebar-light #sidebarToggle::after {
color: <?php echo $textColor; ?>;
}
.sidebar-light .nav-item .nav-link:hover i {
color: <?php echo $primaryColor; ?>;
}
.sidebar-light #sidebarToggle:hover {
background-color: <?php echo $secondaryColor; ?>;
}
.sidebar.toggled .nav-item .nav-link span {
display: none;
}
.sidebar.toggled .nav-item .nav-link {
text-align: center;
padding: .6rem 1rem;
width: 6.5rem;
}
.card-footer, .modal-footer {
background-color: <?php echo $primaryColor; ?>;
color: <?php echo $textColor; ?>;
border-top: 0px;
border-bottom-right-radius: 18px!important;
border-bottom-left-radius: 18px!important;
position: relative;
margin-top: -18px;
}
.modal-footer {
border-radius: 18px;
}
.card>.card-header::before, .navbar-default::before {
content: " ";
display: block;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 2;
background-size: 100% 2px, 3px 100%;
pointer-events: none;
}
.sidebar-light, .sticky-footer {
background-color: <?php echo $backgroundColor; ?>;
}
.sidebar-light .nav-item .nav-link i {
color: <?php echo $textColor; ?>;;
}
.sidebar .nav-item .nav-link {
padding: 0.6rem;
padding-left: 1.2rem;
}
.sidebar-light hr.sidebar-divider {
border-top: 1px solid <?php echo $secondaryColor; ?>;
padding-top: 0.5rem;
}
.sidebar .nav-item .nav-link span {
font-size: 1.0rem;
}
.sidebar .nav-item .nav-link span:hover {
color: <?php echo $primaryColor; ?>!important;
}
.topbar .topbar-divider {
border-right: 1px solid <?php echo $secondaryColor; ?>;
}
.label-warning {
background-color: #d2d2d2;
}
span.label.label-warning {
color: <?php echo $backgroundColor; ?>;
}
.table>tbody>tr>td,
.table>tbody>tr>th,
.table>tfoot>tr>td,
.table>tfoot>tr>th,
.table>thead>tr>td,
.table>thead>tr>th {
background-color: <?php echo $primaryColor; ?>;
border-top: .01rem solid <?php echo $backgroundColor; ?>;
}
.table{
border-radius: 18px;
overflow: hidden;
}
.table>thead>tr>th {
vertical-align: bottom;
border-bottom: 0 solid <?php echo $secondaryColor; ?>;
}
[class*="btn"], [class*="btn"]:focus, [class*="btn"]:disabled {
background-color: <?php echo $secondaryColor; ?>;
border-color: transparent;
border-radius: 18px;
color: <?php echo $textColor; ?>;
}
[class*="btn"]:hover {
border-radius: 18px;
color: <?php echo $textColor; ?>;
background-color: <?php echo $backgroundColor; ?>;
border-color: transparent;
}
[class*="btn"]:hover .disabled {
background-color:red;
}
[class*="alert"] {
border-radius: 18px;
color: <?php echo $textColor; ?>;
background-color: <?php echo $backgroundColor; ?>;
border: 1px solid #404040;
}
.close {
font-size: 1.2em;
font-weight: 400;
text-shadow: none;
color: <?php echo $textColor; ?>;
}
.form-control,
.form-control:focus,
.custom-select {
color: <?php echo $textColor; ?>;
background-color: <?php echo $backgroundColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>;
border-radius: 18px;
}
.form-control:disabled,
.form-control[readonly] {
background-color: <?php echo $backgroundColor; ?>;
opacity: 0.5;
}
.form-control::-webkit-input-placeholder { color: #d2d2d2; }
.form-control:-moz-placeholder { color: #d2d2d2; }
.form-control::-moz-placeholder { color: #d2d2d2; }
.form-control:-ms-input-placeholder { color: #d2d2d2; }
.form-control::-ms-input-placeholder { color: #d2d2d2; }
.form-control option {
font-size: 1em;
}
.form-control::placeholder {
color: <?php echo $textColor; ?>;
}
input[type="text"]{
color: <?php echo $textColor; ?>; !important
}
.progress {
background-color: <?php echo $backgroundColor; ?>;
border-radius: 18px;
}
.progress-bar {
color: <?php echo $backgroundColor; ?>;
}
#progressBar {
background-color: <?php echo $secondaryColor; ?>!important;
}
.progress-bar.bg-success {
background-color: <?php echo $primaryColor; ?>!important;
color: <?php echo $textColor; ?>!important;
}
.progress .progress-bar {
padding-left: 5px;
}
.progress-bar.progress-bar-info.progress-bar-striped.active {
background-color: <?php echo $secondaryColor; ?>;
}
.figure-img {
filter: opacity(0.7);
}
.ra-wireguard:before {
color: <?php echo $textColor; ?>!important;
}
.ra-wireguard:hover:before {
color: <?php echo $primaryColor; ?>!important;
}
.sidebar .nav-item.active .nav-link span.ra-wireguard:before {
color: <?php echo $textColor; ?>!important;
}
.custom-control-input:checked ~ .custom-control-label::before {
background-color: <?php echo $secondaryColor; ?>;
}
.custom-control-input:checked ~ .custom-control-label::before {
background-color: <?php echo $primaryColor; ?>;
border-color: <?php echo $primaryColor; ?>;
}
.wg-keygen {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid yellow <?php echo $secondaryColor; ?>;
border-top-right-radius: 18px !important;
border-bottom-right-radius: 18px !important;
}
.btn.btn-outline-secondary.js-add-dhcp-upstream-server {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>;
border-top-right-radius: 18px !important;
border-bottom-right-radius: 18px !important;
}
.btn.btn-outline-success.js-add-dhcp-static-lease {
border: 1px solid <?php echo $secondaryColor; ?>;
}
.btn.btn-outline-success.js-add-dhcp-static-lease:hover {
background-color: <?php echo $primaryColor; ?>;
}
.text-muted {
font-size: 0.8rem;
}
.fas.fa-circle {
font-size: 0.7rem;
}
pre {
background-color: <?php echo $backgroundColor; ?>;
border: <?php echo $backgroundColor; ?>;
}
button.btn.btn-light.js-toggle-password {
border: 1px solid <?php echo $secondaryColor; ?>;
}
.btn-primary {
border-color: transparent;
background-color: <?php echo $primaryColor; ?>;
}
.btn-primary:hover {
background-color: <?php echo $secondaryColor; ?>;
border-color: transparent;
}
.btn.service-status {
background-color: <?php echo $secondaryColor; ?>;
}
input.btn.btn-success {
background-color: <?php echo $secondaryColor; ?>;
}
input.btn.btn-success:hover {
background-color: <?php echo $backgroundColor; ?>;
border-color: transparent;
}
.signal-icon .signal-bar {
background: <?php echo $secondaryColor; ?>;
}
.figure-img {
border-radius: 18px;
}
.logoutput {
border-radius: 18px!important;
background-color: <?php echo $backgroundColor; ?>;
border: 1px solid <?php echo $primaryColor; ?>!important;
}
.btn-sm {
border-top-right-radius: 18px!important;
border-bottom-right-radius: 18px!important;
}
.signal-icon .signal-bar {
background: <?php echo $secondaryColor; ?>;
}
input.btn.btn-warning {
background-color: <?php echo $secondaryColor; ?>;
}
input.btn.btn-warning:hover {
background-color: <?php echo $backgroundColor; ?>;!important
}
button.btn.btn-danger {
background-color: <?php echo $secondaryColor; ?>;
}
button.btn.btn-danger:hover {
background-color: <?php echo $backgroundColor; ?>;!important
}
.btn-group label.active {
background-color: <?php echo $primaryColor; ?>!important;
border-color:transparent!important;
color: <?php echo $textColor; ?>;!important
}
.btn-group {
background-color: <?php echo $cardsColor; ?>;!important
}
.btn-group:hover {
background-color: <?php echo $cardsColor; ?>;!important
}
.btn.btn-outline-secondary#gen_wpa_passphrase {
background-color: <?php echo $primaryColor; ?>;
border: 1px solid <?php echo $secondaryColor; ?>;
border-top-right-radius: 18px !important;
border-bottom-right-radius: 18px !important;
}
a.scroll-to-top.rounded {
display: inline;
background-color: <?php echo $secondaryColor; ?>;
border-radius: 18px!important;
}
a.scroll-to-top.rounded i.fas.fa-angle-up {
color: <?php echo $textColor; ?>;
}
.btn.btn-sm.btn-outline-secondary.rounded-right {
border: 1px solid <?php echo $secondaryColor; ?>;
background-color: <?php echo $primaryColor; ?>;
}
.info-item.col-xs-3 {
color: <?php echo $textColor; ?>;
}
.text-muted {
color: <?php echo $textColor; ?>!important;
}
.grid-stack-item-content {
width: 100%;
height: 100%;
padding: 5px;
box-sizing: border-box;
}

View File

@ -3,7 +3,7 @@
"short_name": "RaspAP",
"icons": [
{
"src": "/dist/icons/android-chrome-192x192.png",
"src": "/app/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -18,9 +18,9 @@ function createNetmaskAddr(bitCount) {
}
function loadSummary(strInterface) {
$.post('ajax/networking/get_ip_summary.php',{interface:strInterface},function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/networking/get_ip_summary.php',{'interface': strInterface, 'csrf_token': csrfToken},function(data){
jsonData = JSON.parse(data);
console.log(jsonData);
if(jsonData['return'] == 0) {
$('#'+strInterface+'-summary').html(jsonData['output'].join('<br />'));
} else if(jsonData['return'] == 2) {
@ -123,21 +123,24 @@ $(document).on("click", "#gen_wpa_passphrase", function(e) {
});
$(document).on("click", "#js-clearhostapd-log", function(e) {
$.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/hostapd.log'},function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/hostapd.log', 'csrf_token': csrfToken},function(data){
jsonData = JSON.parse(data);
$("#hostapd-log").val("");
});
});
$(document).on("click", "#js-cleardnsmasq-log", function(e) {
$.post('ajax/logging/clearlog.php?',{'logfile':'/var/log/dnsmasq.log'},function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/logging/clearlog.php?',{'logfile':'/var/log/dnsmasq.log', 'csrf_token': csrfToken},function(data){
jsonData = JSON.parse(data);
$("#dnsmasq-log").val("");
});
});
$(document).on("click", "#js-clearopenvpn-log", function(e) {
$.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/openvpn.log'},function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/openvpn.log', 'csrf_token': csrfToken},function(data){
jsonData = JSON.parse(data);
$("#openvpn-log").val("");
});
@ -183,6 +186,7 @@ function contentLoaded() {
break;
case "hostapd_conf":
loadChannel();
setHardwareModeTooltip();
break;
case "dhcpd_conf":
loadInterfaceDHCPSelect();
@ -216,6 +220,12 @@ function loadInterfaceDHCPSelect() {
$('#txtgateway').val(jsonData.StaticRouters);
$('#chkfallback')[0].checked = jsonData.FallbackEnabled;
$('#default-route').prop('checked', jsonData.DefaultRoute);
if (strInterface.startsWith("wl")) {
$('#nohook-wpa-supplicant').parent().parent().parent().show()
$('#nohook-wpa-supplicant').prop('checked', jsonData.NoHookWPASupplicant);
} else {
$('#nohook-wpa-supplicant').parent().parent().parent().hide()
}
$('#txtrangestart').val(jsonData.RangeStart);
$('#txtrangeend').val(jsonData.RangeEnd);
$('#txtrangeleasetime').val(jsonData.leaseTime);
@ -280,7 +290,8 @@ $('#configureClientModal').on('shown.bs.modal', function (e) {
$('#ovpn-confirm-delete').on('click', '.btn-delete', function (e) {
var cfg_id = $(this).data('recordId');
$.post('ajax/openvpn/del_ovpncfg.php',{'cfg_id':cfg_id},function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/openvpn/del_ovpncfg.php',{'cfg_id':cfg_id, 'csrf_token': csrfToken},function(data){
jsonData = JSON.parse(data);
$("#ovpn-confirm-delete").modal('hide');
var row = $(document.getElementById("openvpn-client-row-" + cfg_id));
@ -297,7 +308,8 @@ $('#ovpn-confirm-delete').on('show.bs.modal', function (e) {
$('#ovpn-confirm-activate').on('click', '.btn-activate', function (e) {
var cfg_id = $(this).data('record-id');
$.post('ajax/openvpn/activate_ovpncfg.php',{'cfg_id':cfg_id},function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/openvpn/activate_ovpncfg.php',{'cfg_id':cfg_id, 'csrf_token': csrfToken},function(data){
jsonData = JSON.parse(data);
$("#ovpn-confirm-activate").modal('hide');
setTimeout(function(){
@ -321,6 +333,36 @@ $('#ovpn-userpw,#ovpn-certs').on('click', function (e) {
}
});
$('#js-system-reset-confirm').on('click', function (e) {
var progressText = $('#js-system-reset-confirm').attr('data-message');
var successHtml = $('#system-reset-message').attr('data-message');
var closeHtml = $('#js-system-reset-cancel').attr('data-message');
var csrfToken = $('meta[name=csrf_token]').attr('content');
var progressHtml = $('<div>').text(progressText).html() + '<i class="fas fa-cog fa-spin ml-2"></i>';
$('#system-reset-message').html(progressHtml);
$.post('ajax/networking/do_sys_reset.php?',{'csrf_token':csrfToken},function(data){
setTimeout(function(){
jsonData = JSON.parse(data);
if(jsonData['return'] == 0) {
$('#system-reset-message').text(successHtml);
} else {
$('#system-reset-message').text('Error occured: '+ jsonData['return']);
}
$("#js-system-reset-confirm").hide();
$("#js-system-reset-cancel").text(closeHtml);
},750);
});
});
$('#js-sys-reboot, #js-sys-shutdown').on('click', function (e) {
e.preventDefault();
var csrfToken = $('meta[name=csrf_token]').attr('content');
var action = $(this).data('action');
$.post('ajax/system/sys_actions.php?',{'a': action, 'csrf_token': csrfToken},function(data){
var response = JSON.parse(data);
});
});
$(document).ready(function(){
$("#PanelManual").hide();
});
@ -387,21 +429,39 @@ function loadChannelSelect(selected) {
});
}
/* Sets hardware mode tooltip text for selected interface.
*/
function setHardwareModeTooltip() {
var iface = $('#cbxinterface').val();
var hwmodeText = '';
var csrfToken = $('meta[name=csrf_token]').attr('content');
// Explanatory text if 802.11ac is disabled
if ($('#cbxhwmode').find('option[value="ac"]').prop('disabled') == true ) {
var hwmodeText = $('#hwmode').attr('data-tooltip');
}
$.post('ajax/networking/get_frequencies.php?',{'interface': iface, 'csrf_token': csrfToken},function(data){
var responseText = JSON.parse(data);
$('#tiphwmode').attr('data-original-title', responseText + '\n' + hwmodeText );
});
}
/* Updates the selected blocklist
* Request is passed to an ajax handler to download the associated list.
* Interface elements are updated to indicate current progress, status.
*/
function updateBlocklist() {
var blocklist_id = $('#cbxblocklist').val();
var opt = $('#cbxblocklist option:selected');
var blocklist_id = opt.val();
var csrfToken = $('meta[name=csrf_token]').attr('content');
if (blocklist_id == '') { return; }
$('#cbxblocklist-status').find('i').removeClass('fas fa-check').addClass('fas fa-cog fa-spin');
$('#cbxblocklist-status').removeClass('check-hidden').addClass('check-progress');
$.post('ajax/adblock/update_blocklist.php',{ 'blocklist_id':blocklist_id },function(data){
$.post('ajax/adblock/update_blocklist.php',{ 'blocklist_id':blocklist_id, 'csrf_token': csrfToken},function(data){
var jsonData = JSON.parse(data);
if (jsonData['return'] == '0') {
$('#cbxblocklist-status').find('i').removeClass('fas fa-cog fa-spin').addClass('fas fa-check');
$('#cbxblocklist-status').removeClass('check-progress').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
$('#'+blocklist_id).text("Just now");
$('#blocklist-'+jsonData['list']).text("Just now");
}
})
}
@ -415,7 +475,8 @@ $('.wg-keygen').click(function(){
var entity_pub = $(this).parent('div').prev('input[type="text"]');
var entity_priv = $(this).parent('div').next('input[type="hidden"]');
var updated = entity_pub.attr('name')+"-pubkey-status";
$.post('ajax/networking/get_wgkey.php',{'entity':entity_pub.attr('name') },function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/networking/get_wgkey.php',{'entity':entity_pub.attr('name'), 'csrf_token': csrfToken},function(data){
var jsonData = JSON.parse(data);
entity_pub.val(jsonData.pubkey);
$('#' + updated).removeClass('check-hidden').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
@ -448,7 +509,6 @@ window.addEventListener('load', function() {
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
//console.log(event.submitter);
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
@ -464,18 +524,18 @@ Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k +
$(document).on("click", ".js-toggle-password", function(e) {
var button = $(e.target)
var field = $(button.data("target"));
if (field.is(":input")) {
e.preventDefault();
if (!button.data("__toggle-with-initial")) {
button.data("__toggle-with-initial", button.text())
$("i", this).removeClass("fas fa-eye").addClass(button.attr("data-toggle-with"));
}
if (field.attr("type") === "password") {
button.text(button.data("toggle-with"));
field.attr("type", "text");
} else {
button.text(button.data("__toggle-with-initial"));
$("i", this).removeClass("fas fa-eye-slash").addClass("fas fa-eye");
field.attr("type", "password");
}
}
@ -495,12 +555,27 @@ function set_theme(theme) {
}
$(function() {
var currentTheme = getCookie('theme');
// Check if the current theme is a dark theme
var isDarkTheme = currentTheme === 'lightsout.css' || currentTheme === 'material-dark.php';
$('#night-mode').prop('checked', isDarkTheme);
$('#night-mode').change(function() {
var state = $(this).is(':checked');
if (state == true && getCookie('theme') != 'lightsout.css') {
set_theme('lightsout.css');
var currentTheme = getCookie('theme');
if (state == true) {
if (currentTheme == 'custom.php') {
set_theme('lightsout.css');
} else if (currentTheme == 'material-light.php') {
set_theme('material-dark.php');
}
} else {
set_theme('custom.php');
if (currentTheme == 'lightsout.css') {
set_theme('custom.php');
} else if (currentTheme == 'material-dark.php') {
set_theme('material-light.php');
}
}
});
});
@ -523,6 +598,8 @@ var themes = {
"default": "custom.php",
"hackernews" : "hackernews.css",
"lightsout" : "lightsout.css",
"material-light" : "material-light.php",
"material-dark" : "material-dark.php",
}
// Toggles the sidebar navigation.

View File

@ -3,13 +3,15 @@
// Support for dark theme
theme = getCookie('theme');
if (theme == 'lightsout.css') {
var bgColor1 = '#141414';
var bgColor2 = '#141414';
var borderColor = 'rgba(37, 153, 63, 1)';
var labelColor = 'rgba(37, 153, 63, 1)';
} else if (theme == 'material-light.php') {
var borderColor = '#f2f2fb';
var labelColor = '#f2f2fb';
} else if (theme == 'material-dark.php') {
var borderColor = '#f2f2fb';
var labelColor = '#f2f2fb';
} else {
var bgColor1 = '#d4edda';
var bgColor2 = '#eaecf4';
var borderColor = 'rgba(147, 210, 162, 1)';
var labelColor = 'rgba(130, 130, 130, 1)';
}
@ -17,7 +19,7 @@ if (theme == 'lightsout.css') {
let data1 = {
datasets: [{
data: [linkQ, 100-linkQ],
backgroundColor: [bgColor1, bgColor2],
backgroundColor: 'transparent',
borderColor: borderColor,
}],
};

View File

@ -1,90 +0,0 @@
<?php
/**
* Sytem info class
*
* @description System info class for RaspAP
* @author Bill Zimmerman <billzimmerman@gmail.com>
* @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE
*/
namespace RaspAP\System;
class Sysinfo
{
public function hostname()
{
return shell_exec("hostname -f");
}
public function uptime()
{
$uparray = explode(" ", exec("cat /proc/uptime"));
$seconds = round($uparray[0], 0);
$minutes = $seconds / 60;
$hours = $minutes / 60;
$days = floor($hours / 24);
$hours = floor($hours - ($days * 24));
$minutes = floor($minutes - ($days * 24 * 60) - ($hours * 60));
$uptime= '';
if ($days != 0) {
$uptime .= $days . ' day' . (($days > 1)? 's ':' ');
}
if ($hours != 0) {
$uptime .= $hours . ' hour' . (($hours > 1)? 's ':' ');
}
if ($minutes != 0) {
$uptime .= $minutes . ' minute' . (($minutes > 1)? 's ':' ');
}
return $uptime;
}
public function usedMemory()
{
$used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
return floor($used);
}
public function processorCount()
{
$procs = shell_exec("nproc --all");
return intval($procs);
}
public function loadAvg1Min()
{
$load = exec("awk '{print $1}' /proc/loadavg");
return floatval($load);
}
public function systemLoadPercentage()
{
return intval(($this->loadAvg1Min() * 100) / $this->processorCount());
}
public function systemTemperature()
{
$cpuTemp = file_get_contents("/sys/class/thermal/thermal_zone0/temp");
return number_format((float)$cpuTemp/1000, 1);
}
public function hostapdStatus()
{
exec('pidof hostapd | wc -l', $status);
return $status;
}
public function operatingSystem()
{
$os_desc = shell_exec("lsb_release -sd");
return $os_desc;
}
public function kernelVersion()
{
$kernel = shell_exec("uname -r");
return $kernel;
}
}

View File

@ -1,6 +1,17 @@
{
"notracking/hosts-blocklist": [
"notracking-hostnames",
"notracking-domains"
]
"StevenBlack/hosts": [
"StevenBlack/hosts (default)"
],
"badmojr/hosts": [
"badmojr/1Hosts (Mini)",
"badmojr/1Hosts (Lite)",
"badmojr/1Hosts (Pro)",
"badmojr/1Hosts (Xtra)"
],
"OISD/domains": [
"oisd/big (default)",
"oisd/small",
"oisd/nsfw"
]
}

View File

@ -20,5 +20,5 @@ country_code=GB
## RaspAP wireless client AP mode
#interface=uap0
## RaspAP bridge AP mode (disabled by default)
## RaspAP bridge AP mode, disabled by default
#bridge=br0

View File

@ -1,6 +1,5 @@
<?php
require_once 'includes/status_messages.php';
require_once 'config.php';
/**
@ -9,7 +8,7 @@ require_once 'config.php';
*/
function DisplayAdBlockConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
$enabled = false;
$custom_enabled = false;
@ -75,14 +74,17 @@ function DisplayAdBlockConfig()
$dnsmasq_state = ($dnsmasq[0] > 0);
$serviceStatus = $dnsmasq_state && $enabled ? "up" : "down";
$adblock_custom_content = file_get_contents(RASPI_ADBLOCK_LISTPATH .'custom.txt');
if (file_exists(RASPI_ADBLOCK_LISTPATH .'custom.txt')) {
$adblock_custom_content = file_get_contents(RASPI_ADBLOCK_LISTPATH .'custom.txt');
} else {
$adblock_custom_content = '';
}
$adblock_log = '';
exec('sudo chmod o+r '.RASPI_DHCPCD_LOG);
$handle = fopen(RASPI_DHCPCD_LOG, "r");
if ($handle) {
while (($line = fgets($handle)) !== false) {
if (preg_match('/(0.0.0.0)/', $line)) {
if (preg_match('/(is 0.0.0.0)|(using only locally-known addresses)/', $line)) {
$adblock_log .= $line;
}
}

View File

@ -1,10 +1,12 @@
<?php
require_once 'includes/status_messages.php';
function DisplayAuthConfig($username, $password)
function DisplayAuthConfig($username)
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
$auth = new \RaspAP\Auth\HTTPAuth;
$config = $auth->getAuthConfig();
$password = $config['admin_pass'];
if (isset($_POST['UpdateAdminPassword'])) {
if (password_verify($_POST['oldpass'], $password)) {
$new_username=trim($_POST['username']);
@ -33,5 +35,10 @@ function DisplayAuthConfig($username, $password)
}
}
echo renderTemplate("admin", compact("status", "username"));
echo renderTemplate(
"admin", compact(
"status",
"username"
)
);
}

View File

@ -1,22 +1,16 @@
<?php
$user = $_SERVER['PHP_AUTH_USER'] ?? "";
$pass = $_SERVER['PHP_AUTH_PW'] ?? "";
require_once RASPI_CONFIG.'/raspap.php';
$config = getConfig();
if (RASPI_AUTH_ENABLED) {
$validated = ($user == $config['admin_user']) && password_verify($pass, $config['admin_pass']);
if (!$validated) {
header('WWW-Authenticate: Basic realm="RaspAP"');
if (function_exists('http_response_code')) {
// http_response_code will respond with proper HTTP version back.
http_response_code(401);
$user = $_SERVER['PHP_AUTH_USER'] ?? '';
$pass = $_SERVER['PHP_AUTH_PW'] ?? '';
$auth = new \RaspAP\Auth\HTTPAuth;
if (!$auth->isLogged()) {
if ($auth->login($user, $pass)) {
$config = $auth->getAuthConfig();
} else {
header('HTTP/1.0 401 Unauthorized');
$auth->authenticate();
}
exit('Not authorized'.PHP_EOL);
}
} else {
$validated = true;
}

41
includes/autoload.php Executable file
View File

@ -0,0 +1,41 @@
<?php
/**
* PSR-4 compliant class autoloader
*
* @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
* @link https://www.php.net/manual/en/function.spl-autoload-register.php
* @param string $class fully-qualified class name
* @return void
*/
spl_autoload_register(function ($class) {
// project-specific namespace prefix
$prefix = '';
// base directory for the namespace prefix
$base_dir = 'src/';
// normalize the base directory with a trailing separator
$base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR) . '/';
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
// no, move to the next registered autoloader
return;
}
// get the relative class name
$relative_class = substr($class, $len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require $file;
}
});

View File

@ -1,6 +1,5 @@
<?php
require_once 'includes/status_messages.php';
require_once 'includes/wifi_functions.php';
/**
@ -9,7 +8,7 @@ require_once 'includes/wifi_functions.php';
*/
function DisplayWPAConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
$networks = [];
getWifiInterface();
@ -17,7 +16,9 @@ function DisplayWPAConfig()
if (isset($_POST['connect'])) {
$result = 0;
exec('sudo wpa_cli -i ' . $_SESSION['wifi_client_interface'] . ' select_network '.strval($_POST['connect']));
$iface = escapeshellarg($_SESSION['wifi_client_interface']);
$netid = intval($_POST['connect']);
exec('sudo wpa_cli -i ' . $iface . ' select_network ' . $netid);
$status->addMessage('New network selected', 'success');
} elseif (isset($_POST['wpa_reinit'])) {
$status->addMessage('Reinitializing wpa_supplicant', 'info', false);
@ -76,6 +77,15 @@ function DisplayWPAConfig()
}
}
}
} elseif (strlen($network['passphrase']) == 0 && strlen($network['passkey']) == 64) {
$line = "\tpsk=" . $network['passkey'];
fwrite($wpa_file, "network={".PHP_EOL);
fwrite($wpa_file, "\tssid=\"".$ssid."\"".PHP_EOL);
fwrite($wpa_file, $line.PHP_EOL);
if (array_key_exists('priority', $network)) {
fwrite($wpa_file, "\tpriority=".$network['priority'].PHP_EOL);
}
fwrite($wpa_file, "}".PHP_EOL);
} else {
$status->addMessage('WPA passphrase must be between 8 and 63 characters', 'danger');
$ok = false;

View File

@ -10,7 +10,7 @@ require_once 'includes/functions.php';
function DisplayDashboard(&$extraFooterScripts)
{
getWifiInterface();
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
// Need this check interface name for proper shell execution.
if (!preg_match('/^([a-zA-Z0-9]+)$/', $_SESSION['wifi_client_interface'])) {
$status->addMessage(_('Interface name invalid.'), 'danger');

View File

@ -6,7 +6,7 @@ if (!defined('RASPI_CONFIG')) {
$defaults = [
'RASPI_BRAND_TEXT' => 'RaspAP',
'RASPI_VERSION' => '2.8.7',
'RASPI_VERSION' => '2.9.6',
'RASPI_CONFIG_NETWORK' => RASPI_CONFIG.'/networking/defaults.json',
'RASPI_ADMIN_DETAILS' => RASPI_CONFIG.'/raspap.auth',
'RASPI_WIFI_AP_INTERFACE' => 'wlan0',

View File

@ -1,6 +1,5 @@
<?php
require_once 'includes/status_messages.php';
require_once 'config.php';
/**
@ -8,7 +7,7 @@ require_once 'config.php';
*/
function DisplayDHCPConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['savedhcpdsettings'])) {
saveDHCPConfig($status);
@ -133,8 +132,6 @@ function validateDHCPInput()
}
if (!filter_var($_POST['DefaultGateway'], FILTER_VALIDATE_IP) && !empty($_POST['DefaultGateway'])) {
$errors .= _('Invalid default gateway.').'<br />'.PHP_EOL;
var_dump($_POST['DefaultGateway']);
die();
}
if (($_POST['dhcp-iface'] == "1")) {
if (!filter_var($_POST['RangeStart'], FILTER_VALIDATE_IP) && !empty($_POST['RangeStart'])) {
@ -189,12 +186,14 @@ function updateDnsmasqConfig($iface,$status)
}
// Static leases
$staticLeases = array();
for ($i=0; $i < count($_POST["static_leases"]["mac"]); $i++) {
$mac = trim($_POST["static_leases"]["mac"][$i]);
$ip = trim($_POST["static_leases"]["ip"][$i]);
$comment = trim($_POST["static_leases"]["comment"][$i]);
if ($mac != "" && $ip != "") {
$staticLeases[] = array('mac' => $mac, 'ip' => $ip, 'comment' => $comment);
if (isset($_POST["static_leases"]["mac"])) {
for ($i=0; $i < count($_POST["static_leases"]["mac"]); $i++) {
$mac = trim($_POST["static_leases"]["mac"][$i]);
$ip = trim($_POST["static_leases"]["ip"][$i]);
$comment = trim($_POST["static_leases"]["comment"][$i]);
if ($mac != "" && $ip != "") {
$staticLeases[] = array('mac' => $mac, 'ip' => $ip, 'comment' => $comment);
}
}
}
// Sort ascending by IPs
@ -255,24 +254,27 @@ function updateDHCPConfig($iface,$status)
{
$cfg[] = '# RaspAP '.$iface.' configuration';
$cfg[] = 'interface '.$iface;
if (isset($_POST['StaticIP'])) {
if (isset($_POST['StaticIP']) && $_POST['StaticIP'] !== '') {
$mask = ($_POST['SubnetMask'] !== '' && $_POST['SubnetMask'] !== '0.0.0.0') ? '/'.mask2cidr($_POST['SubnetMask']) : null;
$cfg[] = 'static ip_address='.$_POST['StaticIP'].$mask;
}
if (isset($_POST['DefaultGateway'])) {
$cfg[] = 'static routers='.$_POST['DefaultGateway'];
if (isset($_POST['DefaultGateway']) && $_POST['DefaultGateway'] !== '') {
$cfg[] = 'static routers='.$_POST['DefaultGateway'];
}
if ($_POST['DNS1'] !== '' || $_POST['DNS2'] !== '') {
$cfg[] = 'static domain_name_server='.$_POST['DNS1'].' '.$_POST['DNS2'];
}
if ($_POST['Metric'] !== '') {
$cfg[] = 'metric '.$_POST['Metric'];
$cfg[] = 'metric '.$_POST['Metric'];
}
if ($_POST['Fallback'] == 1) {
$cfg[] = 'profile static_'.$iface;
$cfg[] = 'fallback static_'.$iface;
}
$cfg[] = $_POST['DefaultRoute'] == '1' ? 'gateway' : 'nogateway';
if (( substr($iface, 0, 2) === "wl") && $_POST['NoHookWPASupplicant'] == '1') {
$cfg[] = 'nohook wpa_supplicant';
}
$dhcp_cfg = file_get_contents(RASPI_DHCPCD_CONFIG);
if (!preg_match('/^interface\s'.$iface.'$/m', $dhcp_cfg)) {
$cfg[] = PHP_EOL;

View File

@ -1,368 +0,0 @@
<?php
require_once 'includes/status_messages.php';
require_once 'includes/functions.php';
define('RASPAP_IPTABLES_SCRIPT', "/tmp/iptables_raspap.sh");
define('RASPAP_IP6TABLES_SCRIPT', "/tmp/ip6tables_raspap.sh");
/**
*
* @param array $rule
* @param array $conf
* @return array $don
*/
function getDependson(&$rule, &$conf)
{
if (isset($rule["dependson"][0]) ) {
$don = &$rule["dependson"];
if (!empty($don[0]) && isset($conf[$don[0]["var"]]) ) {
if (!isset($don[0]["type"]) ) { $don[0]["type"]="bool";
}
return $don;
}
}
return false;
}
/**
*
* @param array $sect
* @param array $conf
* @return boolean $active
*/
function isRuleEnabled(&$sect, &$conf)
{
$fw_on = isset($conf["firewall-enable"]) && $conf["firewall-enable"];
$active = isset($sect["fw-state"]) && $sect["fw-state"]==1;
$active = $fw_on ? $active : !$active;
$active = $active || !isset($sect["fw-state"]);
if (($don = getDependson($sect, $conf)) !== false
&& $don[0]["type"] == "bool" && !$conf[$don[0]["var"]]
) { $active = false;
}
return $active;
}
/**
*
* @param array $sect
* @param array $conf
* @return string $str
*/
function createRuleStr(&$sect, &$conf)
{
if (!is_array($sect["rules"]) ) { return "";
}
$rules = $sect["rules"];
$depon = getDependson($sect, $conf);
$rs = array();
foreach ( $rules as $rule ) {
if (preg_match('/\$[a-z0-9]*\$/i', $rule) ) {
$r = array($rule);
foreach ( $depon as $dep ) {
$rr = array();
$repl=$val="";
switch ( $dep["type"] ) {
case "list":
if (isset($dep["var"]) && !empty($conf[$dep["var"]]) ) { $val = explode(' ', $conf[$dep["var"]]);
}
if (!empty($val) && isset($dep["replace"]) ) { $repl=$dep["replace"];
}
break;
case "string":
if (isset($dep["var"]) ) { $val=$conf[$dep["var"]];
}
if (!empty($val) && isset($dep["replace"]) ) { $repl=$dep["replace"];
}
break;
default:
break;
}
if (!empty($repl) && !empty($val) ) {
if (is_array($val) ) {
foreach ( $val as $v ) { $rr = array_merge($rr, str_replace($repl, $v, $r));
}
}
else { $rr = array_merge($rr, str_replace($repl, $val, $r));
}
}
$r = !empty($rr) ? $rr : $r;
}
$rs = array_merge($rs, $rr);
} else {
$rs[] = $rule;
}
}
$str="";
foreach ( $rs as $r ) {
if (!preg_match('/\$[a-z0-9]*\$/i', $r) ) { $str .= '$IPT '.$r."\n";
}
}
return $str;
}
/**
*
* @param array $rule
* @return boolean
*/
function isIPv4(&$rule)
{
return !isset($rule["ip-version"]) || strstr($rule["ip-version"], "4") !== false;
}
/**
*
* @param array $rule
* @return boolean
*/
function isIPv6(&$rule)
{
return !isset($rule["ip-version"]) || strstr($rule["ip-version"], "6") !== false;
}
/**
*
* @return boolean
*/
function configureFirewall()
{
$json = file_get_contents(RASPI_IPTABLES_CONF);
$ipt = json_decode($json, true);
$conf = ReadFirewallConf();
$txt = "#!/bin/bash\n";
file_put_contents(RASPAP_IPTABLES_SCRIPT, $txt);
file_put_contents(RASPAP_IP6TABLES_SCRIPT, $txt);
file_put_contents(RASPAP_IPTABLES_SCRIPT, 'IPT="iptables"'."\n", FILE_APPEND);
file_put_contents(RASPAP_IP6TABLES_SCRIPT, 'IPT="ip6tables"'."\n", FILE_APPEND);
$txt = "\$IPT -F\n";
$txt .= "\$IPT -X\n";
$txt .= "\$IPT -t nat -F\n";
file_put_contents(RASPAP_IPTABLES_SCRIPT, $txt, FILE_APPEND);
file_put_contents(RASPAP_IP6TABLES_SCRIPT, $txt, FILE_APPEND);
if (empty($conf) || empty($ipt) ) { return false;
}
$count=0;
foreach ( $ipt["order"] as $idx ) {
if (isset($ipt[$idx]) ) {
foreach ( $ipt[$idx] as $i => $sect ) {
if (isRuleEnabled($sect, $conf) ) {
$str_rules= createRuleStr($sect, $conf);
if (!empty($str_rules) ) {
if (isIPv4($sect) ) { file_put_contents(RASPAP_IPTABLES_SCRIPT, $str_rules, FILE_APPEND);
}
if (isIPv6($sect) ) { file_put_contents(RASPAP_IP6TABLES_SCRIPT, $str_rules, FILE_APPEND);
}
++$count;
}
}
}
}
}
if ($count > 0 ) {
exec("chmod +x ".RASPAP_IPTABLES_SCRIPT);
exec("sudo ".RASPAP_IPTABLES_SCRIPT);
exec("sudo iptables-save | sudo tee /etc/iptables/rules.v4");
unlink(RASPAP_IPTABLES_SCRIPT);
exec("chmod +x ".RASPAP_IP6TABLES_SCRIPT);
exec("sudo ".RASPAP_IP6TABLES_SCRIPT);
exec("sudo ip6tables-save | sudo tee /etc/iptables/rules.v6");
unlink(RASPAP_IP6TABLES_SCRIPT);
}
return ($count > 0);
}
/**
*
* @param array $conf
* @return string $ret
*/
function WriteFirewallConf($conf)
{
$ret = false;
if (is_array($conf) ) { write_php_ini($conf, RASPI_FIREWALL_CONF);
}
return $ret;
}
/**
*
* @return array $conf
*/
function ReadFirewallConf()
{
$conf = array();
if (file_exists(RASPI_FIREWALL_CONF) ) {
$conf = parse_ini_file(RASPI_FIREWALL_CONF);
}
if ( !isset($conf["firewall-enable"]) ) {
$conf["firewall-enable"] = false;
$conf["ssh-enable"] = false;
$conf["http-enable"] = false;
$conf["excl-devices"] = "";
$conf["excluded-ips"] = "";
$conf["ap-device"] = "";
$conf["client-device"] = "";
$conf["restricted-ips"] = "";
}
exec('ifconfig | grep -E -i "^tun[0-9]"', $ret);
$conf["openvpn-enable"] = !empty($ret);
unset($ret);
exec('ifconfig | grep -E -i "^wg[0-9]"', $ret);
$conf["wireguard-enable"] = !empty($ret);
return $conf;
}
/**
*
* @return string $ips
*/
function getVPN_IPs()
{
$ips = "";
// get openvpn and wireguard server IPs
if (RASPI_OPENVPN_ENABLED && ($fconf = glob(RASPI_OPENVPN_CLIENT_PATH ."/*.conf")) !== false && !empty($fconf) ) {
foreach ( $fconf as $f ) {
unset($result);
exec('cat '.$f.' | sed -rn "s/^remote\s*([a-z0-9\.\-\_:]*)\s*([0-9]*)\s*$/\1 \2/ip" ', $result);
if (!empty($result) ) {
$result = explode(" ", $result[0]);
$ip = (isset($result[0])) ? $result[0] : "";
$port = (isset($result[1])) ? $result[1] : "";
if (!empty($ip) ) {
$ip = gethostbyname($ip);
if (filter_var($ip, FILTER_VALIDATE_IP) && strpos($ips, $ip) === false ) { $ips .= " $ip";
}
}
}
}
}
// get wireguard server IPs
if (RASPI_WIREGUARD_ENABLED && ($fconf = glob(RASPI_WIREGUARD_PATH ."/*.conf")) !== false && !empty($fconf) ) {
foreach ( $fconf as $f ) {
unset($result);
exec('sudo /bin/cat '.$f.' | sed -rn "s/^endpoint\s*=\s*\[?([a-z0-9\.\-\_:]*)\]?:([0-9]*)\s*$/\1 \2/ip" ', $result);
if (!empty($result) ) {
$result = explode(" ", $result[0]);
$ip = (isset($result[0])) ? $result[0] : "";
$port = (isset($result[1])) ? $result[1] : "";
if (!empty($ip) ) {
$ip = gethostbyname($ip);
if (filter_var($ip, FILTER_VALIDATE_IP) && strpos($ips, $ip) === false ) { $ips .= " $ip";
}
}
}
}
}
return trim($ips);
}
/**
*
* @return array $fw_conf
*/
function getFirewallConfiguration()
{
$fw_conf = ReadFirewallConf();
$json = file_get_contents(RASPI_IPTABLES_CONF);
getWifiInterface();
$ap_device = $_SESSION['ap_interface'];
$clients = getClients();
$str_clients = "";
foreach( $clients["device"] as $dev ) {
if (!$dev["isAP"] ) {
if (!empty($str_clients) ) { $str_clients .= ", ";
}
$str_clients .= $dev["name"];
}
}
$fw_conf["ap-device"] = $ap_device;
$fw_conf["client-list"] = $str_clients;
$id=findCurrentClientIndex($clients);
if ($id >= 0 ) { $fw_conf["client-device"] = $clients["device"][$id]["name"];
}
return $fw_conf;
}
/**
*
*/
function updateFirewall()
{
$fw_conf = getFirewallConfiguration();
if ( isset($fw_conf["firewall-enable"]) ) {
WriteFirewallConf($fw_conf);
configureFirewall();
}
return;
}
/**
*
*/
function DisplayFirewallConfig()
{
$status = new StatusMessages();
$fw_conf = getFirewallConfiguration();
$ap_device = $fw_conf["ap-device"];
$str_clients = $fw_conf["client-list"];
if (!empty($_POST)) {
$fw_conf["ssh-enable"] = isset($_POST['ssh-enable']);
$fw_conf["http-enable"] = isset($_POST['http-enable']);
$fw_conf["firewall-enable"] = isset($_POST['firewall-enable']) || isset($_POST['apply-firewall']);
if (isset($_POST['firewall-enable']) ) { $status->addMessage(_('Firewall is now enabled'), 'success');
}
if (isset($_POST['apply-firewall']) ) { $status->addMessage(_('Firewall settings changed'), 'success');
}
if (isset($_POST['firewall-disable']) ) { $status->addMessage(_('Firewall is now disabled'), 'warning');
}
if (isset($_POST['save-firewall']) ) { $status->addMessage(_('Firewall settings saved. Firewall is still disabled.'), 'success');
}
if (isset($_POST['excl-devices']) ) {
$excl = filter_var($_POST['excl-devices'], FILTER_SANITIZE_STRING);
$excl = str_replace(',', ' ', $excl);
$excl = trim(preg_replace('/\s+/', ' ', $excl));
if ($fw_conf["excl-devices"] != $excl ) {
$status->addMessage(_('Exclude devices '. $excl), 'success');
$fw_conf["excl-devices"] = $excl;
}
}
if (isset($_POST['excluded-ips']) ) {
$excl = filter_var($_POST['excluded-ips'], FILTER_SANITIZE_STRING);
$excl = str_replace(',', ' ', $excl);
$excl = trim(preg_replace('/\s+/', ' ', $excl));
if (!empty($excl) ) {
$excl = explode(' ', $excl);
$str_excl = "";
foreach ( $excl as $ip ) {
if (filter_var($ip, FILTER_VALIDATE_IP) ) { $str_excl .= "$ip ";
} else { $status->addMessage(_('Exclude IP address '. $ip . ' failed - not a valid IP address'), 'warning');
}
}
}
$str_excl = trim($str_excl);
if ($fw_conf["excluded-ips"] != $str_excl ) {
$status->addMessage(_('Exclude IP address(es) '. $str_excl), 'success');
$fw_conf["excluded-ips"] = $str_excl;
}
}
WriteFirewallConf($fw_conf);
configureFirewall();
}
$vpn_ips = getVPN_IPs();
echo renderTemplate(
"firewall", compact(
"status",
"ap_device",
"str_clients",
"fw_conf",
"vpn_ips"
)
);
}

View File

@ -52,11 +52,15 @@ function mask2cidr($mask)
*/
function cidr2mask($cidr)
{
$ta = substr ($cidr, strpos ($cidr, '/') + 1) * 1;
$netmask = str_split (str_pad (str_pad ('', $ta, '1'), 32, '0'), 8);
foreach ($netmask as &$element)
$element = bindec ($element);
return join ('.', $netmask);
$ipParts = explode('/', $cidr);
$ip = $ipParts[0];
$prefixLength = $ipParts[1];
$ipLong = ip2long($ip);
$netmaskLong = bindec(str_pad(str_repeat('1', $prefixLength), 32, '0'));
$netmask = long2ip(intval($netmaskLong));
return $netmask;
}
/**
@ -314,23 +318,23 @@ function CSRFMetaTag()
*/
function CSRFValidate()
{
$post_token = $_POST['csrf_token'];
$header_token = $_SERVER['HTTP_X_CSRF_TOKEN'];
if(isset($_POST['csrf_token'])) {
$post_token = $_POST['csrf_token'];
$header_token = $_SERVER['HTTP_X_CSRF_TOKEN'];
if (empty($post_token) && empty($header_token)) {
return false;
}
$request_token = $post_token;
if (empty($post_token)) {
$request_token = $header_token;
}
if (hash_equals($_SESSION['csrf_token'], $request_token)) {
return true;
} else {
error_log('CSRF violation');
return false;
if (empty($post_token) && empty($header_token)) {
return false;
}
$request_token = $post_token;
if (empty($post_token)) {
$request_token = $header_token;
}
if (hash_equals($_SESSION['csrf_token'], $request_token)) {
return true;
} else {
error_log('CSRF violation');
return false;
}
}
}
@ -426,8 +430,9 @@ function ParseConfig($arrConfig)
continue;
}
list($option, $value) = array_map("trim", explode("=", $line, 2));
if (strpos($line, "=") !== false) {
list($option, $value) = array_map("trim", explode("=", $line, 2));
}
if (empty($config[$option])) {
$config[$option] = $value ?: true;
} else {
@ -448,8 +453,8 @@ function ParseConfig($arrConfig)
*/
function getNetConfig($interface)
{
$URI = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'] .'/ajax/networking/get_netcfg.php?iface='.$interface;
$jsonData = file_get_contents($URI);
$URI = $_SERVER['REQUEST_SCHEME'].'://' .'localhost'. dirname($_SERVER['SCRIPT_NAME']) .'/ajax/networking/get_netcfg.php?iface='.$interface;
$jsonData = file_get_contents($URI, true);
return $jsonData;
}
@ -659,10 +664,18 @@ function formatDateAgo($datetime, $full = false)
return $string ? implode(', ', $string) . ' ago' : 'just now';
}
function initializeApp()
{
$_SESSION["theme_url"] = getThemeOpt();
$_SESSION["toggleState"] = getSidebarState();
$_SESSION["bridgedEnabled"] = getBridgedState();
}
function getThemeOpt()
{
if (!isset($_COOKIE['theme'])) {
$theme = "custom.php";
setcookie('theme', $theme);
} else {
$theme = $_COOKIE['theme'];
}
@ -675,13 +688,16 @@ function getColorOpt()
$color = "#2b8080";
} else {
$color = $_COOKIE['color'];
setcookie('color', $color);
}
return $color;
}
function getSidebarState()
{
if ($_COOKIE['sidebarToggled'] == 'true' ) {
return"toggled";
if(isset($_COOKIE['sidebarToggled'])) {
if ($_COOKIE['sidebarToggled'] == 'true' ) {
return "toggled";
}
}
}
@ -730,7 +746,7 @@ function validate_host($host)
// @return boolean
function getNightmode()
{
if ($_COOKIE['theme'] == 'lightsout.css') {
if (isset($_COOKIE['theme']) && $_COOKIE['theme'] == 'lightsout.css') {
return true;
} else {
return false;
@ -757,7 +773,8 @@ function qr_encode($str)
return preg_replace('/(?<!\\\)([\":;,])/', '\\\\\1', $str);
}
function evalHexSequence($string) {
function evalHexSequence($string)
{
$evaluator = function ($input) {
return hex2bin($input[1]);
};
@ -791,3 +808,26 @@ function get_public_ip()
return $public_ip[0];
}
/* Returns a standardized tooltip
*
* @return string $tooltip
*/
function getTooltip($msg, $id, $visible = true, $data_html = false)
{
($visible) ? $opt1 = 'visible' : $opt1 = 'invisible';
($data_html) ? $opt2 = 'data-html="true"' : $opt2 = 'data-html="false"';
echo '<i class="fas fa-question-circle text-muted ' .$opt1.'" id="' .$id. '" data-toggle="tooltip" ' .$opt2. ' data-placement="auto" title="' . _($msg). '"></i>';
}
// Load non default JS/ECMAScript in footer
function loadFooterScripts($extraFooterScripts)
{
foreach ($extraFooterScripts as $script) {
echo '<script type="text/javascript" src="' , $script['src'] , '"';
if ($script['defer']) {
echo ' defer="defer"';
}
echo '></script>' , PHP_EOL;
}
}

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

View File

@ -1,22 +1,17 @@
<?php
require_once 'status_messages.php';
require_once 'app/lib/system.php';
require_once 'includes/wifi_functions.php';
require_once 'includes/config.php';
getWifiInterface();
$system = new \RaspAP\System\Sysinfo;
$os = $system->operatingSystem();
/**
* Initialize hostapd values, display interface
*
*/
function DisplayHostAPDConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
$system = new \RaspAP\System\Sysinfo;
$operatingSystem = $system->operatingSystem();
$arrConfig = array();
@ -25,7 +20,7 @@ function DisplayHostAPDConfig()
'b' => '802.11b - 2.4 GHz',
'g' => '802.11g - 2.4 GHz',
'n' => '802.11n - 2.4 GHz',
'ac' => '802.11.ac - 5 GHz'
'ac' => '802.11ac - 5 GHz'
];
$arrSecurity = array(1 => 'WPA', 2 => 'WPA2', 3 => 'WPA+WPA2', 'none' => _("None"));
$arrEncType = array('TKIP' => 'TKIP', 'CCMP' => 'CCMP', 'TKIP CCMP' => 'TKIP+CCMP');
@ -40,22 +35,25 @@ function DisplayHostAPDConfig()
exec($cmd, $txpower);
$txpower = intval($txpower[0]);
if (isset($_POST['interface'])) {
$interface = escapeshellarg($_POST['interface']);
}
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['SaveHostAPDSettings'])) {
SaveHostAPDConfig($arrSecurity, $arrEncType, $arr80211Standard, $interfaces, $status);
}
}
$arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini');
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['StartHotspot']) || isset($_POST['RestartHotspot'])) {
$status->addMessage('Attempting to start hotspot', 'info');
if ($arrHostapdConf['BridgedEnable'] == 1) {
exec('sudo /etc/raspap/hostapd/servicestart.sh --interface br0 --seconds 3', $return);
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --interface br0 --seconds 3', $return);
} elseif ($arrHostapdConf['WifiAPEnable'] == 1) {
exec('sudo /etc/raspap/hostapd/servicestart.sh --interface uap0 --seconds 3', $return);
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --interface uap0 --seconds 3', $return);
} else {
exec('sudo /etc/raspap/hostapd/servicestart.sh --seconds 3', $return);
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --seconds 3', $return);
}
foreach ($return as $line) {
$status->addMessage($line, 'info');
@ -69,9 +67,11 @@ function DisplayHostAPDConfig()
}
}
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
exec('iwgetid '. escapeshellarg($_POST['interface']). ' -r', $wifiNetworkID);
if (!empty($wifiNetworkID[0])) {
$managedModeEnabled = true;
if (isset($interface)) {
exec('iwgetid '. $interface. ' -r', $wifiNetworkID);
if (!empty($wifiNetworkID[0])) {
$managedModeEnabled = true;
}
}
$hostapdstatus = $system->hostapdStatus();
$serviceStatus = $hostapdstatus[0] == 0 ? "down" : "up";
@ -98,15 +98,44 @@ function DisplayHostAPDConfig()
$arrConfig['country_code'] = $country_code[0];
}
// set txpower with iw if value is non-default ('auto')
if (isset($_POST['txpower']) && ($_POST['txpower'] != 'auto')) {
$sdBm = $_POST['txpower'] * 100;
exec('sudo /sbin/iw dev '.$_POST['interface'].' set txpower fixed '.$sdBm, $return);
$status->addMessage('Setting transmit power to '.$_POST['txpower'].' dBm.', 'success');
$txpower = $_POST['txpower'];
} elseif ($_POST['txpower'] == 'auto') {
exec('sudo /sbin/iw dev '.$_POST['interface'].' set txpower auto', $return);
$status->addMessage('Setting transmit power to '.$_POST['txpower'].'.', 'success');
$txpower = $_POST['txpower'];
if (isset($_POST['txpower'])) {
if ($_POST['txpower'] != 'auto') {
$txpower = intval($_POST['txpower']);
$sdBm = $txpower * 100;
exec('sudo /sbin/iw dev '.$interface.' set txpower fixed '.$sdBm, $return);
$status->addMessage('Setting transmit power to '.$_POST['txpower'].' dBm.', 'success');
$txpower = $_POST['txpower'];
} elseif ($_POST['txpower'] == 'auto') {
exec('sudo /sbin/iw dev '.$interface.' set txpower auto', $return);
$status->addMessage('Setting transmit power to '.$_POST['txpower'].'.', 'success');
$txpower = $_POST['txpower'];
}
}
$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);
}
} else {
$hwModeDisabled = null;
}
echo renderTemplate(
@ -124,7 +153,9 @@ function DisplayHostAPDConfig()
"arrTxPower",
"txpower",
"arrHostapdConf",
"operatingSystem"
"operatingSystem",
"selectedHwMode",
"hwModeDisabled"
)
);
}
@ -141,13 +172,16 @@ function DisplayHostAPDConfig()
*/
function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status)
{
// It should not be possible to send bad data for these fields so clearly
// someone is up to something if they fail. Fail silently.
// It should not be possible to send bad data for these fields.
// If wpa fields are absent, return false and log securely.
if (!(array_key_exists($_POST['wpa'], $wpa_array)
&& array_key_exists($_POST['wpa_pairwise'], $enc_types)
&& array_key_exists($_POST['hw_mode'], $modes))
) {
error_log("Attempting to set hostapd config with wpa='".$_POST['wpa']."', wpa_pairwise='".$_POST['wpa_pairwise']."' and hw_mode='".$_POST['hw_mode']."'"); // FIXME: log injection
$err = "Attempting to set hostapd config with wpa='".escapeshellarg($_POST['wpa']);
$err .= "', wpa_pairwise='".$escapeshellarg(_POST['wpa_pairwise']);
$err .= "and hw_mode='".$escapeshellarg(_POST['hw_mode'])."'";
error_log($err);
return false;
}
// Validate input

View File

@ -75,6 +75,9 @@ if (empty($_SESSION['locale']) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2)
case "pl":
$locale = "pl_PL.UTF-8";
break;
case "sk":
$locale = "sk_SK.UTF-8";
break;
default:
$locale = "en_GB.UTF-8";
break;
@ -94,3 +97,33 @@ bindtextdomain(LOCALE_DOMAIN, LOCALE_ROOT);
bind_textdomain_codeset(LOCALE_DOMAIN, 'UTF-8');
textdomain(LOCALE_DOMAIN);
function getLocales()
{
$arrLocales = array(
'en_GB.UTF-8' => 'English',
'cs_CZ.UTF-8' => 'Čeština',
'zh_TW.UTF-8' => '正體中文 (Chinese traditional)',
'zh_CN.UTF-8' => '简体中文 (Chinese simplified)',
'da_DK.UTF-8' => 'Dansk',
'de_DE.UTF-8' => 'Deutsch',
'es_MX.UTF-8' => 'Español',
'fi_FI.UTF-8' => 'Finnish',
'fr_FR.UTF-8' => 'Français',
'el_GR.UTF-8' => 'Ελληνικά',
'id_ID.UTF-8' => 'Indonesian',
'it_IT.UTF-8' => 'Italiano',
'ja_JP.UTF-8' => '日本語 (Japanese)',
'ko_KR.UTF-8' => '한국어 (Korean)',
'nl_NL.UTF-8' => 'Nederlands',
'pl_PL.UTF-8' => 'Polskie',
'pt_BR.UTF-8' => 'Português',
'ru_RU.UTF-8' => 'Русский',
'ro_RO.UTF-8' => 'Română',
'sk_SK.UTF-8' => 'Slovenčina',
'sv_SE.UTF-8' => 'Svenska',
'tr_TR.UTF-8' => 'Türkçe',
'vi_VN.UTF-8' => 'Tiếng Việt (Vietnamese)'
);
return $arrLocales;
}

23
includes/navbar.php Executable file
View File

@ -0,0 +1,23 @@
<nav class="navbar navbar-expand navbar-light topbar mb-1 static-top">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTopbar" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
<p class="text-left brand-title mt-3 ml-2"></p>
<ul class="navbar-nav ml-auto">
<!-- Nav Item - Night mode -->
<div class="custom-control custom-switch mt-4">
<input type="checkbox" class="custom-control-input" id="night-mode" <?php echo getNightmode() ? 'checked' : null ; ?> >
<label class="custom-control-label" for="night-mode"><i class="far fa-moon mr-1 text-muted"></i></label>
</div>
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link" href="auth_conf">
<span class="mr-2 d-none d-lg-inline small"><?php echo htmlspecialchars($_SESSION['user_id'], ENT_QUOTES); ?></span>
<i class="fas fa-user-circle fa-3x"></i>
</a>
</li>
</ul>
</nav>

View File

@ -1,6 +1,5 @@
<?php
require_once 'includes/status_messages.php';
require_once 'includes/internetRoute.php';
/**
@ -9,8 +8,7 @@ require_once 'includes/internetRoute.php';
*/
function DisplayNetworkingConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
exec("ls /sys/class/net | grep -v lo", $interfaces);
$routeInfo = getRouteInfo(true);

View File

@ -1,9 +1,7 @@
<?php
require_once 'includes/status_messages.php';
require_once 'includes/config.php';
require_once 'includes/wifi_functions.php';
require_once 'app/lib/uploader.php';
getWifiInterface();
@ -12,7 +10,7 @@ getWifiInterface();
*/
function DisplayOpenVPNConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['SaveOpenVPNSettings'])) {
if (isset($_POST['authUser'])) {
@ -64,7 +62,7 @@ function DisplayOpenVPNConfig()
ftruncate($f, 0);
fclose($f);
}
} elseif (isset($_POST['log-openvpn']) || filesize('/tmp/openvpn.log') >0) {
} elseif (isset($_POST['log-openvpn']) || file_exists('/tmp/openvpn.log')) {
$logEnable = 1;
exec("sudo /etc/raspap/openvpn/openvpnlog.sh", $logOutput);
$logOutput = file_get_contents('/tmp/openvpn.log');
@ -109,7 +107,7 @@ function SaveOpenVPNConfig($status, $file, $authUser, $authPassword)
throw new RuntimeException('Invalid parameters');
}
$upload = \RaspAP\Uploader\Upload::factory('ovpn',$tmp_destdir);
$upload = \RaspAP\Uploader\FileUpload::factory('ovpn',$tmp_destdir);
$upload->set_max_file_size(64*KB);
$upload->set_allowed_mime_types(array('ovpn' => 'text/plain'));
$upload->file($file);

52
includes/page_actions.php Executable file
View File

@ -0,0 +1,52 @@
<?php
$extraFooterScripts = array();
$page = $_SERVER['PATH_INFO'];
// handle page actions
switch ($page) {
case "/wlan0_info":
DisplayDashboard($extraFooterScripts);
break;
case "/dhcpd_conf":
DisplayDHCPConfig();
break;
case "/wpa_conf":
DisplayWPAConfig();
break;
case "/network_conf":
DisplayNetworkingConfig();
break;
case "/hostapd_conf":
DisplayHostAPDConfig();
break;
case "/adblock_conf":
DisplayAdBlockConfig();
break;
case "/openvpn_conf":
DisplayOpenVPNConfig();
break;
case "/wg_conf":
DisplayWireGuardConfig();
break;
case "/torproxy_conf":
DisplayTorProxyConfig();
break;
case "/auth_conf":
DisplayAuthConfig($_SESSION['user_id']);
break;
case "/save_hostapd_conf":
SaveTORAndVPNConfig();
break;
case "/data_use":
DisplayDataUsage($extraFooterScripts);
break;
case "/system_info":
DisplaySystem($extraFooterScripts);
break;
case "/about":
DisplayAbout();
break;
default:
DisplayDashboard($extraFooterScripts);
}
?>

93
includes/sidebar.php Executable file
View File

@ -0,0 +1,93 @@
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo (isset($_SESSION["toggleState"])) ? $_SESSION["toggleState"] : null ; ?>" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="wlan0_info">
<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">
<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>
<div class="info-item-xs"><span class="icon">
<i class="fas fa-circle <?php echo ($hostapd_led); ?>"></i></span> <?php echo _("Hotspot").' '. _($hostapd_status); ?>
</div>
<div class="info-item-xs"><span class="icon">
<i class="fas fa-circle <?php echo ($memused_led); ?>"></i></span> <?php echo _("Memory Use").': '. htmlspecialchars(strval($memused), ENT_QUOTES); ?>%
</div>
<div class="info-item-xs"><span class="icon">
<i class="fas fa-circle <?php echo ($cputemp_led); ?>"></i></span> <?php echo _("CPU Temp").': '. htmlspecialchars($cputemp, ENT_QUOTES); ?>°C
</div>
</div>
</div>
<li class="nav-item">
<a class="nav-link" href="wlan0_info"><i class="fas fa-tachometer-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("Dashboard"); ?></span></a>
</li>
<?php if (RASPI_HOTSPOT_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="hostapd_conf"><i class="far fa-dot-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("Hotspot"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_DHCP_ENABLED && !$_SESSION["bridgedEnabled"]) : ?>
<li class="nav-item">
<a class="nav-link" href="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 && !$_SESSION["bridgedEnabled"]) : ?>
<li class="nav-item">
<a class="nav-link" href="adblock_conf"><i class="far fa-hand-paper fa-fw mr-2"></i><span class="nav-label"><?php echo _("Ad Blocking"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_NETWORK_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="network_conf"><i class="fas fa-network-wired fa-fw mr-2"></i><span class="nav-label"><?php echo _("Networking"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_WIFICLIENT_ENABLED && !$_SESSION["bridgedEnabled"]) : ?>
<li class="nav-item">
<a class="nav-link" href="wpa_conf"><i class="fas fa-wifi fa-fw mr-2"></i><span class="nav-label"><?php echo _("WiFi client"); ?></span></a>
</li>
<?php endif; ?>
<?php if (RASPI_OPENVPN_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="openvpn_conf"><i class="fas fa-key fa-fw mr-2"></i><span class="nav-label"><?php echo _("OpenVPN"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_WIREGUARD_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="wg_conf"><span class="ra-wireguard mr-2"></span><span class="nav-label"><?php echo _("WireGuard"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_TORPROXY_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="torproxy_conf"><i class="fas fa-eye-slash fa-fw mr-2"></i><span class="nav-label"><?php echo _("TOR proxy"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_CONFAUTH_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="auth_conf"><i class="fas fa-user-lock fa-fw mr-2"></i><span class="nav-label"><?php echo _("Authentication"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_VNSTAT_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="data_use"><i class="fas fa-chart-bar fa-fw mr-2"></i><span class="nav-label"><?php echo _("Data usage"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_SYSTEM_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="system_info"><i class="fas fa-cube fa-fw mr-2"></i><span class="nav-label"><?php echo _("System"); ?></a>
</li>
<?php endif; ?>
<li class="nav-item">
<a class="nav-link" href="about"><i class="fas fa-info-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("About RaspAP"); ?></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-block">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul>

View File

@ -1,7 +1,5 @@
<?php
require_once 'app/lib/system.php';
$system = new \RaspAP\System\Sysinfo;
$hostname = $system->hostname();

View File

@ -1,74 +1,14 @@
<?php
require_once 'includes/status_messages.php';
require_once 'includes/functions.php';
require_once 'config.php';
require_once 'app/lib/system.php';
/**
* Find the version of the Raspberry Pi
* Currently only used for the system information page but may useful elsewhere
*/
function RPiVersion()
{
// Lookup table from http://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/
$revisions = array(
'0002' => 'Model B Revision 1.0',
'0003' => 'Model B Revision 1.0 + ECN0001',
'0004' => 'Model B Revision 2.0 (256 MB)',
'0005' => 'Model B Revision 2.0 (256 MB)',
'0006' => 'Model B Revision 2.0 (256 MB)',
'0007' => 'Model A',
'0008' => 'Model A',
'0009' => 'Model A',
'000d' => 'Model B Revision 2.0 (512 MB)',
'000e' => 'Model B Revision 2.0 (512 MB)',
'000f' => 'Model B Revision 2.0 (512 MB)',
'0010' => 'Model B+',
'0013' => 'Model B+',
'0011' => 'Compute Module',
'0012' => 'Model A+',
'a01041' => 'a01041',
'a21041' => 'a21041',
'900092' => 'PiZero 1.2',
'900093' => 'PiZero 1.3',
'9000c1' => 'PiZero W',
'a02082' => 'Pi 3 Model B',
'a22082' => 'Pi 3 Model B',
'a32082' => 'Pi 3 Model B',
'a52082' => 'Pi 3 Model B',
'a020d3' => 'Pi 3 Model B+',
'a220a0' => 'Compute Module 3',
'a020a0' => 'Compute Module 3',
'a02100' => 'Compute Module 3+',
'a03111' => 'Model 4B Revision 1.1 (1 GB)',
'b03111' => 'Model 4B Revision 1.1 (2 GB)',
'c03111' => 'Model 4B Revision 1.1 (4 GB)'
);
$cpuinfo_array = '';
exec('cat /proc/cpuinfo', $cpuinfo_array);
$rev = trim(array_pop(explode(':', array_pop(preg_grep("/^Revision/", $cpuinfo_array)))));
if (array_key_exists($rev, $revisions)) {
return $revisions[$rev];
} else {
exec('cat /proc/device-tree/model', $model);
if (isset($model[0])) {
return $model[0];
} else {
return 'Unknown Device';
}
}
}
/**
*
*
*/
function DisplaySystem()
function DisplaySystem(&$extraFooterScripts)
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
if (isset($_POST['SaveLanguage'])) {
if (isset($_POST['locale'])) {
@ -107,15 +47,6 @@ function DisplaySystem()
}
}
}
if (isset($_POST['system_reboot'])) {
$status->addMessage("System Rebooting Now!", "warning", false);
$result = shell_exec("sudo /sbin/reboot");
}
if (isset($_POST['system_shutdown'])) {
$status->addMessage("System Shutting Down Now!", "warning", false);
$result = shell_exec("sudo /sbin/shutdown -h now");
}
}
if (isset($_POST['RestartLighttpd'])) {
@ -125,35 +56,16 @@ function DisplaySystem()
exec('cat '. RASPI_LIGHTTPD_CONFIG, $return);
$conf = ParseConfig($return);
$serverPort = $conf['server.port'];
$serverBind = str_replace('"', '',$conf['server.bind']);
if (isset($conf['server.bind'])) {
$serverBind = str_replace('"', '',$conf['server.bind']);
} else {
$serverBind = '';
}
// define locales
$arrLocales = array(
'en_GB.UTF-8' => 'English',
'cs_CZ.UTF-8' => 'Čeština',
'zh_TW.UTF-8' => '正體中文 (Chinese traditional)',
'zh_CN.UTF-8' => '简体中文 (Chinese simplified)',
'da_DK.UTF-8' => 'Dansk',
'de_DE.UTF-8' => 'Deutsch',
'es_MX.UTF-8' => 'Español',
'fi_FI.UTF-8' => 'Finnish',
'fr_FR.UTF-8' => 'Français',
'el_GR.UTF-8' => 'Ελληνικά',
'id_ID.UTF-8' => 'Indonesian',
'it_IT.UTF-8' => 'Italiano',
'ja_JP.UTF-8' => '日本語 (Japanese)',
'ko_KR.UTF-8' => '한국어 (Korean)',
'nl_NL.UTF-8' => 'Nederlands',
'pl_PL.UTF-8' => 'Polskie',
'pt_BR.UTF-8' => 'Português',
'ru_RU.UTF-8' => 'Русский',
'ro_RO.UTF-8' => 'Română',
'sv_SE.UTF-8' => 'Svenska',
'tr_TR.UTF-8' => 'Türkçe',
'vi_VN.UTF-8' => 'Tiếng Việt (Vietnamese)'
);
$arrLocales = getLocales();
#fetch system status variables.
// fetch system status variables
$system = new \RaspAP\System\Sysinfo;
$hostname = $system->hostname();
@ -161,7 +73,9 @@ function DisplaySystem()
$cores = $system->processorCount();
$os = $system->operatingSystem();
$kernel = $system->kernelVersion();
$systime = $system->systime();
$revision = $system->rpiRevision();
// mem used
$memused = $system->usedMemory();
$memused_status = "primary";
@ -209,6 +123,25 @@ function DisplaySystem()
$hostapd_led = "service-status-down";
}
// theme options
$themes = [
"default" => "RaspAP (default)",
"hackernews" => "HackerNews",
"material-light" => "Material"
];
$themeFiles = [
"default" => "custom.php",
"hackernews" => "hackernews.css",
"material-light" => "material-light.php"
];
$selectedTheme = array_search($_COOKIE['theme'], $themeFiles);
if (strpos($_COOKIE['theme'],'material') !== false) {
$selectedTheme = 'material-light';
}
$extraFooterScripts[] = array('src'=>'dist/huebee/huebee.pkgd.min.js', 'defer'=>false);
$extraFooterScripts[] = array('src'=>'app/js/huebee.js', 'defer'=>false);
echo renderTemplate("system", compact(
"arrLocales",
"status",
@ -216,6 +149,8 @@ function DisplaySystem()
"serverBind",
"hostname",
"uptime",
"systime",
"revision",
"cores",
"os",
"kernel",
@ -229,6 +164,8 @@ function DisplaySystem()
"cputemp_led",
"hostapd",
"hostapd_status",
"hostapd_led"
"hostapd_led",
"themes",
"selectedTheme"
));
}

View File

@ -1,22 +0,0 @@
<?php
/**
*
*
*/
function DisplayThemeConfig(&$extraFooterScripts)
{
$themes = [
"default" => "RaspAP (default)",
"hackernews" => "HackerNews"
];
$themeFiles = [
"default" => "custom.php",
"hackernews" => "hackernews.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);
}

View File

@ -1,7 +1,5 @@
<?php
require_once 'includes/status_messages.php';
/**
* Manage Tor Proxy configuration
*/

View File

@ -2,6 +2,9 @@
require_once 'functions.php';
const MIN_RSSI = -100;
const MAX_RSSI = -55;
function knownWifiStations(&$networks)
{
// Find currently configured networks
@ -16,7 +19,7 @@ function knownWifiStations(&$networks)
$networks[$ssid] = $network;
$network = null;
$ssid = null;
} elseif ($lineArr = preg_split('/\s*=\s*/', trim($line))) {
} elseif ($lineArr = preg_split('/\s*=\s*/', trim($line), 2)) {
switch (strtolower($lineArr[0])) {
case 'ssid':
$ssid = trim($lineArr[1], '"');
@ -24,9 +27,9 @@ function knownWifiStations(&$networks)
$network['ssid'] = $ssid;
break;
case 'psk':
if (array_key_exists('passphrase', $network)) {
break;
}
$network['passkey'] = trim($lineArr[1]);
$network['protocol'] = 'WPA';
break;
case '#psk':
$network['protocol'] = 'WPA';
case 'wep_key0': // Untested
@ -74,44 +77,46 @@ function nearbyWifiStations(&$networks, $cached = true)
if ( isset($lastnet['index']) ) $index = $lastnet['index'] + 1;
}
array_shift($scan_results);
foreach ($scan_results as $network) {
$arrNetwork = preg_split("/[\t]+/", $network); // split result into array
$ssid = $arrNetwork[4];
if (is_array($scan_results)) {
array_shift($scan_results);
foreach ($scan_results as $network) {
$arrNetwork = preg_split("/[\t]+/", $network); // split result into array
$ssid = $arrNetwork[4];
// exclude raspap ssid
if (empty($ssid) || $ssid == $ap_ssid) {
continue;
}
// exclude raspap ssid
if (empty($ssid) || $ssid == $ap_ssid) {
continue;
}
// filter SSID string: unprintable 7bit ASCII control codes, delete or quotes -> ignore network
if (preg_match('[\x00-\x1f\x7f\'\`\´\"]', $ssid)) {
continue;
}
// filter SSID string: unprintable 7bit ASCII control codes, delete or quotes -> ignore network
if (preg_match('[\x00-\x1f\x7f\'\`\´\"]', $ssid)) {
continue;
}
// If network is saved
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[$ssid] = array(
'ssid' => $ssid,
'configured' => false,
'protocol' => ConvertToSecurity($arrNetwork[3]),
'channel' => ConvertToChannel($arrNetwork[1]),
'passphrase' => '',
'visible' => true,
'connected' => false,
'index' => $index
);
++$index;
}
// If network is saved
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[$ssid] = array(
'ssid' => $ssid,
'configured' => false,
'protocol' => ConvertToSecurity($arrNetwork[3]),
'channel' => ConvertToChannel($arrNetwork[1]),
'passphrase' => '',
'visible' => true,
'connected' => false,
'index' => $index
);
++$index;
}
// 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];
// 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];
}
}
}
}
@ -191,7 +196,42 @@ function reinitializeWPA($force)
*
* @param string $ssid
*/
function ssid2utf8($ssid) {
function ssid2utf8($ssid)
{
return evalHexSequence($ssid);
}
/*
* Returns a signal strength indicator based on RSSI value
*
* @param string $rssi
*/
function getSignalBars($rssi)
{
// assign css class based on RSSI value
if ($rssi >= MAX_RSSI) {
$class = 'strong';
} elseif ($rssi >= -56) {
$class = 'medium';
} elseif ($rssi >= -67) {
$class = 'weak';
} elseif ($rssi >= -89) {
$class = '';
}
// calculate percent strength
if ($rssi >= -50) {
$pct = 100;
} elseif ($rssi <= MIN_RSSI) {
$pct = 0;
} else {
$pct = 2*($rssi + 100);
}
$elem = '<div data-toggle="tooltip" title="' . _("Signal strength"). ': ' .$pct. '%" class="signal-icon ' .$class. '">'.PHP_EOL;
for ($n = 0; $n < 3; $n++ ) {
$elem .= '<div class="signal-bar"></div>'.PHP_EOL;
}
$elem .= '</div>'.PHP_EOL;
return $elem;
}

5
includes/wireguard.php Normal file → Executable file
View File

@ -1,6 +1,5 @@
<?php
require_once 'includes/status_messages.php';
require_once 'config.php';
/**
@ -8,7 +7,7 @@ require_once 'config.php';
*/
function DisplayWireGuardConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
if (!RASPI_MONITOR_ENABLED) {
$optRules = $_POST['wgRules'];
$optConf = $_POST['wgCnfOpt'];
@ -112,7 +111,7 @@ function SaveWireGuardUpload($status, $file, $optRules)
throw new RuntimeException('Invalid parameters');
}
$upload = \RaspAP\Uploader\Upload::factory('wg',$tmp_destdir);
$upload = \RaspAP\Uploader\FileUpload::factory('wg',$tmp_destdir);
$upload->set_max_file_size(64*KB);
$upload->set_allowed_mime_types(array('text/plain'));
$upload->file($file);

258
index.php
View File

@ -4,17 +4,17 @@
* Raspbian WiFi Configuration Portal (RaspAP)
*
* 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.
* 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 (64-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.59 installed via apt)
* php-cgi (version 7.4.28 installed via apt)
* along with their supporting packages, php7.3 will also need to be enabled.
* php-cgi (version 7.4.33 installed via apt)
* along with their supporting packages, php7.4 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.8.7
* @version 2.9.6
* @link https://github.com/RaspAP/raspap-webgui/
* @link https://raspap.com/
* @see http://sirlagz.net/2013/02/08/raspap-webgui/
@ -27,8 +27,8 @@ require 'includes/csrf.php';
ensureCSRFSessionToken();
require_once 'includes/config.php';
require_once 'includes/autoload.php';
require_once 'includes/defaults.php';
require_once RASPI_CONFIG.'/raspap.php';
require_once 'includes/locale.php';
require_once 'includes/functions.php';
require_once 'includes/dashboard.php';
@ -41,22 +41,15 @@ require_once 'includes/system.php';
require_once 'includes/sysstats.php';
require_once 'includes/configure_client.php';
require_once 'includes/networking.php';
require_once 'includes/themes.php';
require_once 'includes/data_usage.php';
require_once 'includes/about.php';
require_once 'includes/openvpn.php';
require_once 'includes/wireguard.php';
require_once 'includes/torproxy.php';
$config = getConfig();
$output = $return = 0;
$page = $_SERVER['PATH_INFO'];
$theme_url = getThemeOpt();
$toggleState = getSidebarState();
$bridgedEnabled = getBridgedState();
?><!DOCTYPE html>
initializeApp();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
@ -87,8 +80,7 @@ $bridgedEnabled = getBridgedState();
<link href="dist/raspap/css/style.css" rel="stylesheet" type="text/css">
<!-- Custom CSS -->
<link href="<?php echo $theme_url; ?>" title="main" rel="stylesheet">
<link href="<?php echo $_SESSION["theme_url"]; ?>" title="main" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="app/icons/favicon.png?ver=2.0">
<link rel="apple-touch-icon" sizes="180x180" href="app/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="app/icons/favicon-32x32.png">
@ -110,207 +102,30 @@ $bridgedEnabled = getBridgedState();
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<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="wlan0_info">
<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">
<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>
<div class="info-item-xs"><span class="icon">
<i class="fas fa-circle <?php echo ($hostapd_led); ?>"></i></span> <?php echo _("Hotspot").' '. _($hostapd_status); ?>
</div>
<div class="info-item-xs"><span class="icon">
<i class="fas fa-circle <?php echo ($memused_led); ?>"></i></span> <?php echo _("Memory Use").': '. htmlspecialchars($memused, ENT_QUOTES); ?>%
</div>
<div class="info-item-xs"><span class="icon">
<i class="fas fa-circle <?php echo ($cputemp_led); ?>"></i></span> <?php echo _("CPU Temp").': '. htmlspecialchars($cputemp, ENT_QUOTES); ?>°C
<?php require_once 'includes/sidebar.php'; ?>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<?php require_once 'includes/navbar.php'; ?>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<?php require_once 'includes/page_actions.php'; ?>
</div><!-- /.container-fluid -->
</div><!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-grey-100">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span></span>
</div>
</div>
</div>
<li class="nav-item">
<a class="nav-link" href="wlan0_info"><i class="fas fa-tachometer-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("Dashboard"); ?></span></a>
</li>
<?php if (RASPI_HOTSPOT_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="hostapd_conf"><i class="far fa-dot-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("Hotspot"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_DHCP_ENABLED && !$bridgedEnabled) : ?>
<li class="nav-item">
<a class="nav-link" href="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 && !$bridgedEnabled) : ?>
<li class="nav-item">
<a class="nav-link" href="adblock_conf"><i class="far fa-hand-paper fa-fw mr-2"></i><span class="nav-label"><?php echo _("Ad Blocking"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_NETWORK_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="network_conf"><i class="fas fa-network-wired fa-fw mr-2"></i><span class="nav-label"><?php echo _("Networking"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_WIFICLIENT_ENABLED && !$bridgedEnabled) : ?>
<li class="nav-item">
<a class="nav-link" href="wpa_conf"><i class="fas fa-wifi fa-fw mr-2"></i><span class="nav-label"><?php echo _("WiFi client"); ?></span></a>
</li>
<?php endif; ?>
<?php if (RASPI_OPENVPN_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="openvpn_conf"><i class="fas fa-key fa-fw mr-2"></i><span class="nav-label"><?php echo _("OpenVPN"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_WIREGUARD_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="wg_conf"><span class="ra-wireguard mr-2"></span><span class="nav-label"><?php echo _("WireGuard"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_TORPROXY_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="torproxy_conf"><i class="fas fa-eye-slash fa-fw mr-2"></i><span class="nav-label"><?php echo _("TOR proxy"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_CONFAUTH_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="auth_conf"><i class="fas fa-user-lock fa-fw mr-2"></i><span class="nav-label"><?php echo _("Authentication"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_CHANGETHEME_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="theme_conf"><i class="fas fa-paint-brush fa-fw mr-2"></i><span class="nav-label"><?php echo _("Change Theme"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_VNSTAT_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="data_use"><i class="fas fa-chart-bar fa-fw mr-2"></i><span class="nav-label"><?php echo _("Data usage"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_SYSTEM_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="system_info"><i class="fas fa-cube fa-fw mr-2"></i><span class="nav-label"><?php echo _("System"); ?></a>
</li>
<?php endif; ?>
<li class="nav-item">
<a class="nav-link" href="about"><i class="fas fa-info-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("About RaspAP"); ?></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-block">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light topbar mb-1 static-top">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTopbar" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
<p class="text-left brand-title mt-3 ml-2"></p>
<ul class="navbar-nav ml-auto">
<!-- Nav Item - Night mode -->
<div class="custom-control custom-switch mt-4">
<input type="checkbox" class="custom-control-input" id="night-mode" <?php echo getNightmode() ? 'checked' : null ; ?> >
<label class="custom-control-label" for="night-mode"><i class="far fa-moon mr-1 text-muted"></i></label>
</div>
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link" href="auth_conf">
<span class="mr-2 d-none d-lg-inline small"><?php echo htmlspecialchars($config['admin_user'], ENT_QUOTES); ?></span>
<i class="fas fa-user-circle fa-3x"></i>
</a>
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<?php
$extraFooterScripts = array();
// handle page actions
switch ($page) {
case "/wlan0_info":
DisplayDashboard($extraFooterScripts);
break;
case "/dhcpd_conf":
DisplayDHCPConfig();
break;
case "/wpa_conf":
DisplayWPAConfig();
break;
case "/network_conf":
DisplayNetworkingConfig();
break;
case "/hostapd_conf":
DisplayHostAPDConfig();
break;
case "/adblock_conf":
DisplayAdBlockConfig();
break;
case "/openvpn_conf":
DisplayOpenVPNConfig();
break;
case "/wg_conf":
DisplayWireGuardConfig();
break;
case "/torproxy_conf":
DisplayTorProxyConfig();
break;
case "/torproxy_conf":
DisplayTorProxyConfig();
break;
case "/auth_conf":
DisplayAuthConfig($config['admin_user'], $config['admin_pass']);
break;
case "/save_hostapd_conf":
SaveTORAndVPNConfig();
break;
case "/theme_conf":
DisplayThemeConfig($extraFooterScripts);
break;
case "/data_use":
DisplayDataUsage($extraFooterScripts);
break;
case "/system_info":
DisplaySystem();
break;
case "/about":
DisplayAbout();
break;
default:
DisplayDashboard($extraFooterScripts);
}
?>
</div><!-- /.container-fluid -->
</div><!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-grey-100">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span></span>
</div>
</div>
</footer>
<!-- End Footer -->
</div><!-- End of Content Wrapper -->
</footer>
<!-- End Footer -->
</div><!-- End of Content Wrapper -->
</div><!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top" style="display: inline;">
@ -335,15 +150,6 @@ $bridgedEnabled = getBridgedState();
<!-- Custom RaspAP JS -->
<script src="app/js/custom.js"></script>
<?php
// Load non default JS/ECMAScript in footer.
foreach ($extraFooterScripts as $script) {
echo '<script type="text/javascript" src="' , $script['src'] , '"';
if ($script['defer']) {
echo ' defer="defer"';
}
echo '></script>' , PHP_EOL;
}
?>
<?php loadFooterScripts($extraFooterScripts); ?>
</body>
</html>

View File

@ -27,7 +27,8 @@ readonly raspap_sysctl="/etc/sysctl.d/90_raspap.conf"
readonly raspap_network="$raspap_dir/networking/"
readonly raspap_router="/etc/lighttpd/conf-available/50-raspap-router.conf"
readonly rulesv4="/etc/iptables/rules.v4"
readonly notracking_url="https://raw.githubusercontent.com/notracking/hosts-blocklists/master/"
readonly blocklist_hosts="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
readonly blocklist_domains="https://big.oisd.nl/dnsmasq"
webroot_dir="/var/www/html"
if [ "$insiders" == 1 ]; then
@ -52,7 +53,6 @@ function _install_raspap() {
_create_hostapd_scripts
_create_lighttpd_scripts
_install_lighttpd_configs
_move_config_file
_default_configuration
_configure_networking
_prompt_install_adblock
@ -140,7 +140,13 @@ function _get_linux_distro() {
# Sets php package option based on Linux version, abort if unsupported distro
function _set_php_package() {
case $RELEASE in
22.04|20.04|18.04|19.10|11*) # Ubuntu Server, Debian 11 & Armbian 22.05
23.05|12*) # Debian 12 & Armbian 23.05
php_package="php8.2-cgi"
phpcgiconf="/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" ;;
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" ;;
10*|11*)
@ -165,6 +171,8 @@ function _set_php_package() {
function _manage_systemd_services() {
_install_log "Checking for systemd network services"
_check_notify_ubuntu
services=( "systemd-networkd" "systemd-resolved" )
for svc in "${services[@]}"; do
# Prompt to disable systemd service
@ -189,24 +197,43 @@ function _manage_systemd_services() {
_install_status 0
}
# Notifies Ubuntu users of pre-install requirements
function _check_notify_ubuntu() {
if [ ${OS,,} = "ubuntu" ]; then
_install_status 2 "Ubuntu Server requires manual pre- and post-install steps. See https://docs.raspap.com/manual/"
echo -n "Proceed with installation? [Y/n]: "
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
echo "Installation aborted."
exit 0
else
_install_status 0
fi
fi
}
# Runs a system software update to make sure we're using all fresh packages
function _install_dependencies() {
_install_log "Installing required packages"
_set_php_package
# OS-specific packages
if [ "$php_package" = "php7.4-cgi" ] && [ ${OS,,} = "ubuntu" ] && [[ ${RELEASE} =~ ^(22.04|20.04|18.04|19.10|11) ]]; then
echo "Adding apt-repository ppa:ondrej/php"
sudo apt-get install $apt_option software-properties-common || _install_status 1 "Unable to install dependency"
sudo apt-get install -y software-properties-common || _install_status 1 "Unable to install dependency"
sudo add-apt-repository $apt_option ppa:ondrej/php || _install_status 1 "Unable to add-apt-repository ppa:ondrej/php"
else
echo "${php_package} will be installed from the main deb sources list"
fi
if [ ${OS,,} = "debian" ] || [ ${OS,,} = "ubuntu" ]; then
dhcpcd_package="dhcpcd5"
iw_package="iw"
fi
# Set dconf-set-selections
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 $apt_option lighttpd git hostapd dnsmasq iptables-persistent $php_package $dhcpcd_package vnstat qrencode || _install_status 1 "Unable to install dependencies"
sudo apt-get install -y lighttpd git hostapd dnsmasq iptables-persistent $php_package $dhcpcd_package $iw_package vnstat qrencode || _install_status 1 "Unable to install dependencies"
_install_status 0
}
@ -312,7 +339,7 @@ function _install_lighttpd_configs() {
# Prompt to install ad blocking
function _prompt_install_adblock() {
_install_log "Configure ad blocking (Beta)"
_install_log "Configure ad blocking"
echo -n "Install ad blocking and enable list management? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
@ -328,7 +355,7 @@ function _prompt_install_adblock() {
fi
}
# Download notracking adblock lists and enable option
# Download adblock lists and enable option
function _install_adblock() {
_install_log "Creating ad blocking base configuration (Beta)"
if [ ! -d "$raspap_dir/adblock" ]; then
@ -337,12 +364,12 @@ function _install_adblock() {
fi
if [ ! -f /tmp/hostnames.txt ]; then
echo "Fetching latest hostnames list"
wget ${notracking_url}hostnames.txt -q --show-progress --progress=bar:force -O /tmp/hostnames.txt 2>&1 \
wget ${blocklist_hosts} -q --show-progress --progress=bar:force -O /tmp/hostnames.txt 2>&1 \
|| _install_status 1 "Unable to download notracking hostnames"
fi
if [ ! -f /tmp/domains.txt ]; then
echo "Fetching latest domains list"
wget ${notracking_url}domains.txt -q --show-progress --progress=bar:force -O /tmp/domains.txt 2>&1 \
wget ${blocklist_domains} -q --show-progress --progress=bar:force -O /tmp/domains.txt 2>&1 \
|| _install_status 1 "Unable to download notracking domains"
fi
echo "Adding blocklists to $raspap_dir/adblock"
@ -461,6 +488,10 @@ function _download_latest_files() {
fi
_install_log "Cloning latest files from github"
if [ "$repo" == "RaspAP/raspap-insiders" ]; then
_install_status 3
echo "Insiders please read this: https://docs.raspap.com/insiders/#authentication"
fi
git clone --branch $branch --depth 1 -c advice.detachedHead=false $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"
@ -530,18 +561,6 @@ function _check_for_old_configs() {
_install_status 0
}
# Move configuration file to the correct location
function _move_config_file() {
if [ ! -d "$raspap_dir" ]; then
_install_status 1 "'$raspap_dir' directory doesn't exist"
fi
# Copy config file and make writable by www-data group
_install_log "Moving configuration file to $raspap_dir"
sudo cp "$webroot_dir"/raspap.php "$raspap_dir" || _install_status 1 "Unable to move files to '$raspap_dir'"
sudo chown -c $raspap_user:"$raspap_user" "$raspap_dir"/raspap.php || _install_status 1 "Unable change owner and/or group"
}
# Set up default configuration
function _default_configuration() {
if [ "$upgrade" == 0 ]; then
@ -718,11 +737,17 @@ function _optimize_php() {
function _install_complete() {
_install_log "Installation completed"
echo "Join RaspAP Insiders for early access to exclusive features!"
echo -e "${ANSI_RASPBERRY}"
echo "> https://docs.raspap.com/insiders/"
echo "> https://github.com/sponsors/RaspAP/"
echo -e "${ANSI_RESET}"
if [ "$repo" == "RaspAP/raspap-insiders" ]; then
echo -e "${ANSI_RASPBERRY}"
echo "Thank you for supporting this project as an Insider!"
echo -e "${ANSI_RESET}"
else
echo "Join RaspAP Insiders for early access to exclusive features!"
echo -e "${ANSI_RASPBERRY}"
echo "> https://docs.raspap.com/insiders/"
echo "> https://github.com/sponsors/RaspAP/"
echo -e "${ANSI_RESET}"
fi
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.

179
installers/minwrite.sh Executable file
View File

@ -0,0 +1,179 @@
#!/bin/bash
#
# RaspAP minimal microSD card write operation
# Original author: @zbchristian
# Original source URI: https://github.com/RaspAP/raspap-tools
# Modified by: @billz <billzimmerman@gmail.com>
# License: GNU General Public License v3.0
# License URI: https://github.com/raspap/raspap-webgui/blob/master/LICENSE
#
# Limits microSD card write operation to a minimum by moving temporary and log files to RAM.
# Several packages are removed and the default logging service is replaced.
# The file system is still in read/write mode, so RaspAP settings can be saved.
# Write access can be checked with "iotop -aoP".
# Remaining access originates mainly from the ext4 journal update (process jbd2).
# Exit on error
set -o errexit
# Exit on error inside functions
set -o errtrace
# Set defaults
readonly bootcmd="/boot/cmdline.txt"
function _install_minwrite() {
_display_welcome
_begin_install
_remove_packages
_disable_services
_install_logger
_disable_swap
_move_directories
_install_complete
}
function _dirs2tmpfs() {
for dir in "${dirs[@]}"; do
echo "Moving $dir to RAM"
if ! grep -q " $dir " /etc/fstab; then
echo "tmpfs $dir tmpfs nosuid,nodev 0 0" | sudo tee -a /etc/fstab
fi
done
}
# Determines host Linux distribution details
function _get_linux_distro() {
if type lsb_release >/dev/null 2>&1; then # linuxbase.org
OS=$(lsb_release -si)
RELEASE=$(lsb_release -sr)
CODENAME=$(lsb_release -sc)
DESC=$(lsb_release -sd)
elif [ -f /etc/os-release ]; then # freedesktop.org
. /etc/os-release
OS=$ID
RELEASE=$VERSION_ID
CODENAME=$VERSION_CODENAME
DESC=$PRETTY_NAME
else
_install_status 1 "Unsupported Linux distribution"
fi
}
function _begin_install() {
_install_log "Modify the OS to minimize microSD card write operation"
_get_linux_distro
echo "Detected OS: ${DESC}"
}
function _remove_packages() {
_install_log "Removing packages"
echo -e "The following packages will be removed: ${ANSI_YELLOW}dphys-swapfile logrotate${ANSI_RESET}"
echo -n "Proceed? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
_install_status 0 "(Skipped)"
else
sudo apt-get -y remove --purge dphys-swapfile logrotate || _install_status 1 "Unable to remove packages"
sudo apt-get -y autoremove --purge || _install_status 1 "Unable to autoremove packages"
_install_status 0
fi
else
echo "(Skipped)"
fi
}
function _disable_services() {
_install_log "Disabling services"
echo -e "The following services will be disabled: ${ANSI_YELLOW}bootlogd.service bootlogs console-setup apt-daily${ANSI_RESET}"
echo -n "Proceed? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
_install_status 0 "(Skipped)"
else
sudo systemctl unmask bootlogd.service || _install_status 2 "Service bootlogd.service does not exist"
sudo systemctl disable bootlogs || _install_status 2 "Service bootlogs does not exist"
sudo systemctl disable apt-daily.service apt-daily.timer apt-daily-upgrade.timer apt-daily-upgrade.service || _install_status 2 "Service apt-daily does not exist"
_install_status 0
fi
else
echo "(Skipped)"
fi
}
function _install_logger() {
_install_log "Installing new logger"
echo -e "The following new logger will be installed: ${ANSI_YELLOW}busybox-syslogd${ANSI_RESET}"
echo -n "Proceed? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
_install_status 0 "(Skipped)"
else
sudo apt-get -y install busybox-syslogd || _install_status 1 "Unable to install busybox-syslogd"
sudo dpkg --purge rsyslog || _install_status 1 "Unable to purge rsyslog"
_install_status 0
fi
else
echo "(Skipped)"
fi
}
function _disable_swap() {
_install_log "Modifying boot options to disable swap and filesystem check"
echo "The noswap option will be written to ${bootcmd}"
echo -n "Proceed? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
_install_status 0 "(Skipped)"
else
if ! grep -q "noswap" $bootcmd; then
sudo sed -i '1 s/$/ fsck.mode=skip noswap/' $bootcmd || _install_status 1 "Unable to write to ${bootcmd}"
echo "Modified ${bootcmd} with noswap option"
_install_status 0
fi
fi
else
echo "(Skipped)"
fi
}
function _move_directories() {
_install_log "Add tmpfs entries to /etc/fstab"
# move directories to RAM
dirs=( "/tmp" "/var/log" "/var/tmp" "/var/lib/misc" "/var/cache")
# special dirs used by vnstat and php
dirs+=( "/var/lib/vnstat" "/var/php/sessions" )
echo "The following directories will be moved to RAM:"
echo -e "${ANSI_YELLOW}${dirs[*]}${ANSI_RESET}"
echo -n "Proceed? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
_install_status 0 "(Skipped)"
else
_dirs2tmpfs || _install_status 1 "Unable to call dirs2tmpfs"
_install_status 0
fi
else
echo "(Skipped)"
fi
}
function _install_complete() {
_install_log "Installation completed"
echo -e "${ANSI_RED}The system needs to be rebooted as a final step.${ANSI_RESET}"
echo -n "Reboot now? [Y/n]: "
if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then
echo "Installation reboot aborted."
exit 0
fi
echo "Rebooting..."
sudo reboot || _install_status 1 "Unable to execute reboot"
fi
}

View File

@ -15,15 +15,18 @@
# -c, --cert, --certficate Installs mkcert and generates an SSL certificate for lighttpd
# -o, --openvpn <flag> Used with -y, --yes, sets OpenVPN install option (0=no install)
# -a, --adblock <flag> Used with -y, --yes, sets Adblock install option (0=no install)
# -c, --cert, --certificate Installs an SSL certificate with mkcert and configures lighttpd for HTTPS
# -r, --repo, --repository <name> Overrides the default GitHub repo (RaspAP/raspap-webgui)
# -b, --branch <name> Overrides the default git branch (master)
# -t, --token <accesstoken> Specify a GitHub token to access a private repository
# -u, --upgrade Upgrades an existing installation to the latest release version
# -i, --insiders Installs from the Insiders Edition (RaspAP/raspap-insiders)
# -m, --minwrite Configures a microSD card for minimum write operation
# -v, --version Outputs release info and exits
# -n, --uninstall Loads and executes the uninstaller
# -n, --uninstall Loads and executes the uninstaller
# -h, --help Outputs usage notes and exits
#
# NOTE
# Depending on options passed to the installer, ONE of the following
# additional shell scripts will be downloaded and sourced:
#
@ -31,6 +34,8 @@
# - or -
# https://raw.githubusercontent.com/raspap/raspap-webgui/master/installers/mkcert.sh
# - or -
# https://raw.githubusercontent.com/raspap/raspap-webgui/master/installers/minwrite.sh
# - or -
# https://raw.githubusercontent.com/raspap/raspap-webgui/master/installers/uninstall.sh
#
# You are not obligated to bundle the LICENSE file with your RaspAP projects as long
@ -55,6 +60,7 @@ function _parse_params() {
ovpn_option=1
adblock_option=1
insiders=0
minwrite=0
acctoken=""
while :; do
@ -90,7 +96,10 @@ function _parse_params() {
upgrade=1
;;
-i|--insiders)
insiders=1
insiders=1
;;
-m|--minwrite)
minwrite=1
;;
-t|--token)
acctoken="$2"
@ -134,18 +143,20 @@ function _usage() {
cat << EOF
Usage: raspbian.sh options
Installs an instance of RaspAP.
Installs an instance of RaspAP or a helper component.
OPTIONS:
-y, --yes, --assume-yes Assumes "yes" as an answer to all prompts
-c, --cert, --certificate Installs an SSL certificate for lighttpd
-o, --openvpn <flag> Used with -y, --yes, sets OpenVPN install option (0=no install)
-a, --adblock <flag> Used with -y, --yes, sets Adblock install option (0=no install)
-c, --cert, --certificate Installs an SSL certificate with mkcert and configures lighttpd for HTTPS
-r, --repo, --repository <name> Overrides the default GitHub repo (RaspAP/raspap-webgui)
-b, --branch <name> Overrides the default git branch (latest release)
-t, --token <accesstoken> Specify a GitHub token to access a private repository
-u, --upgrade Upgrades an existing installation to the latest release version
-i, --insiders Installs from the Insiders Edition (RaspAP/raspap-insiders)
-m, --minwrite Configures a microSD card for minimum write operation
-v, --version Outputs release info and exits
-n, --uninstall Loads and executes the uninstaller
-h, --help Outputs usage notes and exits
@ -203,7 +214,7 @@ function _get_release() {
# Outputs a RaspAP Install log line
function _install_log() {
echo -e "${ANSI_GREEN}RaspAP Install: $1${ANSI_RESET}"
echo -e "${ANSI_GREEN}RaspAP ${component}: $1${ANSI_RESET}"
}
# Outputs a RaspAP divider
@ -223,6 +234,8 @@ function _install_status() {
2)
echo -e "[$ANSI_YELLOW \U26A0 warning $ANSI_RESET] $2"
;;
3)
echo -e "[$ANSI_RASPBERRY ! important $ANSI_RESET] $2"
esac
}
@ -255,16 +268,25 @@ function _load_installer() {
if [ "${install_cert:-}" = 1 ]; then
source="mkcert"
component="mkcert"
wget "${header[@]}" -q ${UPDATE_URL}installers/${source}.sh -O /tmp/raspap_${source}.sh
source /tmp/raspap_${source}.sh && rm -f /tmp/raspap_${source}.sh
_install_certificate || _install_status 1 "Unable to install certificate"
elif [ "${minwrite}" = 1 ]; then
source="minwrite"
component="Minwrite"
wget "${header[@]}" -q ${UPDATE_URL}installers/${source}.sh -O /tmp/raspap_${source}.sh
source /tmp/raspap_${source}.sh && rm -f /tmp/raspap_${source}.sh
_install_minwrite || _install_status 1 "Unable to execute minimal write install"
elif [ "${uninstall}" = 1 ]; then
source="uninstall"
component="Uninstall"
wget "${header[@]}" -q ${UPDATE_URL}installers/${source}.sh -O /tmp/raspap_${source}.sh
source /tmp/raspap_${source}.sh && rm -f /tmp/raspap_${source}.sh
_remove_raspap || _install_status 1 "Unable to uninstall RaspAP"
else
source="common"
component="Install"
wget "${header[@]}" -q ${UPDATE_URL}installers/${source}.sh -O /tmp/raspap_${source}.sh
source /tmp/raspap_${source}.sh && rm -f /tmp/raspap_${source}.sh
_install_raspap || _install_status 1 "Unable to install RaspAP"
@ -272,4 +294,3 @@ function _load_installer() {
}
_main "$@"

View File

@ -15,7 +15,7 @@ update_url=$1
file=$2
destination=$3
wget -q ${update_url} -O ${destination}${file} &> /dev/null
wget -q --no-use-server-timestamps ${update_url} -O ${destination}${file} &> /dev/null
echo "$?"

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: 2022-01-05 11:43\n"
"PO-Revision-Date: 2023-06-22 05:56\n"
"Last-Translator: Bill Zimmerman <billzimmerman@gmail.com>\n"
"Language-Team: German\n"
"Language: de_DE\n"
@ -147,31 +147,31 @@ msgid "Not configured"
msgstr "Nicht konfiguriert"
msgid "Connected"
msgstr ""
msgstr "Verbunden"
msgid "Known"
msgstr ""
msgstr "Bekannt"
msgid "Nearby"
msgstr ""
msgstr "In der Nähe"
msgid "<strong>Note:</strong> WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP"
msgstr "<strong>Hinweis:</strong> WEP access points erscheinen als 'Offen'. RaspAP unterstützt derzeit keine Verbindungen zu WEP"
msgid "No Wifi stations found"
msgstr ""
msgstr "Keine WLAN-Sender gefunden"
msgid "Reinitializing wpa_supplicant"
msgstr ""
msgstr "Reinitialisierung von wpa_supplicant"
msgid "Click 'Rescan' to search for nearby Wifi stations."
msgstr ""
msgstr "Auf „Rescan“ klicken, um nach WLAN-Sendern in der Nähe zu suchen."
msgid "Click 'Reinitialize' to force reinitialize <code>wpa_supplicant</code>."
msgstr ""
msgstr "Auf „Reinitialisierung“ klicken, um <code>wpa_supplicant</code> neu zu initialisieren."
msgid "Reinitialize"
msgstr ""
msgstr "Reinitialisieren"
#: includes/dashboard.php
msgid "Interface Information"
@ -268,58 +268,58 @@ msgid "Connected Devices"
msgstr "Verbundene Geräte"
msgid "Client: Ethernet cable"
msgstr ""
msgstr "Client: Ethernet-Kabel"
msgid "Ethernet"
msgstr ""
msgstr "Ethernet"
msgid "Client: Smartphone (USB tethering)"
msgstr ""
msgstr "Client: Smartphone (USB-Tethering)"
msgid "Smartphone"
msgstr ""
msgstr "Smartphone"
msgid "WiFi"
msgstr ""
msgstr "WLAN"
msgid "Mobile Data Client"
msgstr ""
msgstr "Mobile-Daten-Client"
msgid "Mobile Data"
msgstr ""
msgstr "Mobile Daten"
msgid "No information available"
msgstr ""
msgstr "Keine Informationen verfügbar"
msgid "Interface name invalid"
msgstr ""
msgstr "Name der Schnittstelle ungültig"
msgid "Required exec function is disabled. Check if exec is not added to php <code>disable_functions</code>."
msgstr ""
msgstr "Die erforderliche exec-Funktion ist deaktiviert. Bitte prüfen, ob exec nicht zu PHP <code>disable_functions</code> hinzugefügt wurde."
msgid "Waiting for the interface to start ..."
msgstr ""
msgstr "Warten auf den Start der Schnittstelle …"
msgid "Stop the Interface"
msgstr ""
msgstr "Interface stoppen"
msgid "Connection mode"
msgstr ""
msgstr "Verbindungsmodus"
msgid "Signal quality"
msgstr ""
msgstr "Signalqualität"
msgid "WAN IP"
msgstr ""
msgstr "WAN-IP"
msgid "Web-GUI"
msgstr ""
msgstr "Web-GUI"
msgid "Signal strength"
msgstr ""
msgstr "Signalstärke"
msgid "No Client device or not yet configured"
msgstr ""
msgstr "Kein Clientgerät oder noch nicht konfiguriert"
#: includes/dhcp.php
msgid "DHCP server settings"
@ -368,7 +368,7 @@ msgid "MAC Address"
msgstr "MAC Addresse"
msgid "Optional comment"
msgstr ""
msgstr "Optionaler Kommentar"
msgid "Host name"
msgstr "Rechnername"
@ -433,8 +433,8 @@ msgstr "Format"
msgid "Choose a hosted server"
msgstr "Gehosteten Server auswählen"
msgid "Enable these options to log DHCP server activity."
msgstr "Aktivieren Sie diese Optionen, um die DHCP-Serveraktivität zu protokollieren."
msgid "Enable these options to log <code>dhcpcd</code> and <code>dnsmasq</code> activity."
msgstr "Diese Optionen Aktivieren <code>dhcpcd</code> und <code>dnsmasq</code> Logging."
msgid "Log DHCP requests"
msgstr "DHCP-Anfragen protokollieren"
@ -443,25 +443,25 @@ msgid "Log DNS queries"
msgstr "DNS-Anfragen protokollieren"
msgid "Restrict access"
msgstr ""
msgstr "Zugriff beschränken"
msgid "Limit network access to static clients"
msgstr ""
msgstr "Netzwerkzugriff auf statische Clients beschränken"
msgid "Enable this option if you want RaspAP to <b>ignore any clients</b> which are not specified in the static leases list."
msgstr ""
msgstr "Diese Option aktivieren, wenn der RaspAP <b>alle Clients ignorieren</b> soll, die nicht in der Liste der statischen Leases aufgeführt sind."
msgid "This option adds <code>dhcp-ignore</code> to the dnsmasq configuration."
msgstr ""
msgstr "Diese Option fügt <code>dhcp-ignore</code> zur dnsmasq-Konfiguration hinzu."
msgid "Clients with a particular hardware MAC address can always be allocated the same IP address."
msgstr ""
msgstr "Clients mit einer bestimmten Hardware-MAC-Adresse kann immer dieselbe IP-Adresse zugewiesen werden."
msgid "This option adds <code>dhcp-host</code> entries to the dnsmasq configuration."
msgstr ""
msgstr "Diese Option fügt <code>dhcp-host</code>-Einträge zur dnsmasq-Konfiguration hinzu."
msgid "This toggles the <code>gateway</code>/<code>nogateway</code> option for this interface in the DHCPCD configuration."
msgstr ""
msgstr "Dies schaltet die Option <code>gateway</code>/<code>nogateway</code> für diese Schnittstelle in der DHCPCD-Konfiguration um."
#: includes/hostapd.php
msgid "Basic"
@ -555,7 +555,7 @@ msgid "Maximum number of clients"
msgstr "Maximale Anzahl an Clients"
msgid "Configures the <code>max_num_sta</code> option of hostapd. The default and maximum is 2007. If empty or 0, the default applies."
msgstr ""
msgstr "Konfiguriert die Option <code>max_num_sta</code> von hostapd. Der Standard und das Maximum ist 2007. Falls leer oder 0, gilt der Standardwert."
msgid "Beacon interval"
msgstr "Beacon Intervall"
@ -576,13 +576,61 @@ msgid "Enable this option to log <code>hostapd</code> activity."
msgstr "Aktivieren Sie diese Option, um <code>hostapd</code> Aktivitäten zu protokollieren."
msgid "Transmit power (dBm)"
msgstr ""
msgstr "Sendeleistung (dBm)"
msgid "Sets the <code>txpower</code> option for the AP interface and the configured country."
msgstr ""
msgstr "Legt die Option <code>txpower</code> für die AP-Schnittstelle und das konfigurierte Land fest."
msgid "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW."
msgstr ""
msgstr "dBm ist eine Maßeinheit für das Leistungsverhältnis, die in Dezibel (dB) bezogen auf ein Milliwatt (mW) angegeben wird. 30 dBm entsprechen 1000 mW, während 0 dBm 1,25 mW entspricht."
msgid "WPA and WPA2"
msgstr "WPA und WPA2"
msgid "WPA2 and WPA3-Personal (transitional mode)"
msgstr "WPA2- und WPA3-Personal (Übergangsmodus)"
msgid "WPA3-Personal (required)"
msgstr "WPA3-Personal (erforderlich)"
msgid "Enabled (for supported clients)"
msgstr "Aktiviert (für unterstützte Clients)"
msgid "Required (for supported clients)"
msgstr "Erforderlich (für unterstützte Clients)"
msgid "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)."
msgstr "802.11w erweitert den Verschlüsselungsschutz auf ausgewählte robuste Management-Frames wie Deauthentifizierung, DisAssoziation und bestimmte Kategorien von Action-Management-Frames. Zusammen wird dies als „Management Frame Protection“ (MFP) bezeichnet."
msgid "Scan this QR code directly or %s %sprint a sign%s for your users."
msgstr "QR-Code direkt scannen oder %s %sein Zeichen drucken%s für die Benutzer."
msgid "Printable Wi-Fi sign"
msgstr "Printable Wi-Fi sign"
msgid "To connect with your phone or tablet, scan the QR code above with your camera app."
msgstr "Um sich mit dem Telefon oder Tablet zu verbinden, den obigen QR-Code mit der Kamera-App scannen."
msgid "For other devices, use the login credentials below."
msgstr "Für andere Geräte die Anmeldedaten unten verwenden."
msgid "Network"
msgstr "Netzwerk"
msgid "The selected interface (%s) has support for the 2.4 GHz wireless band only."
msgstr "Die ausgewählte Schnittstelle (%s) unterstützt nur das 2,4 GHz Band."
msgid "The selected interface (%s) has support for the 2.5 GHz wireless band only."
msgstr "Die ausgewählte Schnittstelle (%s) unterstützt nur das 2,4 GHz Band."
msgid "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."
msgstr "Die ausgewählte Schnittstelle (%s) unterstützt das 2,4 und 5 GHz Band."
msgid "The selected interface (%s) does not support wireless mode operation."
msgstr "Die ausgewählte Schnittstelle (%s) hat kein drahtloses Interface."
msgid "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."
msgstr "Die 5 GHz Option ist deaktiviert, bis eine kompatible Domain gesetzt ist."
#: includes/networking.php
msgid "Summary"
@ -628,55 +676,61 @@ msgid "Information provided by /sys/class/net"
msgstr "Information aus /sys/class/net"
msgid "Network Devices"
msgstr ""
msgstr "Netzwerkgeräte"
msgid "Mobile Data Settings"
msgstr ""
msgstr "Einstellungen für mobile Daten"
msgid "Properties of network devices"
msgstr ""
msgstr "Eigenschaften der Netzwerkgeräte"
msgid "Device"
msgstr ""
msgstr "Gerät"
msgid "MAC"
msgstr ""
msgstr "MAC"
msgid "USB vid/pid"
msgstr ""
msgstr "USB-vid/pid"
msgid "Device type"
msgstr ""
msgstr "Gerätetyp"
msgid "Fixed name"
msgstr ""
msgstr "Fester Name"
msgid "Change"
msgstr ""
msgstr "Ändern"
msgid "Settings for Mobile Data Devices"
msgstr ""
msgstr "Einstellungen für mobile Datengeräte"
msgid "PIN of SIM card"
msgstr ""
msgstr "PIN der SIM-Karte"
msgid "APN Settings (Modem device ppp0)"
msgstr ""
msgstr "APN-Einstellungen (Modemgerät ppp0)"
msgid "Access Point Name (APN)"
msgstr ""
msgstr "Access Point Name (APN)"
msgid "Password"
msgstr ""
msgstr "Passwort"
msgid "Successfully Updated Network Configuration"
msgstr ""
msgstr "Netzwerkkonfiguration erfolgreich aktualisiert"
msgid "Error saving network configuration to file"
msgstr ""
msgstr "Fehler beim Speichern der Netzwerkkonfiguration"
msgid "Unable to detect interface"
msgstr ""
msgstr "Schnittstelle kann nicht gefunden werden"
msgid "Routing table"
msgstr "Routingtabelle"
msgid "raw output"
msgstr "Raw Output"
#: includes/system.php
msgid "System Information"
@ -730,6 +784,12 @@ msgstr "Port des Webservers"
msgid "Web server bind address"
msgstr "Webserver Bindungsadresse"
msgid "OS"
msgstr "Betriebssystem"
msgid "Kernel"
msgstr "Kernel"
#: includes/themes.php
msgid "Theme settings"
msgstr "Oberflächendesign Einstellungen"
@ -839,64 +899,64 @@ msgid "Attempting to stop openvpn"
msgstr "Versuch, OpenVPN zu stoppen"
msgid "Configurations"
msgstr ""
msgstr "Einstellungen"
msgid "Currently available OpenVPN client configurations are displayed below."
msgstr ""
msgstr "Derzeit verfügbare OpenVPN-Client-Konfigurationen werden unten angezeigt."
msgid "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgstr ""
msgid "Activating a configuration will restart the <code>openvpn-client</code> service."
msgstr "Die Aktivierung einer Konfiguration startet den Dienst <code>openvpn-client</code> neu."
msgid "Delete OpenVPN client"
msgstr ""
msgstr "OpenVPN-Client löschen"
msgid "Delete client configuration? This cannot be undone."
msgstr ""
msgstr "Client-Konfiguration löschen? Dies kann nicht rückgängig gemacht werden."
msgid "Activate OpenVPN client"
msgstr ""
msgstr "OpenVPN-Client aktivieren"
msgid "Activate client configuration? This will restart the openvpn-client service."
msgstr ""
msgstr "Client-Konfiguration aktivieren? Der OpenVPN-Client-Dienst wird neu gestartet."
msgid "Activate"
msgstr ""
msgstr "Aktivieren"
msgid "Cancel"
msgstr ""
msgstr "Verwerfen"
msgid "Enable this option to log <code>openvpn</code> activity."
msgstr ""
msgstr "Diese Option aktivieren, um <code>openvpn</code>-Aktivitäten zu protokollieren."
msgid "Authentification Method"
msgstr ""
msgstr "Authentifizierungsmethode"
msgid "Username and password"
msgstr ""
msgstr "Benutzername und Passwort"
msgid "Certificates"
msgstr ""
msgstr "Zertifikate"
msgid "Enter username and password"
msgstr ""
msgstr "Benutzername und Passwort eingeben"
msgid "Certificates in the configuration file"
msgstr ""
msgstr "Zertifikate in der Konfigurationsdatei"
msgid "RaspAP supports certificates by including them in the configuration file."
msgstr ""
msgstr "RaspAP unterstützt Zertifikate, indem sie in die Konfigurationsdatei aufgenommen werden."
msgid "Signing certification authority (CA) certificate (e.g. <code>ca.crt</code>): enclosed in <code>&lt;ca> ... &lt;/ca></code> tags."
msgstr ""
msgstr "Signierende-Zertifizierungsstellen(CA)-Zertifikate (z. B. <code>ca.crt</code>): in <code>&lt;ca> ... &lt;/ca></code>-Tags eingeschlossen."
msgid "Client certificate (public key) (e.g. <code>client.crt</code>): enclosed in <code>&lt;cert> ... &lt;/cert></code> tags."
msgstr ""
msgstr "Clientzertifikat (öffentlicher Schlüssel) (z. B. <code>client.crt</code>): in <code>&lt;cert> ... &lt;/cert></code>-Tags eingeschlossen."
msgid "Private key of the client certificate (e.g. <code>client.key</code>): enclosed in <code>&lt;key> ... &lt;/key></code> tags."
msgstr ""
msgstr "Privater Schlüssel des Clientzertifikats (z. B. <code>client.key</code>): in <code>&lt;key> ... &lt;/key></code>-Tags eingeschlossen."
msgid "Configuration File"
msgstr ""
msgstr "Konfigurationsdatei"
#: includes/torproxy.php
msgid "TOR is not running"
@ -958,6 +1018,9 @@ msgstr "oben"
msgid "down"
msgstr "unten"
msgid "Clear log"
msgstr "Log löschen"
msgid "adblock"
msgstr "Werbesperre"
@ -1022,185 +1085,185 @@ msgid "Invalid custom host found on line "
msgstr "Ungültige benutzerdefinierte IP-Adresse gefunden "
msgid "Tunnel settings"
msgstr ""
msgstr "Tunneleinstellungen"
msgid "Configuration Method"
msgstr ""
msgstr "Konfigurationsmethode"
msgid "Upload file"
msgstr ""
msgstr "Datei hochladen"
msgid "Create manually"
msgstr ""
msgstr "Manuell erstellen"
msgid "Upload a WireGuard config"
msgstr ""
msgstr "WireGuard Konfiguration hochladen"
msgid "This option uploads and installs an existing WireGuard <code>.conf</code> file on this device."
msgstr ""
msgstr "Diese Option lädt und installiert eine vorhandene WireGuard <code>.conf</code>-Datei auf dieses Gerät."
msgid "Apply iptables rules for AP interface"
msgstr ""
msgstr "iptables-Regeln auf AP-Schnittstelle anwenden"
msgid "Recommended if you wish to forward network traffic from the wg0 interface to clients connected on the AP interface."
msgstr ""
msgstr "Empfohlen, wenn der Netzwerkverkehr von der wg0-Schnittstelle an Clients weitergeleitet werden soll, die mit der AP-Schnittstelle verbunden sind."
msgid "This option adds <strong>iptables</strong> <code>Postup</code> and <code>PostDown</code> rules for the configured AP interface (%s)."
msgstr ""
msgstr "Diese Option fügt <strong>iptables</strong>-Regeln <code>Postup</code> und <code>PostDown</code> für die konfigurierte AP-Schnittstelle (%s) hinzu."
msgid "Select WireGuard configuration file (.conf)"
msgstr ""
msgstr "WireGuard-Konfigurationsdatei auswählen (.conf)"
msgid "Create a local WireGuard config"
msgstr ""
msgstr "Lokale WireGuard-Konfiguration erstellen"
msgid "Enable server"
msgstr ""
msgstr "Server aktivieren"
msgid "Enable this option to secure network traffic by creating an encrypted tunnel between RaspAP and configured peers."
msgstr ""
msgstr "Diese Option aktivieren, um den Netzverkehr zu schützen, indem ein verschlüsselter Tunnel zwischen RaspAP und den konfigurierten Gegenstellen erstellt wird."
msgid "This setting generates a new WireGuard <code>.conf</code> file on this device."
msgstr ""
msgstr "Diese Einstellung erzeugt eine neue WireGuard <code>.conf</code>-Datei auf diesem Gerät."
msgid "Local public key"
msgstr ""
msgstr "Lokaler öffentlicher Schlüssel"
msgid "Local Port"
msgstr ""
msgstr "Lokaler Port"
msgid "IP Address"
msgstr ""
msgstr "IP-Adresse"
msgid "DNS"
msgstr ""
msgstr "DNS"
msgid "Peer"
msgstr ""
msgstr "Peer"
msgid "Enable peer"
msgstr ""
msgstr "Peer aktivieren"
msgid "Enable this option to encrypt traffic by creating a tunnel between RaspAP and this peer."
msgstr ""
msgstr "Diese Option aktivieren, um den Datenverkehr zu verschlüsseln, indem ein Tunnel zwischen RaspAP und dieser Gegenstelle erstellt wird."
msgid "This option adds <code>client.conf</code> to the WireGuard configuration."
msgstr ""
msgstr "Diese Option fügt <code>client.conf</code> der WireGuard-Konfiguration hinzu."
msgid "Peer public key"
msgstr ""
msgstr "Öffentlicher Schlüssel der Gegenstelle"
msgid "Endpoint address"
msgstr ""
msgstr "Endpunktadresse"
msgid "Allowed IPs"
msgstr ""
msgstr "Erlaubte IPs"
msgid "Persistent keepalive"
msgstr ""
msgstr "Dauerhaftes Keepalive"
msgid "Enable this option to display an updated <code>wg-quick</code> debug log."
msgstr ""
msgstr "Diese Option aktivieren, um ein aktualisiertes <code>wg-quick</code>-Debug-Protokoll anzuzeigen."
msgid "WireGuard debug log updated"
msgstr ""
msgstr "WireGuard Debug-Log aktualisiert"
msgid "Scan this QR code with your client to connect to this tunnel"
msgstr ""
msgstr "Diesen QR-Code mit dem eigenen Client scannen, um eine Verbindung zu diesem Tunnel herzustellen"
msgid "or download the <code>client.conf</code> file to your device."
msgstr ""
msgstr "oder die Datei <code>client.conf</code> auf das eigene Gerät herunterladen."
msgid "Download"
msgstr ""
msgstr "Herunterladen"
msgid "Start WireGuard"
msgstr ""
msgstr "WireGuard starten"
msgid "Stop WireGuard"
msgstr ""
msgstr "WireGuard beenden"
msgid "Information provided by wireguard"
msgstr ""
msgstr "Informationen von Wireguard"
msgid "Attempting to start WireGuard"
msgstr ""
msgstr "Es wird versucht, WireGuard zu starten"
msgid "Attempting to stop WireGuard"
msgstr ""
msgstr "Es wird versucht, WireGuard zu stoppen"
msgid "WireGuard configuration updated successfully"
msgstr ""
msgstr "WireGuard-Konfiguration erfolgreich aktualisiert"
msgid "WireGuard configuration failed to be updated"
msgstr ""
msgstr "WireGuard-Konfiguration konnte nicht aktualisiert werden"
msgid "Client Firewall"
msgstr ""
msgstr "Client-Firewall"
msgid "Firewall is ENABLED"
msgstr ""
msgstr "Firewall ist AKTIV"
msgid "Firewall is OFF"
msgstr ""
msgstr "Firewall ist AUS"
msgid "The default firewall will only allow outgoing and already established traffic."
msgstr ""
msgstr "Die Standard-Firewall erlaubt nur ausgehende und bereits hergestellte Verbindungen."
msgid "No incoming UDP traffic is allowed."
msgstr ""
msgstr "Es sind keine eingehenden UDP-Verbindungen erlaubt."
msgid "There are no restrictions for the access point <code>%s</code>."
msgstr ""
msgstr "Es gibt keine Einschränkungen für den Accesspoint <code>%s</code>."
msgid "Exception: Service"
msgstr ""
msgstr "Ausnahme: Dienst"
msgid "allow SSH access on port 22"
msgstr ""
msgstr "SSH-Zugriff auf Port 22 erlauben"
msgid "allow access to the RaspAP GUI on port 80 or 443"
msgstr ""
msgstr "Zugriff auf die RaspAP-Oberfläche auf Port 80 oder 443 erlauben"
msgid "Allow incoming connections for some services from the internet side."
msgstr ""
msgstr "Eingehende Verbindungen für einige Dienste aus dem Internet zulassen."
msgid "Exception: network device"
msgstr ""
msgstr "Ausnahme: Netzwerkgerät"
msgid "Exclude device(s)"
msgstr ""
msgstr "Gerät(e) ausschließen"
msgid "Exclude the given network device(s) (separated by a blank or comma) from firewall rules."
msgstr ""
msgstr "Angegebene Netzwerkgeräte (durch Leerzeichen oder Komma getrennt) von Firewall-Regeln ausschließen."
msgid "Current client devices: <code>%s</code>"
msgstr ""
msgstr "Aktuelle Clientgeräte: <code>%s</code>"
msgid "The access point <code>%s</code> is per default excluded."
msgstr ""
msgstr "Der Accesspoint <code>%s</code> ist standardmäßig ausgenommen."
msgid "Exception: IP-Address"
msgstr ""
msgstr "Ausnahme: IP-Adresse"
msgid "Allow incoming connections from"
msgstr ""
msgstr "Eingehende Verbindungen erlauben von"
msgid "For the given IP-addresses (separated by a blank or comma) the incoming connection (via TCP and UDP) is accepted."
msgstr ""
msgstr "Für die angegebenen IP-Adressen (durch Leerzeichen oder Komma getrennt) wird die eingehende Verbindung (über TCP und UDP) akzeptiert."
msgid "This is required for an OpenVPN via UDP or Wireguard connection."
msgstr ""
msgstr "Dies wird für ein OpenVPN über UDP oder WireGuard-Verbindung benötigt."
msgid "The list of configured VPN server IP addresses: <code><b>%s</b></code>"
msgstr ""
msgstr "Liste der konfigurierten VPN-Server-IP-Adressen: <code><b>%s</b></code>"
msgid "Disable Firewall"
msgstr ""
msgstr "Firewall deaktivieren"
msgid "Enable Firewall"
msgstr ""
msgstr "Firewall aktivieren"
msgid "Apply changes"
msgstr ""
msgstr "Änderungen übernehmen"

Binary file not shown.

View File

@ -464,6 +464,15 @@ msgstr "This option adds <code>dhcp-host</code> entries to the dnsmasq configura
msgid "This toggles the <code>gateway</code>/<code>nogateway</code> option for this interface in the DHCPCD configuration."
msgstr "This toggles the <code>gateway</code>/<code>nogateway</code> option for this interface in the DHCPCD configuration."
msgid "This toggles the <code>nohook wpa_supplicant</code> option for this interface in the DHCPCD configuration."
msgstr "This toggles the <code>nohook wpa_supplicant</code> option for this interface in the DHCPCD configuration."
msgid "Disable wpa_supplicant dhcp hook for this interface"
msgstr "Disable wpa_supplicant dhcp hook for this interface"
msgid "If you manage wireless connections with wpa_supplicant itself, the hook may create unwanted connection events. This option disables the hook."
msgstr "If you manage wireless connections with wpa_supplicant itself, the hook may create unwanted connection events. This option disables the hook."
#: includes/hostapd.php
msgid "Basic"
msgstr "Basic"
@ -585,6 +594,21 @@ msgstr "Sets the <code>txpower</code> option for the AP interface and the config
msgid "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW."
msgstr "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW."
msgid "The selected interface (%s) has support for the 2.4 GHz wireless band only."
msgstr "The selected interface (%s) has support for the 2.4 GHz wireless band only."
msgid "The selected interface (%s) has support for the 2.5 GHz wireless band only."
msgstr "The selected interface (%s) has support for the 2.5 GHz wireless band only."
msgid "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."
msgstr "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."
msgid "The selected interface (%s) does not support wireless mode operation."
msgstr "The selected interface (%s) does not support wireless mode operation."
msgid "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."
msgstr "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."
#: includes/networking.php
msgid "Summary"
msgstr "Summary"
@ -713,6 +737,9 @@ msgstr "Pi Revision"
msgid "Uptime"
msgstr "Uptime"
msgid "System Time"
msgstr "System Time"
msgid "Memory Used"
msgstr "Memory Used"
@ -725,6 +752,18 @@ msgstr "Reboot"
msgid "Shutdown"
msgstr "Shutdown"
msgid "System reboot"
msgstr "System reboot"
msgid "System shutdown"
msgstr "System shutdown"
msgid "Reboot now? The system will be temporarily unavailable."
msgstr "Reboot now? The system will be temporarily unavailable."
msgid "Shutdown now? The system will be unavailable."
msgstr "Shutdown now? The system will be unavailable."
msgid "System Rebooting Now!"
msgstr "System Rebooting Now!"
@ -743,7 +782,36 @@ msgstr "OS"
msgid "Kernel"
msgstr "Kernel"
#: includes/themes.php
msgid "System reset"
msgstr "System reset"
msgid "Reset RaspAP to its initial configuration? This action cannot be undone."
msgstr "Reset RaspAP to its initial configuration? This action cannot be undone."
msgid "Reset complete. Restart the hotspot for the changes to take effect."
msgstr "Reset complete. Restart the hotspot for the changes to take effect."
msgid "System reset in progress..."
msgstr "System reset in progress..."
msgid "Reset"
msgstr "Reset"
msgid "Restore settings"
msgstr "Restore settings"
msgid "To reset RaspAP to its <a href=\"%s\">initial configuration</a>, click or tap the button below."
msgstr "To reset RaspAP to its <a href=\"%s\">initial configuration</a>, click or tap the button below."
msgid "Custom files for optional components such as Ad Blocking, WireGuard or OpenVPN will remain on the system."
msgstr "Custom files for optional components such as Ad Blocking, WireGuard or OpenVPN will remain on the system."
msgid "Perform reset"
msgstr "Perform reset"
msgid "Restores all access point (AP) service settings to their default values. This applies to hostapd, dhcpcd and dnsmasq."
msgstr "Restores all access point (AP) service settings to their default values. This applies to hostapd, dhcpcd and dnsmasq."
msgid "Theme settings"
msgstr "Theme settings"
@ -857,8 +925,8 @@ msgstr "Configurations"
msgid "Currently available OpenVPN client configurations are displayed below."
msgstr "Currently available OpenVPN client configurations are displayed below."
msgid "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgstr "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgid "Activating a configuration will restart the <code>openvpn-client</code> service."
msgstr "Activating a configuration will restart the <code>openvpn-client</code> service."
msgid "Delete OpenVPN client"
msgstr "Delete OpenVPN client"

Binary file not shown.

View File

@ -844,7 +844,7 @@ msgstr "Configuraciones"
msgid "Currently available OpenVPN client configurations are displayed below."
msgstr "Las configuraciones de cliente OpenVPN actualmente disponibles se muestran a continuación."
msgid "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgid "Activating a configuration will restart the <code>openvpn-client</code> service."
msgstr "Al activar una configuración, se reiniciará el servicio <code>openvpn-client</code>."
msgid "Delete OpenVPN client"

Binary file not shown.

View File

@ -877,7 +877,7 @@ msgstr "Configuration"
msgid "Currently available OpenVPN client configurations are displayed below."
msgstr "Les configurations des fichiers OpenVPN actuellement disponibles sont affichées ci-dessous."
msgid "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgid "Activating a configuration will restart the <code>openvpn-client</code> service."
msgstr "L'activation d'une configuration redémarrera le service <code>openvpn-client</code>."
msgid "Delete OpenVPN client"

Binary file not shown.

View File

@ -844,7 +844,7 @@ msgstr "Configurazioni"
msgid "Currently available OpenVPN client configurations are displayed below."
msgstr "Le configurazioni client OpenVPN attualmente disponibili sono visualizzate di seguito."
msgid "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgid "Activating a configuration will restart the <code>openvpn-client</code> service."
msgstr "Attivando la configurazione si riavvierà il servizio <code>openvpn-client</code>."
msgid "Delete OpenVPN client"

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: 2022-01-05 11:43\n"
"PO-Revision-Date: 2023-09-17 15:33\n"
"Last-Translator: Bill Zimmerman <billzimmerman@gmail.com>\n"
"Language-Team: Korean\n"
"Language: ko_KR\n"
@ -147,31 +147,31 @@ msgid "Not configured"
msgstr "환결설정 안됨"
msgid "Connected"
msgstr ""
msgstr "연결됨"
msgid "Known"
msgstr ""
msgid "Nearby"
msgstr ""
msgstr "근처"
msgid "<strong>Note:</strong> WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP"
msgstr "<strong>주의:</strong> WEP 접근점은 'Open'으로 표시됩니다. RaspAP은 현재 WEP 연결을 지원하지 않습니다"
msgid "No Wifi stations found"
msgstr ""
msgstr "Wifi 스테이션을 찾을 수 없습니다."
msgid "Reinitializing wpa_supplicant"
msgstr ""
msgstr "wpa_supplicant 재초기화"
msgid "Click 'Rescan' to search for nearby Wifi stations."
msgstr ""
msgstr "근처 Wifi 스테이션을 검색하려면 '재검색'을 클릭하세요."
msgid "Click 'Reinitialize' to force reinitialize <code>wpa_supplicant</code>."
msgstr ""
msgstr "<code>wpa_supplicant</code>를 강제로 다시 초기화하려면 '재 초기화'를 클릭하십시오."
msgid "Reinitialize"
msgstr ""
msgstr "재초기화"
#: includes/dashboard.php
msgid "Interface Information"
@ -268,58 +268,58 @@ msgid "Connected Devices"
msgstr "연결된 디바이스 "
msgid "Client: Ethernet cable"
msgstr ""
msgstr "클라이언트: 이더넷 케이블"
msgid "Ethernet"
msgstr ""
msgstr "이더넷"
msgid "Client: Smartphone (USB tethering)"
msgstr ""
msgstr "클라이언트: 스마트폰(USB 테더링)"
msgid "Smartphone"
msgstr ""
msgstr "스마트폰"
msgid "WiFi"
msgstr ""
msgstr "WiFi"
msgid "Mobile Data Client"
msgstr ""
msgstr "모바일 데이터 클라이언트"
msgid "Mobile Data"
msgstr ""
msgstr "모바일 데이터"
msgid "No information available"
msgstr ""
msgstr "사용 가능한 정보 없음"
msgid "Interface name invalid"
msgstr ""
msgstr "인터페이스 이름이 잘못되었습니다."
msgid "Required exec function is disabled. Check if exec is not added to php <code>disable_functions</code>."
msgstr ""
msgstr "필수 실행 기능이 비활성화되었습니다. exec가 php <code>disable_functions</code>에 추가되지 않았는지 확인하십시오."
msgid "Waiting for the interface to start ..."
msgstr ""
msgstr "인터페이스가 시작되기를 기다리는 중..."
msgid "Stop the Interface"
msgstr ""
msgstr "인터페이스 중지"
msgid "Connection mode"
msgstr ""
msgstr "연결 모드"
msgid "Signal quality"
msgstr ""
msgstr "신호 품질"
msgid "WAN IP"
msgstr ""
msgstr "WAN IP"
msgid "Web-GUI"
msgstr ""
msgstr "웹-GUI"
msgid "Signal strength"
msgstr ""
msgstr "신호 강도"
msgid "No Client device or not yet configured"
msgstr ""
msgstr "클라이언트 장치가 없거나 아직 구성되지 않았습니다."
#: includes/dhcp.php
msgid "DHCP server settings"
@ -368,7 +368,7 @@ msgid "MAC Address"
msgstr "MAC 주소"
msgid "Optional comment"
msgstr ""
msgstr "추가 코멘트"
msgid "Host name"
msgstr "호스트명"
@ -419,49 +419,58 @@ msgid "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 ""
msgstr "RaspAP가 <b>아래에 구성된 서버에만 DNS 쿼리를 보내도록</b> 하려면 이 옵션을 활성화하십시오. 기본적으로 RaspAP는 업스트림 DHCP 서버의 이름 서버도 사용합니다."
msgid "This option adds <code>no-resolv</code> to the dnsmasq configuration."
msgstr ""
msgstr "이 옵션은 dnsmasq 구성에 <code>no-resolv</code>를 추가합니다."
msgid "Add upstream DNS server"
msgstr ""
msgstr "업스트림 DNS 서버 추가"
msgid "Format"
msgstr "규격"
msgid "Choose a hosted server"
msgstr ""
msgstr "호스팅 서버 선택"
msgid "Enable these options to log DHCP server activity."
msgstr ""
msgid "Enable these options to log <code>dhcpcd</code> and <code>dnsmasq</code> activity."
msgstr "<code>dhcpcd</code> 및 <code>dnsmasq</code> 활동을 기록하려면 이 옵션을 활성화하세요."
msgid "Log DHCP requests"
msgstr ""
msgstr "DHCP 요청 로그"
msgid "Log DNS queries"
msgstr ""
msgstr "DNS 쿼리 로그"
msgid "Restrict access"
msgstr ""
msgstr "액세스 제한"
msgid "Limit network access to static clients"
msgstr ""
msgstr "정적(static) 클라이언트에 대한 네트워크 액세스 제한"
msgid "Enable this option if you want RaspAP to <b>ignore any clients</b> which are not specified in the static leases list."
msgstr ""
msgstr "RaspAP가 정적 임대 목록에 지정되지 않은 <b>모든 클라이언트를 무시</b>하도록 하려면 이 옵션을 활성화하십시오."
msgid "This option adds <code>dhcp-ignore</code> to the dnsmasq configuration."
msgstr ""
msgstr "이 옵션은 dnsmasq 구성에 <code>dhcp-ignore</code>를 추가합니다."
msgid "Clients with a particular hardware MAC address can always be allocated the same IP address."
msgstr ""
msgstr "특정 하드웨어 MAC 주소를 가진 클라이언트는 항상 동일한 IP 주소를 할당받을 수 있습니다."
msgid "This option adds <code>dhcp-host</code> entries to the dnsmasq configuration."
msgstr ""
msgstr "이 옵션은 dnsmasq 구성에 <code>dhcp-host</code> 항목을 추가합니다."
msgid "This toggles the <code>gateway</code>/<code>nogateway</code> option for this interface in the DHCPCD configuration."
msgstr ""
msgstr "이렇게 하면 DHCPCD 구성에서 이 인터페이스에 대한 <code>gateway</code>/<code>nogateway</code> 옵션이 전환됩니다."
msgid "This toggles the <code>nohook wpa_supplicant</code> option for this interface in the DHCPCD configuration."
msgstr "러면 DHCPCD 구성에서 이 인터페이스에 대한 <code>nohook wpa_supplicant</code> 옵션이 전환됩니다."
msgid "Disable wpa_supplicant dhcp hook for this interface"
msgstr "이 인터페이스에 대해 wpa_supplicant dhcp 후크를 비활성화합니다."
msgid "If you manage wireless connections with wpa_supplicant itself, the hook may create unwanted connection events. This option disables the hook."
msgstr "wpa_supplicant 자체로 무선 연결을 관리하는 경우 후크가 원치 않는 연결 이벤트를 생성할 수 있습니다. 이 옵션은 후크를 비활성화합니다."
#: includes/hostapd.php
msgid "Basic"
@ -485,8 +494,8 @@ msgstr "보안 유형 "
msgid "Encryption Type"
msgstr "암호화 유형"
msgid "PSK"
msgstr "PSK (암호키)"
msgid "Pre-shared key (PSK)"
msgstr "사전 공유 키(PSK)"
msgid "Advanced settings"
msgstr "고급 설정 "
@ -555,41 +564,89 @@ msgid "Maximum number of clients"
msgstr "클라이언트 최대 개수"
msgid "Configures the <code>max_num_sta</code> option of hostapd. The default and maximum is 2007. If empty or 0, the default applies."
msgstr ""
msgstr "hostapd의 <code>max_num_sta</code> 옵션을 구성합니다. 기본값 및 최대값은 2007입니다. 비어 있거나 0이면 기본값이 적용됩니다."
msgid "Beacon interval"
msgstr ""
msgstr "비콘 간격"
msgid "Disable <code>disassoc_low_ack</code>"
msgstr ""
msgstr "<code>비활성화</code>"
msgid "Do not disassociate stations based on excessive transmission failures."
msgstr ""
msgstr "과도한 transmission 고장으로 인해 스테이션을 분리하지 마십시오."
msgid "Executing RaspAP service start"
msgstr ""
msgstr "RaspAP 서비스 시작 실행"
msgid "Close"
msgstr "닫기"
msgid "Enable this option to log <code>hostapd</code> activity."
msgstr ""
msgstr "<code>hostapd</code> 활동을 기록하려면 이 옵션을 활성화합니다."
msgid "Transmit power (dBm)"
msgstr ""
msgstr "송신 전력 (dBm)"
msgid "Sets the <code>txpower</code> option for the AP interface and the configured country."
msgstr ""
msgstr "AP 인터페이스 및 구성된 국가에 대한 <code>txpower</code> 옵션을 설정합니다."
msgid "dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW."
msgstr ""
msgstr "dBm은 1밀리와트(mW) 를 기준으로 전력비를 데시벨(dB) 로 표시하는 데 사용되는 레벨 단위입니다. 30dBm은 1000mW이고 0dBm은 1.25mW입니다."
msgid "WPA and WPA2"
msgstr "WPA 및 WPA2"
msgid "WPA2 and WPA3-Personal (transitional mode)"
msgstr "WPA2 및 WPA3-퍼스널 (전환 모드)"
msgid "WPA3-Personal (required)"
msgstr "WPA3-퍼스널 (WPA3-Personal)"
msgid "Enabled (for supported clients)"
msgstr "사용(지원되는 클라이언트용)"
msgid "Required (for supported clients)"
msgstr "필수(지원되는 클라이언트용)"
msgid "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)."
msgstr "802.11w는 강력한 암호화 보호를 인증 해제, 연결 해제 및 특정 범주의 작업 관리 프레임을 포함하여 강력한 관리 프레임의 선택 세트로 확장합니다. 이를 통칭하여 MFP (관리 프레임 보호) 라고 합니다."
msgid "Scan this QR code directly or %s %sprint a sign%s for your users."
msgstr "이 QR 코드를 직접 스캔하거나 사용자를 위해 %s %s인쇄%s하세요."
msgid "Printable Wi-Fi sign"
msgstr "인쇄 가능한 Wi-Fi 서명"
msgid "To connect with your phone or tablet, scan the QR code above with your camera app."
msgstr "전화기 또는 태블릿에 연결하려면 카메라 앱으로 위의 QR 코드를 스캔하십시오."
msgid "For other devices, use the login credentials below."
msgstr "다른 장치의 경우 아래의 로그인 자격 증명을 사용합니다."
msgid "Network"
msgstr "네트워크"
msgid "The selected interface (%s) has support for the 2.4 GHz wireless band only."
msgstr "선택한 인터페이스 (%s) 는 2.4GHz 무선 대역만 지원합니다."
msgid "The selected interface (%s) has support for the 2.5 GHz wireless band only."
msgstr "선택한 인터페이스 (%s) 는 2.5GHz 무선 대역만 지원합니다."
msgid "The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."
msgstr "선택한 인터페이스 (%s) 는 2.4GHz 및 5GHz 무선 대역을 모두 지원합니다."
msgid "The selected interface (%s) does not support wireless mode operation."
msgstr "선택한 인터페이스 (%s) 는 무선 모드 작업을 지원하지 않습니다."
msgid "The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."
msgstr "802.11ac 5GHz 옵션은 호환되는 무선 규제 도메인이 설정될 때까지 비활성화됩니다."
#: includes/networking.php
msgid "Summary"
msgstr "요약 "
msgid "Internet connection"
msgstr ""
msgstr "인터넷 연결"
msgid "Current settings"
msgstr "현재 설정"
@ -619,7 +676,7 @@ msgid "Static IP Options"
msgstr "고정 IP 옵션"
msgid "Metric"
msgstr ""
msgstr "측정항목(Metric)"
msgid "Apply settings"
msgstr "설정 적용"
@ -627,56 +684,95 @@ msgstr "설정 적용"
msgid "Information provided by /sys/class/net"
msgstr "/sys/class/net이 제공한 정보 "
msgid "Network Devices"
msgstr ""
msgid "Devices"
msgstr "디바이스"
msgid "Mobile Data Settings"
msgstr ""
msgid "Diagnostics"
msgstr "진단"
msgid "Properties of network devices"
msgstr ""
msgstr "네트워크 장치의 속성"
msgid "Device"
msgstr ""
msgstr "장치"
msgid "MAC"
msgstr ""
msgstr "맥(MAC)"
msgid "USB vid/pid"
msgstr ""
msgstr "USB vid/pid"
msgid "Device type"
msgstr ""
msgstr "장치 유형"
msgid "Fixed name"
msgstr ""
msgstr "고정 이름"
msgid "Change"
msgstr ""
msgstr "변경"
msgid "Settings for Mobile Data Devices"
msgstr ""
msgstr "모바일 데이터 장치 설정"
msgid "PIN of SIM card"
msgstr ""
msgstr "SIM 카드의 PIN"
msgid "APN Settings (Modem device ppp0)"
msgstr ""
msgstr "APN 설정(모뎀 장치 ppp0)"
msgid "Access Point Name (APN)"
msgstr ""
msgstr "액세스 포인트 이름(APN)"
msgid "Password"
msgstr ""
msgstr "비밀번호"
msgid "Successfully Updated Network Configuration"
msgstr ""
msgstr "네트워크 구성을 성공적으로 업데이트했습니다."
msgid "Error saving network configuration to file"
msgstr ""
msgstr "파일에 네트워크 구성을 저장하는 동안 오류가 발생했습니다."
msgid "Unable to detect interface"
msgstr ""
msgstr "인터페이스를 감지할 수 없습니다."
msgid "Routing table"
msgstr "라우팅 테이블"
msgid "raw output"
msgstr "원시(raw) 출력"
msgid "Speedtest"
msgstr "속도테스트"
msgid "Selecting a server"
msgstr "서버를 선택하세요"
msgid "Privacy"
msgstr "개인정보"
msgid "Server"
msgstr "서버"
msgid "ms"
msgstr "밀리초(ms)"
msgid "Mbps"
msgstr "Mbps"
msgid "Ping"
msgstr "지연 시간(Ping)"
msgid "Jitter"
msgstr "지터(Jitter)"
msgid "Upload"
msgstr "업로드"
msgid "Start"
msgstr "시작"
msgid "Abort"
msgstr "중단"
#: includes/system.php
msgid "System Information"
@ -706,6 +802,9 @@ msgstr "Pi 리비전"
msgid "Uptime"
msgstr "가동시간"
msgid "System Time"
msgstr "시스템 시간"
msgid "Memory Used"
msgstr "사용된 메모리"
@ -730,7 +829,42 @@ msgstr "웹서버 포트"
msgid "Web server bind address"
msgstr "웹서버 바인드 주소"
#: includes/themes.php
msgid "OS"
msgstr "OS"
msgid "Kernel"
msgstr "커널"
msgid "System reset"
msgstr "시스템 리셋"
msgid "Reset RaspAP to its initial configuration? This action cannot be undone."
msgstr "RaspAP를 초기 구성으로 재설정하시겠습니까? 이 작업은 취소할 수 없습니다."
msgid "Reset complete. Restart the hotspot for the changes to take effect."
msgstr "재설정이 완료되었습니다. 변경 사항을 적용하려면 핫스팟을 다시 시작하세요."
msgid "System reset in progress..."
msgstr "시스템 재설정 진행 중..."
msgid "Reset"
msgstr "리셋"
msgid "Restore settings"
msgstr "설정 복원"
msgid "To reset RaspAP to its <a href=\"%s\">initial configuration</a>, click or tap the button below."
msgstr "RaspAP를 <a href=\"%s\">초기 구성</a>으로 재설정하려면 아래 버튼을 클릭하거나 탭하세요."
msgid "Custom files for optional components such as Ad Blocking, WireGuard or OpenVPN will remain on the system."
msgstr "광고 차단, WireGuard 또는 OpenVPN과 같은 선택적 구성 요소에 대한 사용자 정의 파일은 시스템에 유지됩니다."
msgid "Perform reset"
msgstr "초기화 수행"
msgid "Restores all access point (AP) service settings to their default values. This applies to hostapd, dhcpcd and dnsmasq."
msgstr "모든 액세스 포인트(AP) 서비스 설정을 기본값으로 복원합니다. 이는 Hostapd, dhcpcd 및 dnsmasq에 적용됩니다."
msgid "Theme settings"
msgstr "테마 설정"
@ -842,22 +976,22 @@ msgid "Configurations"
msgstr "환경설정"
msgid "Currently available OpenVPN client configurations are displayed below."
msgstr ""
msgstr "현재 사용 가능한 OpenVPN 클라이언트 구성이 아래에 표시됩니다."
msgid "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgstr ""
msgid "Activating a configuration will restart the <code>openvpn-client</code> service."
msgstr "구성을 활성화하면 <code>openvpn-client</code> 서비스가 다시 시작됩니다."
msgid "Delete OpenVPN client"
msgstr ""
msgstr "OpenVPN 클라이언트 삭제"
msgid "Delete client configuration? This cannot be undone."
msgstr ""
msgstr "클라이언트 구성을 삭제하시겠습니까? 이 취소 할 수 없습니다."
msgid "Activate OpenVPN client"
msgstr ""
msgstr "OpenVPN 클라이언트 활성화"
msgid "Activate client configuration? This will restart the openvpn-client service."
msgstr ""
msgstr "클라이언트 구성을 활성화하시겠습니까? 그러면 openvpn-client 서비스가 다시 시작됩니다."
msgid "Activate"
msgstr "활성화"
@ -866,13 +1000,13 @@ msgid "Cancel"
msgstr "취소"
msgid "Enable this option to log <code>openvpn</code> activity."
msgstr ""
msgstr "<code>openvpn</code> 활동을 기록하려면 이 옵션을 활성화합니다."
msgid "Authentification Method"
msgstr ""
msgstr "인증 방식"
msgid "Username and password"
msgstr ""
msgstr "사용자 이름 및 암호"
msgid "Certificates"
msgstr "인증서"
@ -884,16 +1018,16 @@ msgid "Certificates in the configuration file"
msgstr "인증서의 구성파일"
msgid "RaspAP supports certificates by including them in the configuration file."
msgstr ""
msgstr "RaspAP는 구성 파일에 인증서를 포함하여 인증서를 지원합니다."
msgid "Signing certification authority (CA) certificate (e.g. <code>ca.crt</code>): enclosed in <code>&lt;ca> ... &lt;/ca></code> tags."
msgstr ""
msgstr "서명 인증 기관(CA) 인증서(예: <code>ca.crt</code>): <code>&lt;ca> ... &lt;/ca></code> 태그로 묶입니다."
msgid "Client certificate (public key) (e.g. <code>client.crt</code>): enclosed in <code>&lt;cert> ... &lt;/cert></code> tags."
msgstr ""
msgstr "클라이언트 인증서(공개 키)(예: <code>client.crt</code>): <code>&lt;cert> ... &lt;/cert></code> 태그로 묶입니다."
msgid "Private key of the client certificate (e.g. <code>client.key</code>): enclosed in <code>&lt;key> ... &lt;/key></code> tags."
msgstr ""
msgstr "클라이언트 인증서의 개인 키(예: <code>client.key</code>): <code>&lt;key> ... &lt;/key></code> 태그로 묶입니다."
msgid "Configuration File"
msgstr "설정 파일"
@ -934,7 +1068,7 @@ msgstr "TOR 중지 시도 중입니다 "
#: template/dashboard.php
msgid "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page."
msgstr ""
msgstr "브릿지(Bridged) AP 모드가 활성화되었습니다. 호스트 이름 및 IP는 라우터의 관리 페이지를 참조하십시오."
#: common form controls
msgid "Save settings"
@ -958,6 +1092,9 @@ msgstr "작동"
msgid "down"
msgstr "다운"
msgid "Clear log"
msgstr "로그 삭제"
msgid "adblock"
msgstr "광고차단(adblock)"
@ -977,19 +1114,19 @@ 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 ""
msgstr "RaspAP가 <b>광고, 추적 및 기타 가상 쓰레기(virtual garbage) 에 대한 DNS 요청을 차단</b>하도록 하려면 이 옵션을 활성화합니다. 차단 목록은 활발하게 유지 관리되는 여러 소스에서 수집되며 매일 자동으로 업데이트, 정리, 최적화 및 조정됩니다."
msgid "This option adds <code>conf-file</code> and <code>addn-hosts</code> to the dnsmasq configuration."
msgstr ""
msgstr "이 옵션은 dnsmasq 구성에 <code>conf-file</code> 및 <code>addn-hosts</code>를 추가합니다."
msgid "Choose a blocklist provider"
msgstr ""
msgstr "차단 목록 공급자를 선택하십시오"
msgid "Hostnames blocklist last updated"
msgstr ""
msgstr "마지막으로 업데이트된 호스트 이름 차단 목록"
msgid "Domains blocklist last updated"
msgstr ""
msgstr "마지막으로 업데이트된 도메인 차단 목록(blocklist)"
msgid "Update now"
msgstr "지금 업데이트 시작"
@ -998,70 +1135,70 @@ msgid "Statistics"
msgstr "통계"
msgid "Information provided by adblock"
msgstr ""
msgstr "애드블록에서 제공하는 정보"
msgid "Enable custom blocklist"
msgstr ""
msgstr "사용자 지정 차단 목록(blocklist) 활성화"
msgid "Define custom hosts to be blocked by entering an IPv4 or IPv6 address followed by any whitespace (spaces or tabs) and the host name."
msgstr ""
msgstr "IPv4 또는 IPv6 주소 뒤에 공백(공백 또는 탭) 과 호스트 이름을 입력하여 차단할 사용자 지정 호스트를 정의합니다."
msgid "<b>IPv4 example:</b> 0.0.0.0 badhost.com"
msgstr ""
msgstr "<b>IPv4 예:</b> 0.0.0.0 badhost.com"
msgid "This option adds an <code>addn-hosts</code> directive to the dnsmasq configuration."
msgstr ""
msgstr "이 옵션은 dnsmasq 구성에 <code>addn-hosts</code> 지시문을 추가합니다."
msgid "Custom blocklist not defined"
msgstr ""
msgstr "정의되지 않은 맞춤 차단 목록(blocklist)"
msgid "Invalid custom IP address found on line "
msgstr ""
msgstr "이 행에 잘못된 사용자 정의 IP 주소 발견 "
msgid "Invalid custom host found on line "
msgstr ""
msgstr "이 행에 잘못된 사용자 지정 호스트 주소 발견 "
msgid "Tunnel settings"
msgstr ""
msgstr "터널 설정"
msgid "Configuration Method"
msgstr ""
msgstr "구성 방법"
msgid "Upload file"
msgstr ""
msgstr "파일 업로드"
msgid "Create manually"
msgstr ""
msgstr "수동으로 만들기"
msgid "Upload a WireGuard config"
msgstr ""
msgstr "WireGuard 구성(config) 업로드"
msgid "This option uploads and installs an existing WireGuard <code>.conf</code> file on this device."
msgstr ""
msgstr "이 옵션은 이 장치에 기존 WireGuard <code>.conf</code> 파일을 업로드하고 설치합니다"
msgid "Apply iptables rules for AP interface"
msgstr ""
msgstr "AP 인터페이스에 iptables 규칙 적용"
msgid "Recommended if you wish to forward network traffic from the wg0 interface to clients connected on the AP interface."
msgstr ""
msgstr "wg0 인터페이스에서 AP 인터페이스에 연결된 클라이언트로 네트워크 트래픽을 전달하려는 경우에 권장됩니다."
msgid "This option adds <strong>iptables</strong> <code>Postup</code> and <code>PostDown</code> rules for the configured AP interface (%s)."
msgstr ""
msgstr "이 옵션은 구성된 AP 인터페이스(%s) 에 대한 <strong>iptables</strong> <code>Postup</code> 및 <code>PostDown</code> 규칙을 추가합니다."
msgid "Select WireGuard configuration file (.conf)"
msgstr ""
msgstr "WireGuard 구성 파일(.conf) 선택"
msgid "Create a local WireGuard config"
msgstr ""
msgstr "로컬 WireGuard 구성 만들기"
msgid "Enable server"
msgstr "활성화된 서버"
msgid "Enable this option to secure network traffic by creating an encrypted tunnel between RaspAP and configured peers."
msgstr ""
msgstr "RaspAP와 구성된 피어 간에 암호화된 터널을 생성하여 네트워크 트래픽을 보호하려면 이 옵션을 활성화합니다."
msgid "This setting generates a new WireGuard <code>.conf</code> file on this device."
msgstr ""
msgstr "이 설정은 이 장치에서 새 WireGuard <code>.conf</code> 파일을 생성합니다."
msgid "Local public key"
msgstr "로컬 공개키(public Key)"
@ -1082,34 +1219,34 @@ msgid "Enable peer"
msgstr "활성화된 피어"
msgid "Enable this option to encrypt traffic by creating a tunnel between RaspAP and this peer."
msgstr ""
msgstr "RaspAP와 이 피어 사이에 터널을 만들어 트래픽을 암호화하려면 이 옵션을 활성화합니다."
msgid "This option adds <code>client.conf</code> to the WireGuard configuration."
msgstr ""
msgstr "이 옵션은 WireGuard 구성에 <code>client.conf</code>를 추가합니다."
msgid "Peer public key"
msgstr "피어 공개키(Public Key)"
msgid "Endpoint address"
msgstr ""
msgstr "끝점(Endpoint) 주소"
msgid "Allowed IPs"
msgstr ""
msgstr "허용된 IP"
msgid "Persistent keepalive"
msgstr ""
msgstr "지속적 연결 유지(Persistent keepalive)"
msgid "Enable this option to display an updated <code>wg-quick</code> debug log."
msgstr ""
msgstr "업데이트된 <code>wg-quick</code> 디버그 로그를 표시하려면 이 옵션을 활성화하십시오."
msgid "WireGuard debug log updated"
msgstr ""
msgstr "WireGuard 디버그 로그 업데이트됨"
msgid "Scan this QR code with your client to connect to this tunnel"
msgstr ""
msgstr "클라이언트로 이 QR 코드를 스캔하여 이 터널에 연결하세요."
msgid "or download the <code>client.conf</code> file to your device."
msgstr ""
msgstr "또는 <code>client.conf</code> 파일을 장치에 다운로드하십시오."
msgid "Download"
msgstr "다운로드"
@ -1121,86 +1258,176 @@ msgid "Stop WireGuard"
msgstr "WireGuard 정지"
msgid "Information provided by wireguard"
msgstr ""
msgstr "wireguard에서 제공하는 정보"
msgid "Attempting to start WireGuard"
msgstr ""
msgstr "WireGuard 시작 시도 중입니다"
msgid "Attempting to stop WireGuard"
msgstr ""
msgstr "WireGuard 중지 시도 중입니다"
msgid "WireGuard configuration updated successfully"
msgstr ""
msgstr "WireGuard 구성이 성공적으로 업데이트되었습니다."
msgid "WireGuard configuration failed to be updated"
msgstr ""
msgstr "WireGuard 구성을 업데이트하지 못했습니다."
msgid "Enable kill switch"
msgstr "킬 스위치 활성화"
msgid "This option adds <strong>iptables</strong> <code>PostUp</code> and <code>PreDown</code> rules for the configured AP interface (%s)."
msgstr "이 옵션은 구성된 AP 인터페이스 (%s) 에 대한 <strong>iptables</strong> <code>PostUp</code> 및 <code>PreDown</code> 규칙을 추가합니다."
msgid "Recommended if you wish to prevent the flow of unencrypted packets through non-WireGuard interfaces."
msgstr "WireGuard가 아닌 인터페이스를 통해 암호화되지 않은 패킷의 흐름을 방지하려는 경우 권장됩니다."
msgid "iptables rules added to WireGuard configuration"
msgstr "WireGuard 구성에 iptables 규칙이 추가되었습니다."
msgid "Existing iptables rules found in WireGuard configuration - not added"
msgstr "WireGuard 구성에서 발견된 기존 iptables 규칙 - 추가되지 않음"
msgid "Client Firewall"
msgstr ""
msgstr "클라이언트 방화벽"
msgid "Firewall is ENABLED"
msgstr ""
msgstr "방화벽이 활성화됨"
msgid "Firewall is OFF"
msgstr ""
msgstr "방화벽이 꺼져 있습니다."
msgid "The default firewall will only allow outgoing and already established traffic."
msgstr ""
msgstr "기본 방화벽은 나가는 트래픽과 이미 설정된 트래픽만 허용합니다."
msgid "No incoming UDP traffic is allowed."
msgstr ""
msgstr "수신 UDP 트래픽이 허용되지 않습니다."
msgid "There are no restrictions for the access point <code>%s</code>."
msgstr ""
msgstr "액세스 포인트 <code>%s</code>에 대한 제한이 없습니다."
msgid "Exception: Service"
msgstr ""
msgstr "예외: 서비스"
msgid "allow SSH access on port 22"
msgstr ""
msgstr "포트 22에서 SSH 액세스 허용"
msgid "allow access to the RaspAP GUI on port 80 or 443"
msgstr ""
msgstr "포트 80 또는 443에서 RaspAP GUI에 대한 액세스 허용"
msgid "Allow incoming connections for some services from the internet side."
msgstr ""
msgstr "인터넷 측에서 일부 서비스에 대한 수신 연결을 허용합니다."
msgid "Exception: network device"
msgstr ""
msgstr "예외: 네트워크 장치"
msgid "Exclude device(s)"
msgstr ""
msgstr "장치 제외"
msgid "Exclude the given network device(s) (separated by a blank or comma) from firewall rules."
msgstr ""
msgstr "방화벽 규칙에서 지정된 네트워크 장치(공백 또는 쉼표로 구분) 를 제외합니다."
msgid "Current client devices: <code>%s</code>"
msgstr ""
msgstr "현재 클라이언트 장치: <code>%s</code>"
msgid "The access point <code>%s</code> is per default excluded."
msgstr ""
msgstr "액세스 포인트 <code>%s</code>는 기본적으로 제외됩니다."
msgid "Exception: IP-Address"
msgstr ""
msgstr "예외: IP 주소"
msgid "Allow incoming connections from"
msgstr ""
msgstr "다음에서 들어오는 연결 허용"
msgid "For the given IP-addresses (separated by a blank or comma) the incoming connection (via TCP and UDP) is accepted."
msgstr ""
msgstr "지정된 IP 주소(공백 또는 쉼표로 구분) 에 대해 들어오는 연결(TCP 및 UDP를 통해) 이 허용됩니다."
msgid "This is required for an OpenVPN via UDP or Wireguard connection."
msgstr ""
msgstr "이는 UDP 또는 Wireguard 연결을 통한 OpenVPN에 필요합니다."
msgid "The list of configured VPN server IP addresses: <code><b>%s</b></code>"
msgstr ""
msgstr "구성된 VPN 서버 IP 주소 목록: <code><b>%s</b></code>"
msgid "Disable Firewall"
msgstr ""
msgstr "방화벽 비활성화"
msgid "Enable Firewall"
msgstr ""
msgstr "방화벽 활성화"
msgid "Apply changes"
msgstr ""
msgstr "변경 사항을 적용합니다"
msgid "Dynamic DNS"
msgstr "동적 DNS"
msgid "Service provider"
msgstr "서비스 제공 업체"
msgid "Select a Dynamic DNS service supported by <strong>ddclient</strong> from the list below. Selecting a known service provider will populate the <code>protocol</code> and <code>server</code> fields. You may also configure the service manually."
msgstr "아래 목록에서 <strong>ddclient</strong>가 지원하는 동적 DNS 서비스를 선택하세요. 알려진 서비스 제공업체를 선택하면 <code>프로토콜</code> 및 <code>서버</code> 필드가 채워집니다. 서비스를 수동으로 구성할 수도 있습니다."
msgid "Method to obtain IP"
msgstr "IP를 얻는 방법"
msgid "Select the method used by <strong>ddclient</strong> to obtain an IP address. This value is specified in the <code>-use</code> option."
msgstr "IP 주소를 얻기 위해 <strong>ddclient</strong>에서 사용하는 방법을 선택하세요. 이 값은 <code>-use</code> 옵션에 지정됩니다."
msgid "Discovery page on the web"
msgstr "웹의 검색 페이지"
msgid "Network interface"
msgstr "네트워크 인터페이스"
msgid "Network address"
msgstr "네트워크 주소"
msgid "Firewall status page"
msgstr "방화벽 상태 페이지"
msgid "External command"
msgstr "외부 명령"
msgid "Web address"
msgstr "웹 주소"
msgid "Firewall"
msgstr "방화벽"
msgid "Command"
msgstr "명령어"
msgid "Example: <code>192.168.1.254/status.htm</code>."
msgstr "예제: <code>192.168.1.254/status.htm</code>."
msgid "Example: <code>/usr/local/bin/get-ip</code>."
msgstr "예제: <code>/usr/local/bin/get-ip</code>."
msgid "Domain"
msgstr "도메인"
msgid "Enable SSL"
msgstr "SSL 활성화"
msgid "Use an encrypted SSL connection for updates. Not supported by all providers."
msgstr "업데이트에는 암호화된 SSL 연결을 사용하십시오. 모든 공급자가 지원하지는 않습니다."
msgid "Value specified in milliseconds (ms). Default is 300."
msgstr "밀리초(ms) 단위로 지정된 값입니다. 기본값은 300입니다."
msgid "Use the <strong>Generate log</strong> button to output detailed <code>ddclient daemon</code> debug info"
msgstr "<strong>로그 생성</strong> 버튼을 사용하여 자세한 <code>ddclient daemon</code> 디버그 정보를 출력하세요."
msgid "Generate log"
msgstr "로그 생성하기"
msgid "Information provided by ddclient"
msgstr "ddclient에서 제공하는 정보"
msgid "Start Dynamic DNS"
msgstr "동적 DNS 시작"
msgid "Stop Dynamic DNS"
msgstr "동적 DNS 중지"
msgid "Restart Dynamic DNS"
msgstr "동적 DNS 다시 시작"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -844,7 +844,7 @@ msgstr "Configurații"
msgid "Currently available OpenVPN client configurations are displayed below."
msgstr "Configurațiile clientului OpenVPN disponibile sunt afișate mai jos."
msgid "Activating a configuraton will restart the <code>openvpn-client</code> service."
msgid "Activating a configuration will restart the <code>openvpn-client</code> service."
msgstr "Activarea unei configurații va reporni serviciul <code>openvpn-client</code>."
msgid "Delete OpenVPN client"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
<?php
function getConfig()
{
$config = array(
'admin_user' => 'admin',
'admin_pass' => '$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i'
);
if (file_exists(RASPI_CONFIG . '/raspap.auth')) {
if ($auth_details = fopen(RASPI_CONFIG . '/raspap.auth', 'r')) {
$config['admin_user'] = trim(fgets($auth_details));
$config['admin_pass'] = trim(fgets($auth_details));
fclose($auth_details);
}
}
return $config;
}

136
src/RaspAP/Auth/HTTPAuth.php Executable file
View File

@ -0,0 +1,136 @@
<?php
/**
* Authentication class
*
* @description Basic HTTP authentication class for RaspAP
* @author Bill Zimmerman <billzimmerman@gmail.com>
* @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE
* @see https://www.php.net/manual/en/features.http-auth.php
*/
declare(strict_types=1);
namespace RaspAP\Auth;
class HTTPAuth
{
/**
* @var string $realm
*/
public $realm = 'Authentication Required';
/**
* Stored login credentials
* @var array $auth_config
*/
protected $auth_config;
/**
* Default login credentials
* @var array $auth_default
*/
private $auth_default = array(
'admin_user' => 'admin',
'admin_pass' => '$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i'
);
// Constructor
public function __construct()
{
$this->auth_config = $this->getAuthConfig();
}
/*
* Determines if user is logged in
* return boolean
*/
public function isLogged()
{
return isset($_SESSION['user_id']);
}
/*
* Authenticate a user using HTTP basic auth
*/
public function authenticate()
{
if (!$this->isLogged()) {
header('HTTP/1.0 401 Unauthorized');
header('WWW-Authenticate: Basic realm="'.$this->realm.'"');
if (function_exists('http_response_code')) {
// http_response_code will respond with proper HTTP version
http_response_code(401);
} else {
header('HTTP/1.0 401 Unauthorized');
}
exit('Not authorized'.PHP_EOL);
}
}
/*
* Attempt to login a user with supplied credentials
* @var string $user
* @var string $pass
* return boolean
*/
public function login(string $user, string $pass)
{
if ($this->isValidCredentials($user, $pass)) {
$_SESSION['user_id'] = $user;
return true;
}
return false;
}
/*
* Gets the current authentication config
* return array $config
*/
public function getAuthConfig()
{
$config = $this->auth_default;
if (file_exists(RASPI_CONFIG . '/raspap.auth')) {
if ($auth_details = fopen(RASPI_CONFIG . '/raspap.auth', 'r')) {
$config['admin_user'] = trim(fgets($auth_details));
$config['admin_pass'] = trim(fgets($auth_details));
fclose($auth_details);
}
}
return $config;
}
/*
* Validates a set of credentials
* @var string $user
* @var string $pass
* return boolean
*/
protected function isValidCredentials(string $user, string $pass)
{
return $this->validateUser($user) && $this->validatePassword($pass);
}
/**
* Validates a user
*
* @param string $user
*/
protected function validateUser(string $user)
{
return $user == $this->auth_config['admin_user'];
}
/**
* Validates a password
*
* @param string $pass
*/
protected function validatePassword(string $pass)
{
return password_verify($pass, $this->auth_config['admin_pass']);
}
}

View File

@ -1,5 +1,16 @@
<?php
class StatusMessages
/**
* Status message class
*
* @description Status message class for RaspAP
* @author Bill Zimmerman <billzimmerman@gmail.com>
* @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE
*/
namespace RaspAP\Messages;
class StatusMessage
{
public $messages = array();

153
src/RaspAP/System/Sysinfo.php Executable file
View File

@ -0,0 +1,153 @@
<?php
/**
* System info class
*
* @description System info class for RaspAP
* @author Bill Zimmerman <billzimmerman@gmail.com>
* @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE
*/
namespace RaspAP\System;
class Sysinfo
{
public function hostname()
{
return shell_exec("hostname -f");
}
public function uptime()
{
$uparray = explode(" ", exec("cat /proc/uptime"));
$seconds = round($uparray[0], 0);
$minutes = $seconds / 60;
$hours = $minutes / 60;
$days = floor($hours / 24);
$hours = floor($hours - ($days * 24));
$minutes = floor($minutes - ($days * 24 * 60) - ($hours * 60));
$uptime= '';
if ($days != 0) {
$uptime .= $days . ' day' . (($days > 1)? 's ':' ');
}
if ($hours != 0) {
$uptime .= $hours . ' hour' . (($hours > 1)? 's ':' ');
}
if ($minutes != 0) {
$uptime .= $minutes . ' minute' . (($minutes > 1)? 's ':' ');
}
return $uptime;
}
public function systime()
{
$systime = exec("date");
return $systime;
}
public function usedMemory()
{
$used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
return floor(intval($used));
}
public function processorCount()
{
$procs = shell_exec("nproc --all");
return intval($procs);
}
public function loadAvg1Min()
{
$load = exec("awk '{print $1}' /proc/loadavg");
return floatval($load);
}
public function systemLoadPercentage()
{
return intval(($this->loadAvg1Min() * 100) / $this->processorCount());
}
public function systemTemperature()
{
$cpuTemp = file_get_contents("/sys/class/thermal/thermal_zone0/temp");
return number_format((float)$cpuTemp/1000, 1);
}
public function hostapdStatus()
{
exec('pidof hostapd | wc -l', $status);
return $status;
}
public function operatingSystem()
{
$os_desc = shell_exec("lsb_release -sd");
return $os_desc;
}
public function kernelVersion()
{
$kernel = shell_exec("uname -r");
return $kernel;
}
/*
* Returns RPi Model and PCB Revision from Pi Revision Code (cpuinfo)
* @see http://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/
*/
public function rpiRevision()
{
$revisions = array(
'0002' => 'Model B Revision 1.0',
'0003' => 'Model B Revision 1.0 + ECN0001',
'0004' => 'Model B Revision 2.0 (256 MB)',
'0005' => 'Model B Revision 2.0 (256 MB)',
'0006' => 'Model B Revision 2.0 (256 MB)',
'0007' => 'Model A',
'0008' => 'Model A',
'0009' => 'Model A',
'000d' => 'Model B Revision 2.0 (512 MB)',
'000e' => 'Model B Revision 2.0 (512 MB)',
'000f' => 'Model B Revision 2.0 (512 MB)',
'0010' => 'Model B+',
'0013' => 'Model B+',
'0011' => 'Compute Module',
'0012' => 'Model A+',
'a01041' => 'a01041',
'a21041' => 'a21041',
'900092' => 'PiZero 1.2',
'900093' => 'PiZero 1.3',
'9000c1' => 'PiZero W',
'a02082' => 'Pi 3 Model B',
'a22082' => 'Pi 3 Model B',
'a32082' => 'Pi 3 Model B',
'a52082' => 'Pi 3 Model B',
'a020d3' => 'Pi 3 Model B+',
'a220a0' => 'Compute Module 3',
'a020a0' => 'Compute Module 3',
'a02100' => 'Compute Module 3+',
'a03111' => 'Model 4B Revision 1.1 (1 GB)',
'b03111' => 'Model 4B Revision 1.1 (2 GB)',
'c03111' => 'Model 4B Revision 1.1 (4 GB)'
);
$cpuinfo_array = '';
exec('cat /proc/cpuinfo', $cpuinfo_array);
$info = preg_grep("/^Revision/", $cpuinfo_array);
$tmp = explode(':', array_pop($info));
$rev = trim(array_pop($tmp));
if (array_key_exists($rev, $revisions)) {
return $revisions[$rev];
} else {
exec('cat /proc/device-tree/model', $model);
if (isset($model[0])) {
return $model[0];
} else {
return 'Unknown Device';
}
}
}
}

View File

@ -3,8 +3,6 @@
/**
* Simple PHP upload class
*
* Adapted from aivis/PHP-file-upload-class
*
* @description File upload class for RaspAP
* @author Bill Zimmerman <billzimmerman@gmail.com>
* @author Aivis Silins
@ -14,7 +12,7 @@
namespace RaspAP\Uploader;
class Upload
class FileUpload
{
/**
@ -110,7 +108,7 @@ class Upload
*/
public static function factory($destination, $root = false)
{
return new Upload($destination, $root);
return new FileUpload($destination, $root);
}
/**

View File

@ -8,13 +8,14 @@
with the contributions of our <a href="https://github.com/raspap/raspap-webgui/graphs/contributors">developer community</a>
and <a href="https://crowdin.com/project/raspap">language translators</a>.
Learn more about joining the project as a <a href="https://docs.raspap.com/#get-involved">code contributor</a>,
<a href="https://docs.raspap.com/translations.html">translator</a> or <a href="https://github.com/sponsors/RaspAP">financial sponsor</a> with immediate access to <a href="https://github.com/sponsors/RaspAP#exclusive-features">exclusive features</a> available to <strong>Insiders</strong>.</div>
<a href="https://docs.raspap.com/translations/">translator</a> or <a href="https://github.com/sponsors/RaspAP">financial sponsor</a> with immediate access to <a href="https://github.com/sponsors/RaspAP#exclusive-features">exclusive features</a> available to <strong>Insiders</strong>.</div>
<div class="mt-3">Project documentation is available at <a href="https://docs.raspap.com/">https://docs.raspap.com/</a></div>
<div class="mt-3 project-links">
<div class="row">
<div class="col-md-6">GitHub <i class="fab fa-github"></i> <a href="https://github.com/RaspAP/">RaspAP</a></div>
<div class="col-md-6">Twitter <span style="color: #55acee"><i class="fab fa-twitter"></i></span> <a href="https://twitter.com/rasp_ap">@RaspAP</a></div>
<div class="col-md-6">Reddit <span style="color: #ff4500"><i class="fab fa-reddit"></i></span> <a href="https://www.reddit.com/r/RaspAP/">/r/raspap</a></div>
<div class="col-md-6">Gitter <span style="color: #ed1965"><i class="fab fa-gitter"></i></span> <a href="https://app.gitter.im/#/room/#RaspAP:gitter.im">/room/RaspAP</a></div>
<div class="col-md-6">License <i class="fas fa-balance-scale"></i> <a href="https://github.com/raspap/raspap-webgui/blob/master/LICENSE">GPL-3.0</a></div>
</div>
</div>

View File

@ -19,9 +19,9 @@
<div class="row">
<div class="col-md-12">
<p id="blocklist-updated">
<div><small><?php echo _("Hostnames blocklist last updated") ?>: <span class="font-weight-bold" id="notracking-hostnames">
<div><small><?php echo _("Hostnames blocklist last updated") ?>: <span class="font-weight-bold" id="blocklist-hostnames">
<?php echo blocklistUpdated('hostnames.txt') ?></span></small></div>
<div><small><?php echo _("Domains blocklist last updated") ?>: <span class="font-weight-bold" id="notracking-domains">
<div><small><?php echo _("Domains blocklist last updated") ?>: <span class="font-weight-bold" id="blocklist-domains">
<?php echo blocklistUpdated('domains.txt') ?></b></small></div>
</p>
<div class="input-group col-md-12 mb-4">

View File

@ -21,20 +21,35 @@
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="password"><?php echo _("Old password"); ?></label>
<input type="password" class="form-control" name="oldpass"/>
<div class="mb-2"><?php echo _("Old password"); ?></div>
<div class="input-group">
<input type="password" class="form-control" name="oldpass"/>
<div class="input-group-append">
<button class="btn btn-light js-toggle-password" type="button" data-target="[name=oldpass]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="password"><?php echo _("New password"); ?></label>
<input type="password" class="form-control" name="newpass"/>
<div class="mb-2"><?php echo _("New password"); ?></div>
<div class="input-group">
<input type="password" class="form-control" name="newpass"/>
<div class="input-group-append">
<button class="btn btn-light js-toggle-password" type="button" data-target="[name=newpass]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="password"><?php echo _("Repeat new password"); ?></label>
<input type="password" class="form-control" name="newpassagain"/>
<div class="mb-2"><?php echo _("Repeat new password"); ?></div>
<div class="input-group">
<input type="password" class="form-control" name="newpassagain"/>
<div class="input-group-append">
<button class="btn btn-light js-toggle-password" type="button" data-target="[name=newpassagain]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
</div>
</div>
</div>
</div>
<input type="submit" class="btn btn-outline btn-primary" name="UpdateAdminPassword" value="<?php echo _("Save settings"); ?>" />

View File

@ -24,7 +24,9 @@
<h4 class="card-title"><?php echo _("Hourly traffic amount"); ?></h4>
<div id="divInterface" class="d-none"><?php echo $apInterface; ?></div>
<div class="col-md-12">
<canvas id="divDBChartBandwidthhourly"></canvas>
<div class="col dbChart">
<canvas id="divDBChartBandwidthhourly"></canvas>
</div>
</div>
</div><!-- /.card-body -->
</div><!-- /.card-->

View File

@ -67,6 +67,19 @@
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<div class="custom-control custom-switch">
<input class="custom-control-input" id="nohook-wpa-supplicant" type="checkbox" name="NoHookWPASupplicant" value="1" aria-describedby="hook-wpa-supplicant-description">
<label class="custom-control-label" for="nohook-wpa-supplicant"><?php echo _("Disable wpa_supplicant dhcp hook for this interface") ?></label>
<?php getTooltip('If you manage wireless connections with wpa_supplicant itself, the hook may create unwanted connection events. This option disables the hook.', 'tipnohook'); ?>
</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>
</p>
</div>
</div>
<h5 class="mt-1">DHCP options</h5>
<div class="row">
<div class="form-group col-md-6">

View File

@ -1,110 +0,0 @@
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-shield-alt mr-2"></i><?php echo _("Firewall"); ?>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body">
<?php $status->showMessages(); ?>
<h4><?php echo _("Client Firewall"); ?></h4>
<?php if ( $fw_conf["firewall-enable"]) : ?>
<i class="fas fa-circle mr-2 service-status-up"></i><?php echo _("Firewall is ENABLED"); ?>
<?php else : ?>
<i class="fas fa-circle mr-2 service-status-down"></i><?php echo _("Firewall is OFF"); ?>
<?php endif ?>
<div class="row">
<div class="col-md-6">
<p class="mr-2">
<small>
<?php echo _("The default firewall will only allow outgoing and already established traffic."); ?><br />
<?php echo _("No incoming UDP traffic is allowed."); ?><br />
<?php printf(_("There are no restrictions for the access point <code>%s</code>."), $ap_device); ?>
</small>
</p>
</div>
</div>
<form id="frm-firewall" action="firewall_conf" method="POST" >
<?php echo CSRFTokenFieldTag(); ?>
<h5><?php echo _("Exception: Service"); ?></h4>
<div class="row">
<div class="form-group col-md-6">
<div class="custom-control custom-switch">
<input class="custom-control-input" id="ssh-enable" type="checkbox" name="ssh-enable" value="1" aria-describedby="exception-description" <?php if ($fw_conf["ssh-enable"]) echo "checked"; ?> >
<label class="custom-control-label" for="ssh-enable"><?php echo _("allow SSH access on port 22") ?></label>
</div>
<div class="custom-control custom-switch">
<input class="custom-control-input" id="http-enable" type="checkbox" name="http-enable" value="1" aria-describedby="exceptions-description" <?php if ($fw_conf["http-enable"]) echo "checked"; ?> >
<label class="custom-control-label" for="http-enable"><?php echo _("allow access to the RaspAP GUI on port 80 or 443") ?></label>
</div>
<p class="mb-0" id="exceptions-description">
<small><?php echo _("Allow incoming connections for some services from the internet side.") ?></small>
</p>
</div>
</div>
<h5><?php echo _("Exception: network device"); ?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="excl-device"><?php echo _("Exclude device(s)") ?></label>
<input class="form-control" id="excl-devices" type="text" name="excl-devices" value="<?php echo $fw_conf["excl-devices"] ?>" aria-describedby="exclusion-description" >
<p class="mb-0" id="exclusion-description">
<small>
<?php echo _("Exclude the given network device(s) (separated by a blank or comma) from firewall rules."); ?><br />
<?php printf(_("Current client devices: <code>%s</code>"), $str_clients); ?><br />
<?php printf(_("The access point <code>%s</code> is per default excluded."), $ap_device); ?>
</small>
</p>
</div>
</div>
<h5><?php echo _("Exception: IP-Address"); ?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="excluded-ips"><?php echo _("Allow incoming connections from") ?></label>
<input class="form-control" id="excluded-ips" type="text" name="excluded-ips" value="<?php echo $fw_conf["excluded-ips"] ?>" aria-describedby="excl-ips-description" >
<p class="mb-0" id="excl-ips-description">
<small>
<?php echo _("For the given IP-addresses (separated by a blank or comma) the incoming connection (via TCP and UDP) is accepted."); ?><br />
<?php echo _("This is required for an OpenVPN via UDP or Wireguard connection."); ?><br />
<?php if ( !empty($vpn_ips) ) printf (_("The list of configured VPN server IP addresses: <code><b>%s</b></code>"), $vpn_ips); ?>
</small>
</p>
</div>
</div>
<?php if ($fw_conf["firewall-enable"]) : ?>
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Apply changes"); ?>" name="apply-firewall" />
<input type="submit" class="btn btn-warning firewall-apply" value="<?php echo _("Disable Firewall") ?>" name="firewall-disable" data-toggle="modal" data-target="#firewallModal"/>
<?php else : ?>
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="save-firewall" />
<input type="submit" class="btn btn-success firewall-apply" value="<?php echo _("Enable Firewall") ?>" name="firewall-enable" data-toggle="modal" data-target="#firewallModal"/>
<?php endif ?>
</form>
</div><!-- /.card-body -->
<div class="card-footer"></div>
</div><!-- /.card -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->
<!-- Modal -->
<div class="modal fade" id="firewallModal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title" id="ModalLabel">
<i class="fas fa-sync-alt mr-2"></i><?php echo _("Executing firewall option") ?>
</div>
</div>
<div class="modal-body">
<div class="col-md-12 mb-3 mt-1">
<?php if($fw_conf["firewall-enable"]) echo _("Disabling firewall").'...'; else echo _("Enabling firewall").'...'; ?>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline btn-primary" data-dismiss="modal"><?php echo _("Close"); ?></button>
</div>
</div>
</div>
</div>

View File

@ -56,10 +56,8 @@
<div class="row">
<div class="form-group col-md-6">
<label for="cbxtxpower"><?php echo _("Transmit power (dBm)") ?></label>
<i class="fas fa-question-circle text-muted" data-toggle="tooltip" data-placement="auto" title="<?php echo _("dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW."); ?>"></i>
<?php
SelectorOptions('txpower', $arrTxPower, $txpower, 'cbxtxpower');
?>
<?php getTooltip('dBm is a unit of level used to indicate that a power ratio is expressed in decibels (dB) with reference to one milliwatt (mW). 30 dBm is equal to 1000 mW, while 0 dBm equals 1.25 mW.', 'tiptxpower'); ?>
<?php SelectorOptions('txpower', $arrTxPower, $txpower, 'cbxtxpower'); ?>
<small id="txpower_help" class="text-muted"><?php echo _("Sets the <code>txpower</code> option for the AP interface and the configured country."); ?></small>
</div>
</div>

View File

@ -3,9 +3,7 @@
<div class="row">
<div class="form-group col-md-6">
<label for="cbxinterface"><?php echo _("Interface") ;?></label>
<?php
SelectorOptions('interface', $interfaces, $arrConfig['interface'], 'cbxinterface');
?>
<?php SelectorOptions('interface', $interfaces, $arrConfig['interface'], 'cbxinterface', 'setHardwareModeTooltip'); ?>
</div>
</div>
<div class="row">
@ -17,32 +15,9 @@
<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); ?>
<?php getTooltip(null, 'tiphwmode', true); ?>
<?php SelectorOptions('hw_mode', $arr80211Standard, $selectedHwMode, 'cbxhwmode', 'loadChannelSelect', $hwModeDisabled); ?>
<div id="hwmode" data-tooltip="<?php echo _("The 802.11ac 5 GHz option is disabled until a compatible wireless regulatory domain is set."); ?>"></div>
</div>
</div>
<div class="row">

View File

@ -4,7 +4,7 @@
<h4 class="mt-3 mb-3"><?php echo _("Configurations"); ?></h4>
<p id="openvpnconfigs-description" class="mb-3">
<small><?php echo _("Currently available OpenVPN client configurations are displayed below.") ?></small>
<br><small class="text-muted"><?php echo _("Activating a configuraton will restart the <code>openvpn-client</code> service.") ?></small>
<br><small class="text-muted"><?php echo _("Activating a configuration will restart the <code>openvpn-client</code> service.") ?></small>
</p>
<div class="openvpn-configs js-openvpn-configs-container">
<?php foreach ($clients as $client) :

View File

@ -15,13 +15,17 @@
<ul class="nav nav-tabs" role="tablist">
<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="themetab" href="#theme" aria-controls="theme" role="tab" data-toggle="tab"><?php echo _("Theme"); ?></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="resettab" href="#reset" aria-controls="reset" role="tab" data-toggle="tab"><?php echo _("Reset"); ?></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<?php echo renderTemplate("system/basic", $__template_data) ?>
<?php echo renderTemplate("system/language", $__template_data) ?>
<?php echo renderTemplate("system/theme", $__template_data) ?>
<?php echo renderTemplate("system/advanced", $__template_data) ?>
<?php echo renderTemplate("system/reset", $__template_data) ?>
</div><!-- /.tab-content -->
</form>
</div><!-- /.card-body -->
@ -29,3 +33,58 @@
</div><!-- /.card -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->
<!-- modal confirm-reset-->
<div class="modal fade" id="system-confirm-reset" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title" id="ModalLabel"><i class="fas fa-history mr-2"></i><?php echo _("System reset"); ?></div>
</div>
<div class="modal-body">
<div class="col-md-12 mb-3 mt-1" data-message="<?php echo _("Reset complete. Restart the hotspot for the changes to take effect."); ?>" id="system-reset-message"><?php echo _("Reset RaspAP to its initial configuration? This action cannot be undone."); ?></div>
</div>
<div class="modal-footer">
<button type="button" id="js-system-reset-cancel" data-message="<?php echo _("Close"); ?>" class="btn btn-outline-secondary" data-dismiss="modal"><?php echo _("Cancel"); ?></button>
<button type="button" id="js-system-reset-confirm" data-message="<?php echo _("System reset in progress..."); ?>" class="btn btn-outline-danger btn-delete"><?php echo _("Reset"); ?></button>
</div>
</div>
</div>
</div>
<!-- modal confirm-reboot-->
<div class="modal fade" id="system-confirm-reboot" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title" id="ModalLabel"><i class="fas fa-sync mr-2"></i><?php echo _("System reboot"); ?></div>
</div>
<div class="modal-body">
<div class="col-md-12 mb-3 mt-1" id="system-reboot-message"><?php echo _("Reboot now? The system will be temporarily unavailable."); ?></div>
</div>
<div class="modal-footer">
<button type="button" data-message="<?php echo _("Close"); ?>" class="btn btn-outline-secondary" data-dismiss="modal"><?php echo _("Cancel"); ?></button>
<button type="button" id="js-sys-reboot" data-action="reboot" class="btn btn-outline-danger btn-delete"><?php echo _("Reboot"); ?></button>
</div>
</div>
</div>
</div>
<!-- modal confirm-shutdown-->
<div class="modal fade" id="system-confirm-shutdown" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title" id="ModalLabel"><i class="fas fa-power-off mr-2"></i><?php echo _("System shutdown"); ?></div>
</div>
<div class="modal-body">
<div class="col-md-12 mb-3 mt-1" id="system-reboot-message"><?php echo _("Shutdown now? The system will be unavailable."); ?></div>
</div>
<div class="modal-footer">
<button type="button" data-message="<?php echo _("Close"); ?>" class="btn btn-outline-secondary" data-dismiss="modal"><?php echo _("Cancel"); ?></button>
<button type="button" id="js-sys-shutdown" data-action="shutdown" class="btn btn-outline-danger btn-delete"><?php echo _("Shutdown"); ?></button>
</div>
</div>
</div>
</div>

View File

@ -14,7 +14,7 @@ include('includes/sysstats.php');
<div class="info-item col-xs-3"><?php echo _("Hostname"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($hostname, ENT_QUOTES); ?></div>
</div>
<div class="row mb-1">
<div class="info-item col-xs-3"><?php echo _("Pi Revision"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars(RPiVersion(), ENT_QUOTES); ?></div>
<div class="info-item col-xs-3"><?php echo _("Pi Revision"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($revision, ENT_QUOTES); ?></div>
</div>
<div class="row mb-1">
<div class="info-item col-xs-3"><?php echo _("OS"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($os, ENT_QUOTES); ?></div>
@ -24,6 +24,9 @@ include('includes/sysstats.php');
</div>
<div class="row mb-1">
<div class="info-item col-xs-3"><?php echo _("Uptime"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></div>
</div>
<div class="row mb-1">
<div class="info-item col-xs-3"><?php echo _("System Time"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($systime, ENT_QUOTES); ?></div>
</div>
</div>
</div>
@ -52,8 +55,8 @@ include('includes/sysstats.php');
<form action="system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<?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"); ?>" />
<input type="button" class="btn btn-warning" data-toggle="modal" data-target="#system-confirm-reboot" value="<?php echo _("Reboot"); ?>" />
<input type="button" class="btn btn-warning" data-toggle="modal" data-target="#system-confirm-shutdown" value="<?php echo _("Shutdown"); ?>" />
<?php endif ?>
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</form>

View File

@ -0,0 +1,21 @@
<!-- reset tab -->
<div role="tabpanel" class="tab-pane" id="reset">
<h4 class="mt-3"><?php echo _("Restore settings") ;?></h4>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<?php echo CSRFTokenFieldTag() ?>
<div class="row">
<div class="form-group col-lg-8 col-md-8">
<label for="cbxhwmode">
<?php echo sprintf(_("To reset RaspAP to its <a href=\"%s\">initial configuration</a>, click or tap the button below."), "https://docs.raspap.com/defaults/"); ;?>
</label>
<?php getTooltip('Restores all access point (AP) service settings to their default values. This applies to hostapd, dhcpcd and dnsmasq.', 'tiphwmode', true); ?>
<div class="small">
<?php echo _("Custom files for optional components such as Ad Blocking, WireGuard or OpenVPN will remain on the system."); ?>
</div>
</div>
</div>
<button type="button" class="btn btn-danger" name="system-reset" data-toggle="modal" data-target="#system-confirm-reset" /><?php echo _("Perform reset"); ?></button>
<?php endif ?>
</div>

View File

@ -0,0 +1,20 @@
<!-- theme tab -->
<div role="tabpanel" class="tab-pane" id="theme">
<h4 class="mt-3"><?php echo _("Change theme") ;?></h4>
<div class="row">
<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="#2b8080" aria-label="color" />
</div>
</div>
<form action="system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</form>
</div>

View File

@ -1,31 +0,0 @@
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-paint-brush mr-2"></i><?php echo _("Change Theme"); ?>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body">
<h4><?php echo _("Theme settings"); ?></h4>
<div class="row">
<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="#2b8080" aria-label="color" />
</div>
</div>
<form action="system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</form>
</div><!-- /.card-body -->
<div class="card-footer"></div>
</div><!-- /.card -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->

View File

@ -4,7 +4,7 @@
<?php if (strlen($network['ssid']) == 0) {
$network['ssid'] = "(unknown)";
} ?>
<h5 class="card-title"><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5>
<h5 class="card-title"><i class="fas fa-wifi mr-2"></i><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5>
<div class="info-item-wifi"><?php echo _("Status"); ?></div>
<div>
<?php if ($network['configured']) { ?>
@ -29,21 +29,14 @@
<div class="info-item-wifi"><?php echo _("RSSI"); ?></div>
<div>
<?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 "%)";
<?php if (isset($network['RSSI']) && $network['RSSI'] >= -200) {
echo '<div class="d-flex justify-content-start">';
echo getSignalBars($network['RSSI']);
echo '<div class="ml-2">' .htmlspecialchars($network['RSSI'], ENT_QUOTES) . "dB" . "</div>";
echo '</div>';
} else {
echo " not found ";
}
}
?>
</div>
@ -52,18 +45,18 @@
<?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><?php echo empty($network['protocol']) ? "-" : $network['protocol'] ?></div>
<div class="info-item-wifi"><?php echo _("Security"); ?></div>
<div><?php echo empty($network['protocol']) ? "-" : $network['protocol'] ?></div>
<div class="form-group">
<div class="info-item-wifi"><?php echo _("Passphrase"); ?></div>
<div class="info-item-wifi mb-2"><?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" 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>
<button class="btn btn-light js-toggle-password" type="button" data-target="[name=passphrase<?php echo $index ?>]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
</div>
<?php } ?>
</div>

View File

@ -27,7 +27,7 @@
</div><!-- /.card-header -->
<div class="card-body">
<?php $status->showMessages(); ?>
<form role="form" action="/wg_conf" enctype="multipart/form-data" method="POST">
<form role="form" action="wg_conf" enctype="multipart/form-data" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<!-- Nav tabs -->
<ul class="nav nav-tabs">