Compare commits

...

1015 commits

Author SHA1 Message Date
billz
c3175459ab Update release version 2025-04-17 05:44:30 -07:00
Bill Zimmerman
3bf682d752
Merge pull request #1811 from RaspAP/feat/csrf-tokenizer
Feature: CSRF tokenizer class
2025-04-17 14:32:58 +02:00
Bill Zimmerman
9e0801aa0c
Merge pull request #1825 from RaspAP/fix/custom-blocklists
Fix: Check for presence of custom blocklist
2025-04-17 10:07:12 +02:00
billz
a21b0a8f99 Check for presence of custom blocklist in RASPI_ADBLOCK_LISTPATH 2025-04-16 23:33:13 -07:00
billz
5f1b16bc74 Remove instantiation of $token 2025-03-26 11:19:00 -07:00
billz
deba5e1e74 When session token expires, redirect instead of returning a 500 error 2025-03-26 09:51:39 -07:00
billz
0960e8bac9 Add CSRF protection include 2025-03-26 04:05:39 -07:00
billz
4a4506a913 Update with CSRF::hiddenField() 2025-03-26 04:03:37 -07:00
billz
bfab3d7441 Revise CSRFValidate() 2025-03-26 04:02:48 -07:00
billz
47d7c121de Generate new session id on logout() 2025-03-26 04:01:09 -07:00
billz
484b89718a Add validateRequest(), token check outside class 2025-03-26 04:00:34 -07:00
billz
d6c8ac32a7 Fix call to class method 2025-03-25 14:05:34 -07:00
billz
3d6b4e1f15 Simplify getVpnManaged check with ternary operator 2025-03-25 14:04:29 -07:00
billz
8d482845b0 Replace explicit token instantiation w/ includes/CSRF.php 2025-03-25 14:02:51 -07:00
billz
a1550d8049 Refactor templates to use CSRF facade 2025-03-25 14:00:24 -07:00
billz
5584e3b72c Initial commit 2025-03-25 13:58:52 -07:00
billz
b0ba029c66 Revert "Accept $token object, pass to renderTemplate()"
This reverts commit b3c6178274.
2025-03-25 13:23:58 -07:00
billz
48e492bf10 Ensure a CSRF token exists in session 2025-03-25 06:49:18 -07:00
billz
821ac9c1f8 Numerous fixes to class methods 2025-03-25 05:26:53 -07:00
billz
49cb3911b8 Fixup misnamed method getVpnManged -> getVpnManaged 2025-03-25 05:25:11 -07:00
billz
8ad582b3b2 Instantiate ExceptionHandler, CSRFTokenizer objects 2025-03-25 05:23:52 -07:00
billz
bbf1caf777 Update with $token->CSRFTokenFieldTag() 2025-03-25 05:23:06 -07:00
billz
b3c6178274 Accept $token object, pass to renderTemplate() 2025-03-25 05:22:29 -07:00
billz
a5907d8f7f Class loading handled by autoloader, objects instantiated by index.php 2025-03-25 05:21:35 -07:00
billz
8569c2b4d5 Remove CSRF related functions (made obsolete by Token class) 2025-03-25 05:17:58 -07:00
billz
2a70f6ee11 Replace csrf and explicit HTTPAuth includes with autoload.php 2025-03-25 05:15:34 -07:00
billz
c8b0408bd5 Refactor + fixup autoloader 2025-03-25 05:14:29 -07:00
Bill Zimmerman
125ae7a39a
Merge pull request #1810 from RaspAP/fix/php74-compatibility
Fix: php7.4 compatibility
2025-03-25 08:36:03 +01:00
billz
20fe5fc5a7 Fix: php7.4 compatibility 2025-03-24 23:58:30 -07:00
billz
168ed2448f Update release version 2025-03-24 01:51:08 -07:00
Bill Zimmerman
a2b8dfe551
Merge pull request #1806 from RaspAP/fix/fetch-update-response
Fix: Revise fetchUpdateResponse() and modal dialog
2025-03-24 09:45:33 +01:00
billz
4aee1e49d9 Revise fetchUpdateResponse() without endPolling flag 2025-03-24 01:37:16 -07:00
billz
16d92bb486 Set fa-check visible for updateStep1 2025-03-24 01:35:40 -07:00
billz
de376d04d1 Initial commit 2025-03-23 23:13:29 -07:00
Bill Zimmerman
d730c174d4
Update README.md 2025-03-24 06:29:58 +01:00
billz
c798f5fd69 Update BACKERS.md 2025-03-23 22:28:03 -07:00
Bill Zimmerman
3a73916206
Merge pull request #1805 from RaspAP/fix/connection-type
Update getConnectionType() regexes to match MAC-derived names
2025-03-24 06:24:33 +01:00
billz
f46be0139e Update getConnectionType() regexes to match MAC-derived names 2025-03-23 10:52:46 -07:00
Bill Zimmerman
a6295aef6e
Merge pull request #1799 from RaspAP/feat/dashboard-devices
Feature: Dashboard + System device illustrations
2025-03-23 17:51:20 +01:00
Bill Zimmerman
556c2be855
Merge pull request #1802 from RaspAP/fix/dhcp-settings-focus
Fix: Links to dhcp client-list tab
2025-03-23 17:51:05 +01:00
Bill Zimmerman
80e8178384
Update issue_form.yml 2025-03-23 17:13:44 +01:00
billz
b1c429f404 Fix: remove link to client-list tab 2025-03-23 08:45:21 -07:00
Bill Zimmerman
f0b992b9be
Merge pull request #1800 from RaspAP/fix/band-association
Fix: Update 802.11n band associations
2025-03-23 15:23:45 +01:00
billz
084b2e1268 Update 802.11n bands, resolves #1797 2025-03-23 07:22:15 -07:00
billz
0fd60e3730 Update device illustration w/ w/ $deviceImage 2025-03-23 07:18:55 -07:00
billz
cfc6644087 Merge branch 'master' into feat/dashboard-devices 2025-03-23 07:08:04 -07:00
Bill Zimmerman
2cd4abc3c2
Merge pull request #1798 from RaspAP/feat/tabbed-dashboard
Feature: Tabbed dashboard
2025-03-23 15:01:12 +01:00
Bill Zimmerman
8bd5b1b988
Merge pull request #1796 from RaspAP/feat/auth-enhancements
Feature: Auth enhancements
2025-03-23 15:00:57 +01:00
billz
2b8f7fd6d8 Initial commit 2025-03-23 02:18:50 -07:00
billz
b99addef4a Replace static device illustration w/ $deviceImage 2025-03-23 01:30:32 -07:00
billz
96ada80ce1 Update RPi models from latest revision codes 2025-03-23 01:28:51 -07:00
billz
5d33c79369 Return default if revision type not matched 2025-03-23 01:25:45 -07:00
billz
645ab89437 Update w/ getDeviceImage() 2025-03-23 01:22:54 -07:00
billz
62b342cdbb Set device image w/ getDeviceImage($revision) 2025-03-23 01:22:26 -07:00
billz
c235a4ff16 Create zero.php, move under /devices 2025-03-23 01:21:28 -07:00
billz
a24516a4d5 Tweak divDBChartBandwidthhourly 2025-03-23 00:33:27 -07:00
billz
483b1fc27d Split single template into tabs 2025-03-23 00:28:31 -07:00
billz
4d0de82986 Add &$extraFooterScripts to support data usage graph 2025-03-23 00:27:39 -07:00
billz
85663341eb Initial commit 2025-03-23 00:26:48 -07:00
billz
734043dee6 Define button object, add logout btn 2025-03-22 03:17:23 -07:00
billz
af2927f05b Update w/ qr code doc link 2025-03-22 03:16:53 -07:00
billz
3e54b1d7bb Remove authentication sidebar item (redundant) 2025-03-22 03:14:11 -07:00
billz
51a0ce220c Update w/ disableValidation() to support logout btn 2025-03-22 03:12:46 -07:00
billz
05e20e3bab Handle logout action 2025-03-22 03:12:09 -07:00
billz
03fc2c42ad Update w/ logout() method 2025-03-22 03:11:47 -07:00
billz
401172eb36 Initial commit 2025-03-22 03:11:03 -07:00
Bill Zimmerman
71f1132bc8
Update plugin_helper.sh 2025-03-20 18:50:02 +01:00
Bill Zimmerman
605486feda
Update w/ strict check on config destination path 2025-03-20 18:08:29 +01:00
Bill Zimmerman
23597e800d
Fix: Revert set permissions on $destination 2025-03-20 12:05:30 +01:00
Bill Zimmerman
3218d87b1b
Update dashboard screenshot 2025-03-20 11:13:32 +01:00
billz
0c58a6c92c Update release version 2025-03-20 03:11:31 -07:00
billz
afa3006de2 Minor: code cleanup 2025-03-20 02:54:30 -07:00
Bill Zimmerman
03b9bf9e7a
Merge pull request #1793 from RaspAP/maint/php-warnings
Resolves numerous PHP warnings
2025-03-20 10:35:58 +01:00
billz
028c0d3e06 Move template handling of wg_log to include/wireguard 2025-03-20 02:12:47 -07:00
billz
0005488884 Fix: Use null coalescing operator on $_POST object, fetch wg_log, set $peer_id 2025-03-20 02:12:00 -07:00
billz
f73f25708c Fix: Cleanup, resolve warnings in getWifiInterface() 2025-03-20 02:10:40 -07:00
billz
4e411aaa6b Fix: Use null coalescing operator on user_id 2025-03-20 02:09:39 -07:00
billz
6adeab7586 Fix: Evaluate HTTP_ACCEPT_LANGUAGE, check ['locale'] 2025-03-20 02:08:54 -07:00
billz
16f6b7f979 Fix numerous php warnings for undefined vars 2025-03-20 02:07:51 -07:00
billz
068f363f09 Remove obsolete toggleState functions, add file_exists() check 2025-03-20 02:06:11 -07:00
billz
d4554c6429 Update w/ getBridgedState() global function 2025-03-20 02:05:11 -07:00
billz
a3caa6485c Fix: Use null coalescing operator to prevent warnings 2025-03-20 02:04:40 -07:00
billz
795d55a2cd Fix: Sanitize $peer_conf before output to header 2025-03-20 02:04:00 -07:00
billz
c53c1a27a4 Fix: Specify global Exception class by adding backslash 2025-03-20 02:02:35 -07:00
Bill Zimmerman
903cc6bd8e
Merge pull request #1787 from RaspAP/maint/plugin-installer-keys
Updates PluginInstaller to handle signed third-party packages
2025-03-20 08:11:08 +01:00
Bill Zimmerman
13929acbd1
Merge pull request #1775 from RaspAP/fix/plugin-helper-config
Set permissions on parent directory when handling config files
2025-03-20 08:04:40 +01:00
Bill Zimmerman
f6da130fce
Merge pull request #1792 from RaspAP/fix/installer-submodules
Updates plugin submodules after cloning parent repo
2025-03-20 08:01:10 +01:00
billz
1fc793c3fd Exec git submodule update --remote plugins on $source_dir 2025-03-19 12:00:07 -07:00
Bill Zimmerman
4b6ac1a415
Merge pull request #1748 from RaspAP/feat/dashboard-redesign
Dashboard redesign
2025-03-19 17:02:48 +01:00
billz
304010db40 Update client lease ouput w/ human-readable timestamps 2025-03-18 12:28:06 -07:00
billz
66563c9d95 Update hrefs w/ tab param to load specific tabs on page load 2025-03-18 12:11:50 -07:00
billz
5eca4c045b Add event listener to activate tab on page load 2025-03-18 12:10:47 -07:00
billz
fd953e7a71 Remove obsolete svg file (replaced by device.php) 2025-03-18 08:56:32 -07:00
billz
52b20cb491 Revise getEthernetClients() w/ more robust method 2025-03-18 08:55:35 -07:00
billz
c987d2800d Fix php warning: define $firewallManaged 2025-03-18 08:54:47 -07:00
billz
6d6bacd6a1 Update en_US locale msgs + compile .mo 2025-03-18 04:12:34 -07:00
billz
f0a0c9228f Replace static labels w/ gettext() for locale support 2025-03-18 04:11:47 -07:00
billz
dfef9e5233 Define firewallManaged when Firewall plugin is installed 2025-03-18 03:23:25 -07:00
billz
ab77af9e5d Update firewallEnabled() config check 2025-03-18 03:22:03 -07:00
billz
5ce06c6214 Revise dashed svg stroke width, color 2025-03-18 03:20:46 -07:00
billz
d5cc80d1f2 Update en_US locale w/ new dashboard msgs + compile .mo 2025-03-18 02:15:09 -07:00
billz
e3f04192b8 Replace static labels w/ gettext() for locale support 2025-03-18 02:14:02 -07:00
billz
cfb8435373 Revise formatClientLabel() w/ ngettext 2025-03-18 02:13:14 -07:00
billz
615f2abed1 Minor: formatting 2025-03-18 01:45:56 -07:00
billz
ac926e84d7 Style tweak for fa-stack status-item 2025-03-18 01:45:38 -07:00
billz
8846b96905 Update function mappings for absolute paths 2025-03-18 01:45:10 -07:00
billz
677e99ffd9 Update w/ relevant href links, indicate active/inactive states 2025-03-18 00:57:04 -07:00
billz
a82b30179b Add device, clients active/inactive states 2025-03-18 00:55:56 -07:00
billz
ae4e9be739 Change default SSID to RaspAP (finally) 2025-03-18 00:53:59 -07:00
billz
7091a4016a Update media query to reflect markup changes, add .inactive 2025-03-18 00:53:29 -07:00
billz
24b292bf33 Replace static color values w/ --raspap-* vars 2025-03-17 11:42:20 -07:00
billz
c00f006cdd Migrate inline functions to class methods in RaspAP\UI 2025-03-17 11:41:22 -07:00
billz
ed47a41c9c Initial commit 2025-03-17 11:38:17 -07:00
billz
39cc92853a Set z-index for solid + dashed-lines 2025-03-17 10:32:32 -07:00
billz
34f7563bed Replace static placeholder with renderClientConnections 2025-03-17 10:25:04 -07:00
billz
964d7b38a8 Create getConnectionIcon(), renderClientConnections() 2025-03-17 10:24:32 -07:00
billz
17fbbca046 Create renderConnection(), update template 2025-03-17 07:33:37 -07:00
billz
64faf296a6 Apply dynamic theme color w/ rendered svg lines 2025-03-17 07:32:24 -07:00
billz
f1c404a443 Rename file to device.php 2025-03-17 07:09:10 -07:00
billz
5ed1312406 Revise getEthernetClients() w/ more robust method comparing arp + dhcp 2025-03-17 07:08:29 -07:00
billz
00c18451cc Replace static svg w/ device.php 2025-03-17 07:07:25 -07:00
billz
b737b5c748 Use dynamic theme color w/ device svg 2025-03-17 07:06:21 -07:00
billz
d852990314 Replace var raspap-brand-color w/ raspap-theme-color 2025-03-17 07:05:03 -07:00
billz
182073f41e Update placeholder values w/ template data + active route states 2025-03-17 06:04:02 -07:00
billz
64d3a11866 Create getConnectionType(), getWirelessClients() getEthernetClients() 2025-03-17 06:02:48 -07:00
billz
4865e85655 Various minor tweaks 2025-03-17 04:07:27 -07:00
billz
3d6095d652 Define buttons w/ ob_start(), network details block + wifi bands 2025-03-17 04:07:05 -07:00
billz
bd0e379d01 Create getActiveVpnInterface(), update revision strings 2025-03-17 04:05:23 -07:00
billz
93395a8aa5 Refactor DisplayDashboard() 2025-03-17 04:04:27 -07:00
billz
339437f47f Set hostapd_led to warn when status is down 2025-03-17 03:28:32 -07:00
billz
80db7edf18 Compatibility fix for php 7.4 2025-03-16 12:38:22 -07:00
Bill Zimmerman
41e86a9e51
Merge pull request #1789 from RaspAP/fix/installer-update
Fix for automated version update on About page
2025-03-16 14:01:59 +01:00
billz
ef04678947 Get installed plugins, add status checks for services 2025-03-16 03:33:10 -07:00
billz
1a964a283f Replace static hex values w/ css var, style tweaks 2025-03-16 03:30:26 -07:00
billz
6c47375d18 Create adBlockStatus() 2025-03-16 03:29:19 -07:00
billz
c2abce1e35 Add -p flag to mkdir in _create_plugin_scripts() 2025-03-16 01:11:21 -07:00
billz
b4b715f6e4 Add --check 0 option for update 2025-03-16 01:10:26 -07:00
billz
8a7c954d88 Cleanup interface statistics code (obsolete) 2025-03-16 01:04:48 -07:00
billz
639f7605d1 Template tweaks, update labels w/ gettext 2025-03-16 01:01:23 -07:00
billz
fbcf9809c5 Update hotspot icon > fa-bullseye 2025-03-15 16:00:27 -07:00
billz
2474765820 Add device illustration to system basic tab 2025-03-15 15:18:24 -07:00
Bill Zimmerman
ba4507bd22
Merge branch 'master' into feat/dashboard-redesign 2025-03-15 19:54:34 +01:00
billz
2610c44ac9 Adjust stroke-width, remove rect w/ fill for dark mode support 2025-03-15 11:34:49 -07:00
billz
f608282aa5 Define --raspap-text-light, replace hex colors w/ vars, tweaks 2025-03-15 11:33:03 -07:00
billz
781f376bea Standardize revision descriptions 2025-03-15 11:31:59 -07:00
Bill Zimmerman
6e1c3b95c2 Revise dashed .svg files 2025-03-15 17:44:31 +01:00
billz
0331eb7b25 Minor: suppress debug output from key install 2025-03-15 00:59:36 -07:00
billz
c3a210907a Throw exception for invalid key structure, update messages 2025-03-15 00:58:53 -07:00
billz
3e0f1f16c1 Revise installRepositoryKeys() w/ array of key data 2025-03-14 11:37:47 -07:00
billz
c2be25271b Update w/ signed packages from manifest 2025-03-14 11:36:17 -07:00
billz
bb131a7f53 Revise key handling with parameters for url, keyring, repo + list 2025-03-14 11:35:30 -07:00
billz
c753865305 Added handling for GPG keys to enable third-party apt repos 2025-03-14 03:36:43 -07:00
billz
0bac7deccc Define helperScriptPath, create installRepositoryKeys() 2025-03-14 03:35:32 -07:00
Bill Zimmerman
9ada9f9e68
Merge pull request #1777 from RaspAP/maint/php-warnings
Fix PHP warning in getProviderValue()
2025-03-08 10:09:35 +00:00
billz
02b9e20ce3 Use ?? to avoid undefined key warnings 2025-03-02 00:24:57 -08:00
billz
3c8cf996b5 Set permissions on parent directory 2025-03-02 00:10:43 -08:00
Bill Zimmerman
313e2eb06f
Update issue_form.yml 2025-03-01 08:18:54 +01:00
Bill Zimmerman
41fcbba5cc
Update README.md 2025-02-23 14:30:10 +01:00
Bill Zimmerman
ce9916a792
Update README.md 2025-02-23 14:21:58 +01:00
Bill Zimmerman
3f830458b1
Update issue_form.yml 2025-02-23 09:32:02 +01:00
billz
a8e24b7629 Update release version 2025-02-21 09:07:12 -08:00
billz
80f5cb5f46 Set plugins submodule to track master 2025-02-21 05:25:59 -08:00
billz
d45aa752c6 Set plugins submodule to track master 2025-02-21 05:16:45 -08:00
billz
2a1e39a880 Update release version 2025-02-21 05:03:10 -08:00
Bill Zimmerman
8f402ab303
Merge pull request #1763 from RaspAP/maint/plugin-installer
PluginInstaller improvements + fixes
2025-02-21 09:16:29 +01:00
Bill Zimmerman
644d2fe6cb
Update BACKERS.md 2025-02-21 08:02:56 +01:00
billz
b3fe781c19 Prepend this->rootPath if not absolute path 2025-02-19 06:03:07 -08:00
billz
69510a4e92 Set owner after copying dependencies 2025-02-19 06:00:32 -08:00
billz
163d727ee1 Fix: re-add copyPluginFiles() 2025-02-19 01:47:20 -08:00
billz
20fdd9024d Added safeOutputValue() 2025-02-19 01:25:07 -08:00
billz
23e0a6601a Fix: replace dirname var w/ destination param 2025-02-19 01:06:57 -08:00
billz
47d0305bec Revise installPlugin() to use plugins-available, fix copyJavaScriptFiles 2025-02-19 01:05:51 -08:00
billz
f28c5533bc Update pluginConfirm btn actions 2025-02-19 01:02:56 -08:00
billz
b89fe7c6b8 Set install_path, revise parameters used w/ installPlugin() 2025-02-19 01:02:04 -08:00
Bill Zimmerman
71ed223cf5
Merge pull request #1764 from juliovegap/master
Bug #1762
2025-02-19 08:47:52 +01:00
billz
335491124f Add install_path to ajax handler, various fixes + improvements 2025-02-18 09:00:49 -08:00
billz
e45c00b83c Create getRepository(), extend to installed & available plugins 2025-02-18 08:57:04 -08:00
billz
aa5fcef2d4 Add additional field to template, change source -> doc link 2025-02-18 08:55:52 -08:00
billz
01ddf6f4ea Update plugin details w/ javascript, default to none 2025-02-18 01:16:16 -08:00
juliovegap
bbac9a8802
Bug #1762
New versions of 'iw phy#0 info' provides frequencies output with decimals #1762. IW Parser patched to handle this new output format
2025-02-17 20:20:13 +01:00
billz
4374e78bbb Add JavaScript handling to installPlugin(), fix bug w/ manifest parsing 2025-02-17 02:35:42 -08:00
billz
6e0cf0b085 Update w/ javascript support 2025-02-17 02:34:20 -08:00
Bill Zimmerman
867a46bee9
Merge pull request #1757 from RaspAP/maint/version-motd
Fetch RaspAP version and set MOTD
2025-02-13 08:07:02 +01:00
Bill Zimmerman
4a89cb3b07
Update README.md 2025-02-13 07:59:38 +01:00
Bill Zimmerman
dc86f15b59
Update README.md 2025-02-12 23:45:26 +01:00
Bill Zimmerman
91c535ddbb
Update README.md 2025-02-12 23:41:33 +01:00
Bill Zimmerman
f576b02858
Update README.md 2025-02-12 23:20:49 +01:00
billz
eb27ba2c66 Fetch RaspAP version and set MOTD 2025-02-12 08:30:33 -08:00
billz
362a08c00f Update release version 2025-02-09 00:54:27 -08:00
Bill Zimmerman
43ae90bd34
Merge pull request #1754 from RaspAP/maint/release-naming
Update naming to reflect clarity in arch, OS + purpose
2025-02-09 09:51:25 +01:00
billz
c34cbeca8d Exec raspi-config noint do_wifi_country 2025-02-09 00:46:27 -08:00
billz
33f66fdae5 Update naming to reflect clarity in arch, OS + purpose 2025-02-08 10:52:26 -08:00
Bill Zimmerman
cc9720e8ef
Merge pull request #1752 from RaspAP/maint/installer-option
Adds -k --check option to install loader
2025-02-08 13:02:34 +01:00
Bill Zimmerman
74b1b10e31
Merge pull request #1753 from RaspAP/maint/release-check-flag
Specify --check 0 to skip connectivity check
2025-02-08 13:02:01 +01:00
billz
41ce72775e Set default repo at top of _main() 2025-02-08 01:41:43 -08:00
billz
9876ab1e3e Specify --check 0 to skip connectivity check 2025-02-08 01:22:52 -08:00
billz
bd0b226f61 Adds -k --check option to install loader 2025-02-08 01:18:47 -08:00
billz
3417115a84 Update release version 2025-02-08 00:11:43 -08:00
billz
7a880d563f Add _create_plugin_scripts to _update_raspap() 2025-02-07 23:48:30 -08:00
Bill Zimmerman
32e191e55d
Merge pull request #1717 from RaspAP/feat/plugin-manager
Plugin Manager UI
2025-02-08 08:31:07 +01:00
Bill Zimmerman
58501a74a7
Merge pull request #1750 from neo773/bs-redeisgn
feat: Dashboard redesign
2025-02-07 10:29:37 +01:00
neo773
80c1a04797
feat: dashboard redesign 2025-02-07 13:41:23 +05:30
billz
af3abe66f4 Initial commit 2025-02-06 02:44:37 -08:00
billz
8a8be213f7 Display plugins in monitor mode, suppress details dialog 2025-02-04 23:45:06 -08:00
billz
0efbe2b326 Define RASPI_PLUGINS_ENABLED, add condition to template 2025-02-04 23:44:04 -08:00
Bill Zimmerman
624e43f954
Merge pull request #1747 from rjdjohnston/fix/increase-curl-timeout
fix: Increase curl max-time to 15 seconds for connectivity check
2025-02-04 08:12:26 +01:00
RJ Johnston
55b6c81eca fix: Increase curl max-time to 15 seconds for connectivity check 2025-02-03 18:31:59 -05:00
Bill Zimmerman
aa49dcf32c
Merge pull request #1740 from RaspAP/feat/install-loader-check
Adds _check_internet() to install loader
2025-02-03 11:52:27 +01:00
Bill Zimmerman
10d5c4a8a6
Merge pull request #1745 from RaspAP/fix/armbian-dependencies
Install ARM 64- or 32-bit isoquery from Debian pkg (Armbian)
2025-02-03 11:51:15 +01:00
billz
2f205fe9e4 Install ARM 64- or-32 bit isoquery from Debian pkg (Armbian) 2025-02-03 01:33:32 -08:00
billz
6b7b8ef8d0 Refine API response condition 2025-02-03 00:20:03 -08:00
billz
a9804b2f9c Update _get_release() w/ API rate limit and undefined release var check 2025-02-02 03:08:35 -08:00
Bill Zimmerman
484d40f455
Update issue_form.yml 2025-02-01 19:31:47 +01:00
billz
18114df2bd Define component 2025-01-30 00:39:16 -08:00
billz
e61dac332c Add _check_internet() function. Resolves #1729 2025-01-30 00:08:59 -08:00
Bill Zimmerman
b9842b5462
Merge pull request #1739 from RaspAP/fix/debug-log
Fix quoting for dnsmasq_info()
2025-01-30 08:23:56 +01:00
billz
739057c7ac Fix quoting for dnsmasq_info(). Resolves #1738 2025-01-29 23:19:28 -08:00
Bill Zimmerman
d689024c1f
Merge pull request #1690 from Dhanus3133/ci/build-images
ci: build 32 bit and 64 bit images
2025-01-28 14:34:17 +01:00
Dhanus
c1975a78a1 chore: Use pi-gen fork 2025-01-28 15:29:42 +05:30
billz
5fbafeb455 Re-add plugins submodule 2025-01-27 04:49:31 -08:00
billz
7def2d6da1 Remove plugins/ to allow submodule usage 2025-01-27 04:43:01 -08:00
billz
538e37ceb7 Add --recurse-submodules to git clone operation 2025-01-27 04:29:07 -08:00
Bill Zimmerman
5d01fa59b1
Fix for DOM text reinterpreted as HTML
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-01-26 11:50:33 +01:00
billz
0b0f4bc06d Update plugin installed check 2025-01-26 02:45:47 -08:00
Bill Zimmerman
a619e7a25b
Merge branch 'master' into feat/plugin-manager 2025-01-26 10:33:49 +01:00
billz
a8bd85cc80 Create textarea.plugin-log class 2025-01-26 01:32:18 -08:00
billz
e423b7f4d3 Display diagnostic error message on plugin install fail 2025-01-26 01:31:40 -08:00
billz
47c509277c Add checks for empty vars, improve error propagation 2025-01-26 01:25:12 -08:00
billz
a6fdb63dd2 Catch HTTP 442 unprocessable content response 2025-01-26 01:23:42 -08:00
billz
75bb3e4a34 Resolve conflict: update .mo from master + ignore 2025-01-25 09:48:58 -08:00
billz
36c3e5036f Ignore compiled .mo files 2025-01-25 09:42:17 -08:00
billz
a9021c89f4 Refactor getUserPlugins(), define pluginsManifest 2025-01-25 02:49:48 -08:00
billz
77f183817a Replace try/catch callback w/ simplified JSON parsing 2025-01-25 02:48:52 -08:00
billz
97bc8174b4 Add include/session.php 2025-01-25 02:47:46 -08:00
billz
83ed9b5c19 Remove RASPI_PLUGINS_URL (obsolete) 2025-01-25 02:47:03 -08:00
billz
0871601b31 Initial commit 2025-01-25 02:46:34 -08:00
billz
eb25142e03 Update release version 2025-01-22 23:52:05 -08:00
billz
42b6c8fce3 Fix: correctly evaluate session status 2025-01-22 07:38:36 -08:00
Bill Zimmerman
7a9e5169f6
Merge pull request #1735 from RaspAP/feat/session-manager
Feature: Session manager & dedicated login
2025-01-22 15:11:30 +01:00
billz
2ca7448bd3 Define RASPI_BRAND_TITLE, replace static title 2025-01-22 00:46:00 -08:00
billz
cd3fde71e3 Revise login background gradient 2025-01-22 00:35:52 -08:00
billz
ec0dd304ee Add csrf token check, destroy session on timeout 2025-01-22 00:11:22 -08:00
billz
50ed5f9f4b Update en_US locale w/ new msgs, compile .mo 2025-01-21 05:36:13 -08:00
billz
259fac717f Update static label with RASPI_BRAND_TEXT 2025-01-21 05:35:34 -08:00
billz
0fd65fdbc2 Minor: mode change 2025-01-21 05:23:42 -08:00
billz
2b92d028f6 Minor: define status + redirectUrl vars 2025-01-21 05:23:19 -08:00
billz
9c4f8be363 Fix: include session 2025-01-21 05:22:22 -08:00
billz
21b9feb0ef Refactor auth method: http basic > user login 2025-01-21 05:14:18 -08:00
billz
bc7d4ef1c1 Include session in ajax handlers 2025-01-21 04:59:57 -08:00
billz
bc23dfc130 Remove timeout_duration from response 2025-01-21 04:55:56 -08:00
billz
9042ee8c01 Pass redirectUrl as action to login 2025-01-21 00:38:03 -08:00
billz
effcb5e48e Add global styles for login page 2025-01-21 00:35:27 -08:00
billz
111c9581a3 Resolve hash_equals() error w/ expired csrf_token, add login redirect 2025-01-21 00:33:24 -08:00
billz
6cb0be96b4 Set data-bs-backdrop + data-bs-keyboard attributes 2025-01-21 00:31:49 -08:00
billz
6dbdf89760 Add DisplayLogin() page handler 2025-01-21 00:30:40 -08:00
billz
792ce0c956 Include login.php, buffer page output 2025-01-21 00:29:59 -08:00
billz
3f883a70de Initial commit 2025-01-21 00:29:14 -08:00
billz
187041b030 Add checkSession(), showSessionExpiredModal() 2025-01-20 00:58:18 -08:00
billz
c51b520b8d Decouple session from csrf handler, set initial lastActivity 2025-01-20 00:55:21 -08:00
billz
866d8eb5b0 Update w/ sessionTimeoutModal, lastActivity 2025-01-20 00:53:26 -08:00
billz
3cf22a9cbb Define RASPI_SESSION_TIMEOUT 2025-01-20 00:52:28 -08:00
billz
6f1c34f28d Initial commit 2025-01-20 00:51:00 -08:00
Bill Zimmerman
41a138026b
Merge pull request #1733 from RaspAP/fix/dhcp-ignore
Set dhcp-ignore=tag:!known from option switch
2025-01-19 09:55:57 +01:00
billz
0c31b5ba71 Set dhcp-ignore=tag:!known from option switch 2025-01-19 00:23:06 -08:00
billz
2bab11b951 Update callbackTimeout interval, error msg 2025-01-19 00:18:56 -08:00
billz
b52bd84ea4 Add msgs to en_US locale + compile .mo 2025-01-05 02:15:16 -08:00
billz
ff7e674b2e Use callbackTimeout w/ getUserPlugins(), handle err if >2000ms 2025-01-05 02:14:16 -08:00
billz
3e91f50966 Create callbackTimeout() 2025-01-05 02:12:45 -08:00
billz
7dcc177424 Initial commit 2025-01-04 09:33:01 -08:00
Bill Zimmerman
94b502a336
Merge pull request #1724 from RaspAP/fix/adblock-update-ui
Revise bootstrap 5.3 adblock update btn
2025-01-03 00:49:38 -08:00
billz
bfd5859ce1 Revise bootstrap 5.3 adblock update btn 2025-01-03 00:38:45 -08:00
Bill Zimmerman
13cdfbd8cb
Merge pull request #1723 from RaspAP/fix/wg-endpoint-seg
Extends wg peer validation to dynamic addresses
2025-01-01 01:22:46 -08:00
billz
531970d9c6 Extend wg peer endpoint validation w/ subdomain + hostname 2025-01-01 00:41:56 -08:00
billz
5902a8d6a0 Update template + wg-keygen js handler 2025-01-01 00:37:25 -08:00
billz
9bb2075b77 Add strings to en_US locale, update template 2024-12-26 09:41:52 -08:00
billz
3c61954971 Minor: update label 2024-12-26 09:17:33 -08:00
billz
361a2f7531 Use text() instead of replaceWith() 2024-12-26 09:17:12 -08:00
billz
ad36695224 Set/read plugin-installed flag 2024-12-26 08:04:16 -08:00
billz
92ba7df9c6 Create plugin install event handler 2024-12-25 19:03:41 -08:00
billz
ae7b03857e Update install-plugin-progress modal btn 2024-12-25 19:00:41 -08:00
billz
2c0ace4500 Fix for getUserPlugins, add installed btn 2024-12-25 18:59:49 -08:00
billz
759e5dcf5d Add _create_plugin_scripts() 2024-12-25 18:57:59 -08:00
billz
bf0d9f88e2 Implement installPlugin() and related methods 2024-12-25 13:08:32 -08:00
billz
bf74ff7057 Update w/ config, plugin actions 2024-12-25 12:27:47 -08:00
billz
4328f54270 Add visudo -cf, plugin_helper to sudoers 2024-12-24 22:48:21 -08:00
billz
efd67fb698 Add plugin install progress modal 2024-12-24 22:46:17 -08:00
billz
44c99dacdf Initial commit 2024-12-24 22:45:18 -08:00
Bill Zimmerman
048d4ab3e6
Merge pull request #1720 from GuillaumeRossolini/patch-1
Update README.md
2024-12-23 14:53:46 -08:00
Guillaume Rossolini
801ca5a788
Update README.md
Replaced dead link for SSL certificates
2024-12-23 18:00:00 +01:00
billz
e5987a6b59 Update w/ link to plugin_uri 2024-12-22 09:27:40 -08:00
billz
2cb66660c5 Create modal install-user-plugin dialog, update template text 2024-12-21 22:42:34 -08:00
billz
c3968ba42e Encapsulate plugin related functions in PluginInstaller class 2024-12-21 22:40:55 -08:00
billz
edb86d7781 Populate #install-user-plugin modal dialog 2024-12-21 22:39:17 -08:00
billz
6785cc1104 Move getPluginManifest() to PluginInstaller class 2024-12-21 10:40:41 -08:00
billz
ee38614334 Initial commit 2024-12-21 10:39:46 -08:00
billz
9b087f88a7 Call PluginInstaller::getInstance(), set install option 2024-12-20 18:53:35 -08:00
billz
247b35b254 Initial commit 2024-12-20 18:52:09 -08:00
billz
89c4f16e45 Get plugin submodules, fetch manifest details + format output 2024-12-20 13:42:53 -08:00
billz
117370efcf Add plugins tab, render system/plugins template 2024-12-20 13:34:58 -08:00
billz
66e35c564c Initial commit 2024-12-20 13:34:05 -08:00
billz
36b0285158 Define RASPI_PLUGINS_URL 2024-12-20 13:33:46 -08:00
billz
07ec56227d Minor: mode change 2024-12-20 11:45:54 -08:00
billz
cf78f5dc94 Update release version 2024-12-17 17:16:22 -08:00
Bill Zimmerman
daa6bfd460
Merge pull request #1716 from RaspAP/fix/multiple-configs
Fix for updated bootstrap5.3 btn class
2024-12-17 16:56:17 -08:00
billz
6a85ac9b93 Fix for updated bootstrap5.3 btn class 2024-12-17 16:44:07 -08:00
billz
cc85c556a1 Update release version 2024-12-17 13:25:12 -08:00
Bill Zimmerman
80be4d34af
Merge pull request #1714 from RaspAP/fix/dhcp-roundup
Roundup of fixes for DHCP handling
2024-12-17 13:15:55 -08:00
billz
3898b82287 Fix remaining dhcp undefined array key warnings 2024-12-17 11:32:50 -08:00
billz
26c64d42e6 Fix php warnings w/ null coalescing operator for $_POST keys 2024-12-16 18:39:33 -08:00
billz
168dd18679 Fix template bug when upstream server is defined 2024-12-16 18:21:20 -08:00
billz
b7a6d334e3 Fix ParseConfig() handling of name-only options, thx @meandthemachine 2024-12-16 18:19:15 -08:00
billz
f811d21dc7 Resolve undefined array key php warnings 2024-12-16 17:56:41 -08:00
billz
26bd632bab Resolve php warnings w/ null coalescing operator 2024-12-16 17:54:17 -08:00
billz
5020e8b5a0 Resolve php warnings on undefined vars 2024-12-16 17:52:31 -08:00
Bill Zimmerman
b5179f3991
Merge pull request #1710 from RaspAP/maint/cidr-mask-notion
Add form-control support for CIDR masks
2024-12-11 20:47:55 +01:00
billz
86e8b208e0 Add form-control support for CIDR masks 2024-12-11 09:18:33 -08:00
Bill Zimmerman
a7ac30f548
Merge pull request #1707 from RaspAP/maint/attribution
Update w/ code attribution - thx @easylo
2024-12-07 08:33:53 +01:00
billz
7684a4932d Update w/ code attribution - thx @easylo 2024-12-06 01:22:28 -08:00
billz
4d1b746932 Update release version 2024-11-28 01:38:42 -08:00
Bill Zimmerman
dc922bab30
Merge pull request #1704 from RaspAP/feat/adguard-provider
Add VPN provider support for AdGuard
2024-11-28 10:28:04 +01:00
billz
66f5cd4183 Create stripAnsiSequence() 2024-11-27 23:19:41 -08:00
billz
50d0e0be82 Sanitize CLI output, fetch provider details after page functions 2024-11-27 00:41:24 -08:00
billz
83d9248249 Update Adguard regex + cmd_overrides 2024-11-27 00:36:32 -08:00
billz
72475b16ef Remove ANSI escape sequences w/ stripArtifacts() 2024-11-26 14:30:14 -08:00
billz
12b0d9f6c8 Append automatic yes answer to questions on connect 2024-11-26 01:43:46 -08:00
billz
68d47f9a41 Process Adguard cmd output 2024-11-26 01:23:20 -08:00
billz
4bba3384e4 Update w/ Adguard VPN 2024-11-26 01:22:42 -08:00
Bill Zimmerman
0e39896f3d
Merge pull request #1701 from RaspAP/fix/nogateway-default
Adds a nogateway option to wlan0 in default config
2024-11-19 10:06:34 +01:00
billz
90bac7f10f Add nogateway option to wlan0, resolves #1695 2024-11-17 01:02:14 -08:00
Bill Zimmerman
0e6f0f6df7
Merge pull request #1699 from RaspAP/maint/translations
Updates ko_KR locale 100% translated
2024-11-15 09:39:18 +01:00
billz
7037214f23 Update ko_KR locale 100% translated - thx @Dansunmi! 2024-11-14 02:30:52 -08:00
Bill Zimmerman
6294a620c0
Add custom plugin subsection 2024-11-14 08:57:51 +01:00
Bill Zimmerman
1ce4c207a6
Update supported distros 2024-11-14 08:45:28 +01:00
Bill Zimmerman
88806ec01a
Update BACKERS.md 2024-11-12 12:54:05 +01:00
billz
a4b26da5ec Update release version 2024-11-10 00:17:30 -08:00
Bill Zimmerman
b74db9464e
Merge pull request #1693 from RaspAP/feat/plugin-architecture
Plugin architecture to support user add-ons
2024-11-10 09:15:11 +01:00
billz
6fa4f3d5a6 Minor: code cleanup 2024-11-10 00:02:47 -08:00
billz
6e5ef8a866 Fixup callable conditions passed to addItem() 2024-11-08 04:10:55 -08:00
billz
4e71a6e753 Fix: evaluate pluginName in renderTemplate 2024-11-08 03:31:22 -08:00
billz
b33ac6ffa3 Revise handlePageAction for multiple plugin instances 2024-11-07 23:25:19 -08:00
billz
ce72d2a0ab Update interface with renderTemplate() method 2024-11-07 10:23:34 -08:00
billz
39a8a58f38 Fix handlePageAction for multiple plugin instances, move renderTemplate to plugins 2024-11-07 10:23:10 -08:00
billz
0bcc396b78 Minor: formatting 2024-11-07 01:19:08 -08:00
billz
04a6d007fd Consolidate handlePageAction in plugin class, remove functions.php from plugin 2024-11-07 00:44:06 -08:00
billz
7d4e6c1eaa Add plugins/ to .gitignore 2024-11-06 00:54:28 -08:00
billz
05126fbbf8 Fix system sidebar item page action 2024-11-05 18:34:31 -08:00
billz
3c59ce9d7e Remove includes/plugins (test) 2024-11-05 18:33:24 -08:00
billz
63924c26ac Revise handlePageAction() + getInstalledPlugins() 2024-11-05 18:27:24 -08:00
billz
3a19ed9c3d Check for plugin to handle request, fallback to core page actions 2024-11-05 18:24:41 -08:00
billz
3af68ca9a9 Create getClassName(), update renderTemplate() 2024-11-05 18:21:31 -08:00
billz
2ec0738455 Require plugins include 2024-11-05 09:14:58 -08:00
billz
316543cfa7 Removed (deprecated) 2024-11-05 09:14:24 -08:00
billz
6b3455345d Refactor to use PluginManager public methods 2024-11-05 09:13:37 -08:00
billz
8021099f49 Create renderStatus() 2024-11-05 09:12:42 -08:00
billz
262ff6a00e Initial commit 2024-11-05 09:12:19 -08:00
Bill Zimmerman
a86c637f04
Update README.md 2024-11-03 10:36:16 +01:00
Bill Zimmerman
4d208d0bf9
Update screenshots 2024-11-03 10:34:50 +01:00
billz
fbf3129ef4 Update release version 2024-11-03 01:08:04 -08:00
Bill Zimmerman
80d2e6b801
Merge pull request #1682 from RaspAP/maint/bootstrap5.3
Upgrade Bootstrap to v5.3.3
2024-11-03 10:05:32 +01:00
Dhanus
8ae468376f fix: enable all flags and install missing packages 2024-11-02 22:19:01 +05:30
Dhanus
90794c8828 fix: disable all options 2024-11-01 18:08:34 +05:30
Dhanus
28d1395bef chore: fail-fast false for 32 bit image build to finish 2024-11-01 12:17:55 +05:30
Dhanus
8048fcf5c4 chore: add apt-get update 2024-10-31 19:00:59 +05:30
Dhanus
710a8dab4e chore: add curl installation 2024-10-31 18:28:26 +05:30
Dhanus
274b42d225 chore: add custom stage 2024-10-31 18:20:25 +05:30
Dhanus
69d58f4713 chore: revert to previous commit due to extracted image size > 2GB
This reverts commit a1b0ade0a5.
2024-10-31 18:00:49 +05:30
Dhanus
d90ccf4277 fix: upload img instead of zip 2024-10-31 17:27:45 +05:30
Dhanus
a1b0ade0a5 chore: remove system update 2024-10-31 17:15:18 +05:30
Dhanus
f1a5b9163b fix: asset_name file type 2024-10-31 17:12:17 +05:30
Dhanus
cb4fc2ac54 ci: Add build for 32/64 bit images 2024-10-31 17:10:50 +05:30
billz
0a32215b39 Roundup template changes, update en_US locale + compile .mo 2024-10-31 00:19:53 -07:00
billz
f7e8f4d6eb Template tweaks 2024-10-30 10:26:59 -07:00
billz
40a526f217 Update release version 2024-10-29 09:54:24 -07:00
Bill Zimmerman
cf529fa0fb
Update BACKERS.md 2024-10-29 14:33:48 +01:00
Bill Zimmerman
54cf3132ad
Merge pull request #1686 from RaspAP/fix/check-tcp-bbr-available
Fix: Case insensitive modinfo return value check
2024-10-29 10:19:39 +01:00
billz
2f4680bc23 Update _check_tcp_bbr_available() case insensitive 2024-10-29 02:14:06 -07:00
billz
a12c3ce384 Style tweak 2024-10-29 02:11:49 -07:00
Bill Zimmerman
f1e093404c
Merge branch 'master' into maint/bootstrap5.3 2024-10-28 17:35:58 +01:00
Bill Zimmerman
9e52cda593
Merge pull request #1684 from RaspAP/fix/fallback-static-enabled
Add event listener to chkfallback, enable/disable static IP fields
2024-10-28 17:32:47 +01:00
billz
54a90353f8 Add event listener to chkfallback, enable/disable static IP fields 2024-10-28 00:28:59 -07:00
billz
13b894d411 Style tweaks + misc fixes 2024-10-27 00:05:45 -07:00
billz
95b44aed5e Apply common class styles to all.css, minor tweaks 2024-10-26 06:47:10 -07:00
billz
7e1fd32edc Define custom variables, set theme color + variants 2024-10-26 04:52:31 -07:00
billz
3004ce49cc Replace lightsout.php w/ dark.css, set data-bs-theme 2024-10-26 03:17:52 -07:00
billz
eb3873ac3f Initial commit 2024-10-26 03:16:30 -07:00
billz
23dbbd8ea8 Create setTheme() update night-mode switch + apply dark.css 2024-10-26 03:15:43 -07:00
billz
80fbb9aaed Update input-group fontawesome icons 2024-10-26 01:16:09 -07:00
billz
6c20740ffd Upgrade font-awesome to v6.6 2024-10-26 00:45:53 -07:00
billz
4876d3f04a Tweak system info-item layout 2024-10-25 02:45:53 -07:00
billz
61ca5d31be Update external link targets 2024-10-25 02:23:57 -07:00
billz
26d2f244f9 Template layout + compatibility tweaks 2024-10-25 02:19:17 -07:00
billz
b9c7108fd7 Replace inline styles w/ fontawesome 5 brand classes 2024-10-25 02:18:42 -07:00
billz
2d4960a3ab Update data-toggle with bsTarget 2024-10-25 02:17:43 -07:00
billz
80aca6a971 Global style tweaks 2024-10-25 01:19:44 -07:00
billz
bc1c7803e0 Revise/fixup tooltips 2024-10-25 01:19:19 -07:00
billz
6ee1b84489 Update hackernews theme 2024-10-25 01:03:09 -07:00
billz
ce46f87459 Remove material light/dark themes (deprecated) 2024-10-25 01:02:09 -07:00
billz
8087ae3ab1 Update deprecated input-group-append class 2024-10-25 01:00:58 -07:00
billz
c928629fc6 Revise layout of btn-group 2024-10-25 00:06:34 -07:00
billz
f9c91c2125 Process custom.js with bootstrap5-migration-tool 2024-10-25 00:05:29 -07:00
billz
c74c4deb63 Update alert classes 2024-10-25 00:03:31 -07:00
billz
6cd18ad571 Create footer.php 2024-10-25 00:02:38 -07:00
billz
9a1d362d30 Update chkstatic/chkdhcp radio btns classes 2024-10-24 23:13:14 -07:00
billz
87f95ab9f9 Apply theme color to form-check-input 2024-10-24 23:10:46 -07:00
billz
29ca176e49 Move nav elements to footer, style tweaks 2024-10-24 10:33:40 -07:00
billz
4e76445dab Apply text-secondary to logoutput 2024-10-24 10:30:53 -07:00
billz
063a2b1eaf Style tweaks 2024-10-24 06:49:23 -07:00
billz
ec11a527d7 Card border-radius fix for bg-dark 2024-10-24 06:06:04 -07:00
billz
177f42e12b Revise info-* column layout 2024-10-24 05:52:35 -07:00
billz
e00b2fcfde Update class name for selects 2024-10-24 02:20:34 -07:00
billz
7ddf16da6a Add .heart class + keyframes 2024-10-24 02:16:12 -07:00
billz
3dbc83e635 Update footer links 2024-10-24 02:15:09 -07:00
billz
4860b237a1 Update .sb-nav* .sb-sidenav* .sb-topnav* classes 2024-10-24 00:15:27 -07:00
billz
3f8dea4053 Updated for bootstrap 5.3.x 2024-10-24 00:13:44 -07:00
billz
363bcba144 Revise w/ updated sb-admin, bootstrap classes 2024-10-24 00:13:00 -07:00
billz
4f14502bac Upgrade bootstrap + sb-admin to latest release versions 2024-10-24 00:08:02 -07:00
billz
4799825738 Process templates w/ bootstrap-5-migrate-tool 2024-10-24 00:06:13 -07:00
Bill Zimmerman
bf22668284
Merge pull request #1680 from warpdesign/fix-passphrase-with-equal-character
Use sed instead of grep+cut to capture the passphrase
2024-10-22 18:49:49 +02:00
Nicolas Ramz
0bb8a5400e Use sed instead of grep+cut to capture the passphrase
Current method would crop any passphrase containing an '=' sign.

For eg. wpa_passwphrase=Foo=Bar would return 'Foo' instead of 'Foo=Bar'.
2024-10-22 17:27:31 +02:00
Bill Zimmerman
ba0bff9b9c
Merge pull request #1671 from RaspAP/fix/passphrase-htmlchars
Output passphrase w/ htmlspecialchars()
2024-10-06 11:45:17 +02:00
billz
5f8f91e7e4 Output passphrase w/ htmlspecialchars() 2024-10-06 02:33:51 -07:00
billz
246fd32058 Update release version 2024-09-27 01:10:32 -07:00
Bill Zimmerman
5fa8107fe7
Merge pull request #1667 from RaspAP/maint/translations
Update translations
2024-09-27 10:03:20 +02:00
Bill Zimmerman
20ce71070c
Merge pull request #1666 from RaspAP/feat/hostapd-userconf
Add support for custom hostapd.conf.users file
2024-09-27 10:02:35 +02:00
billz
7ad71a916d Update translations + compile .mo 2024-09-27 00:29:10 -07:00
billz
5b88728ec1 Create function parseUserHostapdCfg() 2024-09-26 04:17:34 -07:00
billz
677fe42d84 Add support for custom hostapd.conf.users file 2024-09-26 01:36:13 -07:00
Bill Zimmerman
56e5f6f778
Merge pull request #1662 from RaspAP/fix/escapeshell-ovpncfg
Apply escapeshellarg to OpenVPN auth + client configs
2024-09-20 09:11:23 +02:00
billz
74c7fb8c7a Apply escapeshellarg to OpenVPN auth + client configs 2024-09-20 09:06:43 +02:00
Bill Zimmerman
3889e2f04d
Merge pull request #1660 from RaspAP/fix/tcp-bbr-modprobe-intree
Revise tcp_bbr check method
2024-09-14 11:36:33 +02:00
billz
fa42e0c3f1 Revise tcp_bbr check method, resolves #1656 2024-09-14 11:17:43 +02:00
billz
57199def06 Update release version 2024-08-18 09:45:44 +02:00
Bill Zimmerman
85c38f2a9a
Merge pull request #1639 from RaspAP/feat/installer-tcp-bbr
Adds TCP BBR configuration option to installer
2024-08-18 08:42:32 +02:00
billz
8f033e5920 Add failure check to execute sysctl 2024-08-17 10:34:34 +02:00
billz
0e31670d25 Add TCP BBR configuration option to installer, addresses #1624 2024-08-17 10:26:28 +02:00
billz
d9f1a4dcfe Update release version 2024-08-11 09:39:10 +02:00
billz
9543587786 Improve OpenVPN logging, thx @frankozland 2024-08-11 09:38:57 +02:00
Bill Zimmerman
a5e2d832ef
Merge pull request #1635 from RaspAP/fix/nordvpn-cli
Update parsing of NordVPN countries, fixes #1634
2024-08-10 19:30:02 +02:00
billz
484820f324 Update parsing of NordVPN countries, fixes #1634 2024-08-10 19:25:54 +02:00
billz
90d63a679d Update release version 2024-08-03 08:22:21 +02:00
Bill Zimmerman
3a5766dcc0
Merge pull request #1630 from RaspAP/sec/restapi-svc
Security: set restapi.service file ownership
2024-08-03 08:16:15 +02:00
billz
4afd67f0b0 Add status message 2024-08-03 08:10:45 +02:00
billz
0f78411efe Set root owner on installers/restapi.service 2024-08-02 20:25:37 +02:00
Bill Zimmerman
98c2a7cb34
Merge pull request #1627 from daniel-rose/bugfix/handle-open-wifi-correctly
fix: handle open wifi in `setKnownStationsWPA` correctly
2024-08-02 19:05:06 +02:00
Daniel Rose
534b4df01a fix: handle open wifi in setKnownStationsWPA correctly
use `... key_mgmt NONE` instead of `... psk XXX`
2024-07-24 10:04:19 +02:00
billz
a0d8f22742 Update release version 2024-07-14 08:45:21 +02:00
Bill Zimmerman
ed008730e6
Merge pull request #1612 from RaspAP/fix/wg-status
Update method to determine wg-quick state
2024-07-07 20:31:16 +02:00
billz
828a463888 Update method to determine wg-quick state, resolves #1601 2024-07-07 20:13:06 +02:00
Bill Zimmerman
6541e9b2e1
Merge pull request #1586 from RaspAP/fix/wireguard-conf
Fix: correctly parse multiple wg DNS entries
2024-05-14 07:27:04 +02:00
billz
4175303cf8 Fix: correctly parse multiple wg DNS entries, resolves #1585 2024-05-14 07:21:55 +02:00
Bill Zimmerman
e386cc8dfe
Merge pull request #1583 from RaspAP/fix/armbian-dependencies
Add net-tools dependency to Armbian
2024-05-11 08:27:35 +02:00
billz
543a5e098a Add net-tools dependency to Armbian, resolves #290 2024-05-11 07:39:20 +02:00
Bill Zimmerman
884d4d95c5
Merge pull request #1576 from RaspAP/maint/debuglog
Adds output from rfkill to debug log
2024-05-03 09:44:36 +02:00
billz
e8a8ca6b65 Add _rfkill_info 2024-05-03 09:01:26 +02:00
Bill Zimmerman
f76cb71086
Update issue_form.yml 2024-05-03 08:58:31 +02:00
Bill Zimmerman
2d1d6fb566
Update issue_form.yml 2024-05-03 08:56:14 +02:00
billz
41bca8e581 Update release version 2024-04-01 17:15:31 +02:00
Bill Zimmerman
9fc38ffd0c
Merge pull request #1561 from RaspAP/fix/installer-options
Update install option vars, use indirect expansion
2024-04-01 17:07:04 +02:00
billz
87143e174a Update install option vars, use indirect expansion 2024-04-01 16:58:55 +02:00
billz
655b126a59 Update release version 2024-03-31 17:59:49 +02:00
billz
5930a123d2 Remove _check_incompatible_distro 2024-03-31 17:57:46 +02:00
billz
69387f196c Update release version 2024-03-28 12:08:53 +01:00
billz
5cbe66d99b Set RASPI_RESTAPI_ENABLED flag 2024-03-27 18:35:15 +01:00
Bill Zimmerman
48e7b7abb7
Merge pull request #1556 from RaspAP/maint/installer
Roll up install prompts with _prompt_install_features()
2024-03-26 18:25:48 +01:00
billz
5717d2f4a8 Update package check w/ dpkg-query 2024-03-25 19:47:19 +01:00
billz
fc77f79441 Add _check_incompatible_distro 2024-03-25 15:58:37 +01:00
billz
f4017ef29a Roll up install prompts with _prompt_install_features() 2024-03-24 16:31:21 +01:00
Bill Zimmerman
ee915f95a2
Merge pull request #1552 from nsdoukos/night-mode-fix
Fix night mode when changing theme
2024-03-22 07:52:39 +01:00
Nestoras Sdoukos
02ac421010 Fix night mode when changing theme
Signed-off-by: Nestoras Sdoukos <sdoukos@libre.space>
2024-03-21 22:31:37 +02:00
Bill Zimmerman
5b27f528c9
Update README.md 2024-03-17 20:12:42 +01:00
billz
d1fb8f69d6 Define RASPI_RESTAPI_ENABLED 2024-03-14 21:27:28 +01:00
billz
820621d301 Update release version 2024-03-13 08:38:14 +01:00
Bill Zimmerman
d0592b63de
Merge pull request #1548 from RaspAP/sec/authenticate-ajax
Add authentication to ajax pages, thx @lts-rad
2024-03-12 17:56:30 +01:00
billz
c98d2b0c15 Add authentication to ajax pages, thx @lts-rad 2024-03-11 18:52:34 +01:00
Bill Zimmerman
e92835f89d
Merge pull request #1545 from RaspAP/dependabot/pip/api/fastapi-0.109.1
Bump fastapi from 0.109.0 to 0.109.1 in /api
2024-03-09 15:24:18 +01:00
dependabot[bot]
603038efb1
Bump fastapi from 0.109.0 to 0.109.1 in /api
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.109.0 to 0.109.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.109.0...0.109.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-09 13:05:59 +00:00
Bill Zimmerman
2de012cc85
Merge pull request #1519 from NL-TCH/REST-API
RestAPI installer integrated
2024-03-09 14:05:30 +01:00
billz
d1be0caf54 Restart restapi.sevice on API key save 2024-03-09 12:23:20 +01:00
billz
8d6b8174d1 Bump position of sidebar item 2024-03-09 12:22:14 +01:00
billz
c408a6f5f8 Add message to en_US locale + compile 2024-03-09 12:21:31 +01:00
billz
220709b698 fix: mv api files /facepalm 2024-03-09 11:24:36 +01:00
billz
3262e3030f Update en_US locale + compile .mo 2024-03-09 09:25:34 +01:00
billz
f81c68de26 Add restAPI doc link when svc is active 2024-03-09 09:25:02 +01:00
billz
1e840abbaf Update installer switches 2024-03-09 09:17:05 +01:00
Bill Zimmerman
95f74c560e
Merge pull request #1542 from RaspAP/sec/providers
Sanitize country POST input
2024-03-08 21:20:08 +01:00
billz
d5009e0c1e Sanitize country POST input 2024-03-08 21:14:33 +01:00
billz
9c5c0cfb88 Remove /wireguard/{config} endpoint 2024-03-08 20:17:22 +01:00
billz
f61e1b5c1a Clean up serviceLog output 2024-03-08 20:14:08 +01:00
billz
19fe43466e Remove --reload from ExecStart 2024-03-08 20:13:20 +01:00
billz
49780d8ec9 Rename tag hostpost -> hotspot 2024-03-08 20:12:30 +01:00
billz
79d33db2bf Revert "Sanitize path to prevent directory traversal"
This reverts commit 2cdf6ef53e.
2024-03-08 11:27:44 +01:00
billz
2cdf6ef53e Sanitize path to prevent directory traversal 2024-03-08 11:15:31 +01:00
billz
ef7b67a445 Set serviceLog from systemctl status 2024-03-08 10:50:02 +01:00
billz
87216bdc02 Update sudoers .env permissions, systemd service user 2024-03-08 10:48:41 +01:00
billz
5d8fed824a Define RASPI_CONFIG_API, update class constructor, load + createEnv 2024-03-08 10:46:45 +01:00
billz
282b839f45 Add gen_apikey to template 2024-03-08 10:45:05 +01:00
billz
95ad90063b Validate client_config path expression 2024-03-08 09:08:53 +01:00
billz
b567f565d9 Disambiguate service name 2024-03-08 09:01:13 +01:00
billz
00f90f1f73 Sanitize user-provided inputs 2024-03-08 08:59:36 +01:00
billz
b80151be28 Fix SyntaxError: positional argument follows keyword 2024-03-07 18:54:15 +01:00
billz
75be1bf04e Add load_dotenv from dotenv 2024-03-07 18:53:17 +01:00
billz
2365c4e251 Add python-dotenv dependecy 2024-03-07 18:52:01 +01:00
billz
edc3a421ca Replace root user with %i, append --reload 2024-03-07 18:51:16 +01:00
billz
95acd497df Move /api dir to $raspap_dir 2024-03-07 18:50:39 +01:00
billz
5b7b968676 Fix: rename systemd service, set serviceStatus flag 2024-03-07 18:44:27 +01:00
billz
2b2cb8fa40 Update en_US locale messages + compile .mo 2024-02-28 19:50:20 +01:00
billz
0b9cbee210 Processed w/ phpcbf 2024-02-28 19:49:46 +01:00
billz
cfa916632b Replace external dependencies w/ native DotEnv class 2024-02-28 19:27:10 +01:00
billz
b835243e57 Add .env to gitignore 2024-02-28 19:24:49 +01:00
billz
5150224e66 Read RASPAP_API_KEY from Dotenv 2024-02-27 11:50:32 +01:00
billz
4bf514c992 Add required php-mbstring to _install_dependencies 2024-02-27 11:49:21 +01:00
billz
def8be88fb Update dependencies + cp vendor/*/src src/ 2024-02-27 11:48:37 +01:00
Bill Zimmerman
eabd356bcb
Merge pull request #1529 from RaspAP/dependabot/npm_and_yarn/es5-ext-0.10.63
Bump es5-ext from 0.10.51 to 0.10.63
2024-02-27 08:43:05 +01:00
dependabot[bot]
c8ed440c68
Bump es5-ext from 0.10.51 to 0.10.63
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.51 to 0.10.63.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.51...v0.10.63)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 02:54:33 +00:00
Bill Zimmerman
a55b7d0605
Update BACKERS.md 2024-02-25 10:17:40 +01:00
billz
1e6b604e7f Update release version 2024-02-24 10:47:18 +01:00
Bill Zimmerman
e2530bbbbf
Merge pull request #1527 from RaspAP/fix/auth-user
Fix: Update user_id session var auth context
2024-02-24 10:42:26 +01:00
Bill Zimmerman
55508262de
Merge pull request #1528 from RaspAP/fix/hostapd-iface-check
Fix: Exec iwgetid with client iface session var
2024-02-24 10:41:50 +01:00
billz
cffcac0c52 Exec iwgetid w/ client iface session var 2024-02-24 10:35:35 +01:00
billz
ae44f5476d Update user_id session var auth context 2024-02-24 10:23:58 +01:00
billz
8ecd542eae Create api general + status tabs 2024-02-19 19:34:59 +01:00
billz
7dc2fd6538 Implement basic display/save settings 2024-02-19 19:33:59 +01:00
billz
9d7058527d Add start/stop restapi.service to sudoers 2024-02-19 18:57:02 +01:00
billz
2d41f74b6a Minor: fix caps in title 2024-02-19 18:31:48 +01:00
billz
4e258b3981 Add sidebar item, template stubs + page actions 2024-02-19 10:08:29 +01:00
billz
bf41d88340 Add constant to config.php + enable with installer 2024-02-19 09:12:33 +01:00
Bill Zimmerman
2e4d76a419
Merge pull request #1521 from RaspAP/fix/uninstaller
Install loader compatibility fix
2024-02-18 08:14:33 +01:00
TCH
1f1fa3711a no posts + everything behind auth 2024-02-17 19:45:39 +00:00
billz
35bb48d050 Install loader compatibility fix 2024-02-16 10:18:17 +01:00
Bill Zimmerman
c50d01d972
Bump Armbian release 2024-02-10 08:29:33 +01:00
Bill Zimmerman
4c6b01729e
Merge pull request #1518 from NL-TCH/patch-2
fix logging typo
2024-02-09 08:23:56 +01:00
NL-TCH
910616ef43 fix path error in servicefile 2024-02-09 02:17:15 +01:00
NL-TCH
aec0279135 change python -> python3 2024-02-09 01:57:59 +01:00
NL-TCH
8eae2d1606 check if python is present 2024-02-09 01:56:02 +01:00
NL-TCH
ccd0d62a5a why am i stupid? 2024-02-09 01:50:46 +01:00
NL-TCH
8c82c41330 parsing of restapi var to common 2024-02-09 00:50:10 +01:00
NL-TCH
08db1e5b66 bruh, i am stupid 2024-02-09 00:38:03 +01:00
NL-TCH
c43d2ea7ab fix installer 2024-02-09 00:08:46 +01:00
NL-TCH
8357fcb5e4 fix typo 2024-02-08 23:57:48 +01:00
NL-TCH
2ac9ba580f pip fix 2024-02-08 23:46:08 +01:00
NL-TCH
04a443a514 add --help option 2024-02-08 23:28:17 +01:00
NL-TCH
2ce8351b1a initial install test 2024-02-08 23:24:30 +01:00
TCH
3e4857dc67
fix logging typo
nothing major
2024-02-08 23:15:18 +01:00
Bill Zimmerman
ce63e48445
Merge pull request #1517 from RaspAP/maint/about-page
Update project links block
2024-02-08 12:35:15 +01:00
billz
631b6b36af Update project links block 2024-02-08 12:26:47 +01:00
Bill Zimmerman
67caedc992
Update CONTRIBUTING.md 2024-02-08 12:24:01 +01:00
Bill Zimmerman
becaa209f2
Update reddit bage 2024-02-08 11:51:31 +01:00
Bill Zimmerman
06a3b9386f
Update Discord badge 2024-02-08 11:41:24 +01:00
Bill Zimmerman
d296c67373
Update README.md 2024-02-08 11:18:39 +01:00
billz
20bc1830b4 Update release version 2024-02-08 10:26:43 +01:00
Bill Zimmerman
2f2330497d
Merge pull request #1516 from RaspAP/fix/auth-username
Fix get/set admin username
2024-02-08 09:53:52 +01:00
billz
cd7820ddd2 Fix get/set admin username 2024-02-08 09:41:42 +01:00
Bill Zimmerman
56b9ff5a3b
Update README.md 2024-02-08 09:03:26 +01:00
Bill Zimmerman
804034a871
Merge pull request #1515 from RaspAP/fix/parse-dhcp
Update parsing of dhcp-range
2024-02-08 08:46:11 +01:00
billz
3f11ac165b Update parsing of dhcp-range 2024-02-08 08:38:09 +01:00
Bill Zimmerman
0610848a25
Update features list 2024-02-03 16:47:53 +01:00
billz
a1b610b92d Update release version 2024-02-01 09:04:59 +00:00
Bill Zimmerman
4dd409211d
Merge pull request #1510 from RaspAP/feat/installer-update
Add --provider non-interactive option to installer
2024-02-01 10:01:24 +01:00
billz
38a84fc258 Add --provider non-interactive option to installer 2024-02-01 08:51:55 +00:00
Bill Zimmerman
ccbdf8dccf
Merge pull request #1509 from RaspAP/maint/os-detection
Parse /etc/os-release directly (compatibility)
2024-01-30 14:23:16 +01:00
billz
3ee4ea90f5 Parse /etc/os-release versus lsb_release (compatibility) 2024-01-30 12:54:32 +00:00
Bill Zimmerman
224f4ca784
Merge pull request #1508 from RaspAP/fix/dhcp-no-resolv
Fix uncaught TypeError: explode()
2024-01-30 12:27:24 +01:00
billz
54aca14d2c Fix uncaught TypeError: explode() 2024-01-30 11:00:49 +00:00
billz
e6d4f761bd Update release version 2024-01-25 07:26:31 +01:00
Bill Zimmerman
ef1dc5dae0
Update README.md 2024-01-18 21:08:20 +01:00
Bill Zimmerman
bdda08b53e
Merge pull request #1500 from RaspAP/fix/wpa-reinitialize
Update method used reinitialize wpa_supplicant
2024-01-17 11:25:37 +01:00
Bill Zimmerman
45159c7407
Merge pull request #1501 from NL-TCH/patch-1
add CM4 and Pi5 revision numbers
2024-01-17 09:51:36 +01:00
TCH
89187b7e44
fix missed comma 2024-01-16 23:45:57 +01:00
TCH
97adaf88bf
Update Sysinfo.php
source: https://github.com/raspberrypi/documentation/blob/develop/documentation/asciidoc/computers/raspberry-pi/revision-codes.adoc
2024-01-16 23:44:54 +01:00
billz
68a5085e87 Compile en_US .mo 2024-01-16 18:34:18 +01:00
billz
c304f10f81 Update en_US locale + standardize labels 2024-01-16 18:29:49 +01:00
billz
d56870e2db Update shell cmd used in reinitializeWPA 2024-01-16 18:29:16 +01:00
Bill Zimmerman
bb23dc79f6
Merge pull request #1497 from RaspAP/fix/static-leases
Validate static leases input
2024-01-13 16:40:37 +01:00
billz
e5c7ca4053 Add hexadecimal filter mask to MAC address input 2024-01-12 18:01:48 +00:00
billz
f778cd78a7 Added function validateDnsmasqInput() + update saveDHCPConfig 2024-01-12 12:21:56 +00:00
billz
effa38c0a0 Added function validateMac() 2024-01-12 12:21:00 +00:00
Bill Zimmerman
c594b8f4a9
Update README.md 2024-01-12 10:32:51 +01:00
billz
320379e449 Update release version 2023-12-31 08:20:04 +00:00
Bill Zimmerman
b2c78ff12c
Merge pull request #1491 from RaspAP/fix/sanitize-ajax
Security roundup
2023-12-31 09:10:59 +01:00
billz
ebfb1384a4 Remove file (deprecated) 2023-12-31 08:04:09 +00:00
billz
ca9c0471b6 Update handling of filePath argument 2023-12-31 08:03:19 +00:00
Bill Zimmerman
fd38a22c4f
Merge pull request #1486 from RaspAP/maint/exception-handler
Exception handler class
2023-12-27 20:58:59 +01:00
billz
e24b4cbdfa Update en_US locale + compile .mo 2023-12-27 17:21:36 +00:00
billz
ccbfa1a853 Replace literal with RASPI_ERROR_LOG 2023-12-27 16:48:29 +00:00
billz
939092d673 Style exception template 2023-12-27 16:47:39 +00:00
billz
ee29a4fa0a Define RASPI_ERROR_LOG 2023-12-27 16:46:30 +00:00
billz
405ae0bf17 Add constructor, setExceptionHandler, call HtmlErrorRenderer 2023-12-27 05:37:54 +00:00
billz
41bba09f42 Basic template implementation 2023-12-27 05:35:41 +00:00
billz
adf44d462b Move set_exception_handler to constructor 2023-12-27 05:35:03 +00:00
billz
36a6572971 Initial commit 2023-12-26 19:55:31 +00:00
billz
cb456246ca Add includes/exceptions.php + mode change 2023-12-22 23:18:13 +00:00
billz
e93b793686 Initial commit 2023-12-22 23:15:36 +00:00
Bill Zimmerman
27bc1d65af
Update CODE_OF_CONDUCT.md 2023-12-17 20:28:08 +01:00
Bill Zimmerman
627e99b0e9
Merge pull request #1478 from RaspAP/fix/installer-update
Add rsync dependency for Debian distros
2023-12-14 10:15:41 +01:00
billz
61ba236424 Set .service-status-warn amber color 2023-12-14 09:14:09 +00:00
billz
14f3a4dc09 Add rsync dependency for Debian distros 2023-12-12 17:18:25 +00:00
codesee-maps[bot]
581622ef0c
Install the CodeSee workflow. Learn more at https://docs.codesee.io 2023-12-12 08:08:46 +00:00
billz
3cb578ab30 Update release version 2023-12-05 17:17:38 +00:00
Bill Zimmerman
79dbb6d2ea
Merge pull request #1476 from RaspAP/fix/installer-update
Set rsync exclude parameter during update
2023-12-05 18:15:15 +01:00
billz
8d99be5092 Set rsync exclude parameter during update 2023-12-05 17:11:54 +00:00
Bill Zimmerman
f05cd43b5c
Merge pull request #1475 from RaspAP/maint/installer-pkgs
Install extra networking tools (insiders)
2023-12-05 09:46:13 +01:00
billz
eed05c7d6b Update release version 2023-12-05 07:29:11 +00:00
billz
243a5e49fa Install extra networking tools (insiders) 2023-12-04 16:15:32 +00:00
Bill Zimmerman
fc58d5037a
Merge pull request #1469 from RaspAP/fix/predictable-names
Fix: Support predictable interface names
2023-12-04 13:58:40 +01:00
billz
ce62edc698 Minor: code cleanup 2023-12-04 09:20:52 +00:00
billz
5ca9465e83 Update sudoers interface patterns 2023-12-04 09:00:02 +00:00
billz
9fe7bad7b1 Update reinitializeWPA method to use wpa_cli reconfigure 2023-12-04 08:13:13 +00:00
Bill Zimmerman
959f85e63d
Merge pull request #1466 from RaspAP/maint/wg-dependencies
Maintenance: Add dependency to wireguard install
2023-12-04 09:03:01 +01:00
Bill Zimmerman
692c7d1506
Merge pull request #1470 from RaspAP/maint/lightsout-tweaks
Maintenance: Apply consistent border-radius values to .btn + .card classes
2023-12-04 09:02:33 +01:00
Bill Zimmerman
7e39bc0d35
Merge pull request #1468 from RaspAP/fix/isoquery-opts
Fix: Version compatibility check for isoquery options
2023-12-04 08:59:21 +01:00
billz
0a547442a4 Minor: animation spin tweak 2023-12-03 07:23:27 +00:00
billz
e0751d6f90 Use getNetworkIdBySSID() to assign index values 2023-12-02 19:53:16 +00:00
billz
781a292b67 Replace loading-spinner.gif w/ fontawesome circle-notch icon 2023-12-02 18:15:03 +00:00
billz
69b629a59b Update woth setKnownStationsWPA($networks) 2023-12-02 17:32:39 +00:00
billz
e71042cb63 Create setKnownStationsWPA() 2023-12-02 17:32:15 +00:00
billz
1bf7a32bd5 Add wpa_cli list_networks 2023-12-02 17:28:15 +00:00
billz
c5ffab8332 Revise reinitializeWPA method 2023-12-02 14:32:13 +00:00
billz
79c61d383b Add wpa_cli cmds to set, enable + remove network 2023-12-02 14:31:52 +00:00
billz
b5d861a2b9 Add wpa_cli disconnect cmd 2023-12-02 14:16:15 +00:00
billz
84dc44d944 Add restricted wpa_cli commands to sudoers 2023-12-02 14:00:34 +00:00
billz
478c3fea5c Adjust .nav-link, .btn-light .h4 styles 2023-12-02 08:19:50 +00:00
billz
3717249f6a Apply consistent border-radius values to .btn + .card classes 2023-12-01 19:30:17 +00:00
billz
20589bacf3 Return wpa_cli failure in status message 2023-12-01 18:03:03 +00:00
billz
0cb3128158 Revised for predictable iface names 2023-12-01 18:02:01 +00:00
billz
89cb4621fa Version compatibility check for isoquery options 2023-12-01 14:18:38 +00:00
billz
93f6069dc3 Add resolvconf dependency to wg install for Debian 12/Ubuntu 22.04 2023-12-01 13:57:15 +00:00
Bill Zimmerman
ff7f1f01b4
Merge pull request #1467 from RaspAP/fix/theme-options
Feature / fix: Theme updates
2023-11-30 12:44:43 +01:00
Bill Zimmerman
194ca3a295
Merge branch 'master' into fix/theme-options 2023-11-29 17:28:37 +01:00
Bill Zimmerman
1a16f3c8a3
Merge pull request #1465 from RaspAP/feat/set-loglimit
Feature: Set diagnostic log size limit
2023-11-29 17:10:06 +01:00
billz
ba03688230 Apply @marek-guran's dynamic color to RaspAP dark theme 2023-11-29 09:20:27 +00:00
billz
cf63cfe63b Apply theme color to .sidebar-brand-text 2023-11-29 09:17:09 +00:00
billz
034a0b8f63 Generalize @marek-guran's lighten/darkenColor functions 2023-11-29 09:16:28 +00:00
billz
54ec50c27f Add resolvconf to wireguard install 2023-11-28 17:08:35 +00:00
billz
7818462f56 Update en_US locale + compile .mo 2023-11-28 11:07:25 +00:00
billz
74656c63ed Update templates w/ getLogLimited, add $logdata to payload 2023-11-28 10:05:06 +00:00
billz
05210e8967 Update en_US locale w/ new messages 2023-11-28 10:04:25 +00:00
billz
2a5241fb62 Add log size limit to Advanced tab, validate + set session var 2023-11-28 10:03:58 +00:00
billz
cf53c575ff Create getLogLimited() 2023-11-28 10:01:15 +00:00
billz
8cbfaed989 Define RASPI_LOG_SIZE_LIMIT, RASPI_HOSTAPD_LOG 2023-11-28 10:00:07 +00:00
Bill Zimmerman
7858bb5739
Update stale.yml 2023-11-27 08:41:37 +01:00
Bill Zimmerman
4705cc5ec1
Create stale.yml 2023-11-27 08:34:39 +01:00
Bill Zimmerman
21ee31b8ce
Delete .github/stale.yml 2023-11-27 08:34:01 +01:00
Bill Zimmerman
fd3034e976
Delete .github/workflows/main.yml 2023-11-27 08:26:23 +01:00
billz
f4b9eeb313 Update release version 2023-11-25 16:45:12 +00:00
Bill Zimmerman
0246761609
Update CODE_OF_CONDUCT.md 2023-11-25 13:40:00 +01:00
Bill Zimmerman
7ac8d8b9f3
Merge pull request #1462 from RaspAP/feat/check-update
Feature: Check for update
2023-11-25 13:18:19 +01:00
billz
61a1f063ea Update rsync exclusion path 2023-11-25 11:30:36 +00:00
billz
9a709b3ded Preserve /tmp/raspap_install.log literal 2023-11-25 09:54:28 +00:00
billz
2102fb9043 Remove temp $source_dir if exists, sudo rm raspap_install.log 2023-11-25 08:15:10 +00:00
billz
c0bf18bf50 Add RASPI_MONITOR_ENABLED to update check btn, require config.php 2023-11-24 22:53:06 +00:00
billz
484a1e8702 Cleanup template, fix timing of js execution 2023-11-24 18:10:16 +00:00
billz
d6a4d33758 Define RASPI_INSTALL_LOG 2023-11-24 18:07:47 +00:00
billz
aa3a88e9b1 Use existing raspbian.sh install loader for update 2023-11-24 07:49:52 +00:00
billz
99fd2f8ce7 Remove existing /tmp/raspap_install.log 2023-11-24 07:48:12 +00:00
billz
ffafcf2c83 Add successMsg, set btn state disabled until update complete 2023-11-23 11:43:38 +00:00
billz
ea5ee29d4a Set csrfToken for ajax post 2023-11-23 09:11:02 +00:00
billz
387d779bdf Update w/ ajax post sys_perform_update.php 2023-11-23 08:53:13 +00:00
billz
fec2c283c1 Update local installer pre-loader path 2023-11-23 08:45:40 +00:00
billz
1e4fe3b002 Remove setInterval(fetchUpdateResponse, 500) 2023-11-23 08:44:27 +00:00
billz
61c05d93d8 Revise en_US locale messages + compile .mo 2023-11-23 07:57:40 +00:00
billz
f6d7e9a2d1 Catch update complete + error states 2023-11-23 07:54:38 +00:00
billz
37dcaa41f1 Create performupdateModal w/ progress steps 2023-11-23 07:51:43 +00:00
billz
44c8b7c1ae Create fetchUpdateResponse(), update modals 2023-11-23 07:49:03 +00:00
billz
d14040d3a7 Initial commit 2023-11-23 07:44:46 +00:00
billz
e2111fdf1f Added /etc/raspap/system/app-update.sh to sudoers 2023-11-23 07:43:50 +00:00
billz
5fbcabd3c2 Initial commit 2023-11-23 07:43:33 +00:00
billz
90456e601e Replace mv source > dest with rsync, preserving sys_read_logfile.php 2023-11-22 19:00:32 +00:00
Bill Zimmerman
7b3662fb2b
Update stale.yml 2023-11-22 13:02:58 +01:00
billz
e55f4e2395 Update _download_latest_files, install app-update.sh 2023-11-21 20:14:19 +00:00
billz
61cf109f11 Compile en_US local .mo 2023-11-20 14:57:46 +00:00
billz
ba67d327af Revert change to RASPI_VERSION 2023-11-20 14:56:50 +00:00
billz
51e05dd270 Update en_US local messages 2023-11-20 14:48:59 +00:00
billz
ba45daad19 Patch applied + modified from RaspAP/raspap-insiders#242 2023-11-20 14:45:55 +00:00
billz
2151a44729 Minor: add required --path argument to usage() 2023-11-17 12:01:10 +00:00
billz
026a385add Update release version 2023-11-17 11:14:22 +00:00
Bill Zimmerman
366e0447ab
Merge pull request #1457 from RaspAP/feat/update-install
Improves installer with --update switch & GitHub user/token auth
2023-11-17 12:11:56 +01:00
billz
dea5759514 Minor: tweak GPL verbiage 2023-11-16 17:32:04 +00:00
billz
7e8f63863d Fix handling of config.php for different install types 2023-11-16 17:07:36 +00:00
billz
7782956917 Rename _install_mobile_clients, clarify messages 2023-11-16 15:18:20 +00:00
billz
e6a90e728f Modify conditions for update/upgrade 2023-11-16 12:16:20 +00:00
billz
387f52a2e4 Improve messages, fixup order of install steps 2023-11-16 10:05:18 +00:00
billz
4c6455f1d9 Update file header, usage examples 2023-11-15 19:27:14 +00:00
billz
bfe62fb2c9 Replace comment block with usage() 2023-11-15 18:13:56 +00:00
billz
4c6ec03ea9 Fixup existing config + directory handling for update 2023-11-15 18:06:22 +00:00
Bill Zimmerman
167face986
Update issue_form.yml 2023-11-15 16:18:11 +01:00
billz
bc6ec3a9bf Implement --update switch + GitHub user/token auth 2023-11-14 08:49:21 +00:00
Bill Zimmerman
f0f8c4275f
Update README.md 2023-11-12 20:45:32 +01:00
Bill Zimmerman
b828c2641c
Update config.yml 2023-11-12 15:38:59 +01:00
Bill Zimmerman
b1c9bdb6c7
Delete .github/ISSUE_TEMPLATE/bug_report.md 2023-11-12 15:37:58 +01:00
Bill Zimmerman
20fbda85e3
Update config.yml 2023-11-12 15:37:19 +01:00
Bill Zimmerman
58077162a9
Create issue_form.yml 2023-11-12 15:36:20 +01:00
Bill Zimmerman
7aee28dacb
Create CODE_OF_CONDUCT.md 2023-11-12 14:44:02 +01:00
billz
7e85af6597 Update release version 2023-11-11 09:52:57 +00:00
billz
211d09e67b Update en_US locale + compile .mo 2023-11-11 08:45:10 +00:00
Bill Zimmerman
0b114ecab7
Merge pull request #1450 from RaspAP/feat/form-validation
Custom Bootstrap form validation for required fields
2023-11-11 09:39:57 +01:00
billz
86a8e0e41d Style fix for custom wireguard icon 2023-11-11 08:21:01 +00:00
billz
d874668ce1 Stylize sidebar status indicators 2023-11-10 21:50:04 +00:00
billz
774d7e90ef input-group>.btn style tweak 2023-11-10 17:31:15 +00:00
billz
e90f87ac63 Apply validation to authentication form + update locale 2023-11-10 14:44:06 +00:00
Bill Zimmerman
fc12951e88
Merge pull request #1452 from RaspAP/config/default-wlan1
Define/set default subnet for wlan1
2023-11-10 15:11:05 +01:00
Bill Zimmerman
7f7b688ab9
Merge pull request #1454 from RaspAP/fix/material-theme
Style tweaks for modal dialog
2023-11-10 12:21:01 +01:00
billz
ac339d16ef Apply validated overrides to material themes 2023-11-10 10:08:10 +00:00
billz
36e8eecbea Apply card-body bottom radius fix 2023-11-10 09:44:45 +00:00
billz
7479bcba0e Add DHCP config add/update/enabled messages 2023-11-10 09:31:03 +00:00
billz
a95b43e23e Handle interfaces with no default dhcp settings, update status messages 2023-11-10 09:29:49 +00:00
billz
9ba2719969 Style tweaks for modal dialog 2023-11-10 07:52:22 +00:00
billz
a3230d0684 Implement jQuery mask plugin w/ IP address inputs 2023-11-09 22:48:39 +00:00
billz
1d5ee03324 Initial commit 2023-11-09 22:47:16 +00:00
billz
ef084ef537 Define/set default subnet for wlan1 2023-11-09 18:32:34 +00:00
billz
458bde86b2 Add hostapd/dhcp form validation messages 2023-11-09 16:28:23 +00:00
billz
4f954f4d8f Add set dhcp/staticIP fields enabled/disabled 2023-11-09 16:26:51 +00:00
billz
0684c46b23 Fix: Add $wg boolean to ParseConfig() 2023-11-09 15:39:43 +00:00
billz
e86e52f471 Modify validateDHCPInput() return status object 2023-11-09 15:38:13 +00:00
billz
273f2ce22e Adjust was-validated form-control:valid/invalid bg-image 2023-11-09 15:35:21 +00:00
billz
b2117ac492 Bootstrap needs-validation novalidate + valid-feedback 2023-11-09 15:32:24 +00:00
Bill Zimmerman
645c336c97
Update supported OS's 2023-11-07 22:58:34 +01:00
billz
4f6a28a81f Update release version 2023-11-07 17:32:34 +00:00
billz
f6113c47ce Fix: remove systemctl disable raspapd.service 2023-11-07 14:38:32 +00:00
billz
6f454294df Constants for 5GHz channel min/max 2023-11-07 14:06:57 +00:00
billz
de38aa0f9e Fix: _install_log() 2023-11-07 14:06:43 +00:00
Bill Zimmerman
f9b1eab556
Added VPN provider support 2023-11-07 13:35:06 +01:00
Bill Zimmerman
a6959d4eca
Update screenshots 2023-11-07 12:56:34 +01:00
billz
068f81c8ee Compile locale/en_US messages.mo 2023-11-07 08:35:33 +00:00
Bill Zimmerman
fbec4501ed
Merge pull request #1443 from RaspAP/feat/iw-parser
Refactor ISO countries + create IW parsing class
2023-11-07 09:06:57 +01:00
billz
f131c8463d Update iwRegSet status message + en_US locale 2023-11-06 17:14:18 +00:00
billz
6383f9b88b Revert "Update iwRegSet status message, en_US locale + compile .mo"
This reverts commit 9343b11cc9.
2023-11-06 17:08:52 +00:00
Bill Zimmerman
b24c0ff862
Merge pull request #1442 from RaspAP/maint/script-updates
Updates to support latest Debian distros
2023-11-06 18:03:24 +01:00
Bill Zimmerman
03c819fee2
Merge pull request #1448 from RaspAP/security/net-dev
Escape arguments to shell functions
2023-11-06 17:56:14 +01:00
Bill Zimmerman
080e5140cf
Merge pull request #1446 from RaspAP/feat/contributing
Update about page with contributing tab
2023-11-06 17:48:59 +01:00
Bill Zimmerman
6731f3a784
Merge pull request #1449 from RaspAP/fix/dashboard-ifaces
Fix: dashboard interface stop/start button mismatch
2023-11-06 17:45:36 +01:00
billz
be1feb22e8 Fix: dashboard interface stop/start button mismatch 2023-11-06 15:05:30 +00:00
Bill Zimmerman
b31b1a7773
Update CONTRIBUTING.md 2023-11-06 13:42:48 +01:00
billz
5a6d76defd Replace reboot prompt in uninstall_complete 2023-11-06 12:38:06 +00:00
billz
78d587c5a1 Escape arguments to shell functions 2023-11-06 12:13:21 +00:00
billz
9343b11cc9 Update iwRegSet status message, en_US locale + compile .mo 2023-11-06 07:38:16 +00:00
billz
1ee31d9221 Define HOSTAPD_5GHZ_CHANNEL_MIN, set VHT center frequency segment value 2023-11-06 07:28:50 +00:00
Bill Zimmerman
59ad100b47
Merge pull request #1445 from samuelvermeulenpro/patch-1
Update README.md
2023-11-06 08:02:40 +01:00
billz
f20e4a879a Update about with contributing tab 2023-11-06 06:38:35 +00:00
billz
cbc8e2fdec Add about page msgs + compile .mo 2023-11-06 06:38:12 +00:00
billz
c39f19db15 Initial commit 2023-11-06 06:37:04 +00:00
Samuel Vermeulen
639592a706
Update README.md
Fix broken link for ssl documentation
2023-11-06 07:36:45 +01:00
billz
40dc86cc21 Sort isoquery output by country name 2023-11-06 06:25:07 +00:00
billz
0751fc7ba4 Amend allowed frequencies condition for < 5500 MHz 2023-11-05 20:28:58 +00:00
billz
2abe94b796 Filter channels for frequencies >5500 MHz per hostapd hw_features 2023-11-05 18:46:51 +00:00
billz
fee5a69342 Add iwRegSet() -> set reg domain for selected country 2023-11-05 16:52:09 +00:00
billz
df7fd21cc5 Delete wireless.json (obsolete) 2023-11-05 14:38:34 +00:00
billz
14f9482859 Remove hwModeDisabled from cbxhwmode, handled in loadChannelSelect() 2023-11-05 14:38:14 +00:00
billz
5e802e8a0b Remove valid RASPI_5GHZ_ISO_ALPHA2 country, set hwModeDisabled 2023-11-05 14:36:18 +00:00
billz
e16c69c446 Delete constants for 5GHz wireless reg domain (obsolete) 2023-11-05 14:33:51 +00:00
billz
25cc92b593 parseIwList -> parseIwInfo() + formatting 2023-11-05 14:29:44 +00:00
billz
7a612592c2 Fix btn-primary class selector 2023-11-05 13:46:32 +00:00
billz
648465f6c6 Refactor loadChannelSelect(), disambiguate ajax handler names 2023-11-05 13:44:45 +00:00
billz
1b155dbf58 Set onChange event to getChannel() + save button id 2023-11-05 13:41:04 +00:00
billz
55a8eb85eb Initial commit 2023-11-05 10:05:16 +00:00
billz
66f8cc0b75 Replace ISO 2-letter country code literals w/ isoquery (localized) 2023-11-04 19:09:55 +00:00
billz
be25ffd06f Update w/ latest distros, php versions, packages + reboot prompt 2023-11-03 12:33:27 +00:00
billz
51673aef32 Fix: move debuglog.sh install to _patch_system_files() 2023-11-03 12:15:28 +00:00
billz
48d29d368a Add _dhcpcd_info() to debug output 2023-11-03 08:49:18 +00:00
billz
99b3767fd6 Read/set wg_option flag 2023-11-03 08:48:48 +00:00
Bill Zimmerman
77eb23b0e8
Update CONTRIBUTING.md 2023-11-02 14:46:32 +01:00
Bill Zimmerman
c2d04a98a7
Update bug_report.md 2023-11-02 09:54:40 +01:00
Bill Zimmerman
0fbccabaf5
Update CONTRIBUTING.md 2023-11-02 09:48:13 +01:00
billz
5685a4f107 Update doc links 2023-11-02 08:05:55 +00:00
billz
e046a11f56 Update release version 2023-11-02 07:50:05 +00:00
Bill Zimmerman
21b588282f
Merge pull request #1437 from RaspAP/feat/debug-tools
Feature: Debug log generator
2023-11-02 08:24:12 +01:00
billz
3eb8e5ae3f Check for presence of commands, ini files and defaults.php 2023-11-01 20:33:15 +00:00
billz
c3d97182cb Update _initialize() w/ delete log condition, revise separator labels 2023-11-01 11:13:33 +00:00
billz
5e5eb7d04f Minor: label typo fix 2023-11-01 08:53:20 +00:00
billz
22cd0ae017 Add system/debuglog.sh to sudoers 2023-11-01 07:46:36 +00:00
billz
9663832f0d Add _usb_info, _wpa_info and -w --write option 2023-11-01 07:45:19 +00:00
billz
54e154c01a Add icons to system > generate debug + reset buttons 2023-11-01 07:33:36 +00:00
billz
5e46cd407c Add system tools > debug msgs to en_US locale + compile .mo 2023-10-31 22:28:33 +00:00
billz
86ac3e2ff6 Replace literal w/ RASPI_DEBUG_LOG 2023-10-31 22:18:23 +00:00
billz
98d5f5b64b Update modal icon fa-sync-alt fa-spin 2023-10-31 22:16:34 +00:00
billz
97a9cac5e8 Write debug log to tempDir, redirect + download w/ readfile() 2023-10-31 20:31:27 +00:00
billz
e99e98d8ca Omit debug logfile write to /tmp 2023-10-31 20:27:56 +00:00
billz
00792501fd Change system > reset tab to tools 2023-10-31 17:52:17 +00:00
billz
15632a60df Create system debug log dir, copy shell scripts to destination 2023-10-31 15:19:01 +00:00
billz
d619269df4 CSRF check, exec system/debuglog.sh 2023-10-31 15:17:13 +00:00
billz
362feae185 Echo logfile path + file for ajax handler 2023-10-31 15:16:05 +00:00
billz
11e17a8895 Rename tab, add debugModal dialog 2023-10-31 14:40:10 +00:00
billz
0176f71944 Initial commit 2023-10-31 14:38:45 +00:00
billz
2b543c605f Fix miscellaneous php warnings 2023-10-28 17:00:34 +01:00
billz
94174a3920 Update release version 2023-10-27 12:41:43 +01:00
Bill Zimmerman
ce001aeffa
Merge pull request #1432 from RaspAP/fix/parse-config
Fix: prevent duplicate array values in ParseConfig()
2023-10-27 13:39:07 +02:00
Bill Zimmerman
4f3e00fe56
Merge pull request #1416 from RaspAP/feat/vpn-providers
Custom VPN provider support
2023-10-27 13:38:54 +02:00
billz
516de1f080 Update installer output LONG_BIT 2023-10-27 11:36:44 +01:00
billz
5ec7d4908e Add descriptive text for connect provider, update en_US locale msgs 2023-10-27 11:22:18 +01:00
billz
f481b51c9d Update _download_latest_files() exit on clone failure 2023-10-27 09:26:19 +01:00
billz
6ba718985d Restore insiders navbar item 2023-10-27 08:31:41 +01:00
billz
574113bf28 Update exec mullvad connect w/ location set 2023-10-26 15:29:32 +01:00
billz
0136c32403 Add jq to _install_dependencies(), modify sudoers entry 2023-10-26 13:59:08 +01:00
billz
bc03b329ca Remove connect delay, strip ANSI sequences from connect output 2023-10-26 09:57:06 +01:00
billz
601f587cb0 Cleanup provider disconnect status msgs 2023-10-25 17:01:26 +01:00
billz
63f2c38f4c Update provider status regex, validate country select 2023-10-25 14:38:49 +01:00
billz
20e3633541 Set defaults, check if binary is executable 2023-10-25 14:08:38 +01:00
billz
3008f51450 Update template gettext msgs + locale 2023-10-25 14:08:38 +01:00
billz
c4947eacba Update w/ provider account_pages 2023-10-25 14:08:38 +01:00
billz
f254c01549 Add msgs to locale/en_US + compile .mo 2023-10-25 14:08:38 +01:00
billz
b93a12fcf4 Update release version 2023-10-25 14:08:38 +01:00
billz
a8f541c659 Update raspap.sudoers with vnstat 2023-10-25 14:08:38 +01:00
billz
65578d33eb Create vnstat db entry for AP interface 2023-10-25 14:08:38 +01:00
billz
45dc1142cb Reduce service restart speed + UI tweaks 2023-10-25 14:08:38 +01:00
billz
43d4bb2a2f More robust method to parse phy from selected interface 2023-10-25 14:08:38 +01:00
billz
ada6cbf4d3 Minor: remove whitespace + exit status 2023-10-25 14:08:38 +01:00
billz
1b3e1c3372 Install dhcpcd-base dependency + systemd unit control file 2023-10-25 14:08:38 +01:00
billz
a26a3b665e Detect unsupported Raspbian GNU/Linux 12 (bookworm) 32-bit 2023-10-25 14:08:38 +01:00
billz
dc65af9045 Read/set log-dhcp + log-queries in conf 2023-10-25 14:08:38 +01:00
billz
6cad8606c6 Fix: prevent duplicate array value in ParseConfig() 2023-10-25 08:56:19 +01:00
billz
fc75567b0d Update release version 2023-10-23 12:39:35 +01:00
Bill Zimmerman
d75908ce40
Merge pull request #1431 from RaspAP/fix/vnstat-ifaces
Fix: add AP interface to vnstat for monitoring
2023-10-23 13:33:04 +02:00
billz
23d48b902f Update raspap.sudoers with vnstat 2023-10-23 10:31:01 +01:00
billz
32a6110d3d Create vnstat db entry for AP interface 2023-10-23 10:30:22 +01:00
Bill Zimmerman
3fe3a8db1d
Merge pull request #1429 from RaspAP/feat/hostapd-restart
Reduce hostapd service restart speed + UI tweaks
2023-10-23 10:49:40 +02:00
Bill Zimmerman
e85e403169
Merge pull request #1428 from RaspAP/fix/dev-capabilities
Fix: More robust method to parse phy from selected interface
2023-10-23 10:48:32 +02:00
Bill Zimmerman
c3935103bb
Merge pull request #1423 from RaspAP/maint/installer-raspbian12
Install dhcpcd dependencies for GNU/Linux 12 (bookworm) 32-bit
2023-10-23 10:47:39 +02:00
Bill Zimmerman
9dcdd2ca7a
Merge pull request #1427 from RaspAP/fix/log-dhcp-checkboxes
Fix: log DHCP requests + DNS queries checkbox states
2023-10-23 10:46:41 +02:00
billz
ee662ada09 Update cmd_overrides + stripArtifacts regex 2023-10-21 19:12:44 +01:00
billz
3e404b0202 Reduce service restart speed + UI tweaks 2023-10-21 15:43:49 +01:00
billz
42ff260d63 More robust method to parse phy from selected interface 2023-10-21 11:02:57 +01:00
billz
4973d794a6 Read/set log-dhcp + log-queries in conf 2023-10-21 10:16:36 +01:00
billz
4cc88a881f Minor: remove whitespace + exit status 2023-10-21 08:59:13 +01:00
billz
a527221247 Install dhcpcd-base dependency + systemd unit control file 2023-10-21 08:53:09 +01:00
billz
1e6d94585a Parse mullvad relay list output, add getProviderVersion() 2023-10-20 16:43:59 +01:00
billz
8124f63fa3 Detect unsupported Raspbian GNU/Linux 12 (bookworm) 32-bit 2023-10-20 12:50:42 +02:00
billz
e51c6b0968 Minor: label change 2023-10-19 18:18:14 +02:00
billz
9a1457c6c8 Refactor getCountries w/ regexes, add getAccountInfo() 2023-10-19 14:07:26 +02:00
billz
99f8838fe2 Populate country select, get provider log, connect to country 2023-10-18 09:50:57 +02:00
billz
47f983a361 Minor: update template labels 2023-10-16 10:46:15 +02:00
billz
53f4645c2f Implement CLI overrides, get countries + status functions 2023-10-16 10:44:46 +02:00
billz
ac863f5c8a Status message when CLI binary not found, fetch provider countries, status, user account 2023-10-15 21:29:34 +02:00
billz
f535acc18c Country select list, account info, CLI version + status 2023-10-15 21:26:58 +02:00
billz
ab0568875d Set provider cmd_overrides, status codes 2023-10-15 21:17:16 +02:00
billz
a09ee1e86b Initial commit 2023-10-13 19:46:44 +02:00
billz
f7bdcb4e63 Add providers with known Linux CLIs 2023-10-13 08:47:35 +02:00
billz
72cac43c0f Added _install_provider() 2023-10-13 08:46:39 +02:00
billz
a2394c0742 Update UI, page actions + functions for basic provider support 2023-10-12 19:21:23 +02:00
billz
5123ab4599 Update w/ provider constants 2023-10-12 19:19:15 +02:00
billz
ac7b4ccb28 Add basic commands for Linux provider CLIs 2023-10-12 19:17:00 +02:00
billz
d3c9b00e89 Added _prompt_install_vpn_providers() 2023-10-12 17:43:54 +02:00
billz
7a1d6492b2 Initial commit 2023-10-12 17:42:31 +02:00
Bill Zimmerman
ca157b1789
Merge pull request #1415 from RaspAP/dependabot/npm_and_yarn/fsevents-1.2.13
Bump fsevents from 1.2.9 to 1.2.13
2023-10-11 07:47:52 +02:00
dependabot[bot]
bbc5013617
Bump fsevents from 1.2.9 to 1.2.13
Bumps [fsevents](https://github.com/fsevents/fsevents) from 1.2.9 to 1.2.13.
- [Release notes](https://github.com/fsevents/fsevents/releases)
- [Commits](https://github.com/fsevents/fsevents/compare/v1.2.9...v1.2.13)

---
updated-dependencies:
- dependency-name: fsevents
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-10 11:33:47 +00:00
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
1886 changed files with 65471 additions and 59697 deletions

View file

@ -1,59 +0,0 @@
---
name: Bug report
about: Create a report to help us improve RaspAP
title: ''
labels: ''
assignees: ''
---
<!-- These comments will NOT appear in your issue, so it's OK to ignore them -->
<!--
Thanks for reporting a bug for RaspAP.
Important: If you are NOT using a clean installation of a compatible OS, start with a fresh SD card, install RaspAP and replicate your bug BEFORE reporting an issue.
All submitters MUST read the issue policy and reporting guidelines:
https://docs.raspap.com/issues/
Refer to the frequently asked questions (FAQ) and official documentation:
https://docs.raspap.com/faq/
Do you have a question or want to suggest a new feature? Start a Discussion here:
https://github.com/RaspAP/raspap-webgui/discussions
Be sure there are no issues similar to yours that are already open. You can check this by searching the issues in this repository. If there is a duplicate issue, please close this one and add a comment to the existing issue instead.
-->
<!-- Provide a general summary of the issue in the Title above -->
## Checklist
<!-- IMPORTANT! Fill in the boxes that apply by marking them like so: [x] -->
- [ ] This is a bug report
- [ ] I observed this bug on a clean install of the OS
- [ ] I have followed the project prerequisites
- [ ] I have searched this repository for existing issues
- [ ] I checked the FAQ and official documentation before creating this issue
- [ ] I have read and understand the issue reporting guidelines
## Bug description
<!-- Provide a detailed description of the issue -->
## Your environment
1. Operating System: **ENTER HERE** <!-- RPi OS 32-bit Lite, Armbian, Debian, etc. -->
2. Hardware and version: <!-- RPi Zero/3B+/4, OrangePi 3, etc. -->
3. RaspAP version: <!-- reported by the Quick Installer or About page -->
4. Clean install of a compatible operating system? <!-- Yes/No -->
5. RaspAP Quick Install or Manual setup? <!-- Quick Install/Manual -->
6. Using default configuration? <!-- Yes/No -->
7. Simultaneous AP and managed mode? <!-- Yes/No -->
8. Onboard wireless chipset or external adapter? <!-- Onboard/External -->
9. Other software or services running with RaspAP?
## Steps to reproduce
<!-- Tell us how to reproduce this issue. Provide as much detailed information as possible -->
## Screenshots
<!-- If applicable, add screenshots to help explain your problem -->
## Additional context
<!-- Add any other context about the problem here -->

View file

@ -1 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: RaspAP Community Support
url: https://github.com/RaspAP/raspap-webgui/discussions
about: Please ask and answer questions here.

169
.github/ISSUE_TEMPLATE/issue_form.yml vendored Normal file
View file

@ -0,0 +1,169 @@
name: Bug Report
description: Create a report to help us improve RaspAP
title: "[Bug]: "
labels: ["bug-report", "triage"]
projects: ["RaspAP-webgui"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug for RaspAP.
**Important:** If you are NOT using a clean installation of a compatible OS, start with a fresh SD card, install RaspAP and replicate your bug BEFORE reporting an issue.
All submitters MUST read the [issue policy and reporting guidelines](https://docs.raspap.com/issues/). Bug reports that do not follow the issue policy will be marked as `invalid` and closed. Likewise, bug reports missing required fields will be marked `incomplete` and closed (no hard feelings).
In this event, we ask you to re-submit a complete bug report.
Be sure there are no issues similar to yours that are already open. You can check this by searching the issues in this repository.
If there is a duplicate issue, please comment on the existing issue instead.
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/RaspAP/raspap-webgui/blob/master/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct.
required: true
- type: checkboxes
id: policies
attributes:
label: Issue reporting checklist
options:
- label: I have read and understand the [issue reporting policy](https://docs.raspap.com/issues/).
required: true
- label: I observed this bug on a clean install of a [supported OS](https://docs.raspap.com/#compatible-operating-systems).
required: true
- label: I have followed the [project prerequisites](https://docs.raspap.com/quick_start/#quick-install).
required: true
- label: I have searched this repository for existing issues.
required: true
- label: I checked the [FAQ](https://docs.raspap.com/faq/) and [official documentation](https://docs.raspap.com/).
required: true
- label: I am using an [external wireless adapter](https://docs.raspap.com/issues/#external-hardware).
required: false
- label: I have generated a [RaspAP debug log](https://docs.raspap.com/troubleshooting/#debug-log) and performed a [self-diagnosis](https://docs.raspap.com/troubleshooting/#diagnosing-problems).
required: true
- type: dropdown
id: os
attributes:
label: Operating System
options:
- Raspberry Pi OS (64-bit) Lite Bookworm
- Raspberry Pi OS (32-bit) Lite Bookworm
- Raspberry Pi OS (64-bit) Desktop Bookwom
- Raspberry Pi OS (64-bit) Lite Bullseye
- Raspberry Pi OS (32-bit) Lite Bullseye
- Armbian 23.05 (Suni)
- Debian Bookworm
validations:
required: true
- type: dropdown
id: install
attributes:
label: Installation method
options:
- Pre-built image
- Quick install
- Manual setup
validations:
required: true
- type: dropdown
id: adapter
attributes:
label: Onboard wireless chipset or external adapter?
options:
- Onboard wireless chipset
- External adapter
validations:
required: true
- type: dropdown
id: hardware
attributes:
label: Hardware
options:
- Raspberry Pi 5
- Raspberry Pi 4 Model B
- Raspberry Pi 3 Model B+
- Raspberry Pi 3 Model A+
- Raspberry Pi 3 Model B
- Raspberry Pi Zero 2 W
- Raspberry Pi Zero W
- Raspberry Pi Compute Module
- Orange Pi family
- Other
validations:
required: true
- type: dropdown
id: version
attributes:
label: RaspAP version
options:
- Latest
- Other (specify below)
validations:
required: true
- type: dropdown
id: software
attributes:
label: Other software or services running with RaspAP?
options:
- Yes (specify below)
- No other software
- Not sure
validations:
required: true
- type: input
id: contact
attributes:
label: Contact details (optional)
description: How can we get in touch with you if we need more info?
placeholder: ex. email@example.com
validations:
required: false
- type: textarea
id: bug-description
attributes:
label: Bug description
description: Also tell us, what did you expect to happen?
placeholder: Provide a detailed description of the issue.
value:
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Tell us how to reproduce this issue.
placeholder: Provide as much detailed information as possible.
value:
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
placeholder: Upload your screenshot(s) here.
value:
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional context
description:
placeholder: Add any other context about the problem here.
value:
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: false

18
.github/stale.yml vendored
View file

@ -1,18 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- enhancement
- feature request
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

View file

@ -0,0 +1,23 @@
# This workflow was added by CodeSee. Learn more at https://codesee.io/
# This is v2.0 of this workflow file
on:
push:
branches:
- master
pull_request_target:
types: [opened, synchronize, reopened]
name: CodeSee
permissions: read-all
jobs:
codesee:
runs-on: ubuntu-latest
continue-on-error: true
name: Analyze the repo with CodeSee
steps:
- uses: Codesee-io/codesee-action@v2
with:
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
codesee-url: https://app.codesee.io

View file

@ -1,16 +0,0 @@
on:
issues:
types: [opened, edited]
jobs:
auto_close_issues:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Automatically close issues that don't follow the issue template
uses: lucasbento/auto-close-issues@v1.0.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template.\nPlease review this project's issue policy https://docs.raspap.com/issues" # optional property
closed-issues-label: "invalid" # optional property

80
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,80 @@
name: Build and publish RaspAP images
permissions:
contents: write
on:
release:
types: [published]
jobs:
build-raspap-image:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: "32-bit"
pi_gen_version: "master"
- arch: "64-bit"
pi_gen_version: "arm64"
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Add RaspAP Stage
run: |
mkdir -p stage-raspap/package-raspap &&
{
cat > stage-raspap/package-raspap/00-run-chroot.sh <<-EOF
#!/bin/bash
apt-get update -y && apt-get install -y curl dhcpcd5 iptables procps
curl -sL https://install.raspap.com | bash -s -- --yes --openvpn 1 --restapi 1 --adblock 1 --wireguard 1 --tcp-bbr 1 --check 0
# Set Wi-Fi country to prevent RF kill
raspi-config nonint do_wifi_country "US"
# Fetch RaspAP version and set MOTD
RASPAP_VERSION=\$(curl -sL https://install.raspap.com | bash -s -- --version)
echo "\$RASPAP_VERSION" | tee /etc/motd
EOF
} &&
chmod +x stage-raspap/package-raspap/00-run-chroot.sh &&
{
cat > stage-raspap/prerun.sh <<-EOF
#!/bin/bash -e
if [ ! -d "\${ROOTFS_DIR}" ]; then
copy_previous
fi
EOF
} &&
chmod +x stage-raspap/package-raspap/00-run-chroot.sh &&
{
cat > stage-raspap/prerun.sh <<-EOF
#!/bin/bash -e
if [ ! -d "\${ROOTFS_DIR}" ]; then
copy_previous
fi
EOF
} &&
chmod +x stage-raspap/prerun.sh
- name: Build RaspAP Image
id: build
uses: usimd/pi-gen-action@v1
with:
image-name: "raspap-bookworm-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}"
enable-ssh: 1
stage-list: stage0 stage1 stage2 ./stage-raspap
verbose-output: true
pi-gen-version: ${{ matrix.pi_gen_version }}
pi-gen-repository: RaspAP/pi-gen
- name: Upload Artifact
uses: svenstaro/upload-release-action@v2
with:
asset_name: "raspap-bookworm-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}.img.zip"
file: ${{ steps.build.outputs.image-path }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true

23
.github/workflows/stale.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8.0.0
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
exempt-issue-labels: pinned, enhancement, feature request
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}

3
.gitignore vendored
View file

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

4
.gitmodules vendored Normal file
View file

@ -0,0 +1,4 @@
[submodule "plugins"]
path = plugins
url = https://github.com/RaspAP/plugins
branch = master

View file

@ -1,4 +1,4 @@
<img width="465" alt="Insiders logo" src="https://user-images.githubusercontent.com/229399/115766971-e19e1900-a3a8-11eb-8c6f-379deb4313d2.png">
<img width="465" alt="Insiders logo" src="https://i.imgur.com/62TMUy5.png">
Development of RaspAP is made possible thanks to a sponsorware release model. This means that new features are first exclusively released to sponsors as part of **Insiders**. Read on to learn how sponsorship works, and how easy it is to get access to Insiders.
@ -15,15 +15,21 @@ You can become a sponsor using your individual or organization's GitHub account.
## 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.
✅ [Network device management](https://docs.raspap.com/net-devices/)
✅ [Firewall settings](https://docs.raspap.com/firewall/)
✅ [Network device management](https://docs.raspap.com/net-devices/)
✅ [Firewall settings](https://docs.raspap.com/firewall/)
✅ [WPA3-Personal AP security](https://docs.raspap.com/ap-basics/#wpa3-personal)
✅ [802.11w Protected Management Frames](https://docs.raspap.com/ap-basics/#80211w)
✅ [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)
✅ [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 support](https://docs.raspap.com/dynamicdns/)
✅ [Multiple WireGuard configs](https://docs.raspap.com/wireguard/#multiple-configs)
✅ [Wireless LAN routing](https://docs.raspap.com/wlanrouting/)
✅ [Custom user avatars](https://docs.raspap.com/authentication/#custom-user-avatars)
✅ [WiFi repeater mode](https://docs.raspap.com/ap-basics/#wifi-repeater-mode)
✅ [NTP Service](https://docs.raspap.com/ntp/)
✅ [Limited privilege user role](https://docs.raspap.com/authentication/#limited-privilege-user-role)
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.

64
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,64 @@
# RaspAP Code of Conduct
## Our Pledge
RaspAP is an open source community project devoted to building simple yet
powerful wireless router software for Debian-based devices. We as members, contributors,
and leaders pledge to make participation in our community an experience consisent with
the norms of civil behavior and respectful discourse.
To this end, we pledge to act and interact in ways that uphold the following standards.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Being excellent to one another (treat others as you wish to be treated)
* Giving and accepting constructive feedback
* Being respectful of differing opinions and viewpoints
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior are provided below. Quotes in parantheses
are portions of actual comments or issues that have been posted to this project:
* Unconstructive comments (this software "fails miserably")
* Complaining and/or emotional language ("I'm pulling my hair out!")
* Comments that are derogatory, trolling or are personal attacks ("what's wrong with you guys?")
* Public or private harassment of any kind
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
We have a zero tolerance policy for any and all of the above behavior.
## Enforcement Responsibilities
We reserve the right to remove, edit, or reject comments, issues, commits,
discussions and other contributions that are not consistent with this Code of Conduct.
We may ban, temporarily or permanently, any contributor for violating this code, as appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View file

@ -1,13 +1,22 @@
## How to contribute
Everyone is invited and welcome to contribute to RaspAP. There's a lot to do — if you're not a developer we can always use help with the official [project documentation](https://docs.raspap.com) and language [translations](https://crowdin.com/project/raspap). If you have experience in Linux networking, you can share your knowledge by answering questions from RaspAP users in our [GitHub discussions](https://github.com/RaspAP/raspap-webgui/discussions) and/or the [/r/RaspAP](https://reddit.com/r/RaspAP) subreddit.
1. Fork the project in your account and create a new branch: `your-great-feature`.
2. Open an issue in the repository describing the feature contribution you'd like to make. This will help us get you started on the right foot.
3. Commit changes in your feature branch.
4. Open a pull request and reference the initial issue in the pull request message.
If you're a devloper, the process of contributing code is straightforward:
1. Fork the project in your account and create a new branch: `feat/your-feature` or `fix/your-bugfix`.
2. Open [an issue](https://github.com/RaspAP/raspap-webgui/issues) describing the feature or bug fix contribution you'd like to make.
3. Commit changes in your branch.
4. Open a pull request and reference the initial issue in the pull request message, or by linking it in GitHub.
### Coding standards
This project follows the [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style guidelines. There are many ways to check your code for PSR-2. An excellent tool is [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer). The command line tool phpcs can be run against any single file. [Phing](https://www.phing.info/), a PHP build tool, integrates nicely with `phpcs` to automate PSR-2 checks across all source files in a project.
### Development process
Development processes used by contributors to the project are described [on this page](https://docs.raspap.com/developers/). It does not endorse one over the other; rather it is meant to share two different approaches.
### RaspAP community
RaspAP is made possible by a strong [community of developers](https://github.com/RaspAP/raspap-webgui/graphs/contributors). If you have any questions or would like to get involved in RaspAP, dive into any of these channels:
* [GitHub discussions](https://github.com/RaspAP/raspap-webgui/discussions)
* [Discord chat](https://discord.gg/KVAsaAR)
* [Twitter](https://twitter.com/rasp_ap)
* [Reddit](https://www.reddit.com/r/RaspAP/)
If you enjoy using RaspAP and would like to support our work financially, consider becoming an [Insider](https://github.com/sponsors/RaspAP).

117
README.md
View file

@ -1,60 +1,77 @@
![](https://i.imgur.com/xeKD93p.png)
[![Release 2.8.8](https://img.shields.io/badge/release-v2.8.8-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/)
![RaspAP Custom OS images](https://github.com/user-attachments/assets/e871adf1-123c-450b-94eb-80a185c242cc)
[![Release 3.3.2](https://img.shields.io/badge/release-v3.3.2-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=Insiders&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) [![Reddit](https://img.shields.io/badge/%2Fr%2FRaspAP-e05d44?style=flat&logo=Reddit&logoColor=white&labelColor=e05d44&color=b14835)](https://reddit.com/r/RaspAP) [![Discord](https://img.shields.io/discord/642436993451819018?color=7289DA&label=Discord&logo=discord&style=flat)](https://discord.gg/KVAsaAR)
RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our 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.
RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our [custom OS images](#pre-built-image), [Quick installer](#quick-installer) and [Docker container](#docker-support) create a known-good default configuration for all current Raspberry Pis with onboard wireless. A fully responsive, mobile-ready interface gives you control over the relevant services and networking options. Advanced DHCP settings, WireGuard and OpenVPN support, [SSL certificates](https://docs.raspap.com/ssl/), [ad blocking](#ad-blocking), security audits, [captive portal integration](https://docs.raspap.com/captive/), themes and [multilingual options](https://docs.raspap.com/translations/) are included.
RaspAP has been featured on sites such as [Instructables](http://www.instructables.com/id/Raspberry-Pi-As-Completely-Wireless-Router/), [Adafruit](https://blog.adafruit.com/2016/06/24/raspap-wifi-configuration-portal-piday-raspberrypi-raspberry_pi/), [Raspberry Pi Weekly](https://www.raspberrypi.org/weekly/commander/) and [Awesome Raspberry Pi](https://project-awesome.org/thibmaek/awesome-raspberry-pi) and implemented in countless projects.
RaspAP has been featured by [PC World](https://www.pcwelt.de/article/1789512/raspberry-pi-als-wlan-router.html), [Adafruit](https://blog.adafruit.com/2016/06/24/raspap-wifi-configuration-portal-piday-raspberrypi-raspberry_pi/), [Raspberry Pi Weekly](https://www.raspberrypi.org/weekly/commander/), and [Awesome Raspberry Pi](https://project-awesome.org/thibmaek/awesome-raspberry-pi) and implemented in [countless projects](https://github.com/RaspAP/raspap-awesome#projects).
We hope you enjoy using RaspAP as much as we do creating it. Tell us how you use this with [your own projects](https://github.com/raspap/raspap-awesome).
![](https://i.imgur.com/uhBFoOB.png)
![](https://i.imgur.com/EiIpdOS.gif)
![](https://i.imgur.com/eCjUS1H.gif)
![](https://i.imgur.com/5FT2BcS.gif)
![](https://i.imgur.com/RKaBFrZ.gif)
![dashboard](https://github.com/user-attachments/assets/f7cf5c32-4d95-4ac8-8a30-6d892d7ac6ed)
<img width="32.5%" alt="Wifi Client" src="https://github.com/user-attachments/assets/95696ddc-da84-4339-97cc-f2a173054664">
<img width="32.5%" alt="Hotspot" src="https://github.com/user-attachments/assets/c1c4de15-3ff2-4d3c-a7af-339c24896749">
<img width="32.5%" alt="Adblock" src="https://github.com/user-attachments/assets/ab925687-8407-4bec-a952-9dc6a2675f49">
<img width="32.5%" alt="About" src="https://github.com/user-attachments/assets/ba62d8bb-34f0-44ee-9fe8-504763a03726">
<img width="32.5%" alt="Wireguard" src="https://github.com/user-attachments/assets/4ba16118-8671-4654-9a36-92ac7bc8507f">
<img width="32.5%" alt="System" src="https://github.com/user-attachments/assets/f54e04fc-dc2c-4a21-903b-23641795822b">
## Contents
- [Prerequisites](#prerequisites)
- [Quick installer](#quick-installer)
- [Quick start](#quick-start)
- [Join Insiders](#join-insiders)
- [WireGuard support](#wireguard-support)
- [OpenVPN support](#openvpn-support)
- [VPN Provider support](#vpn-provider-support)
- [Ad Blocking](#ad-blocking)
- [Bridged AP](#bridged-ap)
- [Simultaneous AP and Wifi client](#simultaneous-ap-and-wifi-client)
- [Manual installation](#manual-installation)
- [802.11ac 5GHz support](#80211ac-5ghz-support)
- [Supported operating systems](#supported-operating-systems)
- [Multilingual support](#multilingual-support)
- [HTTPS support](#https-support)
- [Docker support](#docker-support)
- [Custom user plugins](#custom-user-plugins)
- [Multilingual support](#multilingual-support)
- [How to contribute](#how-to-contribute)
- [Reporting issues](#reporting-issues)
- [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.
## Quick start
RaspAP gives you two different ways to get up and running quickly. The simplest and recommended approach is to use a custom Raspberry Pi OS image with RaspAP preinstalled. This option eliminates guesswork and gives you a base upon which to build. Alternatively, you may execute the Quick installer on an existing [compatible OS](https://docs.raspap.com/#compatible-operating-systems).
### Pre-built image
Custom Raspberry Pi OS Lite images with the latest RaspAP are available for [direct download](https://github.com/RaspAP/raspap-webgui/releases/latest). This includes both 32- and 64-bit builds for ARM architectures.
| Operating system | Debian version | Kernel version | RaspAP version | Size |
| ---------------------| ---------------|-----------------|----------------|-------|
| Raspberry Pi OS (64-bit) Lite | 12 (bookworm) | 6.6 | Latest | 777 MB|
| Raspberry Pi OS (32-bit) Lite | 12 (bookworm) | 6.6 | Latest | 805 MB|
These images are automatically generated with each release of RaspAP. You may choose between an `arm64` or `armhf` (32-bit) based build. Refer to [this resource](https://www.raspberrypi.com/software/operating-systems/) to ensure compatibility with your hardware.
After downloading your desired image from the [latest release page](https://github.com/RaspAP/raspap-webgui/releases/latest), use a utility such as the Raspberry Pi Imager or [balenaEtcher](https://www.balena.io/etcher) to flash the OS image onto a microSD card. Insert the card into your device and boot it up. The latest RaspAP release version with the most popular optional components will be active and ready for you to configure.
### Quick installer
Alternatively, start with a clean install of a [latest release of Raspberry Pi OS](https://www.raspberrypi.org/software/operating-systems/). Both the 32- and 64-bit release versions are supported, as well as the latest 64-bit Desktop distribution.
Update RPi OS to its latest version, including the kernel and firmware, followed by a reboot:
1. Update Raspbian, including the kernel and firmware, followed by a reboot:
```
sudo apt-get update
sudo apt-get full-upgrade
sudo reboot
```
2. Set the "WLAN country" option in `raspi-config`'s **Localisation Options**: `sudo raspi-config`
Set the WiFi country in raspi-config's **Localisation Options**: `sudo raspi-config`.
3. If you have a device without an onboard wireless chipset, the [**Edimax Wireless 802.11b/g/n nano USB adapter**](https://www.edimax.com/edimax/merchandise/merchandise_detail/data/edimax/global/wireless_adapters_n150/ew-7811un) is an excellent option it's small, cheap and has good driver support.
With the prerequisites done, you can proceed with either the Quick installer or Manual installation steps below.
## Quick installer
Install RaspAP from your device's shell prompt:
```sh
curl -sL https://install.raspap.com | bash
```
The [installer](https://docs.raspap.com/quick/) will complete the steps in the manual installation (below) for you.
After the reboot at the end of the installation the wireless network will be
configured as an access point as follows:
The Quick installer will respond to several [command line arguments](https://docs.raspap.com/quick/), or switches, to customize your installation in a variety of ways, or install one of RaspAP's optional helper tools.
### Initial settings
After completing either of these setup options, the wireless AP network will be configured as follows:
* IP address: 10.3.141.1
* Username: admin
* Password: secret
@ -62,7 +79,7 @@ configured as an access point as follows:
* SSID: `raspi-webgui`
* Password: ChangeMe
**Note:** As the name suggests, the Quick Installer is a great way to quickly setup a new AP. However, it does not automagically detect the unique configuration of your system. Best results are obtained by connecting to ethernet (`eth0`) or as a WiFi client, also known as managed mode, with `wlan0`. For the latter, refer to [this FAQ](https://docs.raspap.com/faq/#headless). Special instructions for the Pi Zero W are [available here](https://docs.raspap.com/ap-sta/).
It's _strongly recommended_ that your first post-install action is to change the default admin [authentication](https://docs.raspap.com/authentication/) settings. Thereafter, your AP's [basic settings](https://docs.raspap.com/ap-basics/) and many [advanced options](https://docs.raspap.com/ap-basics#advanced-options) are now ready to be modified by RaspAP.
Please [read this](https://docs.raspap.com/issues/) before reporting an issue.
@ -93,6 +110,11 @@ To configure an OpenVPN client, upload a valid .ovpn file and, optionally, speci
See our [OpenVPN documentation](https://docs.raspap.com/openvpn/) for more information.
## VPN provider support
Several popular VPN providers include a Linux Command Line Interface (CLI) for interacting with their services. As a new beta feature, you may optionally control these VPN services from within RaspAP. After your provider's CLI is installed on your system you may administer it thereafter by using RaspAP's UI.
See our [VPN provider documentation](https://docs.raspap.com/providers/) for more information.
## Ad Blocking
This feature uses DNS blacklisting to block requests for ads, trackers and other undesirable hosts. To enable ad blocking, simply respond to the prompt during the installation. As a beta release, we encourage testing and feedback from users of RaspAP.
@ -106,36 +128,28 @@ By default RaspAP configures a routed AP for your clients to connect to. A bridg
More information on Bridged AP mode is provided [in our documentation](https://docs.raspap.com/bridged/).
## Simultaneous AP and Wifi client
RaspAP lets you create an AP with a Wifi client configuration, often called [AP-STA mode](https://docs.raspap.com/ap-sta/). With your system configured in managed mode, enable the AP from the **Advanced** tab of **Configure hotspot** by sliding the **Wifi client AP mode** toggle. Save settings and start the hotspot. The managed mode AP is functional without restart.
**Note:** This option is disabled until you configure your system as a wireless client. For a device operating in [managed mode](https://docs.raspap.com/faq/#headless) without an `eth0` connection, this configuration must be enabled [_before_ a reboot](https://docs.raspap.com/ap-sta/).
## Manual installation
Detailed manual setup instructions are provided [on our documentation site](https://docs.raspap.com/manual/).
## 802.11ac 5GHz support
RaspAP provides an 802.11ac wireless mode option for supported hardware (currently the RPi 3B+/4 and compatible Orange Pi models) and wireless regulatory domains. See [this FAQ](https://docs.raspap.com/faq/#80211ac) for more information.
RaspAP provides an 802.11ac wireless mode option for supported hardware (currently the RPi 3B+/4 and compatible Orange Pi models) and wireless regulatory domains. See [this](https://docs.raspap.com/ap-basics/#80211ac-5-ghz) for more information.
## Supported operating systems
RaspAP was originally made for Raspbian, but now also installs on the following Debian-based distros.
| Distribution | Release | Architecture | Support |
|---|:---:|:---:|:---:|
| Raspberry Pi OS | (32-bit) Lite Bullseye | ARM | Official |
| Raspberry Pi OS | (64-bit) Lite Bookworm | ARM | Official |
| Raspberry Pi OS | (32-bit) Lite Bookworm | ARM | Official |
| Raspberry Pi OS | (64-bit) Desktop Bookworm | ARM | Official |
| Raspberry Pi OS | (64-bit) Lite Bullseye | ARM | Official |
| Armbian | Bullseye | [ARM](https://docs.armbian.com/#supported-socs) | Official |
| Debian | Bullseye | ARM / x86_64 | Beta |
| Ubuntu | 18.04 LTS / 19.10 | ARM / x86_64 | Beta |
| Raspberry Pi OS | (32-bit) Lite Bullseye | ARM | Official |
| Armbian | 23.11 (Jammy) | [ARM](https://docs.armbian.com/#supported-socs) | Beta |
| Debian | Bookworm | ARM / x86_64 | Beta |
![](https://i.imgur.com/luiyYNw.png)
<img src="https://i.imgur.com/XiAJNKb.png" style="width:480px;" />
We find Armbian particularly well-suited for this project. Please note that "supported" is not a guarantee. If you are able to improve support for your preferred distro, we encourage you to [actively contribute](#how-to-contribute) to the project.
## Multilingual support
RaspAP uses [GNU Gettext](https://www.gnu.org/software/gettext/) to manage multilingual messages. In order to use RaspAP with one of our supported translations, you must configure a corresponding language package on your RPi. To list languages currently installed on your system, use `locale -a` at the shell prompt. To generate new locales, run `sudo dpkg-reconfigure locales` and select any other desired locales. Details are provided on our [documentation site](https://docs.raspap.com/translations/).
See this list of [supported languages](https://docs.raspap.com/translations/#supported-languages) that are actively maintained by volunteer translators. If your language is not supported, why not [contribute a translation](https://docs.raspap.com/translations/#contributing-to-a-translation)? Contributors will receive credit as the original translators.
You are also encouraged to use RaspAP's community-led [Docker container](#docker-support). Please note that "supported" is not a guarantee. If you are able to improve support for your preferred distro, we encourage you to [actively contribute](#how-to-contribute) to the project.
## HTTPS support
The Quick Installer may be used to [generate SSL certificates](https://docs.raspap.com/ssl-quick/) with `mkcert`. The installer automates the manual steps [described here](https://docs.raspap.com/ssl-manual/), including configuring lighttpd with SSL support.
@ -148,7 +162,22 @@ curl -sL https://install.raspap.com | bash -s -- --cert
**Note**: this only installs mkcert and generates an SSL certificate with the input you provide. It does *not* (re)install RaspAP.
More information on SSL certificates and HTTPS support is available [in our documentation](https://docs.raspap.com/ssl-quick/).
More information on SSL certificates and HTTPS support is available [in our documentation](https://docs.raspap.com/ssl/).
## Docker support
<img src="https://github.com/RaspAP/raspap-webgui/assets/229399/dc40dfc4-e9b8-405f-8ffb-6c5f88482b8e" width="450">
As an alternative to the [Quick installer](#quick-installer), RaspAP may be run in an isolated, portable [Docker container](https://docs.raspap.com/docker/).
See the [RaspAP-docker repo](https://github.com/RaspAP/raspap-docker/) for more information.
## Custom user plugins
RaspAP's integrated `PluginManager` provides a framework for developers to create custom plugins. To facilitate this, a `SamplePlugin` [repository](https://github.com/RaspAP/SamplePlugin) is available to get developers started on the right track. If you'd like to develop your own plugin for RaspAP, see the [documentation](https://docs.raspap.com/custom-plugins/) or get started right away by forking the [SamplePlugin](https://github.com/RaspAP/SamplePlugin).
## Multilingual support
RaspAP uses [GNU Gettext](https://www.gnu.org/software/gettext/) to manage multilingual messages. In order to use RaspAP with one of our supported translations, you must configure a corresponding language package on your RPi. To list languages currently installed on your system, use `locale -a` at the shell prompt. To generate new locales, run `sudo dpkg-reconfigure locales` and select any other desired locales. Details are provided on our [documentation site](https://docs.raspap.com/translations/).
See this list of [supported languages](https://docs.raspap.com/translations/#supported-languages) that are actively maintained by volunteer translators. If your language is not supported, why not [contribute a translation](https://docs.raspap.com/translations/#contributing-to-a-translation)? Contributors will receive credit as the original translators.
## How to contribute
1. Fork the project in your account and create a new branch: `your-great-feature`.

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

@ -1,24 +1,54 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.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

@ -1,15 +1,10 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.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)) {
// Use first interface if inet parameter not provided.
@ -19,8 +14,7 @@ if (empty($interface)) {
} else {
exit('No network interfaces found.');
}
}
}
define('IFNAMSIZ', 16);
if (strlen($interface) > IFNAMSIZ) {
exit('Interface name too long.');
@ -78,14 +72,12 @@ for ($i = count($jsonData) - 1; $i >= 0; --$i) {
$datareceived = round($jsonData[$i]['rx'] / $dsu_factor, 0);
if ($timeunits === 'm') {
echo '{ "date": "' , $dt->format('Y-m') , '", "rx": "' , $datareceived ,
echo '{ "date": "' , $dt->format('Y-m') , '", "rx": "' , $datareceived ,
'", "tx": "' , $datasend , '" }';
} else {
echo '{ "date": "' , $dt->format('Y-m-d') , '", "rx": "' , $datareceived ,
echo '{ "date": "' , $dt->format('Y-m-d') , '", "rx": "' , $datareceived ,
'", "tx": "' , $datasend , '" }';
}
}
echo ' ]';

View file

@ -1,6 +1,9 @@
<?php
require '../../includes/csrf.php';
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
if (filter_input(INPUT_GET, 'tu') == 'h') {

View file

@ -1,13 +1,20 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/functions.php';
if (isset($_POST['logfile'])) {
$logfile = escapeshellcmd($_POST['logfile']);
$logfile = escapeshellarg($_POST['logfile']);
$valid = '/(\/var\/log|\/tmp)/';
// truncate requested log file
exec("sudo truncate -s 0 $logfile", $return);
if (preg_match($valid, $logfile)) {
// truncate requested log file
exec("sudo truncate -s 0 $logfile", $return);
} else {
$return = 1;
}
echo json_encode($return);
}

View file

@ -0,0 +1,29 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/config.php';
require_once '../../includes/session.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/functions.php';
$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);

View file

@ -1,6 +1,9 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
exec("ls /sys/class/net | grep -v lo", $interfaces);
echo json_encode($interfaces);

View file

@ -1,7 +1,9 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
$arrConfig = array();
@ -15,3 +17,4 @@ foreach ($hostapdconfig as $hostapdconfigline) {
};
$channel = intval($arrConfig['channel']);
echo json_encode($channel);

View file

@ -0,0 +1,15 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
if (isset($_POST['interface'])) {
$iface = escapeshellcmd($_POST['interface']);
$parser = new \RaspAP\Parsers\IwParser($iface);
$supportedFrequencies = $parser->parseIwInfo($iface);
echo json_encode($supportedFrequencies);
}

View file

@ -1,8 +1,10 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/functions.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
if (isset($_POST['interface'])) {
$int = preg_replace('/[^a-z0-9]/', '', $_POST['interface']);

View file

@ -1,9 +1,12 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/functions.php';
$interface = $_GET['iface'];
$interface = $_POST['iface'];
if (isset($interface)) {
// fetch dnsmasq.conf settings for interface
@ -11,15 +14,19 @@ if (isset($interface)) {
$conf = ParseConfig($return);
$dhcpdata['DHCPEnabled'] = empty($conf) ? false : true;
$arrRange = explode(",", $conf['dhcp-range']);
$dhcpdata['RangeStart'] = $arrRange[0];
$dhcpdata['RangeEnd'] = $arrRange[1];
$dhcpdata['RangeMask'] = $arrRange[2];
$dhcpdata['leaseTime'] = $arrRange[3];
$dhcpHost = $conf["dhcp-host"];
if (is_string($conf['dhcp-range'])) {
$arrRange = explode(",", $conf['dhcp-range']);
} else {
$arrRange = explode(",", $conf['dhcp-range'][0]);
}
$dhcpdata['RangeStart'] = $arrRange[0] ?? null;
$dhcpdata['RangeEnd'] = $arrRange[1] ?? null;
$dhcpdata['RangeMask'] = $arrRange[2] ?? null;
$dhcpdata['leaseTime'] = $arrRange[3] ?? null;
$dhcpHost = $conf["dhcp-host"] ?? null;
$dhcpHost = empty($dhcpHost) ? [] : $dhcpHost;
$dhcpdata['dhcpHost'] = is_array($dhcpHost) ? $dhcpHost : [ $dhcpHost ];
$upstreamServers = is_array($conf['server']) ? $conf['server'] : [ $conf['server'] ];
$upstreamServers = is_array($conf['server'] ?? null) ? $conf['server'] : [ $conf['server'] ?? '' ];
$dhcpdata['upstreamServersEnabled'] = empty($conf['server']) ? false: true;
$dhcpdata['upstreamServers'] = array_filter($upstreamServers);
preg_match('/([0-9]*)([a-z])/i', $dhcpdata['leaseTime'], $arrRangeLeaseTime);
@ -29,10 +36,10 @@ if (isset($interface)) {
$arrDns = explode(",", $conf['dhcp-option']);
if ($arrDns[0] == '6') {
if (count($arrDns) > 1) {
$dhcpdata['DNS1'] = $arrDns[1];
$dhcpdata['DNS1'] = $arrDns[1] ?? null;
}
if (count($arrDns) > 2) {
$dhcpdata['DNS2'] = $arrDns[2];
$dhcpdata['DNS2'] = $arrDns[2] ?? null;
}
}
}
@ -46,13 +53,16 @@ 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);
$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]);
$dhcpdata['StaticRouters'] = $static_routers[1];
$dhcpdata['StaticDNS'] = $static_dns[1];
preg_match('/nohook\swpa_supplicant/', $matched[0], $nohook_wpa_supplicant);
$dhcpdata['Metric'] = $metric[1] ?? null;
$dhcpdata['StaticIP'] = isset($static_ip[1]) && strpos($static_ip[1], '/') !== false
? substr($static_ip[1], 0, strpos($static_ip[1], '/'))
: ($static_ip[1] ?? '');
$dhcpdata['SubnetMask'] = cidr2mask($static_ip[1] ?? '');
$dhcpdata['StaticRouters'] = $static_routers[1] ?? null;
$dhcpdata['StaticDNS'] = $static_dns[1] ?? null;
$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

@ -0,0 +1,49 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/locale.php';
if (isset($_POST['interface'])) {
define( 'NL80211_BAND_24GHZ', 0x1 );
define( 'NL80211_BAND_5GHZ', 0x2 );
if(!preg_match('/^[a-zA-Z0-9]+$/', $_POST['interface'])) {
exit('Invalid interface name.');
}
$iface = escapeshellcmd($_POST['interface']);
$flags = 0;
// get physical device for selected interface
exec("iw dev | awk -v iface=".$iface." '/^phy#/ { phy = $0 } $1 == \"Interface\" { interface = $2 } interface == iface { print phy }'", $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

@ -1,9 +1,10 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
// fetch wg client.conf
exec('sudo cat '. RASPI_WIREGUARD_PATH.'client.conf', $return);
echo implode(PHP_EOL,$return);

View file

@ -1,18 +1,20 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
$entity = $_POST['entity'];
$entity = escapeshellcmd($_POST['entity']);
if (isset($entity)) {
// generate public/private key pairs for entity
$pubkey = RASPI_WIREGUARD_PATH.$entity.'-public.key';
$privkey = RASPI_WIREGUARD_PATH.$entity.'-private.key';
$pubkey_tmp = '/tmp/'.$entity.'-public.key';
$privkey_tmp = '/tmp/'.$entity.'-private.key';
exec("sudo wg genkey | tee $privkey_tmp | wg pubkey > $pubkey_tmp", $return);
$wgdata['pubkey'] = str_replace("\n",'',file_get_contents($pubkey_tmp));
exec("sudo mv $privkey_tmp $privkey", $return);

View file

@ -1,93 +0,0 @@
<?php
/*
Save settings of network devices (type, name, PW, APN ...)
Called by js saveNetDeviceSettings (App/js/custom.js)
*/
require '../../includes/csrf.php';
require_once '../../includes/config.php';
require_once '../../includes/functions.php';
if (isset($_POST['interface'])) {
$int = $_POST['interface'];
$cfg = [];
$file = $RASPI_MOBILEDATA_CONFIG;
$cfgfile="/etc/wvdial.conf";
if ( $int == "mobiledata") {
$cfg['pin'] = $_POST["pin-mobile"];
$cfg['apn'] = $_POST["apn-mobile"];
$cfg['apn_user'] = $_POST["apn-user-mobile"];
$cfg['apn_pw'] = $_POST["apn-pw-mobile"];
$cfg['router_user'] = $cfg['apn_user'] ;
$cfg['router_pw'] = $cfg['apn_pw'] ;
if (file_exists($cfgfile)) {
if($cfg["pin"] !== "") exec('sudo /bin/sed -i "s/CPIN=\".*\"/CPIN=\"'.$cfg["pin"].'\"/gi" '.$cfgfile);
if($cfg["apn"] !== "") exec('sudo /bin/sed -i "s/\"IP\"\,\".*\"/\"IP\"\,\"'.$cfg["apn"].'\"/gi" '.$cfgfile);
if($cfg["apn_user"] !== "") exec('sudo /bin/sed -i "s/^username = .*$/Username = '.$cfg["apn_user"].'/gi" '.$cfgfile);
if($cfg["apn_pw"] !== "") exec('sudo /bin/sed -i "s/^password = .*$/Password = '.$cfg["apn_pw"].'/gi" '.$cfgfile);
}
if (write_php_ini($cfg, RASPI_MOBILEDATA_CONFIG)) {
$jsonData = ['return'=>0,'output'=>['Successfully saved mobile data settings']];
} else {
$jsonData = ['return'=>1,'output'=>['Error saving mobile data settings']];
}
} else if ( preg_match("/netdevices/",$int)) {
if(!isset($_POST['opts']) ) {
$jsonData = ['return'=>0,'output'=>['No valid data to add/delete udev rule ']];
echo json_encode($jsonData);
return;
} else {
$opts=explode(" ",$_POST['opts'] );
$dev=$opts[0];
$vid=$_POST["int-vid-".$dev];
$pid=$_POST["int-pid-".$dev];
$mac=$_POST["int-mac-".$dev];
$name=trim($_POST["int-name-".$dev]);
// limit device name to letters and numbers. Total length max 20
$name=preg_replace("/[^a-z0-9]/", "", strtolower($name));
$name=substr($name, 0, min(strlen($name),20));
$type=$_POST["int-type-".$dev];
$newtype=$_POST["int-new-type-".$dev];
$udevfile=$_SESSION["udevrules"]["udev_rules_file"]; // default file /etc/udev/rules.d/80-net-devices.rules";
// find the rule prototype and prefix
$rule = "";
foreach($_SESSION["udevrules"]["network_devices"] as $devt) {
if($devt["type"]==$newtype) {
$rulenew = $devt["udev_rule"];
$prefix = $devt["name_prefix"];
}
}
// check for an existing rule and delete lines with same MAC or same VID/PID
if (!empty($vid) && !empty($pid)) {
$rule = '^.*ATTRS{idVendor}==\"' . $vid . '\".*ATTRS{idProduct}==\"' . $pid . '\".*$';
exec('sudo sed -i "/'.$rule.'/Id" '.$udevfile); // clear all entries with this VID/PID
$rule = '^.*ATTRS{idProduct}==\"' . $pid . '\".*ATTRS{idVendor}==\"' . $vid . '\".*$';
exec('sudo sed -i "/'.$rule.'/Id" '.$udevfile); // clear all entries with this VID/PID
}
if (!empty($mac)) {
exec('sudo sed -i "/^.*'.$mac.'.*$/d" '.$udevfile); // clear all entries with same MAC
}
// create new entry
if ( ($type != $newtype) || !empty($name) ) { // new device type or new name
if (empty($name)) $name = $prefix."%n";
if (!empty($mac)) $rule = preg_replace("/\\\$MAC\\\$/i", $mac, $rulenew);
if (!empty($vid)) $rule = preg_replace("/\\\$IDVENDOR\\\$/i", $vid, $rule);
if (!empty($pid)) $rule = preg_replace("/\\\$IDPRODUCT\\\$/i", $pid, $rule);
if (!empty($name)) $rule = preg_replace("/\\\$DEVNAME\\\$/i",$name,$rule);
if (!empty($rule)) exec('echo \''.$rule.'\' | sudo /usr/bin/tee -a '.$udevfile);
}
$jsonData = ['return'=>0,'output'=>['Settings changed for device '.$dev. '<br>Changes will only be in effect after reconnecting the device' ] ];
}
} else {
$jsonData = ['return'=>1,'output'=>['Unknown network configuration']];
}
} else {
$jsonData = ['return'=>2,'output'=>'Unable to detect interface'];
}
echo json_encode($jsonData);

View file

@ -1,7 +1,9 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/defaults.php';
require_once '../../includes/functions.php';
require_once '../../includes/wifi_functions.php';
@ -14,7 +16,7 @@ knownWifiStations($networks);
nearbyWifiStations($networks, !isset($_REQUEST["refresh"]));
connectedWifiStations($networks);
sortNetworksByRSSI($networks);
foreach ($networks as $ssid => $network) $networks[$ssid]["ssidutf8"] = ssid2utf8( $ssid );
foreach ($networks as $ssid => $network) $networks[$ssid]["ssidutf8"] = ssid2utf8( $ssid );
$connected = array_filter($networks, function($n) { return $n['connected']; } );
$known = array_filter($networks, function($n) { return !$n['connected'] && $n['configured']; } );

View file

@ -1,7 +1,9 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/functions.php';
if (isset($_POST['cfg_id'])) {
@ -24,4 +26,3 @@ if (isset($_POST['cfg_id'])) {
echo json_encode($return);
}

View file

@ -1,7 +1,9 @@
<?php
require '../../includes/csrf.php';
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/functions.php';
if (isset($_POST['cfg_id'])) {
@ -11,4 +13,3 @@ if (isset($_POST['cfg_id'])) {
$jsonData = ['return'=>$return];
echo json_encode($jsonData);
}

View file

@ -0,0 +1,26 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
$pluginInstaller = \RaspAP\Plugins\PluginInstaller::getInstance();
$plugin_uri = $_POST['plugin_uri'] ?? null;
$plugin_version = $_POST['plugin_version'] ?? null;
$install_path = $_POST['install_path'] ?? null;
if (isset($plugin_uri, $plugin_version, $install_path)) {
try {
$return = $pluginInstaller->installPlugin($plugin_uri, $plugin_version, $install_path);
echo json_encode($return);
} catch (Exception $e) {
http_response_code(422); // unprocessable content
echo json_encode(['error' => $e->getMessage()]);
}
} else {
http_response_code(400); // Bad Request
echo json_encode(['error' => 'Plugin URI, version, and install path are required']);
exit;
}

View file

@ -0,0 +1,31 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
$lastActivity = $_SESSION['lastActivity'] ?? time();
$sessionLifetime = time() - $lastActivity;
$status = $sessionLifetime >= RASPI_SESSION_TIMEOUT ? 'session_expired' : 'active';
if ($status === 'session_expired') {
session_unset(); // unset all session variables
session_destroy(); // destroy the session
}
// send response
header('Content-Type: application/json');
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');
header('Pragma: no-cache');
$response = [
'status' => $status,
'last_activity' => $lastActivity,
'session_lifetime' => $sessionLifetime
];
echo json_encode($response);
exit();

View file

@ -0,0 +1,23 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.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);
}

View file

@ -0,0 +1,22 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
require_once '../../includes/defaults.php';
require_once '../../includes/functions.php';
$uri = RASPI_API_ENDPOINT;
preg_match('/(\d+(\.\d+)+)/', RASPI_VERSION, $matches);
$thisRelease = $matches[0];
$json = shell_exec("wget --timeout=5 --tries=1 $uri -qO -");
$data = json_decode($json, true);
$tagName = $data['tag_name'];
$updateAvailable = checkReleaseVersion($thisRelease, $tagName);
$response['tag'] = $tagName;
$response['update'] = $updateAvailable;
echo json_encode($response);

18
ajax/system/sys_debug.php Normal file
View file

@ -0,0 +1,18 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
$root = getenv("DOCUMENT_ROOT");
exec('sudo '.RASPI_CONFIG.'/system/debuglog.sh -i '.$root, $return);
$logOutput = implode(PHP_EOL, $return);
$tempDir = sys_get_temp_dir();
$filePath = $tempDir . DIRECTORY_SEPARATOR . RASPI_DEBUG_LOG;
$handle = fopen($filePath, "w");
fwrite($handle, $logOutput);
fclose($handle);
echo json_encode($filePath);

View file

@ -0,0 +1,23 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
$tempDir = sys_get_temp_dir();
$filePath = $tempDir . DIRECTORY_SEPARATOR . RASPI_DEBUG_LOG;
if (isset($filePath)) {
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($filePath));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: '.filesize($filePath));
readfile($filePath);
exit();
} else {
header('Location: '.'/system_info');
exit();
}

View file

@ -0,0 +1,23 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/CSRF.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
if (isset($_POST['csrf_token'])) {
if (csrfValidateRequest() && !CSRFValidate()) {
handleInvalidCSRFToken();
}
// set installer path + options
$path = getenv("DOCUMENT_ROOT");
$opts = " --update --yes --check 0 --path $path";
$installer = "sudo /etc/raspap/system/raspbian.sh";
$execUpdate = $installer.$opts;
$response = shell_exec($execUpdate);
echo json_encode($response);
} else {
handleInvalidCSRFToken();
}

View file

@ -0,0 +1,47 @@
<?php
require_once '../../includes/autoload.php';
require_once '../../includes/session.php';
require_once '../../includes/config.php';
require_once '../../includes/authenticate.php';
$logFile = '/tmp/raspap_install.log';
$searchStrings = [
'Configure update' => 1,
'Updating sources' => 2,
'Installing required packages' => 3,
'Cloning latest files' => 4,
'Installing application' => 5,
'Installation completed' => 6,
'error' => 7
];
usleep(500);
if (file_exists($logFile)) {
$handle = fopen($logFile, 'r');
if ($handle) {
while (($line = fgets($handle)) !== false) {
foreach ($searchStrings as $searchString => $value) {
if (strpos($line, $searchString) !== false) {
echo $value .PHP_EOL;
flush();
ob_flush();
if ($value === 6) {
fclose($handle);
exit();
} elseif ($value === 7) {
echo $line .PHP_EOL;
fclose($handle);
exit();
}
}
}
}
fclose($handle);
} else {
echo json_encode("Unable to open file: $logFile");
}
} else {
echo json_encode("File does not exist: $logFile");
}

24
api/auth.py Normal file
View file

@ -0,0 +1,24 @@
import os
from fastapi.security.api_key import APIKeyHeader
from fastapi import Security, HTTPException
from starlette.status import HTTP_403_FORBIDDEN
from dotenv import load_dotenv
load_dotenv()
apikey=os.getenv('RASPAP_API_KEY')
#if env not set, set the api key to "insecure"
if apikey == None:
apikey = "insecure"
print(apikey)
api_key_header = APIKeyHeader(name="access_token", auto_error=False)
async def get_api_key(api_key_header: str = Security(api_key_header)):
if api_key_header ==apikey:
return api_key_header
else:
raise HTTPException(
status_code=HTTP_403_FORBIDDEN, detail="403: Unauthorized"
)

156
api/main.py Normal file
View file

@ -0,0 +1,156 @@
from fastapi import FastAPI, Depends
from fastapi.security.api_key import APIKey
import auth
import json
import modules.system as system
import modules.ap as ap
import modules.client as client
import modules.dns as dns
import modules.dhcp as dhcp
import modules.ddns as ddns
import modules.firewall as firewall
import modules.networking as networking
import modules.openvpn as openvpn
import modules.wireguard as wireguard
tags_metadata = [
]
app = FastAPI(
title="API for RaspAP",
openapi_tags=tags_metadata,
version="0.0.1",
license_info={
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html",
}
)
@app.get("/system", tags=["system"])
async def get_system(api_key: APIKey = Depends(auth.get_api_key)):
return{
'hostname': system.hostname(),
'uptime': system.uptime(),
'systime': system.systime(),
'usedMemory': system.usedMemory(),
'processorCount': system.processorCount(),
'LoadAvg1Min': system.LoadAvg1Min(),
'systemLoadPercentage': system.systemLoadPercentage(),
'systemTemperature': system.systemTemperature(),
'hostapdStatus': system.hostapdStatus(),
'operatingSystem': system.operatingSystem(),
'kernelVersion': system.kernelVersion(),
'rpiRevision': system.rpiRevision()
}
@app.get("/ap", tags=["accesspoint/hotspot"])
async def get_ap(api_key: APIKey = Depends(auth.get_api_key)):
return{
'driver': ap.driver(),
'ctrl_interface': ap.ctrl_interface(),
'ctrl_interface_group': ap.ctrl_interface_group(),
'auth_algs': ap.auth_algs(),
'wpa_key_mgmt': ap.wpa_key_mgmt(),
'beacon_int': ap.beacon_int(),
'ssid': ap.ssid(),
'channel': ap.channel(),
'hw_mode': ap.hw_mode(),
'ieee80211n': ap.ieee80211n(),
'wpa_passphrase': ap.wpa_passphrase(),
'interface': ap.interface(),
'wpa': ap.wpa(),
'wpa_pairwise': ap.wpa_pairwise(),
'country_code': ap.country_code(),
'ignore_broadcast_ssid': ap.ignore_broadcast_ssid()
}
@app.get("/clients/{wireless_interface}", tags=["Clients"])
async def get_clients(wireless_interface, api_key: APIKey = Depends(auth.get_api_key)):
return{
'active_clients_amount': client.get_active_clients_amount(wireless_interface),
'active_clients': json.loads(client.get_active_clients(wireless_interface))
}
@app.get("/dhcp", tags=["DHCP"])
async def get_dhcp(api_key: APIKey = Depends(auth.get_api_key)):
return{
'range_start': dhcp.range_start(),
'range_end': dhcp.range_end(),
'range_subnet_mask': dhcp.range_subnet_mask(),
'range_lease_time': dhcp.range_lease_time(),
'range_gateway': dhcp.range_gateway(),
'range_nameservers': dhcp.range_nameservers()
}
@app.get("/dns/domains", tags=["DNS"])
async def get_domains(api_key: APIKey = Depends(auth.get_api_key)):
return{
'domains': json.loads(dns.adblockdomains())
}
@app.get("/dns/hostnames", tags=["DNS"])
async def get_hostnames(api_key: APIKey = Depends(auth.get_api_key)):
return{
'hostnames': json.loads(dns.adblockhostnames())
}
@app.get("/dns/upstream", tags=["DNS"])
async def get_upstream(api_key: APIKey = Depends(auth.get_api_key)):
return{
'upstream_nameserver': dns.upstream_nameserver()
}
@app.get("/dns/logs", tags=["DNS"])
async def get_dnsmasq_logs(api_key: APIKey = Depends(auth.get_api_key)):
return(dns.dnsmasq_logs())
@app.get("/ddns", tags=["DDNS"])
async def get_ddns(api_key: APIKey = Depends(auth.get_api_key)):
return{
'use': ddns.use(),
'method': ddns.method(),
'protocol': ddns.protocol(),
'server': ddns.server(),
'login': ddns.login(),
'password': ddns.password(),
'domain': ddns.domain()
}
@app.get("/firewall", tags=["Firewall"])
async def get_firewall(api_key: APIKey = Depends(auth.get_api_key)):
return json.loads(firewall.firewall_rules())
@app.get("/networking", tags=["Networking"])
async def get_networking(api_key: APIKey = Depends(auth.get_api_key)):
return{
'interfaces': json.loads(networking.interfaces()),
'throughput': json.loads(networking.throughput())
}
@app.get("/openvpn", tags=["OpenVPN"])
async def get_openvpn(api_key: APIKey = Depends(auth.get_api_key)):
return{
'client_configs': openvpn.client_configs(),
'client_config_names': openvpn.client_config_names(),
'client_config_active': openvpn.client_config_active(),
'client_login_names': openvpn.client_login_names(),
'client_login_active': openvpn.client_login_active()
}
@app.get("/openvpn/{config}", tags=["OpenVPN"])
async def client_config_list(config, api_key: APIKey = Depends(auth.get_api_key)):
return{
'client_config': openvpn.client_config_list(config)
}
@app.get("/wireguard", tags=["WireGuard"])
async def get_wireguard(api_key: APIKey = Depends(auth.get_api_key)):
return{
'client_configs': wireguard.configs(),
'client_config_names': wireguard.client_config_names(),
'client_config_active': wireguard.client_config_active()
}

64
api/modules/ap.py Normal file
View file

@ -0,0 +1,64 @@
import subprocess
import json
def driver():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep driver= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def ctrl_interface():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep ctrl_interface= | cut -d'=' -f2 | head -1", shell=True, capture_output=True, text=True).stdout.strip()
def ctrl_interface_group():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep ctrl_interface_group= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def auth_algs():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep auth_algs= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def wpa_key_mgmt():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep wpa_key_mgmt= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def beacon_int():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep beacon_int= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def ssid():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep ssid= | cut -d'=' -f2 | head -1", shell=True, capture_output=True, text=True).stdout.strip()
def channel():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep channel= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def hw_mode():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep hw_mode= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def ieee80211n():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep ieee80211n= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def wpa_passphrase():
return subprocess.run("sed -En 's/wpa_passphrase=(.*)/\1/p' /etc/hostapd/hostapd.conf", shell=True, capture_output=True, text=True).stdout.strip()
def interface():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep interface= | cut -d'=' -f2 | head -1", shell=True, capture_output=True, text=True).stdout.strip()
def wpa():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep wpa= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def wpa_pairwise():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep wpa_pairwise= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def country_code():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep country_code= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def ignore_broadcast_ssid():
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep ignore_broadcast_ssid= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def logging():
log_output = subprocess.run(f"cat /tmp/hostapd.log", shell=True, capture_output=True, text=True).stdout.strip()
logs = {}
for line in log_output.split('\n'):
parts = line.split(': ')
if len(parts) >= 2:
interface, message = parts[0], parts[1]
if interface not in logs:
logs[interface] = []
logs[interface].append(message)
return json.dumps(logs, indent=2)

38
api/modules/client.py Normal file
View file

@ -0,0 +1,38 @@
import subprocess
import json
def get_active_clients_amount(interface):
arp_output = subprocess.run(['arp', '-i', interface], capture_output=True, text=True)
mac_addresses = arp_output.stdout.splitlines()
if mac_addresses:
grep_pattern = '|'.join(mac_addresses)
output = subprocess.run(['grep', '-iwE', grep_pattern, '/var/lib/misc/dnsmasq.leases'], capture_output=True, text=True)
return len(output.stdout.splitlines())
else:
return 0
def get_active_clients(interface):
arp_output = subprocess.run(['arp', '-i', interface], capture_output=True, text=True)
arp_mac_addresses = set(line.split()[2] for line in arp_output.stdout.splitlines()[1:])
dnsmasq_output = subprocess.run(['cat', '/var/lib/misc/dnsmasq.leases'], capture_output=True, text=True)
active_clients = []
for line in dnsmasq_output.stdout.splitlines():
fields = line.split()
mac_address = fields[1]
if mac_address in arp_mac_addresses:
client_data = {
"timestamp": int(fields[0]),
"mac_address": fields[1],
"ip_address": fields[2],
"hostname": fields[3],
"client_id": fields[4],
}
active_clients.append(client_data)
json_output = json.dumps(active_clients, indent=2)
return json_output

24
api/modules/ddns.py Normal file
View file

@ -0,0 +1,24 @@
import subprocess
def use():
return subprocess.run("cat /etc/ddclient.conf | grep use= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def method():
#get the contents of the line below "use="
return subprocess.run("awk '/^use=/ {getline; print}' /etc/ddclient.conf | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def protocol():
return subprocess.run("cat /etc/ddclient.conf | grep protocol= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def server():
return subprocess.run("cat /etc/ddclient.conf | grep server= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def login():
return subprocess.run("cat /etc/ddclient.conf | grep login= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def password():
return subprocess.run("cat /etc/ddclient.conf | grep password= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def domain():
#get the contents of the line below "password="
return subprocess.run("awk '/^password=/ {getline; print}' /etc/ddclient.conf", shell=True, capture_output=True, text=True).stdout.strip()

30
api/modules/dhcp.py Normal file
View file

@ -0,0 +1,30 @@
import subprocess
import json
def range_start():
return subprocess.run("cat /etc/dnsmasq.d/090_wlan0.conf |grep dhcp-range= |cut -d'=' -f2| cut -d',' -f1", shell=True, capture_output=True, text=True).stdout.strip()
def range_end():
return subprocess.run("cat /etc/dnsmasq.d/090_wlan0.conf |grep dhcp-range= |cut -d'=' -f2| cut -d',' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def range_subnet_mask():
return subprocess.run("cat /etc/dnsmasq.d/090_wlan0.conf |grep dhcp-range= |cut -d'=' -f2| cut -d',' -f3", shell=True, capture_output=True, text=True).stdout.strip()
def range_lease_time():
return subprocess.run("cat /etc/dnsmasq.d/090_wlan0.conf |grep dhcp-range= |cut -d'=' -f2| cut -d',' -f4", shell=True, capture_output=True, text=True).stdout.strip()
def range_gateway():
return subprocess.run("cat /etc/dhcpcd.conf | grep routers | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
def range_nameservers():
output = subprocess.run("cat /etc/dhcpcd.conf", shell=True, capture_output=True, text=True).stdout.strip()
nameservers = []
lines = output.split('\n')
for line in lines:
if "static domain_name_server" in line:
servers = line.split('=')[1].strip().split()
nameservers.extend(servers)
return nameservers

38
api/modules/dns.py Normal file
View file

@ -0,0 +1,38 @@
import subprocess
import json
def adblockdomains():
output = subprocess.run("cat /etc/raspap/adblock/domains.txt", shell=True, capture_output=True, text=True).stdout.strip()
domains =output.split('\n')
domainlist=[]
for domain in domains:
if domain.startswith('#') or domain=="":
continue
domainlist.append(domain.split('=/')[1])
return domainlist
def adblockhostnames():
output = subprocess.run("cat /etc/raspap/adblock/hostnames.txt", shell=True, capture_output=True, text=True).stdout.strip()
hostnames = output.split('\n')
hostnamelist=[]
for hostname in hostnames:
if hostname.startswith('#') or hostname=="":
continue
hostnamelist.append(hostname.replace('0.0.0.0 ',''))
return hostnamelist
def upstream_nameserver():
return subprocess.run("awk '/nameserver/ {print $2}' /run/dnsmasq/resolv.conf", shell=True, capture_output=True, text=True).stdout.strip()
def dnsmasq_logs():
output = subprocess.run("cat /var/log/dnsmasq.log", shell=True, capture_output=True, text=True).stdout.strip()
log_entries = []
for line in output.split("\n"):
fields = line.split(" ")
log_dict = {
'timestamp': ' '.join(fields[:3]),
'process': fields[3][:-1], # Remove the trailing colon
'message': ' '.join(fields[4:]),
}
log_entries.append(log_dict)
return log_entries

4
api/modules/firewall.py Normal file
View file

@ -0,0 +1,4 @@
import subprocess
def firewall_rules():
return subprocess.run("cat /etc/raspap/networking/firewall/iptables_rules.json", shell=True, capture_output=True, text=True).stdout.strip()

68
api/modules/networking.py Normal file
View file

@ -0,0 +1,68 @@
import psutil
import json
def throughput():
interface_info = {}
# Get network interfaces
interfaces = psutil.net_if_stats()
for interface, stats in interfaces.items():
if interface.startswith("lo") or interface.startswith("docker"):
# Skip loopback and docker interface
continue
try:
# Get network traffic statistics
traffic_stats = psutil.net_io_counters(pernic=True)[interface]
rx_packets = traffic_stats[1]
rx_bytes = traffic_stats[0]
tx_packets = traffic_stats[3]
tx_bytes = traffic_stats[4]
interface_info[interface] = {
"RX_packets": rx_packets,
"RX_bytes": rx_bytes,
"TX_packets": tx_packets,
"TX_bytes": tx_bytes
}
except KeyError:
# Handle the case where network interface statistics are not available
pass
return json.dumps(interface_info, indent=2)
def interfaces():
interface_info = {}
# Get network interfaces
interfaces = psutil.net_if_addrs()
for interface, addrs in interfaces.items():
if interface.startswith("lo") or interface.startswith("docker"):
# Skip loopback and docker interface
continue
ip_address = None
netmask = None
mac_address = None
for addr in addrs:
if addr.family == 2: # AF_INET corresponds to the integer value 2
# IPv4 address
ip_address = addr.address
netmask = addr.netmask
# Get MAC address
for addr in psutil.net_if_addrs().get(interface, []):
if addr.family == psutil.AF_LINK:
mac_address = addr.address
interface_info[interface] = {
"IP_address": ip_address,
"Netmask": netmask,
"MAC_address": mac_address
}
return json.dumps(interface_info, indent=2)
#TODO: migrate to vnstat, to lose psutil dependency

41
api/modules/openvpn.py Normal file
View file

@ -0,0 +1,41 @@
import subprocess
def client_configs():
return subprocess.run("find /etc/openvpn/client/ -type f | wc -l", shell=True, capture_output=True, text=True).stdout.strip()
def client_config_names():
config_names_list = []
output = subprocess.run('''ls /etc/openvpn/client/ | grep -v "^client.conf$"''', shell=True, capture_output=True, text=True).stdout.strip()
lines = output.split("\n")
for client in lines:
if "_client" in client:
config_names_dict ={'config':client}
config_names_list.append(config_names_dict)
return config_names_list
def client_login_names():
config_names_list = []
output = subprocess.run('''ls /etc/openvpn/client/ | grep -v "^client.conf$"''', shell=True, capture_output=True, text=True).stdout.strip()
lines = output.split("\n")
for client in lines:
if "_login" in client:
config_names_dict ={'login':client}
config_names_list.append(config_names_dict)
return config_names_list
def client_config_active():
output = subprocess.run('''ls -al /etc/openvpn/client/ | grep "client.conf -"''', shell=True, capture_output=True, text=True).stdout.strip()
active_config = output.split("/etc/openvpn/client/")
return(active_config[1])
def client_login_active():
output = subprocess.run('''ls -al /etc/openvpn/client/ | grep "login.conf -"''', shell=True, capture_output=True, text=True).stdout.strip()
active_config = output.split("/etc/openvpn/client/")
return(active_config[1])
def client_config_list(client_config):
output = subprocess.run(["cat", f"/etc/openvpn/client/{client_config}"], capture_output=True, text=True).stdout.strip()
return output.split('\n')
#TODO: where is the logfile??
#TODO: is service connected?

86
api/modules/system.py Normal file
View file

@ -0,0 +1,86 @@
import subprocess
revisions = {
'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)',
'c03111': 'Model 4B Revision 1.1 (4 GB)',
'a03140': 'Compute Module 4 (1 GB)',
'b03140': 'Compute Module 4 (2 GB)',
'c03140': 'Compute Module 4 (4 GB)',
'd03140': 'Compute Module 4 (8 GB)',
'c04170': 'Pi 5 (4 GB)',
'd04170': 'Pi 5 (8 GB)'
}
def hostname():
return subprocess.run("hostname", shell=True, capture_output=True, text=True).stdout.strip()
def uptime():
return subprocess.run("uptime -p", shell=True, capture_output=True, text=True).stdout.strip()
def systime():
return subprocess.run("date", shell=True, capture_output=True, text=True).stdout.strip()
def usedMemory():
return round(float(subprocess.run("free -m | awk 'NR==2{total=$2 ; used=$3 } END { print used/total*100}'", shell=True, capture_output=True, text=True).stdout.strip()),2)
def processorCount():
return int(subprocess.run("nproc --all", shell=True, capture_output=True, text=True).stdout.strip())
def LoadAvg1Min():
return round(float(subprocess.run("awk '{print $1}' /proc/loadavg", shell=True, capture_output=True, text=True).stdout.strip()),2)
def systemLoadPercentage():
return round((float(LoadAvg1Min())*100)/float(processorCount()),2)
def systemTemperature():
try:
output = subprocess.run("cat /sys/class/thermal/thermal_zone0/temp", shell=True, capture_output=True, text=True).stdout.strip()
return round(float(output)/1000,2)
except ValueError:
return 0
def hostapdStatus():
return int(subprocess.run("pidof hostapd | wc -l", shell=True, capture_output=True, text=True).stdout.strip())
def operatingSystem():
return subprocess.run('''grep PRETTY_NAME /etc/os-release | cut -d= -f2- | sed 's/"//g' ''', shell=True, capture_output=True, text=True).stdout.strip()
def kernelVersion():
return subprocess.run("uname -r", shell=True, capture_output=True, text=True).stdout.strip()
def rpiRevision():
output = subprocess.run("grep Revision /proc/cpuinfo | awk '{print $3}'", shell=True, capture_output=True, text=True).stdout.strip()
try:
return revisions[output]
except KeyError:
return 'Unknown Device'

23
api/modules/wireguard.py Normal file
View file

@ -0,0 +1,23 @@
import subprocess
import re
def configs():
#ignore symlinks, because wg0.conf is in production the main config, but in insiders it is a symlink
return subprocess.run("find /etc/wireguard/ -type f | wc -l", shell=True, capture_output=True, text=True).stdout.strip()
def client_config_names():
config_names_list = []
output = subprocess.run('''ls /etc/wireguard/ | grep -v "^wg0.conf$"''', shell=True, capture_output=True, text=True).stdout.strip()
lines = output.split("\n")
for client in lines:
config_names_dict ={'config':client}
config_names_list.append(config_names_dict)
return config_names_list
def client_config_active():
output = subprocess.run('''ls -al /etc/wireguard/ | grep "wg0.conf -"''', shell=True, capture_output=True, text=True).stdout.strip()
active_config = output.split("/etc/wireguard/")
return(active_config[1])
#TODO: where is the logfile??
#TODO: is service connected?

5
api/requirements.txt Normal file
View file

@ -0,0 +1,5 @@
fastapi==0.109.1
uvicorn==0.25.0
psutil==5.9.8
python-dotenv==1.0.1

663
app/css/all.css Normal file
View file

@ -0,0 +1,663 @@
/*
Name: all.css
Author: @billz
Author URI: https://github.com/billz
Description: Classes shared by all themes
License: GNU General Public License v3.0
*/
:root {
--raspap-content-main: #495057;
--raspap-text-muted: #858796;
--raspap-text-light: #999999;
--raspap-brand-color: #2b8080;
--raspap-offwhite: #faf9f6;
}
a {
color: var(--raspap-brand-color);
text-decoration: none;
}
.sb-sidenav .sb-sidenav-menu .nav .nav-link {
padding-top: 0.6rem;
padding-bottom: 0.6rem;
}
.sb-sidenav-light .sb-sidenav-menu .nav-link, .card-title, h4 {
color: var(--raspap-content-main);
}
.sb-topnav.navbar-light #sidebarToggle {
color: var(--raspap-content-main);
}
.sidebar-brand-text {
text-transform: none;
font-size: 2.0rem;
font-weight: 500;
font-family: Helvetica, Arial, sans-serif;
}
th {
color: var(--raspap-content-main) !important;
}
.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: var(--raspap-text-muted);
}
.info-value {
font-size: 0.7rem;
margin-left: 0.7rem;
}
.info-item-xs {
font-size: 0.7rem;
margin-left: 0.75rem;
}
.sb-status {
margin-left: 0.75rem!important;
}
.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: #ffbf00 !important;
}
.service-status-down {
color: #f80107 !important;
}
@keyframes flash {
50% {
opacity: 0;
}
}
.logoutput {
width:100%;
height: 20rem;
border: 1px solid #d1d3e2;
border-radius: .35rem;
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace;
font-size: 0.8rem;
}
.dhcp-static-leases {
margin-top: 1em;
margin-bottom: 1em;
}
.dhcp-static-lease-row {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
#wifiClientContent #wpaConf {
min-height: calc(100vh / 3);
}
.loading-spinner::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: calc(100vh / 4);
display: flex;
justify-content: center;
align-items: center;
color: var(--raspap-text-muted);
content: "\f1ce"; /* Unicode for the circle-notch icon */
font-family: "Font Awesome 5 Free";
font-weight: 900; /* Adjust as needed */
font-size: 54px; /* Adjust icon size as needed */
animation: spin 1.2s linear infinite;
width: 100%;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@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: 509px!important;
}
.dbChart {
display: flex;
height: 80%;
}
.table {
margin-bottom: 0rem;
}
.check-hidden {
visibility: hidden;
}
.check-progress {
color: var(--raspap-text-light);
}
.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%;
}
.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: var(--raspap-text-muted);
}
button > i.fas {
pointer-events: none;
}
.close {
font-weight: 400;
font-size: 1.3rem;
}
.was-validated .form-control:valid,
.was-validated .form-control:invalid {
background-position: center right calc(.375em + .4875rem);
}
.was-validated .form-control:invalid {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}
.was-validated .form-control:valid {
background-size: calc(0.6em + 0.375rem) calc(0.6em + 0.375rem);
}
.input-group>.input-group-append:not(:last-child)>.btn {
border-top-right-radius: 0.35rem;
border-bottom-right-radius: 0.35rem;
}
.nav-user {
position: relative;
bottom: 11px;
right: 3px;
}
.nav-item {
font-size: 0.85rem;
}
/* Font Awesome 5 brands */
.fa-reddit {
color: #ff4500;
}
.fa-twitter {
color: #55acee
}
.fa-discord {
color: #7289da
}
.fa-github {
color: #151b23
}
@keyframes heart {
0%, 40%, 80%, 100% {
transform: scale(1);
}
20%, 60% {
transform: scale(1.15);
}
}
.heart {
color: #e63946;
animation: heart 1000ms infinite;
}
#modal-admin-login .modal-content {
background: radial-gradient(circle at 120% -20%, #032626, #052c2c, #073232, #0a3838, #0d3f3f, #114545, #144c4c);
align-items: center;
}
#modal-admin-login .modal-body {
min-width: 330px;
}
.login-brand {
color: var(--raspap-theme-color);
filter: brightness(150%);
}
.admin-login {
color: var(--raspap-offwhite);
font-size: 1.2em
}
.btn-admin-login {
color: var(--raspap-offwhite);
background-color: var(--raspap-theme-color);
}
.btn-admin-login:hover {
color: var(--raspap-offwhite);
background-color: #236969;
}
.no-right-radius {
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
.btn-passwd-append {
border: 1px solid #ced4da;
}
#passwd-toggle:active,
#passwd-toggle:hover,
#passwd-toggle:focus {
border: 1px solid #ced4da;
}
textarea.plugin-log {
width: 100%;
height: 150px;
resize: none;
border: 1px solid #dee2e6;
border-radius: 0.25rem;
padding: 0.5rem;
background-color: #f8f9fa;
font-family: monospace;
font-size: 0.9rem;
}
.card-wrapper {
margin: 1rem;
}
.dashboard-container {
display: flex;
position: relative;
width: 100%;
min-height: 400px;
padding: 2rem;
}
.connections-left,
.connections-right {
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.connection-item {
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
z-index: 5;
color: var(--raspap-text-light);
}
.connection-right {
align-items: center;
margin-left: 10rem;
}
.connections-left i {
height: 40px;
display: flex;
align-items: center;
justify-content: left;
}
.connections-left i:first-child {
margin-top: 0;
}
.connections-left i:last-child {
margin-bottom: 0;
margin-left: 0.5rem;
}
.center-device {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
position: relative;
z-index: 1;
}
.center-device-top {
margin-bottom: 30px;
}
.client-group {
display: flex;
align-items: center;
flex-direction: row-reverse;
gap: 0.5rem;
}
.client-count {
text-align: right;
}
.clients-status {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
padding-right: 1rem;
}
.dashed-lines,
.solid-lines {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: contain;
padding: 1rem;
left: 112px;
}
.dashed-lines-right,
.solid-lines-right {
left: -80px;
}
.solid-lines, .solid-lines-right {
z-index: 3;
}
.dashed-lines, .dashed-lines-right {
z-index 0;
}
.device-status {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
margin: 0.8rem 0;
}
.wifi-bands {
display: flex;
gap: 0.5rem;
}
.band {
padding: 0.25rem 1rem;
border: 2px solid var(--raspap-text-light);
border-radius: 4px;
background: transparent;
font-weight: 600;
color: var(--raspap-text-light);
}
.band.active {
border-color: var(--raspap-theme-color);
color: var(--raspap-theme-color);
}
.device-label {
font-size: 1.3rem;
text-align: center;
color: var(--raspap-theme-color);
margin-top: 1rem;
}
.status-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.3rem;
color: var(--raspap-text-light);
}
.bottom {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.3rem;
width: 100%;
}
.status-item .fa-stack {
width: 1.5em!important;
}
.connection-item>i {
color: var(--raspap-text-light);
}
.connection-item .fa-stack {
min-width: 2.5em;
}
.connections-left>.connection-item>span {
color: var(--raspap-text-light);
margin-right: 0.5rem;
}
.inactive {
color: var(--raspap-text-light)!important;
}
a.inactive:hover,
a.inactive:focus {
color: var(--raspap-text-light) !important;
}
@media (max-width: 1200px) {
.connection-item a > span:not(.fa-stack) {
display: none!important;
}
}
@media (max-width: 991px) {
.connections-right,
.connections-left {
display: none!important;
}
.dashboard-container {
width: auto;
padding: 0;
}
.device-status {
gap: 0.5rem;
}
.clients-mobile {
display: flex!important;
flex-direction: row!important;
}
}
.connection-item.active > span {
color: var(--raspap-theme-color)!important;
}
.connection-item.active > i {
color: var(--raspap-theme-color)!important;
}
.status-item.active > span {
color: var(--raspap-theme-color)!important;
}
.status-item.active > i {
color: var(--raspap-theme-color)!important;
}
.clients-mobile {
display: none;
flex-direction: column;
gap: 1rem;
margin-top: 2rem;
}
.client-type {
position: relative;
display: inline-flex;
align-items: center;
gap: 1rem;
}
.client-type i {
font-size: 1.5rem;
color: var(--raspap-theme-color);
width: 45px;
height: 45px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid var(--raspap-theme-color);
}
.client-type i.badge-icon {
font-size: 0.7rem;
background: var(--raspap-theme-color);
color: var(--raspap-offwhite);
width: 20px;
height: 20px;
border: none;
}
.client-count {
position: absolute;
top: -5px;
right: -5px;
background: var(--raspap-theme-color);
color: var(--raspap-offwhite);
border-radius: 50%;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
}
.device-illustration {
min-width: 220px;
max-width: 250px;
}

View file

@ -3,7 +3,6 @@
require_once '../../includes/functions.php';
$color = getColorOpt();
?>
/*
Theme Name: RaspAP default
Author: @billz
@ -12,54 +11,62 @@ Description: Default theme for RaspAP
License: GNU General Public License v3.0
*/
@import url('all.css');
:root {
--raspap-theme-color: <?php echo $color; ?>;
--raspap-theme-lighter: <?php echo lightenColor($color, 20); ?>;
--raspap-theme-darker: <?php echo darkenColor($color, 20); ?>;
}
body {
color: #212529;
background-color: #f8f9fc;
}
.h-underlined {
border-bottom: 1px solid #e3e6f0;
padding-bottom: 0.3rem;
a {
color: var(--raspap-theme-color);
text-decoration: none;
}
.page-header {
margin: 20px 0 20px;
a:focus, a:hover {
color: var(--raspap-theme-darker);
}
.navbar-logo {
margin-top: 0.5em;
margin-left: 0.5em;
.sb-sidenav-light .sb-sidenav-menu .nav-link:hover {
color: var(--raspap-theme-color);
}
/* 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:focus,
.sidebar-brand-text:hover {
color: var(--raspap-theme-darker);
}
.form-check-input:checked {
background-color: var(--raspap-theme-color);
border-color: var(--raspap-theme-color);
}
.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;
.sb-nav-link-icon.active {
font-weight: 600;
}
.sidebar .nav-item.active .nav-link {
font-weight: 500;
}
.sidebar-brand-text {
color: var(--raspap-theme-color);
}
.card .card-header, .modal-header {
border-color: <?php echo $color; ?>;
border-color: var(--raspap-theme-color);
color: #fff;
background-color: <?php echo $color; ?>;
background-color: var(--raspap-theme-color);
}
.modal-header {
@ -67,19 +74,25 @@ body {
}
.btn-primary {
color: <?php echo $color; ?>;
border-color: <?php echo $color; ?>;
color: var(--raspap-theme-color);
border-color: var(--raspap-theme-color);
background-color: #fff;
}
.btn-primary:disabled {
color: var(--raspap-theme-color) !important;
border-color: var(--raspap-theme-color) !important;
background-color: #fff !important;
}
.card-body {
color: #495057;
}
.card-footer, .modal-footer {
background-color: #f2f1f0;
}
.nav-item {
font-size: 0.85rem;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link {
font-size: 1.0rem;
@ -97,10 +110,6 @@ a.nav-link.active {
padding: 0.6rem 0.6rem 0.6rem 1.0rem;
}
.alert-success {
background-color: #d4edda;
}
.btn-primary {
background-color: #fff;
}
@ -110,8 +119,8 @@ a.nav-link.active {
}
.btn-primary:hover {
background-color: <?php echo $color; ?>;
border-color: <?php echo $color; ?>;
background-color: var(--raspap-theme-color);
border-color: var(--raspap-theme-color);
}
i.fa.fa-bars {
@ -122,87 +131,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 +148,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: var(--raspap-theme-color);
}

83
app/css/dark.css Normal file
View file

@ -0,0 +1,83 @@
/*
Theme Name: Lights Out
Author: @billz
Author URI: https://github.com/billz
Description: A Bootstrap dark mode theme for RaspAP
License: GNU General Public License v3.0
*/
@import url('custom.php');
html[data-bs-theme="dark"] {
background-color: var(--bs-dark);
color: var(--bs-light);
}
html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] footer,
html[data-bs-theme="dark"] .sb-sidenav,
html[data-bs-theme="dark"] .sb-topnav,
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .card-footer {
background-color: var(--bs-dark);
}
html[data-bs-theme="dark"] .card-body,
html[data-bs-theme="dark"] .card-footer,
html[data-bs-theme="dark"] .info-item-xs,
html[data-bs-theme="dark"] .table>:not(caption)>*>* {
color: var(--bs-secondary);
}
html[data-bs-theme="dark"] .sb-topnav.navbar {
background-color: var(--bs-dark) !important;
color: var(--bs-light);
}
html[data-bs-theme="dark"] .sb-topnav.navbar,
html[data-bs-theme="dark"] .sb-topnav.navbar a {
color: var(--raspap-theme-color) !important;
}
html[data-bs-theme="dark"] .sb-topnav.navbar a:hover,
html[data-bs-theme="dark"] .sb-topnav.navbar a:focus {
color: var(--raspap-theme-darker) !important;
}
html[data-bs-theme="dark"] .sb-topnav.navbar {
--bs-navbar-bg: var(--bs-dark);
}
html[data-bs-theme="dark"] .sb-topnav.navbar.navbar-light {
color: var(--bs-light);
}
html[data-bs-theme="dark"] .card {
border-color: var(--bs-secondary);
color: var(--bs-light);
}
html[data-bs-theme="dark"] .card-footer {
border-color: var(--bs-secondary);
}
html[data-bs-theme="dark"] .nav-tabs {
--bs-nav-tabs-link-active-color: var(--bs-light);
--bs-nav-tabs-link-active-bg: var(--bs-dark);
--bs-nav-tabs-link-active-border-color: var(--bs-secondary) var(--bs-secondary) var(--bs-dark);
--bs-nav-tabs-border-color: var(--bs-secondary);
--bs-nav-tabs-link-hover-border-color: var(--bs-secondary);
}
html[data-bs-theme="dark"] .btn {
color: var(--bs-gray-800);
opacity: 75%;
}
html[data-bs-theme="dark"] select,
html[data-bs-theme="dark"] .form-control {
background-color: var(--bs-dark);
border-color: var(--bs-secondary);
color: var(--bs-light);
}

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,12 @@ h5.card-title {
color: #212529;
}
.h-underlined {
border-bottom: 1px solid #e3e6f0;
padding-bottom: 0.3rem;
.sb-sidenav-menu, footer {
background-color: var(--bs-body-bg);
}
.card, .modal-dialog {
border-radius: 1px;
border-radius: 5px;
border-color: #ff6600;
}
@ -71,14 +72,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;
}
@ -86,46 +79,37 @@ h5.card-title {
ul.nav-tabs, .nav-tabs .nav-link {
background-color: #f6f6ef;
border-bottom: 1px solid #dddfeb;
color: #495057;
font-size: 1.0rem;
}
.form-switch .form-check-input:checked {
background-color: #ff6600;
border-color: #828282;
}
code {
font-size: 0.875em;
color: var(--bs-code-color);
word-wrap: break-word;
}
.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;
border-radius: 5px;
}
th {
color: #495057 !important;
}
.card-footer {
background-color: #eee;
}
@ -152,60 +136,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 +151,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 +168,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

@ -1,486 +0,0 @@
/*
Theme Name: Lights Out
Author: @billz
Author URI: https://github.com/billz
Description: A dark mode theme for RaspAP
License: GNU General Public License v3.0
*/
html * {
font-family: Helvetica,Arial,sans-serif;
color: #afafaf;
}
h2 {
font-size: 2rem !important;
}
h4 {
font-size: 1.3rem;
}
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%);
}
.sidebar-light .nav-item.active .nav-link i {
color: #d2d2d2;
}
.sidebar .nav-item.active .nav-link {
font-weight: 400;
}
#wrapper #content-wrapper #content {
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;
}
.nav-tabs {
border-bottom: 1px solid #404040;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link {
font-size: 1.0rem;
}
.nav-tabs .nav-link:hover {
border-color: transparent;
}
.navbar-default .navbar-brand:hover {
color: #d2d2d2;
}
.navbar-default .navbar-toggle {
border-color: #d2d2d2;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #d2d2d2;
}
.navbar-default .navbar-toggle:focus,
.navbar-default .navbar-toggle:hover {
background-color: #202020;
}
#content, .navbar, .sidebar, .footer, .sticky-footer {
background-image: url('/app/img/bg.png');
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: #d2d2d2;
background-color: #141414;
border-color: #404040 #404040 #141414;
}
a:focus, a:hover {
color: #d2d2d2;
}
.card>.card-header, .modal-content, .modal-header {
border-color: #404040;
background-color: #202020;
color: #afafaf;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
font-size: 1.0rem;
font-weight: 400;
}
.modal-body {
background-color: #141414;
}
.card>.card-header .fa {
color: #202020;
}
.card-header [class^="fa"] {
color: #afafaf;
font-size: 1.0rem;
}
.col {
color: #afafaf;
}
.card, .card-body {
border-color: #343434;
border-radius: 3px;
background-color: #141414;
}
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;
}
.ra-raspap:before {
color: #ac1b3d !important;
}
.sidebar-light #sidebarToggle {
background-color: #202020;
border: 1px solid #afafaf !important
}
.sidebar-light #sidebarToggle::after {
color: #afafaf;
}
.sidebar-light .nav-item .nav-link:hover i {
color: #d2d2d2;
}
.sidebar-light #sidebarToggle:hover {
background-color: #202020;
}
.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: #202020;
border-top: 0px;
}
.modal-footer {
border-radius: 0.3rem;
}
.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: #202020;
}
.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 #404040;
padding-top: 0.5rem;
}
.sidebar .nav-item .nav-link span {
font-size: 1.0rem;
}
.topbar .topbar-divider {
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;
}
span.label.label-warning {
color: #202020;
}
.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: #202020;
border-top: .01rem solid #202020;
}
.table>thead>tr>th {
vertical-align: bottom;
border-bottom: .01rem solid #d2d2d2;
}
[class*="btn"], [class*="btn"]:focus, [class*="btn"]:disabled {
background-color: #202020;
border-color: #404040;
border-radius: 3px;
color: #d2d2d2;
}
[class*="btn"]:hover {
border-radius: 3px;
color: #d2d2d2;
background-color: #202020;
border-color: #afafaf;
}
[class*="btn"]:hover .disabled {
background-color:red;
}
[class*="alert"] {
border-radius: .35rem;
color: #d2d2d2;
background-color: #202020;
border: 1px solid #404040;
}
.close {
font-size: 1.2em;
font-weight: 400;
text-shadow: none;
color: #d2d2d2;
}
.form-control,
.form-control:focus,
.custom-select {
color: #d2d2d2;
background-color: #202020;
border: 1px solid #404040;
border-radius: 3px;
}
.form-control:disabled,
.form-control[readonly] {
background-color: #202020;
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; }
input[type="text"]{
color: #d2d2d2 !important
}
.progress {
background-color: #202020;
border-radius: 0px;
}
.progress-bar {
color: #202020;
}
.progress-bar.progress-bar-info.progress-bar-striped.active {
background-color: #d2d2d2;
}
.logoutput {
width: 100%;
height: 300px;
background-color: #202020;
border-color: #404040;
}
tspan, rect {
fill: #d2d2d2;
}
.text-muted {
font-size: 0.8rem;
}
.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;
}
}
pre {
background-color: #202020;
border: #202020;
}
.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;
}
}
.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;
}

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

54
app/img/dashed.svg Normal file
View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 227 596" style="enable-background:new 0 0 227 596;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#999999;stroke-width:3;}
.st1{fill:none;stroke:#999999;stroke-width:3;stroke-dasharray:6.0204,3.0102;}
.st2{fill:none;stroke:#999999;stroke-width:3;stroke-dasharray:5.7963,2.8981;}
</style>
<g id="dashed">
<g id="Line_1">
<g>
<line class="st0" x1="112.8" y1="0" x2="112.8" y2="3"/>
<line class="st1" x1="112.8" y1="6" x2="112.8" y2="591.5"/>
<line class="st0" x1="112.8" y1="593" x2="112.8" y2="596"/>
</g>
</g>
<g id="Line_2">
<g>
<line class="st0" x1="113.2" y1="0.8" x2="110.2" y2="0.8"/>
<line class="st2" x1="107.3" y1="0.8" x2="4.4" y2="0.8"/>
<line class="st0" x1="3" y1="0.8" x2="0" y2="0.8"/>
</g>
</g>
<g id="Line_3">
<g>
<line class="st0" x1="113.2" y1="198.9" x2="110.2" y2="198.9"/>
<line class="st2" x1="107.3" y1="198.9" x2="4.4" y2="198.9"/>
<line class="st0" x1="3" y1="198.9" x2="0" y2="198.9"/>
</g>
</g>
<g id="Line_4">
<g>
<line class="st0" x1="113.2" y1="397.1" x2="110.2" y2="397.1"/>
<line class="st2" x1="107.3" y1="397.1" x2="4.4" y2="397.1"/>
<line class="st0" x1="3" y1="397.1" x2="0" y2="397.1"/>
</g>
</g>
<g id="Line_5">
<g>
<line class="st0" x1="113.2" y1="595.2" x2="110.2" y2="595.2"/>
<line class="st2" x1="107.3" y1="595.2" x2="4.4" y2="595.2"/>
<line class="st0" x1="3" y1="595.2" x2="0" y2="595.2"/>
</g>
</g>
<g id="Line_6">
<g>
<line class="st0" x1="226.2" y1="297.8" x2="223.2" y2="297.8"/>
<line class="st2" x1="220.3" y1="297.8" x2="117.4" y2="297.8"/>
<line class="st0" x1="116" y1="297.8" x2="113" y2="297.8"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

1083
app/img/devices/compute.php Normal file

File diff suppressed because it is too large Load diff

4450
app/img/devices/default.php Normal file

File diff suppressed because it is too large Load diff

1561
app/img/devices/zero.php Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

0
app/img/raspAP-logo.php Normal file → Executable file
View file

40
app/img/right-dashed.svg Normal file
View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 314 594" style="enable-background:new 0 0 314 594;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#999999;stroke-width:3;}
.st1{fill:none;stroke:#999999;stroke-width:3;stroke-dasharray:6.04,3.02;}
.st2{fill:none;stroke:#999999;stroke-width:3;stroke-dasharray:5.7963,2.8981;}
</style>
<g id="dashed">
<g id="horizontal">
<g>
<line class="st0" x1="113.2" y1="144" x2="113.2" y2="147"/>
<line class="st1" x1="113.2" y1="150" x2="113.3" y2="447.5"/>
<line class="st0" x1="113.3" y1="449" x2="113.3" y2="452"/>
</g>
</g>
<g id="top">
<g>
<line class="st0" x1="114" y1="144.8" x2="117" y2="144.8"/>
<line class="st2" x1="119.9" y1="144.8" x2="222.8" y2="144.8"/>
<line class="st0" x1="224.2" y1="144.8" x2="227.2" y2="144.8"/>
</g>
</g>
<g id="out">
<g>
<line class="st0" x1="0" y1="297.8" x2="3" y2="297.8"/>
<line class="st2" x1="5.9" y1="297.8" x2="108.8" y2="297.8"/>
<line class="st0" x1="110.2" y1="297.8" x2="113.2" y2="297.8"/>
</g>
</g>
<g id="bottom">
<g>
<line class="st0" x1="113" y1="450.8" x2="116" y2="450.8"/>
<line class="st2" x1="118.9" y1="450.8" x2="221.8" y2="450.8"/>
<line class="st0" x1="223.2" y1="450.8" x2="226.2" y2="450.8"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

46
app/img/right-solid.php Normal file
View file

@ -0,0 +1,46 @@
<?php
header("Content-Type: image/svg+xml");
$showDevice1 = isset($_GET['device-1']);
$showOut = isset($_GET['out']);
$showDevice2 = isset($_GET['device-2']);
?>
<svg width="313" height="594" viewBox="0 0 313 594" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame 1">
<g id="right connection frame">
<g id="solid">
<?php if ($showDevice2): ?>
<line id="joint-device-2" y1="-0.75" x2="154" y2="-0.75"
transform="matrix(4.37114e-08 1 1 -4.37114e-08 114 297)"
stroke="#008281" stroke-width="4"/>
<?php endif; ?>
<?php if ($showDevice1): ?>
<line id="joint-device-1" style="display: inline;"
y1="-0.75" x2="154" y2="-0.75"
transform="matrix(4.37114e-08 1 1 -4.37114e-08 114 144)"
stroke="#008281" stroke-width="4"/>
<line id="device-1" style="display: inline;"
y1="-0.75" x2="113.231" y2="-0.75"
transform="matrix(1 8.74228e-08 8.74228e-08 -1 114 144)"
stroke="#008281" stroke-width="4"/>
<?php endif; ?>
<?php if ($showOut): ?>
<line id="out" style="display: inline;"
y1="-0.75" x2="113.231" y2="-0.75"
transform="matrix(1 8.74228e-08 8.74228e-08 -1 -0.000305176 297)"
stroke="#008281" stroke-width="4"/>
<?php endif; ?>
<?php if ($showDevice2): ?>
<line id="device-2" style="display: inline;"
y1="-0.75" x2="113.231" y2="-0.75"
transform="matrix(1 8.74228e-08 8.74228e-08 -1 113 450)"
stroke="#008281" stroke-width="4"/>
<?php endif; ?>
</g>
</g>
</g>
</svg>

65
app/img/solid.php Normal file
View file

@ -0,0 +1,65 @@
<?php
header("Content-Type: image/svg+xml");
require_once '../../includes/functions.php';
$color = getColorOpt();
$showJoint = isset($_GET['joint']);
$showDevice1 = isset($_GET['device-1']);
$showOut = isset($_GET['out']);
$showDevice2 = isset($_GET['device-2']);
$showDevice3 = isset($_GET['device-3']);
$showDevice4 = isset($_GET['device-4']);
?>
<svg xmlns="http://www.w3.org/2000/svg" width="227" height="596" viewBox="0 0 227 596" fill="none">
<?php
// Device positions array (y-coordinates)
$devicePositions = [
'device-1' => 0.75,
'out' => 297.75,
'device-2' => 198.75,
'device-3' => 397.058,
'device-4' => 595.211
];
// Calculate joint line segments
if ($showJoint) {
$activeDevices = array_filter([$showDevice1, $showDevice2, $showDevice3, $showDevice4]);
$activeYs = [];
foreach ($devicePositions as $device => $y) {
if (isset($_GET[$device])) {
$activeYs[] = $y;
}
}
// Add top/bottom if first/last device is connected
if ($showDevice1) array_unshift($activeYs, 0);
if ($showDevice4) $activeYs[] = 596;
// Draw segments between consecutive points
for ($i = 1; $i < count($activeYs); $i++) {
$y1 = $activeYs[$i-1];
$y2 = $activeYs[$i];
echo "<line x1='112.75' y1='$y1' x2='112.75' y2='$y2' stroke='$color' stroke-width='4'/>";
}
}
?>
<?php if ($showDevice1): ?>
<line x1="113.231" y1="0.75" x2="7.69496e-06" y2="0.75001" stroke="<?php echo $color; ?>" stroke-width="6" id="device-1"/>
<?php endif; ?>
<?php if ($showOut): ?>
<line x1="226.231" y1="297.75" x2="113" y2="297.75" stroke="<?php echo $color; ?>" stroke-width="4" id="out"/>
<?php endif; ?>
<?php if ($showDevice2): ?>
<line x1="113.231" y1="198.75" x2="7.69496e-06" y2="198.75" stroke="<?php echo $color; ?>" stroke-width="4" id="device-2"/>
<?php endif; ?>
<?php if ($showDevice3): ?>
<line x1="113.231" y1="397.058" x2="7.69496e-06" y2="397.058" stroke="<?php echo $color; ?>" stroke-width="4" id="device-3"/>
<?php endif; ?>
<?php if ($showDevice4): ?>
<line x1="113.231" y1="595.211" x2="7.69496e-06" y2="595.211" stroke="<?php echo $color; ?>" stroke-width="4" id="device-4"/>
<?php endif; ?>
</svg>

29
app/img/uri-qr-code.php Executable file
View file

@ -0,0 +1,29 @@
<?php
if (!isset($_GET['uri']) || !filter_var($_GET['uri'], FILTER_VALIDATE_URL)) {
header("HTTP/1.1 400 Bad Request");
exit("Invalid or missing URI parameter");
}
$uri = $_GET['uri'];
$command = "qrencode -t svg -m 0 -o - " . escapeshellarg($uri);
$svg = shell_exec($command);
if ($svg === null) {
error_log("QR generation failed for URI: $uri");
header("HTTP/1.1 500 Internal Server Error");
exit("Failed to generate QR code");
}
$etag = hash('sha256', $uri);
$content_length = strlen($svg);
$last_modified = gmdate("D, d M Y H:i:s") . " GMT";
header("Content-Type: image/svg+xml");
header("Content-Length: $content_length");
header("Last-Modified: $last_modified");
header("ETag: \"$etag\"");
header("X-QR-Code-Content: " . htmlspecialchars($uri, ENT_QUOTES, 'UTF-8'));
echo $svg;

3
app/img/wg-qr-code.php Normal file → Executable file
View file

@ -13,6 +13,7 @@ if (!isset($_SERVER['HTTP_REFERER'])) {
exec("sudo cat " .RASPI_WIREGUARD_PATH.'client.conf', $return);
$peer_conf = implode(PHP_EOL,$return);
$peer_conf.= PHP_EOL;
$peer_conf_sanitized = str_replace(["\r", "\n"], '', $peer_conf);
$command = "qrencode -t svg -m 0 -o - " . mb_escapeshellarg($peer_conf);
$svg = shell_exec($command);
$etag = hash('sha256', $peer_conf);
@ -23,6 +24,6 @@ header("Content-Type: image/svg+xml");
header("Content-Length: $content_length");
header("Last-Modified: $last_modified");
header("ETag: \"$etag\"");
header("X-QR-Code-Content: $peer_conf");
header("X-QR-Code-Content: $peer_conf_sanitized");
echo shell_exec($command);

8
app/img/wifi-qr-code.php Normal file → Executable file
View file

@ -12,12 +12,12 @@ if (!isset($_SERVER['HTTP_REFERER'])) {
$hostapd = parse_ini_file(RASPI_HOSTAPD_CONFIG, false, INI_SCANNER_RAW);
// assume wpa encryption and get the passphrase
// assume WPA encryption and get the passphrase
$type = "WPA";
$password = isset($hostapd['wpa_psk']) ? $hostapd['wpa_psk'] : $hostapd['wpa_passphrase'];
// use wep if configured
$wep_default_key = intval($hostapd['wep_default_key']);
// use WEP if configured
$wep_default_key = intval($hostapd['wep_default_key'] ?? 0);
$wep_key = 'wep_key' . $wep_default_key;
if (array_key_exists($wep_key, $hostapd)) {
$type = "WEP";
@ -30,7 +30,7 @@ if (empty($password)) {
}
$ssid = $hostapd['ssid'];
$hidden = intval($hostapd['ignore_broadcast_ssid']) != 0 ? "H:true" : "";
$hidden = intval($hostapd['ignore_broadcast_ssid'] ?? 0) !== 0 ? "H:true" : "";
$ssid = qr_encode($ssid);
$password = qr_encode($password);

View file

@ -3,7 +3,7 @@ function msgShow(retcode,msg) {
} else if(retcode == 2 || retcode == 1) {
var alertType = 'danger';
}
var htmlMsg = '<div class="alert alert-'+alertType+' alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+msg+'</div>';
var htmlMsg = '<div class="alert alert-'+alertType+' alert-dismissible" role="alert"><button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>'+msg+'</div>';
return htmlMsg;
}
@ -18,13 +18,13 @@ 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) {
$('#'+strInterface+'-summary').append('<div class="alert alert-danger alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+jsonData['output'].join('<br />')+'</div>');
$('#'+strInterface+'-summary').append('<div class="alert alert-danger alert-dismissible" role="alert"><button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>'+jsonData['output'].join('<br />')+'</div>');
}
});
}
@ -39,7 +39,7 @@ function getAllInterfaces() {
}
function setupTabs() {
$('a[data-toggle="tab"]').on('shown.bs.tab',function(e){
$('a[data-bs-toggle="tab"]').on('shown.bs.tab',function(e){
var target = $(e.target).attr('href');
if(!target.match('summary')) {
var int = target.replace("#","");
@ -122,22 +122,29 @@ $(document).on("click", "#gen_wpa_passphrase", function(e) {
$('#txtwpapassphrase').val(genPassword(63));
});
$(document).on("click", "#gen_apikey", function(e) {
$('#txtapikey').val(genPassword(32).toLowerCase());
});
$(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("");
});
@ -146,7 +153,7 @@ $(document).on("click", "#js-clearopenvpn-log", function(e) {
// Enable Bootstrap tooltips
$(function () {
$('[data-toggle="tooltip"]').tooltip()
$('[data-bs-toggle="tooltip"]').tooltip()
})
function genPassword(pwdLen) {
@ -182,7 +189,8 @@ function contentLoaded() {
setupBtns();
break;
case "hostapd_conf":
loadChannel();
getChannel();
setHardwareModeTooltip();
break;
case "dhcpd_conf":
loadInterfaceDHCPSelect();
@ -208,7 +216,8 @@ Option toggles are set dynamically depending on the loaded configuration
*/
function loadInterfaceDHCPSelect() {
var strInterface = $('#cbxdhcpiface').val();
$.get('ajax/networking/get_netcfg.php?iface='+strInterface,function(data){
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/networking/get_netcfg.php', {'iface' : strInterface, 'csrf_token': csrfToken}, function(data){
jsonData = JSON.parse(data);
$('#dhcp-iface')[0].checked = jsonData.DHCPEnabled;
$('#txtipaddress').val(jsonData.StaticIP);
@ -216,6 +225,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);
@ -227,18 +242,17 @@ function loadInterfaceDHCPSelect() {
$('#txtmetric').val(jsonData.Metric);
if (jsonData.StaticIP !== null && jsonData.StaticIP !== '' && !jsonData.FallbackEnabled) {
$('#chkstatic').closest('.btn').button('toggle');
$('#chkstatic').closest('.btn').button('toggle').blur();
$('#chkstatic').blur();
$('#chkstatic').prop('checked', true).closest('.btn').addClass('active');
$('#chkdhcp').prop('checked', false).closest('.btn').removeClass('active');
$('#chkfallback').prop('disabled', true);
$('#dhcp-iface').removeAttr('disabled');
} else {
$('#chkdhcp').closest('.btn').button('toggle');
$('#chkdhcp').closest('.btn').button('toggle').blur();
$('#chkdhcp').blur();
$('#chkfallback').prop('disabled', false);
$('#chkdhcp').closest('.btn').addClass('active');
$('#chkdhcp').closest('.btn').button.blur();
}
if (jsonData.FallbackEnabled || $('#chkdhcp').is(':checked')) {
$('#dhcp-iface').prop('disabled', true);
setDhcpFieldsDisabled();
}
});
}
@ -249,30 +263,126 @@ function setDHCPToggles(state) {
}
if ($('#dhcp-iface').is(':checked') && !state) {
$('#dhcp-iface').prop('checked', state);
setDhcpFieldsDisabled();
}
$('#chkfallback').prop('disabled', state);
$('#dhcp-iface').prop('disabled', !state);
//$('#dhcp-iface').prop('checked', state);
}
function loadChannel() {
$.get('ajax/networking/get_channel.php',function(data){
jsonData = JSON.parse(data);
loadChannelSelect(jsonData);
$('#chkfallback').change(function() {
if ($('#chkfallback').is(':checked')) {
setStaticFieldsEnabled();
} else {
setStaticFieldsDisabled();
}
});
$('#debugModal').on('shown.bs.modal', function (e) {
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/system/sys_debug.php',{'csrf_token': csrfToken},function(data){
window.location.replace('/ajax/system/sys_get_logfile.php');
$('#debugModal').modal('hide');
});
});
$('#chkupdateModal').on('shown.bs.modal', function (e) {
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/system/sys_chk_update.php',{'csrf_token': csrfToken},function(data){
var response = JSON.parse(data);
var tag = response.tag;
var update = response.update;
var msg;
var msgUpdate = $('#msgUpdate').data('message');
var msgLatest = $('#msgLatest').data('message');
var msgInstall = $('#msgInstall').data('message');
var msgDismiss = $('#js-check-dismiss').data('message');
var faCheck = '<i class="fas fa-check ms-2"></i><br />';
$("#updateSync").removeClass("fa-spin");
if (update === true) {
msg = msgUpdate +' '+tag;
$("#msg-check-update").html(msg);
$("#msg-check-update").append(faCheck);
$("#msg-check-update").append("<p>"+msgInstall+"</p>");
$("#js-sys-check-update").removeClass("collapse");
} else {
msg = msgLatest;
dismiss = $("#js-check-dismiss");
$("#msg-check-update").html(msg);
$("#msg-check-update").append(faCheck);
$("#js-sys-check-update").remove();
dismiss.text(msgDismiss);
dismiss.removeClass("btn-outline-secondary");
dismiss.addClass("btn-primary");
}
});
});
$('#performUpdate').on('submit', function(event) {
event.preventDefault();
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/system/sys_perform_update.php',{
'csrf_token': csrfToken
})
$('#chkupdateModal').modal('hide');
$('#performupdateModal').modal('show');
});
$('#performupdateModal').on('shown.bs.modal', function (e) {
fetchUpdateResponse();
});
function fetchUpdateResponse() {
const complete = 6;
const error = 7;
let phpFile = 'ajax/system/sys_read_logfile.php';
$.ajax({
url: phpFile,
type: 'GET',
success: function(response) {
for (let i = 1; i <= 6; i++) {
let divId = '#updateStep' + i;
if (response.includes(i.toString())) {
$(divId).removeClass('invisible');
}
}
// check if the update is complete or if there's an error
if (response.includes(complete)) {
var successMsg = $('#successMsg').data('message');
$('#updateMsg').after('<span class="small">' + successMsg + '</span>');
$('#updateMsg').addClass('fa-check');
$('#updateMsg').removeClass('invisible');
$('#updateStep6').removeClass('invisible');
$('#updateSync2').removeClass("fa-spin");
$('#updateOk').removeAttr('disabled');
} else if (response.includes(error)) {
var errorMsg = $('#errorMsg').data('message');
$('#updateMsg').after('<span class="small">' + errorMsg + '</span>');
$('#updateMsg').addClass('fa-times');
$('#updateMsg').removeClass('invisible');
$('#updateSync2').removeClass("fa-spin");
$('#updateOk').removeAttr('disabled');
} else {
setTimeout(fetchUpdateResponse, 500);
}
},
error: function(xhr, status, error) {
console.error("AJAX Error:", error);
}
});
}
$('#hostapdModal').on('shown.bs.modal', function (e) {
var seconds = 9;
var seconds = 3;
var pct = 0;
var countDown = setInterval(function(){
if(seconds <= 0){
clearInterval(countDown);
}
var pct = Math.floor(100-(seconds*100/9));
document.getElementsByClassName('progress-bar').item(0).setAttribute('style','width:'+Number(pct)+'%');
seconds --;
}, 1000);
pct = Math.floor(100-(seconds*100/4));
}, 500);
});
$('#configureClientModal').on('shown.bs.modal', function (e) {
@ -280,7 +390,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 +408,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,8 +433,196 @@ $('#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 ms-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);
});
});
$('#install-user-plugin').on('shown.bs.modal', function (e) {
var button = $(e.relatedTarget);
$(this).data('button', button);
var manifestData = button.data('plugin-manifest');
var installed = button.data('plugin-installed') || false;
var repoPublic = button.data('repo-public') || false;
var installPath = manifestData.install_path;
if (!installed && repoPublic && installPath === 'plugins-available') {
insidersHTML = 'Available with <i class="fas fa-heart heart me-1"></i><a href="https://docs.raspap.com/insiders" target="_blank" rel="noopener">Insiders</a>';
$('#plugin-additional').html(insidersHTML);
} else {
$('#plugin-additional').empty();
}
if (manifestData) {
$('#plugin-docs').html(manifestData.plugin_docs
? `<a href="${manifestData.plugin_docs}" target="_blank">${manifestData.plugin_docs}</a>`
: 'Unknown');
$('#plugin-icon').attr('class', `${manifestData.icon || 'fas fa-plug'} link-secondary h5 me-2`);
$('#plugin-name').text(manifestData.name || 'Unknown');
$('#plugin-version').text(manifestData.version || 'Unknown');
$('#plugin-description').text(manifestData.description || 'No description provided');
$('#plugin-author').html(manifestData.author
? manifestData.author + (manifestData.author_uri
? ` (<a href="${manifestData.author_uri}" target="_blank">profile</a>)` : '') : 'Unknown');
$('#plugin-license').text(manifestData.license || 'Unknown');
$('#plugin-locale').text(manifestData.default_locale || 'Unknown');
$('#plugin-configuration').html(formatProperty(manifestData.configuration || 'None'));
$('#plugin-packages').html(formatProperty(manifestData.keys || 'None'));
$('#plugin-dependencies').html(formatProperty(manifestData.dependencies || 'None'));
$('#plugin-javascript').html(formatProperty(manifestData.javascript || 'None'));
$('#plugin-sudoers').html(formatProperty(manifestData.sudoers || 'None'));
$('#plugin-user-name').html((manifestData.user_nonprivileged && manifestData.user_nonprivileged.name) || 'None');
}
if (installed) {
$('#js-install-plugin-confirm').html('OK');
} else if (!installed && repoPublic && installPath == 'plugins-available') {
$('#js-install-plugin-confirm').html('Get Insiders');
} else {
$('#js-install-plugin-confirm').html('Install now');
}
});
$('#js-install-plugin-confirm').on('click', function (e) {
var button = $('#install-user-plugin').data('button');
var manifestData = button.data('plugin-manifest');
var installPath = manifestData.install_path;
var pluginUri = manifestData.plugin_uri;
var pluginVersion = manifestData.version;
var pluginConfirm = $('#js-install-plugin-confirm').text();
var progressText = $('#js-install-plugin-confirm').attr('data-message');
var successHtml = $('#plugin-install-message').attr('data-message');
var successText = $('<div>').text(successHtml).text();
var csrfToken = $('meta[name=csrf_token]').attr('content');
if (pluginConfirm === 'Install now') {
$("#install-user-plugin").modal('hide');
$("#install-plugin-progress").modal('show');
$.post(
'ajax/plugins/do_plugin_install.php',
{
'plugin_uri': pluginUri,
'plugin_version': pluginVersion,
'install_path': installPath,
'csrf_token': csrfToken
},
function (data) {
setTimeout(function () {
response = JSON.parse(data);
if (response === true) {
$('#plugin-install-message').contents().first().text(successText);
$('#plugin-install-message')
.find('i')
.removeClass('fas fa-cog fa-spin link-secondary')
.addClass('fas fa-check');
$('#js-install-plugin-ok').removeAttr("disabled");
} else {
const errorMessage = jsonData.error || 'An unknown error occurred.';
var errorLog = '<textarea class="plugin-log text-secondary" readonly>' + errorMessage + '</textarea>';
$('#plugin-install-message')
.contents()
.first()
.replaceWith('An error occurred installing the plugin:');
$('#plugin-install-message').append(errorLog);
$('#plugin-install-message').find('i').removeClass('fas fa-cog fa-spin link-secondary');
$('#js-install-plugin-ok').removeAttr("disabled");
}
}, 200);
}
).fail(function (xhr) {
const jsonData = JSON.parse(xhr.responseText);
const errorMessage = jsonData.error || 'An unknown error occurred.';
$('#plugin-install-message')
.contents()
.first()
.replaceWith('An error occurred installing the plugin:');
var errorLog = '<textarea class="plugin-log text-secondary" readonly>' + errorMessage + '</textarea>';
$('#plugin-install-message').append(errorLog);
$('#plugin-install-message').find('i').removeClass('fas fa-cog fa-spin link-secondary');
$('#js-install-plugin-ok').removeAttr("disabled");
});
} else if (pluginConfirm === 'Get Insiders') {
window.open('https://docs.raspap.com/insiders/', '_blank');
return;
} else if (pluginConfirm === 'OK') {
$("#install-user-plugin").modal('hide');
}
});
$('#js-install-plugin-ok').on('click', function (e) {
$("#install-plugin-progress").modal('hide');
window.location.reload();
});
function formatProperty(prop) {
if (Array.isArray(prop)) {
if (typeof prop[0] === 'object') {
return prop.map(item => {
return Object.entries(item)
.map(([key, value]) => `${key}: ${value}`)
.join('<br/>');
}).join('<br/><br/>');
}
return prop.map(line => `${line}<br/>`).join('');
}
if (typeof prop === 'object') {
return Object.entries(prop)
.map(([key, value]) => `${key}: ${value}`)
.join('<br/>');
}
return prop || 'None';
}
$(document).ready(function(){
$("#PanelManual").hide();
$("#PanelManual").hide();
$('.ip_address').mask('0ZZ.0ZZ.0ZZ.0ZZ', {
translation: {
'Z': {
pattern: /[0-9]/, optional: true
}
},
placeholder: "___.___.___.___"
});
$('.date').mask('FF:FF:FF:FF:FF:FF', {
translation: {
"F": {
pattern: /[0-9a-z]/, optional: true
}
},
placeholder: "__:__:__:__:__:__"
});
});
$(document).ready(function() {
$('.cidr').mask('099.099.099.099/099', {
translation: {
'0': { pattern: /[0-9]/ }
},
placeholder: "___.___.___.___/___"
});
});
$('#wg-upload,#wg-manual').on('click', function (e) {
@ -335,55 +635,93 @@ $('#wg-upload,#wg-manual').on('click', function (e) {
}
});
// Add the following code if you want the name of the file appear on select
$(".custom-file-input").on("change", function() {
var fileName = $(this).val().split("\\").pop();
$(this).siblings(".custom-file-label").addClass("selected").html(fileName);
});
/*
Sets the wirelss channel select options based on hw_mode and country_code.
// Retrieves the 'channel' value specified in hostapd.conf
function getChannel() {
$.get('ajax/networking/get_channel.php',function(data){
jsonData = JSON.parse(data);
loadChannelSelect(jsonData);
});
}
Methodology: In North America up to channel 11 is the maximum allowed WiFi 2.4Ghz channel,
except for the US that allows channel 12 & 13 in low power mode with additional restrictions.
Canada allows channel 12 in low power mode. Because it's unsure if low powered mode can be
supported the channels are not selectable for those countries. Also Uzbekistan and Colombia
allow up to channel 11 as maximum channel on the 2.4Ghz WiFi band.
Source: https://en.wikipedia.org/wiki/List_of_WLAN_channels
Additional: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git
/*
Sets the wirelss channel select options based on frequencies reported by iw.
See: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git
Also: https://en.wikipedia.org/wiki/List_of_WLAN_channels
*/
function loadChannelSelect(selected) {
// Fetch wireless regulatory data
$.getJSON("config/wireless.json", function(json) {
var iface = $('#cbxinterface').val();
var hwmodeText = '';
var csrfToken = $('meta[name=csrf_token]').attr('content');
// update hardware mode tooltip
setHardwareModeTooltip();
$.post('ajax/networking/get_frequencies.php',{'interface': iface, 'csrf_token': csrfToken, 'selected': selected},function(response){
var hw_mode = $('#cbxhwmode').val();
var country_code = $('#cbxcountries').val();
var channel_select = $('#cbxchannel');
var data = json["wireless_regdb"];
var selectablechannels = Array.range(1,14);
var btn_save = $('#btnSaveHostapd');
var data = JSON.parse(response);
var selectableChannels = [];
// Assign array of countries to valid frequencies (channels)
var countries_2_4Ghz_max11ch = data["2_4GHz_max11ch"].countries;
var countries_2_4Ghz_max14ch = data["2_4GHz_max14ch"].countries;
var countries_5Ghz_max48ch = data["5Ghz_max48ch"].countries;
// Map selected hw_mode and country to determine channel list
// Map selected hw_mode to available channels
if (hw_mode === 'a') {
selectablechannels = data["5Ghz_max48ch"].channels;
} else if (($.inArray(country_code, countries_2_4Ghz_max11ch) !== -1) && (hw_mode !== 'ac') ) {
selectablechannels = data["2_4GHz_max11ch"].channels;
} else if (($.inArray(country_code, countries_2_4Ghz_max14ch) !== -1) && (hw_mode === 'b')) {
selectablechannels = data["2_4GHz_max14ch"].channels;
} else if (($.inArray(country_code, countries_5Ghz_max48ch) !== -1) && (hw_mode === 'ac')) {
selectablechannels = data["5Ghz_max48ch"].channels;
selectableChannels = data.filter(item => item.MHz.toString().startsWith('5'));
} else if (hw_mode !== 'ac') {
selectableChannels = data.filter(item => item.MHz.toString().startsWith('24'));
} else if (hw_mode === 'b') {
selectableChannels = data.filter(item => item.MHz.toString().startsWith('24'));
} else if (hw_mode === 'ac') {
selectableChannels = data.filter(item => item.MHz.toString().startsWith('5'));
}
// If selected channel doeesn't exist in allowed channels, set default or null (unsupported)
if (!selectableChannels.find(item => item.Channel === selected)) {
if (selectableChannels.length === 0) {
selectableChannels[0] = { Channel: null };
} else {
defaultChannel = selectableChannels[0].Channel;
selected = defaultChannel
}
}
// Set channel select with available values
selected = (typeof selected === 'undefined') ? selectablechannels[0] : selected;
channel_select.empty();
$.each(selectablechannels, function(key,value) {
channel_select.append($("<option></option>").attr("value", value).text(value));
});
channel_select.val(selected);
if (selectableChannels[0].Channel === null) {
channel_select.append($("<option></option>").attr("value", "").text("---"));
channel_select.prop("disabled", true);
btn_save.prop("disabled", true);
} else {
channel_select.prop("disabled", false);
btn_save.prop("disabled", false);
$.each(selectableChannels, function(key,value) {
channel_select.append($("<option></option>").attr("value", value.Channel).text(value.Channel));
});
channel_select.val(selected);
}
});
}
/* Sets hardware mode tooltip text for selected interface
* and calls loadChannelSelect()
*/
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_nl80211_band.php?',{'interface': iface, 'csrf_token': csrfToken},function(data){
var responseText = JSON.parse(data);
$('#tiphwmode').attr('data-original-title', responseText + '\n' + hwmodeText );
});
}
@ -392,16 +730,18 @@ function loadChannelSelect(selected) {
* 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");
}
})
}
@ -410,17 +750,18 @@ function clearBlocklistStatus() {
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
}
// Handler for the wireguard generate key button
// Handler for the WireGuard generate key button
$('.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 parentGroup = $(this).closest('.input-group');
var entity_pub = parentGroup.find('input[type="text"]');
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);
})
})
});
});
// Handler for wireguard client.conf download
$('.wg-client-dl').click(function(){
@ -448,7 +789,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();
@ -458,24 +798,132 @@ window.addEventListener('load', function() {
});
}, false);
let sessionCheckInterval = setInterval(checkSession, 5000);
function checkSession() {
// skip session check if on login page
if (window.location.pathname === '/login') {
return;
}
var csrfToken = $('meta[name=csrf_token]').attr('content');
$.post('ajax/session/do_check_session.php',{'csrf_token': csrfToken},function (data) {
if (data.status === 'session_expired') {
clearInterval(sessionCheckInterval);
showSessionExpiredModal();
}
}).fail(function (jqXHR, status, err) {
console.error("Error checking session status:", status, err);
});
}
function showSessionExpiredModal() {
$('#sessionTimeoutModal').modal('show');
}
$(document).on("click", "#js-session-expired-login", function(e) {
const loginModal = $('#modal-admin-login');
const redirectUrl = window.location.pathname;
window.location.href = `/login?action=${encodeURIComponent(redirectUrl)}`;
});
// show modal login on page load
$(document).ready(function () {
const params = new URLSearchParams(window.location.search);
const redirectUrl = $('#redirect-url').val() || params.get('action') || '/';
$('#modal-admin-login').modal('show');
$('#redirect-url').val(redirectUrl);
$('#username').focus();
$('#username').addClass("focusedInput");
});
// DHCP or Static IP option group
$('#chkstatic').on('change', function() {
if (this.checked) {
setStaticFieldsEnabled();
}
});
$('#chkdhcp').on('change', function() {
this.checked ? setStaticFieldsDisabled() : null;
});
$('input[name="dhcp-iface"]').change(function() {
if ($('input[name="dhcp-iface"]:checked').val() == '1') {
setDhcpFieldsEnabled();
} else {
setDhcpFieldsDisabled();
}
});
function setStaticFieldsEnabled() {
$('#txtipaddress').prop('required', true);
$('#txtsubnetmask').prop('required', true);
$('#txtgateway').prop('required', true);
$('#txtipaddress').removeAttr('disabled');
$('#txtsubnetmask').removeAttr('disabled');
$('#txtgateway').removeAttr('disabled');
}
function setStaticFieldsDisabled() {
$('#txtipaddress').prop('disabled', true);
$('#txtsubnetmask').prop('disabled', true);
$('#txtgateway').prop('disabled', true);
$('#txtipaddress').removeAttr('required');
$('#txtsubnetmask').removeAttr('required');
$('#txtgateway').removeAttr('required');
}
function setDhcpFieldsEnabled() {
$('#txtrangestart').prop('required', true);
$('#txtrangeend').prop('required', true);
$('#txtrangeleasetime').prop('required', true);
$('#cbxrangeleasetimeunits').prop('required', true);
$('#txtrangestart').removeAttr('disabled');
$('#txtrangeend').removeAttr('disabled');
$('#txtrangeleasetime').removeAttr('disabled');
$('#cbxrangeleasetimeunits').removeAttr('disabled');
$('#txtdns1').removeAttr('disabled');
$('#txtdns2').removeAttr('disabled');
$('#txtmetric').removeAttr('disabled');
}
function setDhcpFieldsDisabled() {
$('#txtrangestart').removeAttr('required');
$('#txtrangeend').removeAttr('required');
$('#txtrangeleasetime').removeAttr('required');
$('#cbxrangeleasetimeunits').removeAttr('required');
$('#txtrangestart').prop('disabled', true);
$('#txtrangeend').prop('disabled', true);
$('#txtrangeleasetime').prop('disabled', true);
$('#cbxrangeleasetimeunits').prop('disabled', true);
$('#txtdns1').prop('disabled', true);
$('#txtdns2').prop('disabled', true);
$('#txtmetric').prop('disabled', true);
}
// Static Array method
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
$(document).on("click", ".js-toggle-password", function(e) {
var button = $(e.target)
var field = $(button.data("target"));
var button = $(e.currentTarget);
var field = $(button.data("bsTarget"));
if (field.is(":input")) {
e.preventDefault();
if (!button.data("__toggle-with-initial")) {
button.data("__toggle-with-initial", button.text())
$("i", button).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", button).removeClass("fas fa-eye-slash").addClass("fas fa-eye");
field.attr("type", "password");
}
}
@ -483,8 +931,18 @@ $(document).on("click", ".js-toggle-password", function(e) {
$(function() {
$('#theme-select').change(function() {
var theme = themes[$( "#theme-select" ).val() ];
set_theme(theme);
var theme = themes[$( "#theme-select" ).val() ];
var hasDarkTheme = theme === 'custom.php';
var nightModeChecked = $("#night-mode").prop("checked");
if (nightModeChecked && hasDarkTheme) {
if (theme === "custom.php") {
set_theme("dark.css");
}
} else {
set_theme(theme);
}
});
});
@ -495,12 +953,23 @@ function set_theme(theme) {
}
$(function() {
var currentTheme = getCookie('theme');
// Check if the current theme is a dark theme
var isDarkTheme = currentTheme === 'dark.css';
$('#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('dark.css');
}
} else {
set_theme('custom.php');
if (currentTheme == 'dark.css') {
set_theme('custom.php');
}
}
});
});
@ -521,48 +990,49 @@ function getCookie(cname) {
// Define themes
var themes = {
"default": "custom.php",
"hackernews" : "hackernews.css",
"lightsout" : "lightsout.css",
"hackernews" : "hackernews.css"
}
// Toggles the sidebar navigation.
// Overrides the default SB Admin 2 behavior
$("#sidebarToggleTopbar").on('click', function(e) {
$("body").toggleClass("sidebar-toggled");
$(".sidebar").toggleClass("toggled d-none");
});
// Overrides SB Admin 2
$("#sidebarToggle, #sidebarToggleTop").on('click', function(e) {
var toggled = $(".sidebar").hasClass("toggled");
// Persist state in cookie
setCookie('sidebarToggled',toggled, 90);
});
$(function() {
if ($(window).width() < 768) {
$('.sidebar').addClass('toggled');
setCookie('sidebarToggled',false, 90);
}
});
$(window).on("load resize",function(e) {
if ($(window).width() > 768) {
$('.sidebar').removeClass('d-none d-md-block');
if (getCookie('sidebarToggled') == 'false') {
$('.sidebar').removeClass('toggled');
}
}
});
// Adds active class to current nav-item
$(window).bind("load", function() {
var url = window.location;
$('ul.navbar-nav a').filter(function() {
$('.sb-nav-link-icon a').filter(function() {
return this.href == url;
}).parent().addClass('active');
});
// Sets focus on a specified tab
document.addEventListener("DOMContentLoaded", function () {
const params = new URLSearchParams(window.location.search);
const targetTab = params.get("tab");
if (targetTab) {
let tabElement = document.querySelector(`[data-bs-toggle="tab"][href="#${targetTab}"]`);
if (tabElement) {
let tab = new bootstrap.Tab(tabElement);
tab.show();
}
}
});
function disableValidation(form) {
form.removeAttribute("novalidate");
form.classList.remove("needs-validation");
form.querySelectorAll("[required]").forEach(function (field) {
field.removeAttribute("required");
});
}
$(document).ready(function() {
const $htmlElement = $('html');
const $modeswitch = $('#night-mode');
$modeswitch.on('change', function() {
const isChecked = $(this).is(':checked');
const newTheme = isChecked ? 'dark' : 'light';
$htmlElement.attr('data-bs-theme', newTheme);
localStorage.setItem('bsTheme', newTheme);
});
});
$(document)
.ajaxSend(setCSRFTokenHeader)
.ready(contentLoaded)

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,505 +0,0 @@
<?php
/**
* 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
* @link https://github.com/aivis/PHP-file-upload-class
* @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE
*/
namespace RaspAP\Uploader;
class Upload
{
/**
* Default directory persmissions (destination)
*/
protected $default_permissions = 0750;
/**
* File post array
*
* @var array
*/
protected $file_post = array();
/**
* Destination directory
*
* @var string
*/
protected $destination;
/**
* Fileinfo
*
* @var object
*/
protected $finfo;
/**
* Data about file
*
* @var array
*/
public $file = array();
/**
* Max. file size
*
* @var int
*/
protected $max_file_size;
/**
* Allowed mime types
*
* @var array
*/
protected $mimes = array();
/**
* Temp path
*
* @var string
*/
protected $tmp_name;
/**
* Validation errors
*
* @var array
*/
protected $validation_errors = array();
/**
* Filename (new)
*
* @var string
*/
protected $filename;
/**
* Internal callbacks (filesize check, mime, etc)
*
* @var array
*/
private $callbacks = array();
/**
* Root dir
*
* @var string
*/
protected $root;
/**
* Return upload object
*
* $destination = 'path/to/file/destination/';
*
* @param string $destination
* @param string $root
* @return Upload
*/
public static function factory($destination, $root = false)
{
return new Upload($destination, $root);
}
/**
* Define root constant and set & create destination path
*
* @param string $destination
* @param string $root
*/
public function __construct($destination, $root = false)
{
if ($root) {
$this->root = $root;
} else {
$this->root = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR;
}
// set & create destination path
if (!$this->set_destination($destination)) {
throw new Exception('Upload: Unable to create destination. '.$this->root . $this->destination);
}
//create finfo object
$this->finfo = new \finfo();
}
/**
* Set target filename
*
* @param string $filename
*/
public function set_filename($filename)
{
$this->filename = $filename;
}
/**
* Check & Save file
*
* Return data about current upload
*
* @return array
*/
public function upload($filename = false)
{
if($filename ) {
$this->set_filename($filename);
}
$this->set_filename($filename);
if ($this->check()) {
$this->save();
}
// return state data
return $this->get_state();
}
/**
* Save file on server
* Return state data
*
* @return array
*/
public function save()
{
$this->save_file();
return $this->get_state();
}
/**
* Validate file (execute callbacks)
* Returns TRUE if validation successful
*
* @return bool
*/
public function check()
{
//execute callbacks (check filesize, mime, also external callbacks
$this->validate();
//add error messages
$this->file['errors'] = $this->get_errors();
//change file validation status
$this->file['status'] = empty($this->validation_errors);
return $this->file['status'];
}
/**
* Get current state data
*
* @return array
*/
public function get_state()
{
return $this->file;
}
/**
* Save file on server
*/
protected function save_file()
{
//create & set new filename
if(empty($this->filename)) {
$this->create_new_filename();
}
//set filename
$this->file['filename'] = $this->filename;
//set full path
$this->file['full_path'] = $this->root . $this->destination . $this->filename;
$this->file['path'] = $this->destination . $this->filename;
$status = move_uploaded_file($this->tmp_name, $this->file['full_path']);
//checks whether upload successful
if (!$status) {
throw new Exception('Upload: Failed to upload file.');
}
//done
$this->file['status'] = true;
}
/**
* Set data about file
*/
protected function set_file_data()
{
$file_size = $this->get_file_size();
$this->file = array(
'status' => false,
'destination' => $this->destination,
'size_in_bytes' => $file_size,
'size_in_mb' => $this->bytes_to_mb($file_size),
'mime' => $this->get_file_mime(),
'filename' => $this->file_post['name'],
'tmp_name' => $this->file_post['tmp_name'],
'post_data' => $this->file_post,
);
}
/**
* Set validation error
*
* @param string $message
*/
public function set_error($message)
{
$this->validation_errors[] = $message;
}
/**
* Return validation errors
*
* @return array
*/
public function get_errors()
{
return $this->validation_errors;
}
/**
* Set external callback methods
*
* @param object $instance_of_callback_object
* @param array $callback_methods
*/
public function callbacks($instance_of_callback_object, $callback_methods)
{
if (empty($instance_of_callback_object)) {
throw new Exception('Upload: $instance_of_callback_object cannot be empty.');
}
if (!is_array($callback_methods)) {
throw new Exception('Upload: $callback_methods data type need to be array.');
}
$this->external_callback_object = $instance_of_callback_object;
$this->external_callback_methods = $callback_methods;
}
/**
* Execute callbacks
*/
protected function validate()
{
//get curent errors
$errors = $this->get_errors();
if (empty($errors)) {
//set data about current file
$this->set_file_data();
//execute internal callbacks
$this->execute_callbacks($this->callbacks, $this);
//execute external callbacks
$this->execute_callbacks($this->external_callback_methods, $this->external_callback_object);
}
}
/**
* Execute callbacks
*/
protected function execute_callbacks($callbacks, $object)
{
foreach($callbacks as $method) {
$object->$method($this);
}
}
/**
* File mime type validation callback
*
* @param object $object
*/
protected function check_mime_type($object)
{
if (!empty($object->mimes)) {
if (!in_array($object->file['mime'], $object->mimes)) {
$object->set_error('MIME type not allowed.');
}
}
}
/**
* Set allowed mime types
*
* @param array $mimes
*/
public function set_allowed_mime_types($mimes)
{
$this->mimes = $mimes;
//if mime types is set -> set callback
$this->callbacks[] = 'check_mime_type';
}
/**
* File size validation callback
*
* @param object $object
*/
protected function check_file_size($object)
{
if (!empty($object->max_file_size)) {
$file_size_in_mb = $this->bytes_to_mb($object->file['size_in_bytes']);
if ($object->max_file_size <= $file_size_in_mb) {
$object->set_error('File exceeds maximum allowed size.');
}
}
}
/**
* Set max file size
*
* @param int $size
*/
public function set_max_file_size($size)
{
$this->max_file_size = $size;
//if max file size is set -> set callback
$this->callbacks[] = 'check_file_size';
}
/**
* Set File array to object
*
* @param array $file
*/
public function file($file)
{
$this->set_file_array($file);
}
/**
* Set file array
*
* @param array $file
*/
protected function set_file_array($file)
{
//checks whether file array is valid
if (!$this->check_file_array($file)) {
//file not selected or some bigger problems (broken files array)
$this->set_error('Please select file.');
}
//set file data
$this->file_post = $file;
//set tmp path
$this->tmp_name = $file['tmp_name'];
}
/**
* Checks whether Files post array is valid
*
* @return bool
*/
protected function check_file_array($file)
{
return isset($file['error'])
&& !empty($file['name'])
&& !empty($file['type'])
&& !empty($file['tmp_name'])
&& !empty($file['size']);
}
/**
* Get file mime type
*
* @return string
*/
protected function get_file_mime()
{
return $this->finfo->file($this->tmp_name, FILEINFO_MIME_TYPE);
}
/**
* Get file size
*
* @return int
*/
protected function get_file_size()
{
return filesize($this->tmp_name);
}
/**
* Set destination path (return TRUE on success)
*
* @param string $destination
* @return bool
*/
protected function set_destination($destination)
{
$this->destination = $destination . DIRECTORY_SEPARATOR;
return $this->destination_exist() ? true : $this->create_destination();
}
/**
* Checks whether destination folder exists
*
* @return bool
*/
protected function destination_exist()
{
return is_writable($this->root . $this->destination);
}
/**
* Create path to destination
*
* @param string $dir
* @return bool
*/
protected function create_destination()
{
return mkdir($this->root . $this->destination, $this->default_permissions, true);
}
/**
* Set unique filename
*
* @return string
*/
protected function create_new_filename()
{
$filename = sha1(mt_rand(1, 9999) . $this->destination . uniqid()) . time();
$this->set_filename($filename);
}
/**
* Convert bytes to MB
*
* @param int $bytes
* @return int
*/
protected function bytes_to_mb($bytes)
{
return round(($bytes / 1048576), 2);
}
}

View file

@ -13,12 +13,15 @@
}
],
"require": {
"php": "^7.0"
"php": "^8.2",
"phpoption/phpoption": "^1.9",
"ext-mbstring": "*"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2.0",
"phpcompatibility/php-compatibility": "^9.3.5",
"squizlabs/php_codesniffer": "^3.5.5"
"squizlabs/php_codesniffer": "^3.9.0",
"ext-simplexml": "*"
},
"scripts": {
"lint": "parallel-lint . --exclude vendor",

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

@ -1,11 +1,18 @@
<?php
define('RASPI_BRAND_TEXT', 'RaspAP');
define('RASPI_BRAND_TITLE', RASPI_BRAND_TEXT.' Admin Panel');
define('RASPI_CONFIG', '/etc/raspap');
define('RASPI_CONFIG_NETWORK', RASPI_CONFIG.'/networking/defaults.json');
define('RASPI_CONFIG_PROVIDERS', 'config/vpn-providers.json');
define('RASPI_CONFIG_API', RASPI_CONFIG.'/api');
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
define('RASPI_WIFI_AP_INTERFACE', 'wlan0');
define('RASPI_CACHE_PATH', sys_get_temp_dir() . '/raspap');
define('RASPI_ERROR_LOG', sys_get_temp_dir() . '/raspap_error.log');
define('RASPI_DEBUG_LOG', 'raspap_debug.log');
define('RASPI_LOG_SIZE_LIMIT', 64);
define('RASPI_SESSION_TIMEOUT', 1440);
// Constants for configuration file paths.
// These are typical for default RPi installs. Modify if needed.
@ -16,6 +23,7 @@ define('RASPI_ADBLOCK_CONFIG', RASPI_DNSMASQ_PREFIX.'adblock.conf');
define('RASPI_HOSTAPD_CONFIG', '/etc/hostapd/hostapd.conf');
define('RASPI_DHCPCD_CONFIG', '/etc/dhcpcd.conf');
define('RASPI_DHCPCD_LOG', '/var/log/dnsmasq.log');
define('RASPI_HOSTAPD_LOG', '/tmp/hostapd.log');
define('RASPI_WPA_SUPPLICANT_CONFIG', '/etc/wpa_supplicant/wpa_supplicant.conf');
define('RASPI_HOSTAPD_CTRL_INTERFACE', '/var/run/hostapd');
define('RASPI_WPA_CTRL_INTERFACE', '/var/run/wpa_supplicant');
@ -29,9 +37,12 @@ define('RASPI_LIGHTTPD_CONFIG', '/etc/lighttpd/lighttpd.conf');
define('RASPI_ACCESS_CHECK_IP', '1.1.1.1');
define('RASPI_ACCESS_CHECK_DNS', 'one.one.one.one');
// Constants for the 5GHz wireless regulatory domain.
define('RASPI_5GHZ_ISO_ALPHA2', array('NL','US'));
define('RASPI_5GHZ_MAX_CHANNEL', 165);
// Constant for the GitHub API latest release endpoint
define('RASPI_API_ENDPOINT', 'https://api.github.com/repos/RaspAP/raspap-webgui/releases/latest');
// Constant for the 5GHz wireless regulatory domain
define("RASPI_5GHZ_CHANNEL_MIN", 100);
define("RASPI_5GHZ_CHANNEL_MAX", 192);
// Enable basic authentication for the web admin.
define('RASPI_AUTH_ENABLED', true);
@ -43,6 +54,7 @@ define('RASPI_NETWORK_ENABLED', true);
define('RASPI_DHCP_ENABLED', true);
define('RASPI_ADBLOCK_ENABLED', false);
define('RASPI_OPENVPN_ENABLED', false);
define('RASPI_VPN_PROVIDER_ENABLED', false);
define('RASPI_WIREGUARD_ENABLED', false);
define('RASPI_TORPROXY_ENABLED', false);
define('RASPI_CONFAUTH_ENABLED', true);
@ -50,6 +62,8 @@ define('RASPI_CHANGETHEME_ENABLED', true);
define('RASPI_VNSTAT_ENABLED', true);
define('RASPI_SYSTEM_ENABLED', true);
define('RASPI_MONITOR_ENABLED', false);
define('RASPI_RESTAPI_ENABLED', false);
define('RASPI_PLUGINS_ENABLED', true);
// Locale settings
define('LOCALE_ROOT', 'locale');

View file

@ -6,6 +6,12 @@
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
"subnetmask": [ "255.255.255.0" ]
},
"wlan1": {
"static ip_address": [ "10.9.141.1/24" ],
"static routers": [ "10.9.141.1" ],
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
"subnetmask": [ "255.255.255.0" ]
},
"uap0": {
"static ip_address": [ "192.168.50.1/24" ],
"static routers": [ "192.168.50.1" ],
@ -30,6 +36,9 @@
"wlan0": {
"dhcp-range": [ "10.3.141.50,10.3.141.254,255.255.255.0,12h" ]
},
"wlan1": {
"dhcp-range": [ "10.9.141.50,10.9.141.254,255.255.255.0,12h" ]
},
"uap0": {
"dhcp-range": [ "192.168.50.50,192.168.50.150,12h" ]
}

View file

@ -15,4 +15,5 @@ interface wlan0
static ip_address=10.3.141.1/24
static routers=10.3.141.1
static domain_name_server=9.9.9.9 1.1.1.1
nogateway

View file

@ -4,7 +4,7 @@ ctrl_interface_group=0
beacon_int=100
auth_algs=1
wpa_key_mgmt=WPA-PSK
ssid=raspi-webgui
ssid=RaspAP
channel=1
hw_mode=g
wpa_passphrase=ChangeMe
@ -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

75
config/vpn-providers.json Normal file
View file

@ -0,0 +1,75 @@
{
"providers": [
{
"id": 1,
"name": "ExpressVPN",
"bin_path": "/usr/bin/expressvpn",
"install_page": "https://www.expressvpn.com/support/vpn-setup/app-for-linux/",
"account_page": "https://www.expressvpn.com/subscriptions",
"cmd_overrides": {
"countries": "list all",
"log": "diagnostics",
"version": "-v"
},
"regex": {
"status": "\/not connected\/",
"pattern": "\/^(.{2,5})\\s(?:.{1,28})(.{1,26}).*$\/",
"replace": "$1,$2",
"slice": 3
}
},
{
"id": 2,
"name": "Mullvad VPN",
"bin_path": "/usr/bin/mullvad",
"install_page": "https://mullvad.net/en/download/vpn/linux",
"account_page": "https://mullvad.net/en/account",
"cmd_overrides": {
"account": "account get",
"countries": "relay list",
"log": "status -v",
"version": "--version"
},
"regex": {
"status": "\/disconnected\/",
"pattern": "\/^(.*),.*$\/",
"replace": "$1"
}
},
{
"id": 3,
"name": "NordVPN",
"bin_path": "/usr/bin/nordvpn",
"install_page": "https://nordvpn.com/download/linux/",
"account_page": "https://my.nordaccount.com/dashboard/",
"cmd_overrides": {
"log": "status"
},
"regex": {
"status": "\/status: disconnected\/",
"pattern": "(\\w+)\\s+",
"replace": "$1,$1\\n"
}
},
{
"id": 4,
"name": "AdGuard VPN",
"bin_path": "/usr/local/bin/adguardvpn-cli",
"install_page": "https://adguard-vpn.com/kb/adguard-vpn-for-linux/installation/",
"account_page": "https://my.adguard-vpn.com/en/account/product/vpn",
"cmd_overrides": {
"countries": "list-locations",
"connect": "connect -y -l",
"log": "status",
"account": "license",
"version": "--version"
},
"regex": {
"status": "\/vpn is disconnected\/",
"pattern": "/^([A-Z]{2})\\s+.*?\\s([A-Za-z]+(?:\\s[A-Za-z]+)?)\\s+\\d+$/m",
"replace": "$2",
"slice": 3
}
}
]
}

View file

@ -1,17 +0,0 @@
{"wireless_regdb": {
"debug": "off",
"2_4GHz_max11ch": {
"countries": [ "AG", "BS", "BB", "BZ", "CR", "CU", "DM", "DO", "SV", "GD", "GT",
"HT", "HN", "JM", "MX", "NI", "PA", "KN", "LC", "VC", "TT", "US", "CA", "UZ", "CO" ],
"channels": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
},
"2_4GHz_max14ch": {
"countries": [ "JP", "NL" ],
"channels": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
},
"5Ghz_max48ch": {
"countries": [ "NL","US" ],
"channels": [ 36, 40, 44, 48 ]
}
}}

File diff suppressed because it is too large Load diff

1
dist/bootstrap/css/bootstrap.css.map vendored Normal file

File diff suppressed because one or more lines are too long

6
dist/bootstrap/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7876
dist/font-awesome/css/all.css vendored Normal file

File diff suppressed because it is too large Load diff

9
dist/font-awesome/css/all.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1600
dist/font-awesome/css/brands.css vendored Normal file

File diff suppressed because it is too large Load diff

6
dist/font-awesome/css/brands.min.css vendored Normal file

File diff suppressed because one or more lines are too long

6215
dist/font-awesome/css/fontawesome.css vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

19
dist/font-awesome/css/regular.css vendored Normal file
View file

@ -0,0 +1,19 @@
/*!
* Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2024 Fonticons, Inc.
*/
:root, :host {
--fa-style-family-classic: 'Font Awesome 6 Free';
--fa-font-regular: normal 400 1em/1 'Font Awesome 6 Free'; }
@font-face {
font-family: 'Font Awesome 6 Free';
font-style: normal;
font-weight: 400;
font-display: block;
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
.far,
.fa-regular {
font-weight: 400; }

6
dist/font-awesome/css/regular.min.css vendored Normal file
View file

@ -0,0 +1,6 @@
/*!
* Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2024 Fonticons, Inc.
*/
:host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype")}.fa-regular,.far{font-weight:400}

19
dist/font-awesome/css/solid.css vendored Normal file
View file

@ -0,0 +1,19 @@
/*!
* Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2024 Fonticons, Inc.
*/
:root, :host {
--fa-style-family-classic: 'Font Awesome 6 Free';
--fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free'; }
@font-face {
font-family: 'Font Awesome 6 Free';
font-style: normal;
font-weight: 900;
font-display: block;
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
.fas,
.fa-solid {
font-weight: 900; }

Some files were not shown because too many files have changed in this diff Show more