605 Commits

Author SHA1 Message Date
Cameron Thompson
ce20da12c1 Edit sources for R02
update to new 23.05.4 sources
2025-09-16 20:49:49 -04:00
Cameron Thompson
b5d6f4af28 Custom firmware helper improvements 2025-09-16 19:59:22 -04:00
Cameron Thompson
74ce62e5fc Merge pull request #193 from dr-dolomite/development-SDXPINN
QuecManager BETA v2.3.2 Release Candidate
2025-09-12 00:48:09 -04:00
Cameron Thompson
8b34baa4b3 rebuild feed 2025-09-12 00:47:47 -04:00
Cameron Thompson
75d8535cb2 Add chmod +x to new script 2025-09-12 00:46:44 -04:00
Russel Yasol
509130448d Merging additional fixes 2025-09-10 11:52:18 +08:00
Russel Yasol
cfa8dccec1 Removed extra margins on buttons 2025-09-07 18:52:21 +08:00
Russel Yasol
5a5d4dd984 Removed unneeded scripts 2025-09-07 18:44:15 +08:00
Russel Yasol
08a1cd8d7b QuecManager v2.3.2 Release Candidate 2025-09-07 18:36:18 +08:00
Cameron Thompson
64f06fc056 rebuild feed 2025-08-31 03:35:15 -04:00
Cameron Thompson
223418bcf8 add chmod +x 2025-08-31 03:33:53 -04:00
Cameron Thompson
3acdd470c5 Rebuild feed; Add websocat 2025-08-31 02:37:49 -04:00
Cameron Thompson
331b69a7db Add websocat 1.14.0
https://github.com/vi/websocat/releases/tag/v1.14.0
2025-08-31 02:32:30 -04:00
Cameron Thompson
b14f3d7ded Rebuild feed 2025-08-31 02:18:30 -04:00
Cameron Thompson
02dafc73ad Copy QuecManager beta to non-beta
QM BETA --> regular/non-beta
2025-08-31 02:17:49 -04:00
Cameron Thompson
6d6a3775c4 Merge pull request #192 from dr-dolomite/development-SDXPINN
QuecManager Beta v2.3.1 Release Candidate
2025-08-27 23:48:09 -04:00
Cameron Thompson
d6dfa5efd7 rebuild feed 2025-08-27 23:47:40 -04:00
Cameron Thompson
a82c63d6b7 Update control
new version
2025-08-27 23:45:39 -04:00
Cameron Thompson
1442ce21eb Revert "temporarily reverted back at_queue scripts"
This reverts commit 5daf4bb388.
2025-08-27 23:40:26 -04:00
Cameron Thompson
20c2f37452 Revert "Official Hot Fix for QuecManager 2.3.0"
This reverts commit 6bd2c7ea52.
2025-08-27 23:40:17 -04:00
Russel Yasol
1773301af8 Sync outdated speedtest scripts 2025-08-27 21:38:25 +08:00
Russel Yasol
5d7df898f3 Clean out scripts 2025-08-27 21:36:43 +08:00
Russel Yasol
e054ada872 Release Candidate v2.3.1 2025-08-27 21:13:19 +08:00
Russel Yasol
789cb0bc3a Added --accept-gdpr to speedtest script 2025-08-27 18:50:13 +08:00
Russel Yasol
19544e28f3 Fixed Speedtest for 2.3.0 2025-08-27 18:32:17 +08:00
Russel Yasol
96dd20a758 Updated scirpts for Hot Fix 2025-08-27 11:39:02 +08:00
Russel Yasol
6bd2c7ea52 Official Hot Fix for QuecManager 2.3.0 2025-08-27 11:31:00 +08:00
Russel Yasol
029d657d08 Merge branch 'iamromulan:development-SDXPINN' into development-SDXPINN 2025-08-27 10:42:15 +08:00
Russel Yasol
5daf4bb388 temporarily reverted back at_queue scripts 2025-08-27 10:41:37 +08:00
Cameron Thompson
45aaafb4fb Create socat-at-bridge_1.1.1_aarch64_cortex-a53.ipk 2025-08-26 22:30:38 -04:00
Cameron Thompson
b2f8e4ed5b Merge pull request #188 from dr-dolomite/development-SDXPINN
Release Candidate for Version 2.3.0
2025-08-26 22:02:36 -04:00
Cameron Thompson
e97785f601 Rebuild feed 2025-08-26 21:59:23 -04:00
Cameron Thompson
fe5ce0aa37 Add new service to CONTROL files; Remove old cleanup logic 2025-08-26 21:54:51 -04:00
Cameron Thompson
b5586f1b00 Add chmod +x to new scripts 2025-08-26 21:35:18 -04:00
Russel Yasol
c7c2190ce3 Merge branch 'development-SDXPINN' of https://github.com/dr-dolomite/QuecManagerBetaReleases into development-SDXPINN 2025-08-27 08:29:48 +08:00
Russel Yasol
07746de9d0 Removed zone identifier generated by WSL2 2025-08-27 08:29:45 +08:00
Cameron Thompson
1416edc3c4 remove annoying files that came from windows 2025-08-26 20:26:56 -04:00
Russel Yasol
c31f435537 Update login.html to correct file 2025-08-25 12:59:42 +08:00
Russel Yasol
13e325cb67 Merge branch 'development-SDXPINN' into development-SDXPINN 2025-08-25 12:58:28 +08:00
Russel Yasol
95463202dd Release Candidate for 2.3.0 2025-08-25 12:52:58 +08:00
Cameron Thompson
38a0736110 Rebuild feed 2025-08-24 18:55:13 -04:00
Cameron Thompson
da1563ce21 Rename to login.html
avoids opkg conflict
2025-08-24 18:54:16 -04:00
Cameron Thompson
92570427ae Rebuild feed 2025-08-24 18:49:04 -04:00
Cameron Thompson
ed4ec61e52 Merge pull request #187 from dr-dolomite/development-SDXPINN
Hot Fix Patch for Release Candidate version 2.2.8
2025-08-24 18:41:10 -04:00
Russel Yasol
dd59450e99 Merge branch 'development-SDXPINN' of https://github.com/dr-dolomite/QuecManagerBetaReleases into development-SDXPINN 2025-08-25 05:55:39 +08:00
Russel Yasol
27f17eb874 Hot fixes for version 2.2.8 2025-08-25 05:55:35 +08:00
Cameron Thompson
87d9593f93 Rebuild feed 2025-08-24 16:30:13 -04:00
Cameron Thompson
f0c750ddff Add mem limit to tailscale 2025-08-24 16:27:14 -04:00
Cameron Thompson
f629917ac9 Rebuild console menu/feed
New console menu version
2025-08-24 16:09:38 -04:00
Cameron Thompson
4a91546563 Merge pull request #186 from dr-dolomite/development-SDXPINN
Release Candidate for version 2.2.8
2025-08-24 16:07:32 -04:00
Cameron Thompson
27b455df06 Rebuild feed 2025-08-24 16:07:03 -04:00
Cameron Thompson
e7c57e1c2a Add +x to new scripts 2025-08-24 16:02:57 -04:00
Cameron Thompson
23df41eac4 Merge pull request #184 from clndwhr/bug/custom-dns-fix
[BUG FIX] Fix for Custom DNS Menu Option
2025-08-24 15:54:44 -04:00
Cameron Thompson
5cdd8ebad6 Revert "Update feed"
This reverts commit ef65d3d524.
2025-08-24 15:54:19 -04:00
Cameron Thompson
ef65d3d524 Update feed
- increase version
- rebuild feed
2025-08-24 15:52:27 -04:00
Russel Yasol
4a327bfcd8 Improved memory fetch speed 2025-08-24 22:07:20 +08:00
Russel Yasol
5ed245a3df Added fix for memory fetching initialization 2025-08-24 22:01:46 +08:00
Russel Yasol
e2ea01f64a Improved Network Insights Feature 2025-08-24 20:43:13 +08:00
Russel Yasol
629d9a35bc Merge branch 'development-SDXPINN' of https://github.com/dr-dolomite/QuecManagerBetaReleases into development-SDXPINN 2025-08-24 18:13:43 +08:00
Russel Yasol
8e99618f2a Hot fix for version 2.28 2025-08-24 18:13:37 +08:00
Christopher Landwehr
0e60336199 minor adjustments to add dhcp section as needed 2025-08-15 23:34:21 -04:00
Christopher Landwehr
09daba4ad5 comment question 2025-08-15 12:36:04 -04:00
Christopher Landwehr
f0151d7967 Expanded the IPPT enabled check to includ checking for PDP context and auto-connect seeing as these are the two additional fields needing checked to validate IPPT being enabled. Added additional uci entry check 2025-08-15 12:31:49 -04:00
Cameron Thompson
30a300dbd3 Merge pull request #182 from dr-dolomite/development-SDXPINN
QuecManager Beta Release Notes – v2.2.7
2025-08-13 21:33:21 -04:00
Cameron Thompson
7f3a026cc5 Rebuild opkg feed 2025-08-13 21:32:17 -04:00
Cameron Thompson
4fe009cf28 Add chmod +x for new scripts 2025-08-13 21:31:20 -04:00
Russel Yasol
752fce41b4 Merge branch 'development-SDXPINN' of https://github.com/dr-dolomite/QuecManagerBetaReleases into development-SDXPINN 2025-08-12 09:50:41 +08:00
Russel Yasol
e75ff823a3 Merging 2.2.7 Release Candidate 2025-08-12 09:50:34 +08:00
Cameron Thompson
0c3956b5eb Merge pull request #181 from dr-dolomite/development-SDXPINN
QuecManager BETA 2.2.6 Release Candidate
2025-08-07 23:35:56 -04:00
Cameron Thompson
c47f32da66 Rebuild opkg-feed/build ipk 2025-08-07 23:35:14 -04:00
Cameron Thompson
6efe370805 Apply chmod +x to new scripts 2025-08-07 23:33:24 -04:00
Russel Yasol
619502a100 Merging 2.2.6 release candidate 2025-08-07 10:17:34 +08:00
Cameron Thompson
384c055278 Rebuild feed 2025-08-04 23:52:32 -04:00
Cameron Thompson
03440b2693 Increase respawn aggressiveness 2025-08-04 23:51:51 -04:00
Cameron Thompson
0ccb6bbf1b rebuild feed 2025-08-04 23:30:48 -04:00
Cameron Thompson
1e725e940b Make scripts less aggressive 2025-08-04 23:30:14 -04:00
Cameron Thompson
45af7b6ee7 Make procd manage socat-at-bridge completely 2025-08-04 23:14:30 -04:00
Cameron Thompson
2a6fc2cf2d Add custom section for quick custom firmware prep 2025-08-01 23:56:24 -04:00
Cameron Thompson
7fa78309ce Rebuild feed 2025-08-01 21:29:02 -04:00
Cameron Thompson
c61e8e8122 Update tailscale to 1.86.2 2025-08-01 21:25:14 -04:00
Cameron Thompson
8209bac12e Merge pull request #180 from dr-dolomite/development-SDXPINN
Merging 2.2.5 Release (Clean)
2025-08-01 21:20:06 -04:00
Russel Yasol
db3055afbf Merge pull request #4 from dr-dolomite/release/v2.2.5
Release/v2.2.5
2025-08-02 08:43:59 +08:00
Christopher Landwehr
709be1f447 Merge branch 'development-SDXPINN' into release/v2.2.5 2025-08-01 20:41:59 -04:00
Christopher Landwehr
81da81cb40 rebuild with chart-preview fix in place 2025-08-01 20:40:43 -04:00
Russel Yasol
b158d40352 Merge pull request #179 from dr-dolomite/release/v2.2.5
Release/v2.2.5
2025-08-02 08:32:32 +08:00
Christopher Landwehr
b499f5cc0b 2.2.5 QuecManager Beta Build Release 2025-08-01 19:48:49 -04:00
Christopher Landwehr
f6b46cde99 Merge pull request #3 from clndwhr/feature/update-build-script-to-ensure-executable-sh
Update the build-ipk to ensure all .sh files in cgi-bin are executable

Addition to ipk build, available to otherwise comment out if causes problems
2025-08-01 19:30:28 -04:00
Christopher Landwehr
abcb75b097 Merge branch 'development-SDXPINN' into feature/update-build-script-to-ensure-executable-sh 2025-07-27 16:54:04 -04:00
Cameron Thompson
0469b43b7c Rebuild feed
Regenerate QM beta 2.2.4; rebuild feed
2025-07-27 13:20:05 -04:00
Cameron Thompson
dacf583d13 Fix small things
Fix an env issue
Add exe permissions

Co-Authored-By: Christopher Landwehr <10077248+clndwhr@users.noreply.github.com>
2025-07-27 13:18:36 -04:00
Christopher Landwehr
7277bdeb07 update comment for suggestiong if chmod -R is problematic 2025-07-27 10:13:23 -04:00
Christopher Landwehr
c2d4f9f0f6 Update the build-ipk to ensure all .sh files in cgi-bin are executable 2025-07-27 10:10:07 -04:00
Cameron Thompson
5afecaeaba Rebuild opkg-feed; build QM beta ipk 2025-07-26 20:20:58 -04:00
Cameron Thompson
9349df0abc Merge pull request #178 from dr-dolomite/development-SDXPINN
QuecManager Beta 2.2.4 Release
2025-07-26 20:18:46 -04:00
Russel Yasol
5db402136c [CORRECTION] Merging changes for 2.2.4 release 2025-07-27 08:03:27 +08:00
Cameron Thompson
73bb838b38 Revert "Merge pull request #176 from clndwhr/feature/quecmanager-2.2.4-beta"
This reverts commit 2662079349, reversing
changes made to a8730bf9e9.
2025-07-26 19:31:33 -04:00
Cameron Thompson
8f97a577d2 Revert "Build QM 2.2.4 IPK; rebuild feed"
This reverts commit 03a092acfe.
2025-07-26 19:30:22 -04:00
Cameron Thompson
03a092acfe Build QM 2.2.4 IPK; rebuild feed 2025-07-26 19:01:23 -04:00
Russel Yasol
2662079349 Merge pull request #176 from clndwhr/feature/quecmanager-2.2.4-beta
Feature/quecmanager 2.2.4 beta
2025-07-26 22:39:38 +08:00
Christopher Landwehr
473f9969dd 2.2.4-beta build 2025-07-26 10:22:47 -04:00
Cameron Thompson
a8730bf9e9 Update README 2025-07-25 21:45:22 -04:00
Cameron Thompson
8ff9a630ae Fix missing dependencies from index
resigned updated Packages index
2025-07-04 15:41:53 -04:00
Cameron Thompson
87098a4319 update opkg-feed 2025-07-01 19:39:20 -04:00
Cameron Thompson
a3dd95ec30 Merge QuecManager beta into QuecManager
Sync beta and normal QuecManager versions
2025-07-01 19:35:56 -04:00
Cameron Thompson
559d260eb0 Merge pull request #146 from dr-dolomite/development-SDXPINN
[IMPROVEMENTS] Added Fixes and Improvements for RC 2.2.3
2025-04-07 11:45:00 -04:00
Cameron Thompson
b5141a63ac Rebuild opkg-feed 2025-04-07 11:44:19 -04:00
Russel Yasol
4d5d79c352 added meter conversion for approx cell distance 2025-04-07 14:15:42 +08:00
Russel Yasol
1e2125e558 Added more fixes for RSRP, RSRQ, and SINR parsing methods 2025-04-07 13:58:03 +08:00
Russel Yasol
f7af2cb687 Merge branch 'iamromulan:development-SDXPINN' into development-SDXPINN 2025-04-06 13:03:26 +08:00
Russel Yasol
5e5444e890 Merging RC version 2.2.3 2025-04-06 13:02:48 +08:00
Cameron Thompson
0e4815ccbb QuecManager big update
Updated non beta
Updated beta
2025-04-02 23:16:07 -04:00
Cameron Thompson
f4c980ce71 chmod +x new cgi 2025-04-02 23:13:30 -04:00
Cameron Thompson
f9f428e372 Merge pull request #143 from dr-dolomite/development-SDXPINN
[IMPROVEMENTS] Merging RC Version 2.2.2 Fixes and Added Features
2025-04-02 23:10:20 -04:00
Cameron Thompson
c42907e346 QuecManager non-beta
Its about time I did this!
2025-04-02 23:09:08 -04:00
Russel Yasol
721bbd9bfb Adjusted RSRP and RSRQ to also use servingcell for home data 2025-04-02 16:27:58 +08:00
Russel Yasol
677cdbb66d Added more improvements and fixes. 2025-04-02 15:44:55 +08:00
Russel Yasol
9d3768dccf Added improvements to network addressing 2025-04-02 11:07:53 +08:00
Russel Yasol
99295a5061 Update version 2025-04-02 10:30:00 +08:00
Russel Yasol
e5aa61f31f Added more fixes for RC v2.2.2 2025-04-02 09:55:06 +08:00
Russel Yasol
1d5faf38d1 Merging Release Candidate v2.2.0 2025-03-31 19:25:20 +08:00
Cameron Thompson
c4a340bd36 Merge pull request #138 from dr-dolomite/development-SDXPINN
[IMPROVEMENTS] Added Improvements to Speedtest and QuecProfiles
2025-03-24 01:18:46 -04:00
Cameron Thompson
80752d3a02 Rebuild opkg-feed 2025-03-24 01:16:59 -04:00
Cameron Thompson
7165798338 Make new cgi file exe 2025-03-24 01:14:33 -04:00
Russel Yasol
0fab14e75b Added improvements to Speedtest and QuecProfiles 2025-03-24 10:37:56 +08:00
Cameron Thompson
45100c60ca Merge pull request #133 from dr-dolomite/development-SDXPINN
[HOT PATCH] Fixed Incorrect SCC PCIs when using NR5G-SA Mode
2025-03-20 16:02:37 -04:00
Cameron Thompson
35b6710b46 Rebuild opkg-feed 2025-03-20 16:01:39 -04:00
Russel Yasol
dbe0a8da95 Fixed Sim Changer from Home Page 2025-03-20 12:16:10 +08:00
Russel Yasol
03e1863b59 Added AT Command Improvements 2025-03-20 10:31:10 +08:00
Russel Yasol
9910092ff5 Fixed Signal Quality and Cell Locking 2025-03-20 10:14:45 +08:00
Russel Yasol
3e1f3e09e7 Added Missing AUTO Network Mode Option for QuecProfiles 2025-03-19 08:02:55 +08:00
Russel Yasol
a09cfe6b2c Fixed Incorrect SCC PCIs when using NR5G-SA Mode 2025-03-19 06:11:59 +08:00
Cameron Thompson
571b3a0c4b Merge pull request #131 from dr-dolomite/development-SDXPINN
[HOT PATCH AND ADDED FEATURE] Fixed Cell Locking Scheduler and Added Preliminary Functionalities for MBN Profiles
2025-03-18 13:24:10 -04:00
Cameron Thompson
efcbfea866 Rebuild opkg-feed 2025-03-18 13:22:19 -04:00
Cameron Thompson
d87f254c6b Make new cgi files exe 2025-03-18 13:19:38 -04:00
Russel Yasol
94b59a50c4 Merge branch 'development-SDXPINN' of https://github.com/dr-dolomite/QuecManagerBetaReleases into development-SDXPINN 2025-03-17 13:17:17 +08:00
Russel Yasol
f7c64cc374 RC Version 2.1.4 2025-03-17 13:17:13 +08:00
Cameron Thompson
8e54c6e0b3 Merge pull request #129 from dr-dolomite/development-SDXPINN
[Hot Patch] Fixed Cellular Basic Settings
2025-03-14 11:59:06 -04:00
Cameron Thompson
75f5e15d4e Rebuild opkg-feed 2025-03-14 11:58:38 -04:00
Russel Yasol
2f800c7399 Corrected version control 2025-03-14 16:36:02 +08:00
Russel Yasol
ee528bb68b Fixed Basic Settings not working 2025-03-14 16:34:28 +08:00
Cameron Thompson
63dbeeb073 Merge pull request #128 from dr-dolomite/development-SDXPINN
[Hot Patch and Added Feature] Fixed Speedtest and Added Pause to Quecprofiles
2025-03-13 23:56:46 -04:00
Cameron Thompson
bd2f8fcede rebuild-opkg feed 2025-03-13 23:56:16 -04:00
Cameron Thompson
ecd800df44 make new cgi exe 2025-03-13 23:54:58 -04:00
Russel Yasol
ba817e535c Update version control 2025-03-14 11:47:39 +08:00
Russel Yasol
aac8079bc6 Hot patch for speedtest 2025-03-14 11:46:14 +08:00
Cameron Thompson
11f9ee2bbf rebuild-opkg feed 2025-03-13 23:14:18 -04:00
Cameron Thompson
96c39048b2 Fix services issue 2025-03-13 23:13:38 -04:00
Cameron Thompson
1f86858913 Rebuild opkg-feed 2025-03-13 22:54:08 -04:00
Cameron Thompson
38638fb1ec Account for changes in file name 2025-03-13 22:53:06 -04:00
Cameron Thompson
ca5827c693 Merge pull request #127 from dr-dolomite/development-SDXPINN
[Hot Patch and Added Feature] Fixed AT Terminal and Added Frequency Calculator
2025-03-13 22:40:50 -04:00
Cameron Thompson
f8a612d072 rebuild opkg-feed 2025-03-13 22:39:52 -04:00
Cameron Thompson
1a43b740b4 Update quecmanager_services 2025-03-13 22:38:37 -04:00
Cameron Thompson
d68dd62d51 Make all files in cgi-bin exe 2025-03-13 22:32:58 -04:00
Russel Yasol
cacde36ca4 Removed redundant RSRP value from Freq Analysis Card 2025-03-13 20:58:19 +08:00
Russel Yasol
a0301f4cd2 Added missing cgi-bin directory 2025-03-13 20:51:47 +08:00
Russel Yasol
54e6407507 Added UI improvements to charts 2025-03-13 15:45:27 +08:00
Russel Yasol
2418b3eec9 Added support for low freq NR bands for Frequency Calculator 2025-03-13 10:51:52 +08:00
Russel Yasol
810865290b Added Frequency Calculator
- Added Frequency Calculator page
2025-03-13 10:16:06 +08:00
Russel Yasol
aa08a8ee28 Increment version for hot patch 2025-03-13 08:12:55 +08:00
Russel Yasol
2a4d8b6d56 Hot Patch for AT Terminal
- Fixed the cgi-bin call causing the issue by appending .sh to the at_queue_client
2025-03-13 08:10:19 +08:00
Cameron Thompson
113eda4f6c Merge pull request #126 from dr-dolomite/development-SDXPINN
Merging Beta 2.0.0 Release Candidate
2025-03-11 23:41:32 -04:00
Cameron Thompson
8866e35d4b rebuild opkg-feed
QuecManager-beta 2.0.0 ipk
2025-03-11 23:41:02 -04:00
Cameron Thompson
8e80ba5c91 Final edits
- Make all cgi-bin and init files executable

- Move NTP contribution fix from package --> to be appart of sdxpinn-patch

- Edited ntp fi location

- Added additional service triggers to primary service quecmanager-services
2025-03-11 23:39:06 -04:00
Russel Yasol
36874b12f0 Merging Beta 2.0.0 Release Candidate 2025-03-11 15:21:04 +08:00
Cameron Thompson
0ce398b6e5 Fix missing depends for luci-app-argon-config 2025-02-22 00:44:00 -05:00
Cameron Thompson
d05491c8a1 Remove conflicting files
Files from luci-lua-runtime are appart of luci-base on sdxpinn. Removed conflicting files.

Rebuilt opkg feed
2025-02-22 00:06:06 -05:00
Cameron Thompson
70f1134b69 Merge branch 'development-SDXPINN' into SDXPINN 2025-02-21 23:30:06 -05:00
Cameron Thompson
e66a2c5721 Rebuild opkg-feed
Luci Argon Theme available!
2025-02-21 23:28:05 -05:00
Cameron Thompson
5ecb93a5e1 Build new ipks
-Built packages
   - luci-theme-argon
   - luci-app-argon-config

- Built depends:
   - libucode20230711
   - luci-lua-runtime
   - ucode-mod-lua
2025-02-21 23:03:15 -05:00
Cameron Thompson
44b21671bc Make the argon theme and luci app recommend each other 2025-02-21 22:54:12 -05:00
Cameron Thompson
7d3da6e073 Edit source info 2025-02-21 22:50:05 -05:00
Cameron Thompson
3f05beee37 Add Luci Theme argon and app
- Also added missing depends from source: https://dl.openwrt.ai/packages-24.10/aarch64_cortex-a53/

- Argon theme and app source:
https://github.com/jerrykuku/luci-theme-argon
2025-02-18 21:39:32 -05:00
Cameron Thompson
99dbf135e9 Remove cloudfalre-warp
Needs to be compiled for OpenWRT C lib from source. Ubuntu binaries don't work
2025-02-07 15:49:25 -05:00
Cameron Thompson
41b47533a4 Rebuild opkg-feed 2025-02-07 15:24:28 -05:00
Cameron Thompson
209d782172 Edit depends to OpenWRT Equals
libnss3-tools not available

All others mapped to correct corresponding openwrt package.
2025-02-07 15:18:41 -05:00
Cameron Thompson
0eb6b4d502 Start work: porting cloudflare warp client to sdxpinn 2025-02-06 22:43:23 -05:00
Cameron Thompson
21e144966f Merge branch 'development-SDXPINN' into SDXPINN 2025-02-05 15:33:10 -05:00
Cameron Thompson
13fe12413e Merge pull request #119 from dr-dolomite/development-SDXPINN
Merging Beta 1.1.1-4 Release Candidate
2025-02-05 15:31:48 -05:00
Cameron Thompson
133100eee7 Build ipk; Rebuild opkg-feed
Generate new ipk; update Packages repo
2025-02-05 15:30:02 -05:00
Cameron Thompson
148b6a6861 Add exe permissions 2025-02-05 15:25:49 -05:00
Russel Yasol
fa4ed2876b Fixed incorrect TAC value when current network mode is NSA 2025-02-03 14:42:21 +08:00
Russel Yasol
efc3ea460a Merging beta 1.1.1-4 release candidate 2025-02-03 14:12:59 +08:00
Cameron Thompson
ba34463acd Merge branch 'development-SDXPINN' into SDXPINN 2025-02-01 02:04:47 -05:00
Cameron Thompson
61a14f6b39 Rebuild opkg-feed 2025-02-01 02:04:07 -05:00
Cameron Thompson
bda5e8622d Update luci-app-go-wireguard
- Defined conffile
- Added service firewall reload when starting the vpn
2025-02-01 01:58:54 -05:00
Cameron Thompson
8dc578a364 Create warp CLI wrapper
- A CLI tool that uses wgcf CLI to create a directory for free and plus warp accounts

- Allows profiles to install direct to luci-app-go-wireguard
2025-02-01 01:30:56 -05:00
Cameron Thompson
a75c2c9da7 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-31 18:52:41 -05:00
Cameron Thompson
6394731663 Rebuild opkg-feed
Fix permissions
2025-01-31 18:50:53 -05:00
Cameron Thompson
d3c6605936 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-31 18:42:48 -05:00
Cameron Thompson
b6466dc910 Add wgcf to repo 2025-01-31 18:40:04 -05:00
Cameron Thompson
6608d084b5 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-30 21:58:57 -05:00
Cameron Thompson
59be0e546f Rename package and rebuild opkg-feed
- Added luci-app-GO-wireguard

(Luci app for Wireguard pulled from GoldenOrb)
2025-01-30 20:50:26 -05:00
Cameron Thompson
e820fe3623 Add wireguard luci app
- Pulled from GoldenOrb
2025-01-30 20:43:29 -05:00
Cameron Thompson
74971330f6 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-29 23:13:23 -05:00
Cameron Thompson
3f86da0e33 Rebuild opkg-feed
- Added kmod-wireguard
2025-01-29 23:12:57 -05:00
Cameron Thompson
6d80afb010 add kmod-wireguard to ipk source
Wireguard is precompiled into the kernel

zcat /proc/config.gz | grep WIREGUARD

CONFIG_WIREGUARD=y
# CONFIG_WIREGUARD_DEBUG is not set

This package simply makes opkg understand that its already installed.
2025-01-29 23:09:29 -05:00
Cameron Thompson
19d6b984bd Merge branch 'development-SDXPINN' into SDXPINN 2025-01-28 19:58:52 -05:00
Cameron Thompson
6ac3f137fd Update rcPCIe_SDXPINN_toolkit.sh 2025-01-28 19:58:23 -05:00
Cameron Thompson
c4e2bfb714 Rebuild opkg-feed 2025-01-28 19:51:01 -05:00
Cameron Thompson
3d0a760e13 Fix mount-fix issue 2025-01-28 19:49:42 -05:00
Cameron Thompson
f412e318ed Merge branch 'development-SDXPINN' into SDXPINN 2025-01-28 00:07:23 -05:00
Cameron Thompson
3b2f4df801 Rebuild opkg-feed 2025-01-28 00:06:38 -05:00
Cameron Thompson
5112fd5280 Add depends sdxpinn-patch to quecmanager beta 2025-01-28 00:04:17 -05:00
Cameron Thompson
e7ab42b2c1 Remove need for rc_sync 2025-01-27 23:59:11 -05:00
Cameron Thompson
e99adb0a3e QuecManager Beta 1.1.1-3
- Fixed cell scanner not working
- Improved control scripts
2025-01-27 23:56:02 -05:00
Cameron Thompson
4cef2d3d86 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-26 17:47:24 -05:00
Cameron Thompson
eedbe783ae Rebuild opkg-feed 2025-01-26 17:40:42 -05:00
Cameron Thompson
64d117fb9e Update preinst 2025-01-26 17:38:59 -05:00
Cameron Thompson
498a38f030 Rebuild opkg-feed 2025-01-26 17:34:08 -05:00
Cameron Thompson
901fed57c5 Update toolkit, sdxpinn patch and mount-fix 2025-01-26 17:32:24 -05:00
Cameron Thompson
a9b961c763 Rebuild opkg-feed 2025-01-26 01:36:40 -05:00
Cameron Thompson
8de5a5f917 Update postinst 2025-01-26 01:29:41 -05:00
Cameron Thompson
c63b28f196 Update toolkit; Rebuild opkg-feed 2025-01-26 00:42:09 -05:00
Cameron Thompson
7b956bbcc2 Rebuild opkg-feed 2025-01-26 00:09:15 -05:00
Cameron Thompson
f06995bda7 Ensure old overlay watchdog is disabled 2025-01-26 00:06:25 -05:00
Cameron Thompson
d4d2aa9b11 Rebuild opkg-feed 2025-01-26 00:00:27 -05:00
Cameron Thompson
51ac84705c Update sdxpinn-patch
- Added a fix to ensure mount-fix does not have a prerm to run

- Added a custom arch index for opkg

- Updated quecmanager beta to have a depend on inotifywait since mount-fix no longer has the depend.
2025-01-25 23:57:31 -05:00
Cameron Thompson
dc16a3c9fe mount-fix simplification
- No more inotifywait or overlay-init-watchdog

- Instead, real_rootfs rc.d is mounted back on top of the overlay to allow read/write to it. The bootup rc.d and resulting location rc.d become the same and as a result allowing init to behave naturally without extra help.

- Must be on the latest sdxpinn-patch version in order to upgrade this package. The old prerm scripts need removed before upgrading.
2025-01-25 22:33:05 -05:00
Cameron Thompson
c9ec7f7617 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-23 18:36:19 -05:00
Cameron Thompson
cd60b7b6db Rebuild opkg-feed
- Updated QuecManager ipk to 1.1.1-2
2025-01-23 18:35:41 -05:00
Cameron Thompson
3352a86548 QuecManager Beta install improvements
Made it so this package runs rc sync only once and waits 3 seconds before doing so in case init-watchdog is also responding.
2025-01-23 18:33:37 -05:00
Cameron Thompson
430d9445ac Merge pull request #112 from dr-dolomite/development-SDXPINN
Release version for 1.1.1-2
2025-01-23 18:26:50 -05:00
Russel Yasol
cf9387c736 Release version for 1.1.1-2
- Improved fetch_data script
- Improved quecwatch script
- Added scripts for cell scan
- Added a working UI for cell scan
2025-01-23 20:17:02 +08:00
Cameron Thompson
f956fbaf37 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-21 23:48:26 -05:00
Cameron Thompson
f2a451e862 rebuild opkg-feed 2025-01-21 23:43:27 -05:00
Cameron Thompson
85136894e0 Update rc_sync 2025-01-21 23:41:53 -05:00
Cameron Thompson
139170b3ca Create a temporary version of the toolkit script
- For work in progress new improvements
2025-01-21 23:25:44 -05:00
Cameron Thompson
cdf655af16 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-21 22:03:19 -05:00
Cameron Thompson
9650309978 rebuild opkg-feed 2025-01-21 21:49:31 -05:00
Cameron Thompson
fb24db4cfe Update preinst 2025-01-21 21:31:31 -05:00
Cameron Thompson
4936d144a4 Delete sdxpinn-patch_1_all.ipk 2025-01-21 00:39:17 -05:00
Cameron Thompson
d2d18cc10a rebuild opkg-feed 2025-01-21 00:33:05 -05:00
Cameron Thompson
6b2b424bcd fix sdxpinn-patch 2025-01-21 00:32:07 -05:00
Cameron Thompson
83d61aeae1 update opkg-feed 2025-01-21 00:22:07 -05:00
Cameron Thompson
0f9fbfa2ab sdxpinn-patch fixes 2025-01-21 00:21:22 -05:00
Cameron Thompson
4f99c66cec rebuild opkg-feed 2025-01-21 00:08:44 -05:00
Cameron Thompson
1875ac86b3 Update preinst 2025-01-21 00:07:51 -05:00
Cameron Thompson
28d1c1ce71 rebuild opkg-feed
add sdxpinn-patch v1
2025-01-20 23:36:31 -05:00
Cameron Thompson
07d06d4480 Update control 2025-01-20 23:29:10 -05:00
Cameron Thompson
8cd7d09a55 update sdxpinn-patch
- Added opkg feeds patch
2025-01-20 23:27:29 -05:00
Cameron Thompson
80f2975243 Begin work on sdxpinn-patch 2025-01-20 22:11:24 -05:00
Cameron Thompson
a80af985fd Merge branch 'development-SDXPINN' into SDXPINN 2025-01-20 16:19:27 -05:00
Cameron Thompson
18ec2896cc Rebuild opkg-feed
Rebuilt 2 ipks
2025-01-20 16:18:35 -05:00
Cameron Thompson
f2767682c5 Added req for rc_sync for QuecManager BETA and socat-at-bridge 2025-01-20 16:15:00 -05:00
Cameron Thompson
d4f13f11b6 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-20 15:41:25 -05:00
Cameron Thompson
4010a26b40 rebuild-opkg feed
Updated mount-fix
2025-01-20 15:40:11 -05:00
Cameron Thompson
429d34d48a Create rc_sync
- Added a executable that can be called upon manually to ensure rc.d stays in sync with the orginal.
2025-01-20 15:37:56 -05:00
Cameron Thompson
8fcbbbb6b2 Rebuild opkg-feed
- Updated mount-fix package so it can't be upgraded
2025-01-20 15:17:23 -05:00
Cameron Thompson
cb0cfd7e60 Prevent mount-fix from being upgraded
- Prevent the mount-fix package from being upgraded.
2025-01-20 15:15:20 -05:00
Cameron Thompson
4fddc32f3b Merge branch 'development-SDXPINN' into SDXPINN 2025-01-20 14:47:24 -05:00
Cameron Thompson
608cc1c19f Update toolkit: Tailscale
- Updated link in tookit for current tailscale and tailscaled ipk files.
2025-01-20 14:47:07 -05:00
Cameron Thompson
cc5792d192 Remove old src files out of sync with dev baranch 2025-01-20 10:32:37 -05:00
Cameron Thompson
250233ef26 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-20 10:31:47 -05:00
Cameron Thompson
c77d720a43 Rebuild feed 2025-01-20 00:32:03 -05:00
Cameron Thompson
cfe126bcb0 Hot Fix: Incorrect tailscale binary 2025-01-20 00:30:28 -05:00
Cameron Thompson
1d59769366 Merge pull request #108 from dr-dolomite/development-SDXPINN
QuecManager Beta 1.1.1-1 (Fixes) and Repo Enhancements
2025-01-19 22:18:02 -05:00
Cameron Thompson
050b5aa049 Rebuild-opkg feed 2025-01-19 22:17:15 -05:00
Cameron Thompson
995c3c3e21 Update Packages
Update depends for Packages
2025-01-19 22:06:35 -05:00
Cameron Thompson
d346826ae5 Update rebuild-feed_test.sh 2025-01-19 21:02:25 -05:00
Cameron Thompson
3c9472b5ee Update rebuild-feed_test.sh 2025-01-19 20:59:11 -05:00
Cameron Thompson
152e74bafb Fix issues with new opkg-rebuild script 2025-01-19 20:51:43 -05:00
Cameron Thompson
ad2af11429 Clean opkg-feed; add newly built ipk files 2025-01-19 20:28:15 -05:00
Cameron Thompson
5c2b385e18 Rebuild all ipk files 2025-01-19 20:11:34 -05:00
Russel Yasol
45f445cf28 Update auth.sh for special character support. 2025-01-20 09:06:03 +08:00
Russel Yasol
02583b04ed Added support for using special characters for password. 2025-01-20 09:03:43 +08:00
Cameron Thompson
059c613bde Fix Permissions 2025-01-19 19:53:15 -05:00
Cameron Thompson
e94b199b6e Fix permissions; Compile sms_tools aarch_64 AP 2025-01-19 19:51:23 -05:00
Cameron Thompson
2fe55cf223 Repo Control file improvements
Control files at minimum now list

Package:
Version:
Depends:
Architecture:
Maintainer:
MD5Sum:
Size:
Filename:
Source:
Description:

This will help improve workflow when rebuilding opkg-feed....

- Enhanced opkg-feed rebuild with a new test version of the script.

- Set the luci app default to send at commands to smd7 to avoid issues with smd11 being occupied
2025-01-19 19:10:41 -05:00
Russel Yasol
d28fadc1ba Merge branch 'development-SDXPINN' of https://github.com/dr-dolomite/QuecManagerBetaReleases into development-SDXPINN 2025-01-20 07:57:57 +08:00
Russel Yasol
5134a3bd38 Fixed AT Terminal state sessions and shedule cell locking bugs. 2025-01-20 07:57:54 +08:00
Cameron Thompson
e54d5e0552 Repo enhancements
- Added version requirements for tailscaled to the tailscale luci app depends list. This ensures you have the new init.d and config that are needed.

- Removed the conffile control for now since the formatting of the new config differs from the old.

- Tailscaled config is set to auto start a single instance now. This will be especially helpful for the scenario where you do not install the luci app. Your state file should be preserved so it will auto login if you have signed in before on your current flash cycle.

- Added version requirements for sms-tool on the QuecManager beta packages to ensure its dependencies are available.
2025-01-19 17:37:03 -05:00
Russel Yasol
29198d22d2 Improved clear_logs script 2025-01-19 14:47:13 +08:00
Russel Yasol
9d0667af58 Hotfix for reboot bug 2025-01-19 13:39:39 +08:00
Cameron Thompson
7694f1adf9 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-18 23:24:04 -05:00
Cameron Thompson
1b5d272940 Merge pull request #106 from dr-dolomite/development-SDXPINN
Sync build version 1.1.1
2025-01-18 22:11:27 -05:00
Cameron Thompson
49df6b784a rebuild opkg-feed 2025-01-18 22:07:43 -05:00
Cameron Thompson
d73fa42d06 Generate ipk 2025-01-18 22:01:52 -05:00
Cameron Thompson
a8043e6d95 Final Touches 2025-01-18 21:59:14 -05:00
Russel Yasol
1f5c2b8540 Merge branch 'development-SDXPINN' of https://github.com/dr-dolomite/QuecManagerBetaReleases into development-SDXPINN 2025-01-18 06:46:07 +08:00
Russel Yasol
f0121bcb4a Fixed QuecManager Services and removed deprecated change_sms script. 2025-01-18 06:46:00 +08:00
Russel Yasol
efdac9581c Merge branch 'iamromulan:development-SDXPINN' into development-SDXPINN 2025-01-18 06:39:41 +08:00
Cameron Thompson
7cf49c7862 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-17 16:30:03 -05:00
Cameron Thompson
450372f1c6 Rebuild opkg-feed
-Update Tailscaled ipk to 1.78.1-3
2025-01-17 16:25:59 -05:00
Cameron Thompson
040a50d8be Make it so old conff is replaced
tailscaled conf file fix
2025-01-17 16:24:43 -05:00
Cameron Thompson
6ccac640bc Update tailscaled package to 1.78.1-3 2025-01-17 16:20:18 -05:00
Cameron Thompson
404924884c Edit incorrect settings def
For luci-app-tailscale so it will work
2025-01-17 16:18:50 -05:00
Cameron Thompson
6319aca987 Rebuild opkg-feed 2025-01-17 15:54:33 -05:00
Cameron Thompson
8ba98f10cb Replace bad binary
- Bad binary tailscaled replaced
2025-01-17 15:52:33 -05:00
Cameron Thompson
ec55b990a9 Edit version to 1.1.1 2025-01-17 12:18:38 -05:00
Russel Yasol
a7365470f8 Optimized home and imei pages 2025-01-17 17:44:46 +08:00
Russel Yasol
634e2bbb29 Improved fetch_data processing speed 2025-01-17 17:17:21 +08:00
Russel Yasol
bae23b5587 Removed deprecated scripts 2025-01-17 15:00:35 +08:00
Russel Yasol
b8f9feef20 Added cgi-bin scripts 2025-01-17 14:57:15 +08:00
Russel Yasol
397e0de45a Ready for version 1.1.2
PR for the main repository, version 1.1.2 with sms_tool as the major change
2025-01-17 14:29:29 +08:00
Cameron Thompson
622d0d9361 Update tailscaled depends 2025-01-16 15:17:59 -05:00
Cameron Thompson
5b765953c4 Updated dependencies tailscaled;luci-app-tailscale 2025-01-16 15:13:56 -05:00
Cameron Thompson
492f837fee Rebuild opkg-feed
- Updated tailscaled init.d for new package:
- Added new package luci-app-tailscale
2025-01-16 14:59:45 -05:00
Cameron Thompson
fa0139c447 Merge dependencies
- Merged dependent config and init.d for luci-app-tailscale with tailscaled
2025-01-16 14:52:07 -05:00
Cameron Thompson
a2464e9793 ipk source: luci-app-tailscale
- Additional directory structure formatting updates
2025-01-16 14:05:31 -05:00
Cameron Thompson
adcd4a553d ipk-source: Add luci-app-tailscale; rename directories
- Added luci-app-tailcale to ipk-source from: https://github.com/asvow/luci-app-tailscale/releases/tag/v1.2.3

- Renamed ipk-source directories to have no version number, only arch where needed.
2025-01-16 14:03:39 -05:00
Cameron Thompson
dc81d00d6d Merge branch 'development-SDXPINN' into SDXPINN 2025-01-16 12:03:07 -05:00
Cameron Thompson
bd97f2e652 Rebuild opkg-feed
- Updated Quecmanager beta ipk
2025-01-16 12:02:18 -05:00
Cameron Thompson
13117829e8 Update QuecManager Beta to 1.1.0-6
- Removed a problematic script from quecmanager-services that was casing init.d to stall at boot. Services beyond it like uhttpd and tailscale would not start as a result.

- This script is slated for removal for the transition from atinout to sms_tool anyways.

- Kown issues: SMS does not work
2025-01-16 12:00:38 -05:00
Cameron Thompson
41e18cb5eb Merge branch 'development-SDXPINN' into SDXPINN 2025-01-16 00:58:33 -05:00
Cameron Thompson
ad3b364245 Rebuild opkg-feed 2025-01-16 00:57:58 -05:00
Cameron Thompson
0bb14ae09c Update socat-at-bridge to 1.1.1
- Fixed an issue causing the bridge to not properly form at boot

- A single file is executed with procd now instead for each smd device (AT Coammnd stream)
2025-01-16 00:56:29 -05:00
Cameron Thompson
f133866286 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-15 16:20:28 -05:00
Cameron Thompson
7810aed7d9 Rebuild opkg-feed
- New QuecManager Beta
2025-01-15 15:47:40 -05:00
Cameron Thompson
929b572e94 Update QuecManager to 1.1.0-5
- WWW content restored from -3
   - moved 2 files to cgi-bin/services
- Edits and improvements to control files
2025-01-15 15:46:12 -05:00
Cameron Thompson
f7de652f13 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-12 23:54:31 -05:00
Cameron Thompson
1fcbf71900 Update socat-bridge and QuecManager
Created quecmanager services
Removed SMS for now

Updated socat start priority and add smd7 as an option
2025-01-12 23:50:35 -05:00
Cameron Thompson
cef9ba16c2 Merge pull request #104 from dr-dolomite/development-SDXPINN
Removed SMS for the mean time
2025-01-12 22:48:28 -05:00
Russel Yasol
c06a2a7b54 Removed SMS for the mean time 2025-01-13 09:58:25 +08:00
Cameron Thompson
06b3c92f6e Merge branch 'development-SDXPINN' into SDXPINN 2025-01-12 20:46:54 -05:00
Cameron Thompson
dcbb99f5bd Update toolkit to current tailscale version 2025-01-12 20:46:36 -05:00
Cameron Thompson
c049d9c10a Merge branch 'development-SDXPINN' into SDXPINN 2025-01-12 20:12:12 -05:00
Cameron Thompson
48ba5f786c Merge branch 'development-SDXPINN' into SDXPINN 2025-01-12 23:37:28 -05:00
Cameron Thompson
5507b63ab7 Merge branch 'development-SDXPINN' of https://github.com/iamromulan/quectel-rgmii-toolkit into development-SDXPINN 2025-01-12 23:35:26 -05:00
Cameron Thompson
7f2196af64 Add time for rc.d to sync 2025-01-12 23:23:58 -05:00
Cameron Thompson
828049b537 Update tailscale
Same version; Just rebuilt on modem to preserve attributes to avoid issues with opkg
2025-01-12 20:10:48 -05:00
Cameron Thompson
075e6a529b Merge branch 'development-SDXPINN' into SDXPINN 2025-01-12 15:48:28 -05:00
Cameron Thompson
ef9ebc3ed5 Rebuild opkg-feed 2025-01-12 15:40:20 -05:00
Cameron Thompson
d45581f140 Rebuilt all on modem
To avoid segmentation error
2025-01-12 15:39:31 -05:00
Cameron Thompson
dc4c42e4ac Fix perrmisions 2025-01-12 15:27:18 -05:00
Cameron Thompson
097b45945f socat-at-bridge fix opkg-feed 2025-01-12 15:06:42 -05:00
Cameron Thompson
c6b30a6c2a Update control 2025-01-12 15:05:19 -05:00
Cameron Thompson
38fd92ad4b Update socat-at-bridge
Make executable
2025-01-12 15:04:53 -05:00
Cameron Thompson
3acde3d007 Fix mistake on socat-at-bridge 2025-01-12 15:00:51 -05:00
Cameron Thompson
1133c3113a Fix missing commas 2025-01-12 14:55:46 -05:00
Cameron Thompson
f0a75e3e9b Update opkg feed
-Added socat-at-bridge
-Updated sms_tool
2025-01-12 14:36:06 -05:00
Cameron Thompson
13ba36f560 update sms_tool and socat_at-bridge
-Updated sms_tool binary to the AP aarch64 version

- socat-at-bridge ready to build
2025-01-12 14:14:47 -05:00
Cameron Thompson
e5d1850253 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-12 13:07:06 -05:00
Cameron Thompson
5d29af2f85 Update quecmanager beta ipk 2025-01-12 13:06:40 -05:00
Cameron Thompson
729529a564 Merge pull request #102 from dr-dolomite/development-SDXPINN
Merging request for v1.1.0-3
2025-01-12 13:01:44 -05:00
Russel Yasol
97e45f66c6 Added fix for logging signal metrics
Added a fix for signal metrics logging being too aggressive in cleaning output resulting to empty JSONs
2025-01-12 17:25:00 +08:00
Russel Yasol
259d50ee69 Merging v1.1.0-3
Fixed band lock bug for SA and NSA bands.
2025-01-12 14:39:42 +08:00
Russel Yasol
a3f01dd33e Merge pull request #2 from iamromulan/development-SDXPINN
Development sdxpinn
2025-01-12 14:36:30 +08:00
Cameron Thompson
a9920c6ea4 Add socat-at-bridge ipk source 2025-01-12 01:09:02 -05:00
Cameron Thompson
cc12a388e5 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-11 15:55:16 -05:00
Cameron Thompson
d939a33333 Merge pull request #101 from sondercoder/patch-1
Update rcPCIe_SDXPINN_toolkit.sh
2025-01-11 15:52:44 +00:00
sondercoder
576231f0b1 Update rcPCIe_SDXPINN_toolkit.sh
curl correct mount-fix version
2025-01-11 01:21:35 -07:00
Cameron Thompson
366fa94c9b Merge branch 'development-SDXPINN' into SDXPINN 2025-01-11 02:17:13 -05:00
Cameron Thompson
7b60eb6495 Update rcPCIe_SDXPINN_toolkit.sh
Update file name
2025-01-11 02:16:51 -05:00
Cameron Thompson
442cf882c3 Merge branch 'development-SDXPINN' into SDXPINN 2025-01-11 02:12:09 -05:00
Cameron Thompson
775674cbed mount-fix ready to test
Confirmed working on my modem
2025-01-11 02:11:12 -05:00
Cameron Thompson
78d9bdabff Missing d 2025-01-10 21:11:07 -05:00
Cameron Thompson
35be8163bd Remove extra }
¯\_(ツ)_/¯
2025-01-10 12:19:46 -05:00
Cameron Thompson
0c6194e00c mount-fix Test
First test with new firmware with updated mount-fix package
2025-01-10 00:29:13 -05:00
Cameron Thompson
47c1ea44ad Progress for: mount-fix
Slowly working on patch to account for new mounts on December firmware
2025-01-08 01:41:08 -05:00
Cameron Thompson
c4e1b9483c Merge branch 'development-SDXPINN' into SDXPINN 2025-01-02 20:30:20 -05:00
Cameron Thompson
871bc0f645 Fix for latest firmware
The 12/23/24 RM551 firmware is missing the init.d scripts. Re-add automatically in those conditions.
2025-01-02 20:30:04 -05:00
Cameron Thompson
ae46149862 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-24 04:21:07 +00:00
Cameron Thompson
0f64341f65 Add new package sms-tool 2024-12-24 04:20:49 +00:00
Cameron Thompson
db83597a33 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-24 03:18:25 +00:00
Cameron Thompson
c3fea1014b update opkg-feed 2024-12-24 03:17:49 +00:00
Cameron Thompson
d108469062 Hot Fix permissions 2024-12-24 03:03:33 +00:00
Cameron Thompson
b0fc66689e Merge branch 'development-SDXPINN' into SDXPINN 2024-12-24 02:28:10 +00:00
Cameron Thompson
e569e47416 Fix signature 2024-12-24 02:27:49 +00:00
Cameron Thompson
9e4f9fc159 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-24 02:23:24 +00:00
Cameron Thompson
501ead5a2c update opkg-feed
updated quecmanager beta ipk
2024-12-24 02:21:58 +00:00
Cameron Thompson
994f831818 Merge pull request #98 from dr-dolomite/development-SDXPINN
Beta Build 1.1.0
2024-12-24 01:55:42 +00:00
Russel Yasol
8b80f3bd35 Added optimization to band locking fetch calls 2024-12-24 09:13:52 +08:00
Russel Yasol
d7555208d3 Merge pull request #1 from iamromulan/development-SDXPINN
Development sdxpinn
2024-12-24 09:11:13 +08:00
Cameron Thompson
3317793099 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-23 16:36:22 -05:00
Cameron Thompson
999a9c7d37 Update opkg-feed
-Updated QuecManager BETA ipk to 1.0.9

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-23 16:35:32 -05:00
Cameron Thompson
dcd8cd6ab7 QueManager BETA 1.0.9
- Added Cell Locking Scheduler UI improvements
- Fixed change_sms_code.sh to properly exit
- Added an experimental feature: Keep-alive
- Added disable state for speedtest when keep-alive is active

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-23 16:33:51 -05:00
Cameron Thompson
f4dba6cce0 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-22 20:06:49 -05:00
Cameron Thompson
1f315e8ca6 Rebuild ipk 2024-12-22 20:06:24 -05:00
Cameron Thompson
7acb2e170f Merge branch 'development-SDXPINN' into SDXPINN 2024-12-22 20:02:47 -05:00
Cameron Thompson
1449a36ef8 rename login hotfix 2024-12-22 20:02:16 -05:00
Cameron Thompson
96095fcb09 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-22 19:58:42 -05:00
Cameron Thompson
2ad7b54a97 update opkg-feed
updated quecmanager beta ipk to 1.0.8
2024-12-22 19:58:01 -05:00
Cameron Thompson
e03d882626 QuecManager BETA 1.0.8
- Speedtest fixes
2024-12-22 19:56:48 -05:00
Cameron Thompson
944fd61748 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-22 13:22:12 -05:00
Cameron Thompson
15adb7b260 update opkg-feed 2024-12-22 13:21:31 -05:00
Cameron Thompson
299f7b450f prerm hotfix 2024-12-22 13:19:24 -05:00
Cameron Thompson
15556419cd Merge branch 'development-SDXPINN' into SDXPINN 2024-12-22 13:14:56 -05:00
Cameron Thompson
daa0f9295c update opkg-feed
-Updated QuecManager BETA to 1.0.7
2024-12-22 13:14:03 -05:00
Cameron Thompson
007b268b03 QuecManager BETA 1.0.7
- Resolved SMS Inbox Display Issue: Fixed a bug preventing messages from being displayed in the SMS inbox.

- Enhanced SMS Inbox Functionality: Optimized the SMS inbox to group messages with the same sender and timestamp.

- Corrected Signal Metrics Calculation: Addressed inaccuracies in the calculation of signal metrics.

- Updated Speedtest Cooldown: Increased the cooldown period for speed tests from 5 seconds to 10 seconds.

- Improved Speedtest Cleanup: Ensured the pipe is removed automatically after the speed test completes.

- Updated to NextJS 15

- Improved Quecwatch script

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-22 13:12:20 -05:00
Cameron Thompson
fe88898f2f update opkg-feed
-Updated QuecManager BETA to 1.0.6

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-21 16:13:42 -05:00
Cameron Thompson
0e74abe7db QuecManager BETA 1.0.6
- Resolved IMEI Mangling Issue
- Optimized Logging and AT Operations: Centralized logging to smd7 and redirected all AT operations to smd11 to prevent request conflicts.
- Introduced Cell Locking Scheduler
- Fixed SMS Inbox Loading Issue: Addressed a bug where the SMS inbox would get stuck during loading.
- Enhanced Speedtest Output: Updated speed test results to display values with two decimal points when reaching GBps speeds.
- Changed Link Speed from "Unknown!" to "-" when link is not active
- Added 5 second cooldown to speedtest

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-21 16:11:55 -05:00
Cameron Thompson
8666d450c4 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-18 23:40:57 -05:00
Cameron Thompson
c8b53ae3f3 Update opkg-feed
- Updated quecmanager beta ipk to 1.0.5

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-18 23:38:22 -05:00
Cameron Thompson
df6b4114a8 Update QuecManager Beta to 1.0.5
- Improved signal metrics script so that it will not overlap with data usage that also uses smd7
- Improved signal metrics refresh speed to 15 seconds
- Fixed speedtest get logic that causes a bug when using tailscale
- Improved signal metrics refresh animation

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-18 23:35:25 -05:00
Cameron Thompson
476c949e6c Merge branch 'development-SDXPINN' into SDXPINN 2024-12-18 13:24:24 -05:00
Cameron Thompson
0298242849 Update opkg-feed
Added 1.0.4 quecmanager beta ipk
2024-12-18 13:23:15 -05:00
Cameron Thompson
3e8449e06b Update: QuecManager BETA 1.0.4
- Added proper truncation
-Moved signal graphs from smd11 to smd7
- Added decimal place for gigabit speeds

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-18 13:19:55 -05:00
Cameron Thompson
38a551ef5c Merge branch 'development-SDXPINN' into SDXPINN 2024-12-17 21:55:33 -05:00
Cameron Thompson
78cc255af6 Rebuild feed
Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-17 20:54:01 -05:00
Cameron Thompson
5de2e4dc41 QuecManager BETA 1.0.3
-UI hotfixes
-Postrm fix

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-17 20:49:30 -05:00
Cameron Thompson
214bc89832 Rebuild feed
Add new dependencies to Packages file
2024-12-17 19:32:57 -05:00
Cameron Thompson
aed53a49ed Rebuild feed
Updated quecmanager beta ipk
2024-12-17 19:14:32 -05:00
Cameron Thompson
b981b4a519 QuecManager 1.0.2 BETA
- Added signal graphs for RSRP, RSRQ, and SINR
- Added ethernet connection details
- Added memory usage details
- Added ping graph

Known bug:
Signal graphs may sometimes show inaccurate values. It seems to be a fetching error but Ill try to find the real root cause as soon as possible

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-17 19:11:26 -05:00
Cameron Thompson
45e8ef8272 Merge branch 'development-SDXPINN' into SDXPINN 2024-12-12 18:49:05 -05:00
Cameron Thompson
f145802509 Update opkg-feed
Updated QuecManager to 1.0.1

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-12 18:40:02 -05:00
Cameron Thompson
52f68bc54c QuecManager 1.0.1
- Fixed an issue where diagnosis would not work while in SA

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-12 18:36:35 -05:00
Cameron Thompson
9facd17476 Merge Cleanup
Remove old packages and edit branch name in deployment toolkit sh
2024-12-11 23:40:34 -05:00
Cameron Thompson
3670e3ee8d Merge branch 'development-SDXPINN' into SDXPINN 2024-12-11 23:36:35 -05:00
Cameron Thompson
e035b2a37c Rebuild opkg-feed
QuecManager and QuecManager-beta both synced at version 1.0.0

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-11 23:17:17 -05:00
Cameron Thompson
bb4d75f560 QuecManger 1.0.0
Release Notes:

Enhanced Web App Architecture:

- Optimized the structure for better scalability and maintainability.

- Refined Data Fetching Logic:
Improved the efficiency and reliability of data retrieval processes.

- Optimized AT Terminal: Enhanced functionality for smoother interaction with AT commands.

- Revamped UI/UX Design: Streamlined user interface and experience for improved accessibility and usability.

New Features:

- MTU Settings: Added customizable Maximum Transmission Unit (MTU) settings.

- APN and IMEI Profiles: Introduced the ability to configure APN and IMEI profiles for better device management.

- Persistent Cell Locking: Added native support for persistent cell locking, ensuring consistent network connections.

- QuecWatch: Connection monitoring with auto reconnect and reboot settable

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-11 23:11:41 -05:00
Cameron Thompson
46f8e1af8b QuecManger 1.0.0-beta
Release Notes:

Enhanced Web App Architecture:

- Optimized the structure for better scalability and maintainability.

- Refined Data Fetching Logic:
Improved the efficiency and reliability of data retrieval processes.

- Optimized AT Terminal: Enhanced functionality for smoother interaction with AT commands.

- Revamped UI/UX Design: Streamlined user interface and experience for improved accessibility and usability.

New Features:

- MTU Settings: Added customizable Maximum Transmission Unit (MTU) settings.

- APN and IMEI Profiles: Introduced the ability to configure APN and IMEI profiles for better device management.

- Persistent Cell Locking: Added native support for persistent cell locking, ensuring consistent network connections.

- QuecWatch: Connection monitoring with auto reconnect and reboot settable

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-11 23:00:57 -05:00
Cameron Thompson
0f8ec6d242 Rebuild feed & update tailscale
- QuecManager beta updated to 0.0.9
- Tailscale updated to 1.78.1
2024-12-07 22:35:51 +00:00
Cameron Thompson
29196f7f9b Update QuecManager to 0.0.9
- Added MTU settings
- Added no SIM detected message

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-07 22:22:29 +00:00
Cameron Thompson
293940e3f0 Correct reading set MTU 2024-12-07 02:05:35 -05:00
Cameron Thompson
a6a293116e Update MTU function 2024-12-07 01:44:54 -05:00
Cameron Thompson
075046300b Add MTU modification ability
First test: modification of MTU from toolkit
2024-12-06 20:56:09 -05:00
Cameron Thompson
c0cc14bfcb Update opkg-feed
Latest QuecManager beta

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-01 04:58:15 +00:00
Cameron Thompson
ac472a2f5c Update QuecManager beta to 0.0.8
- Various edits
- Addition of QuecWatch for connection monitoring

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-01 04:49:19 +00:00
Cameron Thompson
b9d88c21c0 Rebuild opkg-feed
quecmanager-beta 0.0.6 --> 0.0.7
2024-11-18 22:38:00 +00:00
Cameron Thompson
4af2890b43 quecmanager-beta 0.0.7
- Improved SMS view on mobile
- Improved AT terminal view on mobile
- Fixed traffic stats not registering for NR traffic.
- Fixed Luci's link issue when using tailscale

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-11-18 22:35:17 +00:00
Cameron Thompson
f9b1161a82 update opkg-feed quecmanager-beta 0.0.6 2024-11-14 00:52:09 +00:00
Cameron Thompson
f137ae6074 Update quecmanager-beta to 0.0.6
- Diagnostics button will now always visible

- Fixed error message when theres no scripts to rerun

- Added the same fix for the false error message when switching sims

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-11-14 00:49:57 +00:00
Cameron Thompson
96bdfd5109 Rebuild opkg-feed
sdxpinn-quecmanager-beta_0.0.5 Available
2024-11-13 23:53:31 +00:00
Cameron Thompson
66c9fc6da9 quecmanager-beta 0.0.5
- Improved signal strength and quality percentages
- Fixed hover color for signal strength
- Removed success toasters when navigating to some pages. Error toasters will still be shown
- Improved overall calculation of RSRP, RSRQ and SINR for quick stats page
- Improved skeleton loading for Home page
- Added navigation arrows for Band carousel for mobile view
- Added SMS Inbox

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-11-13 23:43:10 +00:00
Cameron Thompson
b83ea53091 Hot Fix: wrong file name quecmanager beta
rebuilt feed
2024-11-13 03:01:19 +00:00
Cameron Thompson
7cf7083767 rebuild-feed 2024-11-13 02:52:13 +00:00
Cameron Thompson
f24bfc0478 quecmanager-beta fixes
Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-11-13 02:50:34 +00:00
Cameron Thompson
3c37a3b9af Update sdxpinn-quecmanager-beta
Added missing conf file
2024-11-12 02:00:26 +00:00
Cameron Thompson
12dde2e40a Merge pull request #92 from dr-dolomite/development-SDXPINN
Initial test release for quecmanager-beta
2024-11-12 01:04:22 +00:00
Cameron Thompson
545b381004 Resign Packages 2024-11-12 01:02:12 +00:00
Cameron Thompson
6a0a41b8b9 Build ipk
- Had postinst copy login.html to index.html

-Made all files in cgi-bin +x

- Generated ipk
2024-11-12 00:33:51 +00:00
Cameron Thompson
acae974583 Initial Changes
- Renamed index.html to login.html to allow postinst to handle preserving orginal index.html during install

-Edited Control file for new package

-Created new script to automate rebulding Packages, Packages.gz, and Packages.sig for the feed (Work in progress)

-Added complied x64 usign binary

-Removed extra tailscale package
2024-11-11 20:00:04 +00:00
unknown
b5b18b9cd0 updated imei profile script that causes boot loop when used 2024-11-10 16:47:29 +08:00
unknown
a174267dd8 initial test release for quecmanager-beta 2024-11-10 14:47:22 +08:00
Cameron Thompson
cea5899666 Sync Changes with SDXPINN main branch 2024-11-08 23:57:59 -05:00
Cameron Thompson
d53d7af8d6 Update README.md 2024-11-04 10:12:32 -05:00
Cameron Thompson
6df1dfc132 Hotfix place correct ipk back 2024-10-31 23:15:30 +00:00
Cameron Thompson
3e3810ba18 Hotfix tailscale bin
Fix permissions issue on tailscale bin
2024-10-31 23:08:40 +00:00
Cameron Thompson
74b7c11cab Add link to YouTube setup video 2024-10-30 03:25:45 +00:00
Cameron Thompson
12c8430670 Update Repo
- Updated Package:
sdxpinn-quecmanager to 0.0.3

     - Fixed issue described here: c8faf539c1

- Updated package sdxpinn-console-menu to 0.0.2

     - Added new menu: LAN Settings
          - Will let you edit the LAN settings. Only for DMZ mode or normal LAN mode not mpdn_rule. Work in Progress.

- Updated package tailscaled tailscale to 1.76.1
See tailscale's website for chnagelog

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-10-30 02:26:06 +00:00
Cameron Thompson
b5c7bfe567 Update Packages
- Updated QuecManager to 0.0.3 include patch from c8faf539c1

- Added LAN settings to sdxpinn-console-menu V0.0.2

- Updated Tailscale ipks from 1.74.1 to 1.76.1
2024-10-30 02:07:11 +00:00
Cameron Thompson
6ed4a3e1e4 Update ipk-source
Update QuecManager ipk-source to version 0.0.3

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-10-29 23:46:38 +00:00
Cameron Thompson
c8faf539c1 Fix No Phone Number scenario
Fix:
In the scenario where a phone number is not able to be read from the SIM, QuecManager will now continue to provide other stats.

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-10-29 23:44:48 +00:00
Cameron Thompson
b5f299dfb2 Sync with release branch
Pull updates from release branch
2024-10-29 23:36:37 +00:00
iamromulan
0cf8fd10a9 Create lan_menu 2024-10-17 19:42:08 -05:00
Cameron Thompson
03f42b03bc Create make-ipk
will make an ipk from an already installed package
2024-10-12 01:55:58 -04:00
iamromulan
76891cce61 Fix wrong file name in Packages
- fixed mistake in Packages
- Updated sig

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-10-11 14:44:07 -04:00
iamromulan
be9ee7def5 Sync Changes with development-SDXPINN
-Updated QuecManager to 0.0.2 from PR #87

- Change-log:

https: //github.com/iamromulan/quectel-rgmii-toolkit/pull/87
Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-10-11 14:35:17 -04:00
iamromulan
c0394cf215 Update opkg-feed
- Increased version number for QuecManager

- Generated new ipk

- Updated Packages file and resgined
2024-10-11 14:26:06 -04:00
Russel Yasol
35eedffe95 rebased for applying latest changes 2024-10-11 11:42:41 +08:00
iamromulan
28c39a4829 Fix ipk size 2024-10-06 04:18:24 -04:00
iamromulan
15ca383d34 Wrong size for speedtest ipk 2024-10-06 04:17:26 -04:00
iamromulan
c9a3c9966c Update Packages.gz 2024-10-06 03:51:43 -04:00
iamromulan
aa049aaa89 Update Packages.gz 2024-10-06 03:50:36 -04:00
iamromulan
a990ce2773 Update packages
-Forgot commas
2024-10-06 03:38:31 -04:00
iamromulan
e19bb58e92 Update packges
Forgot commas
2024-10-06 03:36:43 -04:00
Cameron Thompson
276702911c Update README.md 2024-10-06 03:15:59 -04:00
Cameron Thompson
76ff7eeafd Update README.md 2024-10-06 03:10:11 -04:00
Cameron Thompson
df589bcb7e Update README.md 2024-10-06 03:09:33 -04:00
Cameron Thompson
7877276498 Update README.md 2024-10-06 02:58:07 -04:00
iamromulan
624a74be0d Sync with development-SDXPINN 2024-10-06 02:56:50 -04:00
iamromulan
7a636798d6 SDXPINN branch is now ipk focused
-Updated opkg-feed with new packages
-Updated key cause I lost my private key
2024-10-06 02:52:53 -04:00
Cameron Thompson
705d461342 Update link 2024-10-06 00:32:42 -04:00
Cameron Thompson
69a6f7b62d Update rcPCIe_SDXPINN_toolkit.sh
Forgot key add
2024-10-05 22:10:52 -04:00
Cameron Thompson
7a2ec5d02c Update rcPCIe_SDXPINN_toolkit.sh
typo
2024-10-05 22:02:40 -04:00
iamromulan
a37177a3af Build sdxpinn-quecmanger ipk
-Removed no longer needed files
-Created ipk for quecmanager

-Thank you @dr-dolomite for your hard work on this!

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-10-05 21:20:05 -04:00
iamromulan
e154dee562 Update to use ipk and opkg instead
Moving in the right direction
2024-10-05 20:50:57 -04:00
Cameron Thompson
2055ab69dc Merge pull request #84 from dr-dolomite/QuecManager
Added About Page Functionality
2024-10-05 20:11:29 -04:00
Russel Yasol
8c0b758cb3 added about page functioanlity 2024-10-06 08:00:12 +08:00
iamromulan
40d57e9930 Update tailscale to 1.74.1 2024-10-05 19:35:42 -04:00
iamromulan
79d0e4db3f Add Tailscale 1.74.1 static binaries 2024-10-05 19:24:40 -04:00
iamromulan
2ca21c6087 Remove test IPKs Add release IPK
sdxpinn-mount-fix 1.1.0 ready
2024-10-05 19:20:08 -04:00
iamromulan
191067031f sdxpinn-mount-fix ipk Ready
Ready for use:
- Works in online/offline scenarios
- Dependencies bundled
- Dependencies register as separate packages
- Will detect existing installed dependencies and adapt
2024-10-05 23:12:23 -04:00
iamromulan
735fcfb9a8 Update preinst 2024-10-05 23:09:08 -04:00
iamromulan
9a9b47c294 Create sdxpinn-mount-fix_1.0.11_aarch64_cortex-a53.ipk 2024-10-05 17:25:42 -04:00
iamromulan
3a35becca8 Update: sdxpinn-mount-fix 1.0.11 RC
-Improved stopping mount-fix
     - Now restores stock filesystem completely when stopped.
     - / is still rw after but a reboot or setting it to ro will make it be read only again

- Improved echo and comments
2024-10-05 21:05:36 -04:00
iamromulan
b7b8bb2838 Add installation warning to preinst
sdxpinn-mount-fix
remove no longer needed ipk
2024-10-05 20:23:22 -04:00
iamromulan
5b89d9098c sdxpinn-mount-fix Version: 1.0.10
-Fix: Status file not updating
-Fix: Account for already installed services
2024-10-05 15:51:42 -04:00
iamromulan
67de104199 Update postinst 2024-10-05 15:47:10 -04:00
iamromulan
d0abbb2812 Update postinst 2024-10-05 15:37:50 -04:00
iamromulan
a2ff2799b5 Update to sdxpinn-mount-fix to 1.0.9
-Should now account for the scenario where bundled dependencies are already installed
2024-10-05 15:10:01 -04:00
iamromulan
e191a0009c Update to handled pre-installed dependencies 2024-10-05 18:57:50 -04:00
Cameron Thompson
25be4b30db typo 2024-10-05 14:04:22 -04:00
Cameron Thompson
f7d237856e Update control
Update control file to not have a direct suggested or otherwise dependency.
2024-10-05 14:01:20 -04:00
iamromulan
c7d238e65f Update sdxpinn-mount-fix
1.0.8
-Fixed .list exclusions
-status now updates with a self removing post init
-Fixed prerm script
2024-10-05 12:40:50 -04:00
iamromulan
0bb0720c6b Remove extra list entries; Fix prerm 2024-10-05 12:18:50 -04:00
Cameron Thompson
e7cb821fa1 Merge pull request #83 from dr-dolomite/QuecManager
Added Cellular Settings Functionality
2024-10-05 02:59:50 -04:00
iamromulan
4e361eb336 sdxpinn-mount-fix 1.0.7
Using a post init.d script now to add extra opkg status entries
2024-10-05 02:34:15 -04:00
iamromulan
368825c13a Update status after opkg completes via init 2024-10-05 06:03:17 -04:00
iamromulan
7f4b651ed7 Update sdxpinn-mount-fix version 2024-10-05 01:24:30 -04:00
iamromulan
151ec22f95 Update postinst 2024-10-05 05:17:08 -04:00
iamromulan
f3fb31acfa Update test_status_update.sh 2024-10-05 04:44:19 -04:00
iamromulan
f9da788193 Update test_status_update.sh 2024-10-05 04:39:03 -04:00
iamromulan
1aca8c892f Create test_status_update.sh
For diagnosing why we can't write to the status file
2024-10-05 04:32:12 -04:00
iamromulan
b90cb9b460 Update to version 1.0.5
Attempting to add entries to the status file differently
2024-10-05 00:13:56 -04:00
iamromulan
2652c15aef Update postinst 2024-10-05 04:06:23 -04:00
iamromulan
3a2ca5c1ab Add new ipk delete failed tests 2024-10-04 23:49:03 -04:00
iamromulan
dd8e4d1bba Update Version
Suppress bogus errors
2024-10-04 23:47:35 -04:00
iamromulan
2d0af5b2ae Update postinst 2024-10-05 03:21:35 -04:00
iamromulan
c307ccd8a8 Create sdxpinn-mount-fix_1.0.3_aarch64_cortex-a53.ipk 2024-10-04 22:41:42 -04:00
iamromulan
0b24fabb48 Update Version number 2024-10-04 22:39:07 -04:00
iamromulan
b5bf9a4fb9 Fix bundled packages issue
Fix bundled packages not showing up as a separate package in opkg
2024-10-05 02:34:00 -04:00
iamromulan
26de7b7b6c Create sdxpinn-mount-fix_1.0.2_aarch64_cortex-a53.ipk
Create ipk from /ipk-source/sdxpinn-mount-fix/
2024-10-04 21:48:13 -04:00
iamromulan
861085cb26 Update postinst 2024-10-04 21:44:25 -04:00
iamromulan
f7e89663ee Integrate bundled packages 2024-10-04 21:40:31 -04:00
Russel Yasol
0adddef63a added network pref and nr5g mode control functionalities 2024-10-05 08:58:15 +08:00
Cameron Thompson
ae23d55274 Merge ipks part 1
Merge inotifywait and libinotifytools into mount fix part 1
2024-10-04 15:15:07 -04:00
Cameron Thompson
b811265921 Merge pull request #82 from dr-dolomite/QuecManager
Added fixes and improvements
2024-10-04 10:04:51 -04:00
Russel Yasol
b4ef80c116 added fixes and improvements 2024-10-04 17:26:02 +08:00
iamromulan
061fb6abe6 Further extract and setup for rebuild 2024-10-04 00:45:29 -04:00
iamromulan
1af3ee2d5e Add inotifywait and libinotifytools extracted ipk 2024-10-04 04:02:26 -04:00
iamromulan
823a5fa342 Add extracted files from tailscale ipks
Extracted the contents of:

https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/packages/tailscale_1.32.3-1_aarch64_cortex-a53.ipk

https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/packages/tailscaled_1.32.3-1_aarch64_cortex-a53.ipk
2024-10-04 02:59:39 -04:00
Cameron Thompson
687d684937 Merge pull request #81 from dr-dolomite/QuecManager
Fixes and improvements
2024-10-03 22:26:33 -04:00
iamromulan
3f54d58422 Update ipk 2024-10-03 22:25:20 -04:00
iamromulan
77c4fa6667 Update for Offline deployment
-Added dependent ipks as apart of package

-Now installs via postinst script

From:

https://mirror-03.infra.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/packages/libinotifytools_3.20.11.0-1_aarch64_cortex-a53.ipk

https://mirror-03.infra.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/packages/inotifywait_3.20.11.0-1_aarch64_cortex-a53.ipk

- Added missing base feed telephony
2024-10-03 22:22:29 -04:00
Russel Yasol
78c673ed4d fixed apn and improved javascripts 2024-10-04 06:02:21 +08:00
Cameron Thompson
044bab364f Merge pull request #80 from dr-dolomite/QuecManager
Added advance settings functionality
2024-10-03 10:25:00 -04:00
Russel Yasol
46c1d92f90 added advance settings functionality 2024-10-03 22:18:49 +08:00
Cameron Thompson
69e22c5f6c Merge pull request #79 from dr-dolomite/QuecManager
Fxed critical bug on bands table when viewing on mobile
2024-10-03 08:48:42 -04:00
Russel Yasol
f93a4d8082 fixed data fetching error 2024-10-03 16:28:50 +08:00
Cameron Thompson
2feecf15e1 Add sdxpinn-mount-fix
-Source Added
-build-ipk executable script added
-ipk added
2024-10-03 04:07:28 -04:00
Russel Yasol
af8aee60ff added nr5g_dc on bandlocking 2024-10-03 15:47:10 +08:00
Russel Yasol
148fb5df1b fixed data fetching error 2024-10-03 14:02:10 +08:00
Russel Yasol
a9f8ae753b fixed critical bug on bands table when viewing on mobile 2024-10-03 13:30:14 +08:00
Cameron Thompson
7594aa095b Delete opkg-source/sdxpinn-mount-fix/build-ipk 2024-10-03 00:03:45 -04:00
Cameron Thompson
6633e7f70b Delete opkg-source/sdxpinn-mount-fix/sdxpinn-mount-fix_1.0_aarch64_cortex-a53.ipk 2024-10-03 00:03:34 -04:00
Cameron Thompson
f08a40bdbd Delete opkg-source/sdxpinn-mount-fix/root/tmp/distfeeds.conf 2024-10-03 00:03:23 -04:00
Cameron Thompson
7ddbd1430f Delete opkg-source/SDXPINN-mount-fix directory 2024-10-03 00:02:34 -04:00
Cameron Thompson
94bab21696 add sdxpinn-mount-fix ipk and source 2024-10-03 04:01:22 -04:00
Cameron Thompson
30adb3e744 Merge pull request #77 from dr-dolomite/QuecManager
Bug Fixes
2024-10-02 23:02:55 -04:00
Russel Yasol
badfb5e182 fixed auth redirection bug 2024-10-03 08:33:32 +08:00
Cameron Thompson
0a77e5e497 Merge pull request #76 from dr-dolomite/QuecManager
Added Various Improvements and Utils
2024-10-02 20:16:46 -04:00
Russel Yasol
7d36748dce added auth improvements and luci 2024-10-03 05:48:00 +08:00
Cameron Thompson
37ffbdc320 Merge pull request #75 from dr-dolomite/QuecManager
QuecManager Home for RM551E
2024-10-02 08:27:26 -04:00
Russel Yasol
661a3c3f44 fixed merging error on auth.js 2024-10-02 20:23:19 +08:00
Russel Yasol
6fbcc3c28d Merge branch 'QuecManager' of https://github.com/dr-dolomite/quectel-rgmii-toolkit into QuecManager 2024-10-02 20:20:06 +08:00
Russel Yasol
21be826fba fixed band tables for SA 2024-10-02 20:19:44 +08:00
Russel Yasol
b032ad738d Merge branch 'development-SDXPINN' into QuecManager 2024-10-02 19:33:35 +08:00
Russel Yasol
b70ada6b9c ready for PR 2024-10-02 19:22:00 +08:00
Cameron Thompson
e276ac479f Add overlay-init-watchdog
also updated pre/post scripts
2024-09-30 23:29:07 -04:00
Cameron Thompson
63e6c62c5c add ipk build files for SDXPINN-mount-fix 2024-09-30 22:31:13 -04:00
Cameron Thompson
e0e31824f6 Mockup from @dr-dolomite
Example www content
2024-09-30 00:40:03 -04:00
Cameron Thompson
2165713141 Add Working nginx examples
To use these files set uhttpd to listen on 127.0.0.1:1000

install nginx-ssl from opkg
replace the init.d script with the one from here
add in the conf file
restart nginx/reboot

nginx will proxy to luci and uhttpd will handle cgi in cgi-bin for nginx
2024-09-29 23:36:14 -04:00
Cameron Thompson
c43728856f Update rcPCIe_SDXPINN_toolkit.sh 2024-09-29 23:22:16 -04:00
Cameron Thompson
8ac1dda904 Update README.md 2024-09-29 23:11:47 -04:00
Cameron Thompson
c28748016c Fixed speedtest installer 2024-09-29 22:37:13 -04:00
Cameron Thompson
934b8eec41 Create menu 2024-09-29 21:47:15 -04:00
Cameron Thompson
75668f3692 Update rcPCIe_SDXPINN_toolkit.sh
Switch to curl for tailscale
2024-09-25 01:07:59 -04:00
Cameron Thompson
b6d140782b Update README.md 2024-09-25 00:31:22 -04:00
Cameron Thompson
49e86fd69b Update README.md 2024-09-25 00:21:33 -04:00
Cameron Thompson
214931a454 Forgot syntax 2024-09-22 17:59:39 -04:00
Cameron Thompson
fd40f3caaa Add service starts; Add set password part of basic setup 2024-09-22 17:56:34 -04:00
Cameron Thompson
56aafcbd61 Fix dumb mistake 2024-09-22 17:37:37 -04:00
Cameron Thompson
812e096354 Ready to test 2024-09-22 17:23:25 -04:00
Cameron Thompson
5d92fdeadf Progress
Reorganize; add a new service that actively keeps rc.d in sync with the real rootfs
2024-09-22 05:08:27 -04:00
Cameron Thompson
224f63c1a8 Update toolkit name 2024-09-22 01:12:07 -04:00
Cameron Thompson
202606166a Update README.md 2024-09-21 21:07:00 -04:00
Cameron Thompson
5832fdef18 Remove from main branch 2024-09-22 01:01:13 -04:00
Cameron Thompson
0f9eaf6df5 Update key 2024-09-22 00:40:29 -04:00
Cameron Thompson
cb02197463 rename to opkg-feed 2024-09-21 19:40:51 -04:00
Cameron Thompson
e16cf97a6d Add IPKs 2024-09-21 19:30:34 -04:00
Cameron Thompson
d2390a7ece Create socat-at-bridge 2024-09-17 22:56:48 -04:00
iamromulan
cb021d2410 Add rule clear before setting new ones 2024-07-21 16:30:10 -04:00
iamromulan
f26dfb33b5 TTL Function improvement 2024-07-21 16:10:53 -04:00
iamromulan
4f66e2150f Force the user to reboot after setting TTL 2024-07-20 23:44:48 -04:00
iamromulan
2a010a19c1 Add firewall reload 2024-07-20 23:18:39 -04:00
iamromulan
c9b63a21e7 Take3 2024-07-20 23:09:26 -04:00
iamromulan
eb4eace916 take 2 2024-07-20 23:07:50 -04:00
iamromulan
4f39f39e9a Fix TTL not being read 2024-07-20 23:06:21 -04:00
iamromulan
477d393116 Update RM55x_rcPCIe_toolkit.sh 2024-07-20 23:01:41 -04:00
iamromulan
042b76b89d Update RM55x_rcPCIe_toolkit.sh 2024-07-20 22:12:56 -04:00
iamromulan
b8ed7f2ba8 Update ttl_setup 2024-07-20 22:02:36 -04:00
iamromulan
e7ef610f05 Use ash instead 2024-07-20 21:38:14 -04:00
iamromulan
9f855ba473 Update RM55x_rcPCIe_toolkit.sh 2024-07-20 21:34:57 -04:00
iamromulan
4215168042 ;; in front of comment fixed 2024-07-20 21:28:21 -04:00
iamromulan
fd4666a546 Update RM55x_rcPCIe_toolkit.sh 2024-07-20 21:13:58 -04:00
iamromulan
c986872719 Fix bad syntax 2024-07-20 21:11:49 -04:00
iamromulan
f46597e14e correct the syntax 2024-07-20 21:07:50 -04:00
iamromulan
ae95ad41c6 Add TTL function 2024-07-20 20:59:20 -04:00
Cameron Thompson
0c5a7e99d4 Remove remount_ro during fix 2024-07-20 19:07:42 -04:00
Cameron Thompson
fb7d5b91ed Update RM55x_rcPCIe_toolkit.sh 2024-07-18 20:29:52 -04:00
Cameron Thompson
beb73521cd Delete init-overlay-watchdog 2024-07-11 21:30:41 -04:00
Cameron Thompson
761017ccae Forgot chmod 2024-07-11 21:14:57 -04:00
Cameron Thompson
ebb824eae2 forgot rw 2024-07-11 20:51:47 -04:00
Cameron Thompson
0ffb28341b remove mistake 2024-07-11 20:44:49 -04:00
Cameron Thompson
53d590eddb Fix ordering 2024-07-11 20:41:24 -04:00
Cameron Thompson
4a8bff4138 mountpoint does not exist 2024-07-11 20:38:33 -04:00
Cameron Thompson
d764b70ec4 Add sync between real rc.d and the overlayfs 2024-07-11 20:18:00 -04:00
Cameron Thompson
b027378c9d Update mount-fix 2024-07-07 20:32:35 -04:00
Cameron Thompson
fca83ab616 Update README.md 2024-07-07 20:23:18 -04:00
Cameron Thompson
bfd4b31fea Initial Commit
Start new branch for development on new 64bit x75 platfom.
2024-07-07 20:15:59 -04:00
Cameron Thompson
88d300303c Merge pull request #66 from dr-dolomite/feature-watchcat
Hot Fix
2024-07-03 20:03:01 -04:00
Cameron Thompson
65ceb39c1f Merge pull request #65 from dr-dolomite/feature-watchcat
Fixed SINR and RSRQ Swapped values when using NSA
2024-07-01 20:20:03 -04:00
Cameron Thompson
14b45941b0 Merge pull request #64 from dr-dolomite/feature-watchcat
Added Various Changes
2024-07-01 19:52:28 -04:00
Cameron Thompson
f6290708bf Merge pull request #59 from dr-dolomite/development-socat
Changes for Beta 1.0
2024-05-31 18:24:02 -04:00
Cameron Thompson
7c413fe5a0 Capture whole Firmware rev in ttyd 2024-05-26 15:55:18 -04:00
iamromulan
70e9af1273 Fix version number 2024-05-26 15:46:33 -04:00
Cameron Thompson
155e8dd9bb Merge pull request #57 from dr-dolomite/development-socat
Added Changes for Version 0.9
2024-05-24 20:39:13 -04:00
Cameron Thompson
b1cd03ec72 Remove Requires from unit 2024-05-24 13:03:50 -04:00
Cameron Thompson
3965081d97 Ensure opt.mount is available
Ensure that opt.mount is complete before starting lighttpd
2024-05-24 12:22:52 -04:00
iamromulan
9ea53d593d fix chmod 2024-05-23 23:33:02 -04:00
iamromulan
b4bc15f8ef Dumb mistake fix 2024-05-23 23:06:45 -04:00
iamromulan
e6a0c00ce8 Fix mistakes for update script 2024-05-23 22:26:16 -04:00
Cameron Thompson
f6739360ee Merge pull request #56 from dr-dolomite/development-socat
Added Various Changes
2024-05-23 20:31:31 -04:00
Cameron Thompson
f1b08de405 Merge pull request #55 from dr-dolomite/development-socat
Hot Fix for Index (Home Page) Async Problem
2024-05-23 00:43:00 -04:00
Cameron Thompson
9ca4451ef4 Use curl instead
Downloads ttyd and tailscale with curl now. Needed for newer RM520 firmwares.
2024-05-22 15:20:05 -04:00
Cameron Thompson
08b799a906 Merge pull request #53 from dr-dolomite/development-socat
Added Various Changes for Alpha 0.8
2024-05-19 00:06:01 -04:00
iamromulan
744871a90b Make sure curl is on all firmware versions pt2 2024-05-17 23:36:21 -04:00
iamromulan
79f835fd0f Make sure curl is on all firmware versions 2024-05-17 23:24:46 -04:00
Cameron Thompson
5e8bcd1d3f Merge pull request #52 from dr-dolomite/development-socat
Added Various Changes Ready For Merge
2024-05-14 00:48:43 -04:00
iamromulan
5f387e7b17 menu is executable 2024-05-14 00:17:33 -04:00
iamromulan
bf0c2028b1 Update start_menu.sh 2024-05-14 00:14:37 -04:00
iamromulan
0858b03da2 Update start_menu.sh 2024-05-13 23:20:42 -04:00
iamromulan
408cf583dd Install Console Menu 2024-05-13 22:35:32 -04:00
Cameron Thompson
ff23e5cfac Merge pull request #50 from dr-dolomite/development-socat
NSA Mode Bandwidth Parsing and SMS Layout Fixes
2024-05-11 23:14:10 -04:00
832 changed files with 112791 additions and 11542 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Windows Zone.Identifier files (created when downloading files from internet)
*:Zone.Identifier
*Zone.Identifier

1
.obsidian/app.json vendored Normal file
View File

@@ -0,0 +1 @@
{}

1
.obsidian/appearance.json vendored Normal file
View File

@@ -0,0 +1 @@
{}

31
.obsidian/core-plugins.json vendored Normal file
View File

@@ -0,0 +1,31 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"properties": false,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": true,
"webviewer": false
}

173
.obsidian/workspace.json vendored Normal file
View File

@@ -0,0 +1,173 @@
{
"main": {
"id": "cfbe859ecf56fae0",
"type": "split",
"children": [
{
"id": "b83a784c3a7d92c5",
"type": "tabs",
"children": [
{
"id": "f1014514d48382b8",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "README.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "README"
}
}
]
}
],
"direction": "vertical"
},
"left": {
"id": "d0cb12d3f48108e9",
"type": "split",
"children": [
{
"id": "a8a7e64788ca4c59",
"type": "tabs",
"children": [
{
"id": "7d7f951eade08e15",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical",
"autoReveal": false
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "7febcdc7d3c2deea",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "12bb71ef9436a043",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "3bcff15aa34346c5",
"type": "split",
"children": [
{
"id": "249aae86eddbae79",
"type": "tabs",
"children": [
{
"id": "60b3bb238ff8dd44",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "README.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks for README"
}
},
{
"id": "168425d9c5df2b15",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "README.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links from README"
}
},
{
"id": "cb0c34fa52269a79",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "edfdf272173ebc96",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "README.md",
"followCursor": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "Outline of README"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false
}
},
"active": "f1014514d48382b8",
"lastOpenFiles": []
}

245
README.md
View File

@@ -1,40 +1,61 @@
# RGMII Toolkit
Software deployment Toolkit for Quectel RM5xxx series 5G modems utilizing an m.2 to RJ45 adapter (RGMII)
Current Branch: **development-SDXPINN**
Current Branch: **Development**
>:checkered_flag: Hint: Start by checking out the ipk-source directory, each package is broken down into its contents. Inside, root represents the structure copied starting at / and control includes metadata and scripts to be ran before and after installation. The build-ipk.sh will produce an ipk based on the control and root directories next to it.
Please PR to this branch instead of main :)
# SDXPINN OpenWRT Repository
Fork development, and PR development to development :)
This branch of the repository serves as both an opkg source and feed for the custom packages I make available for Quectel cellular modules with the SDXPINN system. This source is preloaded into my custom firmware for the RM551E-GL found here: https://mega.nz/file/GUkk0RpD#7JsFymzKBBKplxLs5tqc5-m7rBmrB2QPfTfMtf1ZQ4g
Flash with QFlash, QFIL, or qfirehose. At first boot a script will automaticly set the module to PCIe RC mode and USB ECM mode then reboot so wait for that reboot after flash to proceed. From there either by Ethernet or USB ECM visit http://192.168.224.1/ or ssh root@192.168.224.1 Password: iamromulan
> :warning: Custom firmware is only available for the RM551E-GL for now. An RM550V-GLAA firmware will be available soon.
[![IndoorBuild](https://img.youtube.com/vi/SdNEyDfTIKk/0.jpg)](https://www.youtube.com/watch?v=SdNEyDfTIKk)
[Watch on YouTube](https://www.youtube.com/watch?v=SdNEyDfTIKk)
#### [JUMP TO HOW TO USE](#how-to-use)
**Currently:** This will allow you to install or if already installed, update, remove, or modify:
- Simple Admin: A simple web interface for managing your Quectel m.2 modem through it's gateway address
- It will install socat-at-bridge: sets up ttyOUT and ttyOUT2 for AT commands. You'll be able to use the `atcmd` command as well for an interactive at command session from adb, ssh, or ttyd
- It will install simplefirewall: A simple firewall that blocks definable incoming ports and a TTL mangle option/modifier. As of now only the TTL is controllable through Simple Admin. You can edit port block options and TTL from the 3rd option in the toolkit
- Tailscale: A magic VPN for accessing Simple Admin, SSH, and ttyd on the go. The Toolkit installs the Tailscale client directly to the modem and allows you to login and configure other settings. Head over to tailscale.com to sign up for a free account and learn more.
- Schedule a Daily Reboot at a specified time
- A fix for certain modems that don't start in CFUN=1 mode
- Entware/OPKG: A package installer/manager/repo
- Run `opkg help` to see how to use it
- These packages are installable: https://bin.entware.net/armv7sf-k3.2/Packages.html
- TTYd: A shell session right from your browser
- Currently this uses port 443 but SSL/TLS is not in use (http only for now)
- Entware/OPKG is required so it will install it if it isn't installed
- This will replace the stock Quectel login and passwd binaries with ones from entware
# :warning: Known issues with Packages
**My goal** is for this to also include any new useful scripts or software for this modem and others that support RGMII mode.
## Screenshots
Currently there is know vulnerability with QuecManager that allows cgi scripts to be executed unauthenticated. It is not recommended to expose uhttpd to the public internet, and to only used in a controlled, trusted local environment for now. Please see [Issue #175](https://github.com/iamromulan/quectel-rgmii-toolkit/issues/175) for more info.
# RC PCIe Toolkit
If you prefer starting from factory firmware you may use the toolkit script here to deploy my repo and other fixes via adb. It has been a while since I last visited this deployment script so open an issue if you see something wrong. See the wiki for info on adb.
![Home Page](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulansimpleindex.png?raw=true)
![AT Commands](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulanatcommands.png?raw=true)
![TTL](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulansimpleTTL.png?raw=true)
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulantoolkit.png?raw=true)
Software deployment Toolkit for Quectel RM5xxx series 5G modems utilizing an m.2 to RJ45 adapter (RC PCIe)
# Devleopment Branch: the below commands will download the beta/work in progress toolkit
# The below commands will download the toolkit for RM55x modems/SDXPINN platform
# Current state:
The toolkit will do the following:
1. AT Commands
- Needs tested.
2. Install sdxpinn-mount-fix/run me after a flash!
- Installs sdxpinn-mount-fix so you can have a usable filesystem.
- You won't get far without this installed
3. TTL Setup
- Will allow you to set a TTL value
4. Install Basic Packages/enable luci/add iamromulan's feed to opkg
- Adds this repo as a source for opkg/software to get packages
- Installs the public key for this repo
- Installs a few basic packages: atinout luci-app-atinout-mod sdxpinn-console-menu shadow-login luci-app-ttyd mc mc-skins
- Starts and enables the SSH server and uhttpd web server (Luci)
5. Set root password
- Runs the passwd utility so you can set your password for root
6. Tailscale Management
- Will let you install tailscale
- Installs my updated ipks
- Will let you configure tailscale
- No web server yet
7. Install Speedtest.net CLI app (speedtest command)
- Will install the speedtest command (speedtest.net test)
- After install type speedtest to use it
## How to Use
**To run the Toolkit:**
@@ -44,95 +65,116 @@ Fork development, and PR development to development :)
- Run `adb shell ping 8.8.8.8` to make sure the shell can access the internet. If you get an error, make sure the modem is connected to a cellular network and make sure `AT+QMAPWAC=1` as covered in the troubleshooting section: [I Can't get internet access from the Ethernet port (Common)](https://github.com/iamromulan/quectel-rgmii-configuration-notes/tree/main?tab=readme-ov-file#i-cant-get-internet-access-from-the-ethernet-port-common)
- If you don't get an error you should be getting replies back endlessly, press `CTRL-C` to stop it.
- Simply Copy/Paste this into your Command Prompt/Shell
```bash
adb shell "cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh" && cd /
```
**Or, if you want to stay in the modems shell when you are done**
```
adb root
adb shell
```
Then run
```
cd /tmp && wget -O RMxxx_rgmii_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development/RMxxx_rgmii_toolkit.sh && chmod +x RMxxx_rgmii_toolkit.sh && ./RMxxx_rgmii_toolkit.sh && cd /
cd /tmp && wget -O rcPCIe_SDXPINN_toolkit.sh https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/SDXPINN/rcPCIe_SDXPINN_toolkit.sh && chmod +x rcPCIe_SDXPINN_toolkit.sh && ./rcPCIe_SDXPINN_toolkit.sh && cd /
```
**You should see:**
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/iamromulantoolkit.png?raw=true)
## Tailscale Installation and Config
> :warning: Your modem must already be connected to the internet for this to install
### Installation:
Open up the toolkit main menu and **press 4** to enter the Tailscale menu
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/tailscalemenu.png?raw=true)
**Press 1, wait for it to install. This is a very large file for the system so give it some time.**
**Once done and it says Tailscale installed successfully press 2/enter to configure it.**
![Toolkit](https://github.com/iamromulan/quectel-rgmii-configuration-notes/blob/main/images/tailscaleconfig.png?raw=true)
If you want to, enable the Tailscale Web UI on port 8088 for configuration from the browser later by **pressing 1/enter**.
To do it in the toolkit:
First time connecting you'll be given a link to login with
- Press 3 to just connect only.
- Press 4 to connect and enable SSH access (remote command line) over tailscale.
- Press 5 to reconnect with SSH off while connected with SSH on
- Press 6 to disconnect
- Press 7 to Logout
That's it! From another device running tailscale you should be able to access your modem through the IP assigned to it by your tailnet. To access SSH from another device on the tailnet, open a terminal/command prompt and type
tailscale ssh root@(IP or Hostname)
IP or Hostname being the IP or hostname assigned to it in your tailnet
- Note that your SSH client must be able to give you a link to sign in with upon connecting. That's how the session is authorized. Works fine in Windows CMD or on Android use JuiceSSH.
## Advanced/Beta
### Entware/OPKG installation
It isn't perfect yet so it goes here under Advanced/Beta for now.
Here's what you gotta know about going into it:
# Useful AT Commands
- After installing, the `opkg` command will work
- You can run `opkg list` to see a list of installable packages, or head over to https://bin.entware.net/armv7sf-k3.2/Packages.html
- Everything opkg does is installed to /opt
- `/opt` is actually located at `/usrdata/opt` to save space but is
mounted at `/opt`
- Anything `opkg` installs will not be available in the system path by
default but you can get around this either:
You can send more than one command at once by sperating them with ``;`` and not including the AT part. ``AT+QENG="servingcell";+QCAINFO`` for example to see the info from both ``AT+QENG="servingcell"`` and ``AT+QCAINFO``
#### Temporarily:
Run this at the start of each adb shell or SSH shell session
export PATH=/opt/bin:/opt/sbin:$PATH
## PCIe RC Ethernet mode setup
#### Permanently:
Symbolic linking each binary installed by the package to `/bin` and `/sbin` from `/opt/bin` and `/opt/sbin`
For example, if you were to install zerotier:
For use with a board like the [Rework.Network PoE 2.5gig RJ45 sled](https://rework.network/collections/lte-home-gateway/products/5g2phy)
opkg install zerotier
ln -sf /opt/bin/zerotier-one /bin
ln -sf /opt/bin/zerotier-cli /bin
ln -sf /opt/bin/zerotier-idtool /bin
### For x70 modems (RM550/551)
Now you can run those 3 binaries from the shell anytime since they are linked in a place already part of the system path.
For BETA versions of firmware: the adb value 2 trick still works so one and done:
``AT+QCFG="pcie/mode",1;+QCFG="usbnet",1;+QCFG="usbcfg",0x2C7C,0x0122,1,1,1,1,1,2,0;+CFUN=1,1``
OR if you are running the latest non-beta firmware
``AT+QCFG="pcie/mode",1;+QCFG="usbnet",1``
Then unlock ADB:
Ask the modem for its adb code by sending: ``AT+QADBKEY?``
It'll respond with something like ``+QADBKEY: 29229988``
Take that number and paste it in this generator: https://onecompiler.com/python/3znepjcsq (hint: where it says STDIN)
You should get something like
``AT+QADBKEY="mrX4zOPwdSIEjfM"``
Send that command to the modem and adb will be able to be turned on with the next command
Now you can turn it on with the usbcfg command ``AT+QCFG="usbcfg"``
***Be super careful, this controls what ports are on/off over USB.***
Run it and you will get the current settings. Something like this:
``+QCFG: "usbcfg",0x2C7C,0x0122,1,1,1,1,1,0,0``
Send ``AT+QCFG="usbcfg",0x2C7C,0x0122,1,1,1,1,1,1,0`` to enable adb
Now you can reboot: ``AT+CFUN=1,1``
This will do the following:
- Enable PCIe RC mode (Driver selection is automatic now)
- Set to ECM mode via USB and AP mode connection behavior
- Force Enables ADB Access
- Reboots after all the above
Tip: APN automatic selection will somtimes choose the wrong APN. You may need to set your APN after powering up with the SIM inserted.
## The List
- ``AT+CFUN=1,1`` (reboot)
- ``AT+CFUN=0;CFUN=1`` (Disconnect then reconnect)(tip: run this after chnaging APN and you don't have to reboot)
- ``AT+QMAPWAC? ``(get current status of auto connect, 0=disabled 1=enabled)
- ``AT+QMAPWAC=1`` (enable auto connect internet for ethernet)
- ``AT+QMAPWAC=0`` (disable auto connect for ethernet; use when you want internet over USB to work; IPPT must be disabled)
- ``AT+QUIMSLOT?`` (get active sim slot; 1=Slot 1; 2=Slot 2)
- ``AT+QUIMSLOT=1`` (switch to sim slot 1)
- ``AT+QUIMSLOT=2`` (switch to sim slot 2)
- ``AT+CGDCONT?`` (Get active APN profle st 1 through 8)
- ``AT+QMBNCFG="AutoSel",0;+QMBNCFG="Deactivate"`` (Disable Automatic APN selection)(You will need to set your APN when you switch SIMs or Slots)(Can also set APN after you switch the run ``AT+CFUN=0;CFUN=1``
- ``AT+CGDCONT=1,"IPV4V6","APNHERE"`` (Sets APN profile 1 to APNHERE using both IPV4 and IPV6)
- ``AT+GSN`` (Show current IMEI)
- ``AT+EGMR=0,7`` (Show current IMEI)
- ``AT+EGMR=1,7,"IMEIGOESHERE"`` (sets/repairs IMEI)
- ``AT+QCFG="usbcfg",0x2C7C,0x0801,1,1,1,1,1,2,0`` (enables adb bypasses adb key)
- ``AT+QENG="servingcell"`` (shows anchor band and network connection status)
- ``AT+QCAINFO`` (Show all connected bands/CA info)
- ``AT+QNWPREFCFG="mode_pref"`` (Check what the current network search mode is set to)
- ``AT+QNWPREFCFG="mode_pref",AUTO`` (Set network search mode to automatic)
- ``AT+QNWPREFCFG="mode_pref",NR5G:LTE`` (Set network search mode to 5GNR and 4GLTE only)
- ``AT+QNWPREFCFG="mode_pref",NR5G`` (Set network search mode to 5GNR only)
- ``AT+QNWPREFCFG="mode_pref",LTE`` (Set network search mode to 4GLTE only)
- ``AT+QNWPREFCFG="nr5g_disable_mode"`` (Check to see if SA or NSA NR5G is disabled)
- ``AT+QNWPREFCFG="nr5g_disable_mode",0`` (Enable Both SA and NSA 5GNR)
- ``AT+QNWPREFCFG="nr5g_disable_mode",1`` (Disable SA 5GNR only)
- ``AT+QNWPREFCFG="nr5g_disable_mode",2`` (Disable NSA 5GNR only)
- ``AT+QNWPREFCFG="nr5g_band"`` (Get current SA 5GNR bandlock settings)
- ``AT+QNWPREFCFG="nsa_nr5g_band"`` (Get current NSA 5GNR bandlock settings)
- ``AT+QNWPREFCFG="nr5g_band",1:2:3:4:5:6`` (Example: Lock to SA 5G/NR bands n1,n2,n3,n4,n5, and n6)
- ``AT+QNWPREFCFG="nsa_nr5g_band",1:2:3:4:5:6`` (Example: Lock to SA 5G/NR bands n1,n2,n3,n4,n5, and n6)
- ``AT+QNWPREFCFG="lte_band"`` (Get current 4GLTE bandlock settings)
- ``AT+QNWPREFCFG="lte_band",1:2:3:4:5:6`` (Example: Lock to 4G/LTE bands 1,2,3,4,5, and 6)
- ``AT+QMAP="WWAN"`` (Show currently assigned IPv4 and IPv6 from the provider)
- ``AT+QMAP="LANIP"`` (Show current DHCP range and Gateway address for VLAN0)
- ``AT+QMAP="LANIP",IP_start_range,IP_end_range,Gateway_IP `` (Set IPv4 Start/End range and Gateway IP of DHCP for VLAN0)
- ``AT+QMAP="DHCPV4DNS","disable"`` (disable the onboard DNS proxy; recommended for IPPT)
- ``AT+QMAP="MPDN_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF"``
(:warning: On the RM551E-GL you must specify the ethernet devices MAC address instead of FF:FF:FF...)
- ``AT+QMAP="MPDN_rule",0`` (turn off IPPT/clear MPDN rule 0; Remember to run AT+QMAPWAC=1 and reboot after)
I plan to create a watchdog service for /opt/bin and /opt/sbin that will automaticly link new packages to /bin or /sbin later on in order to combat this.
### TTYd installation
It isn't perfect yet so it goes here under Advanced/Beta for now.
Here's what you gotta know about going into it:
- This listens on port 443 for http requests (no SSL/TLS yet)
- This will automaticly install entware and patch the login and passwd binaries with ones from entware
- It will ask you to set a password for the `root` user account
- TTYd doesn't seem to be too mobile friendly for now but I optimized it the best i could for now so it is at least usable through a smartphone browser. Hopefully the startup script can be improved even more later.
## Acknowledgements
### GitHub Users/Individuals:
@@ -144,15 +186,12 @@ Thank You to:
[rbflurry](https://github.com/rbflurry/) for inital Simple Admin fixes
[dr-dolomite](https://github.com/dr-dolomite) for some major stat page improvements and this repos first approved external PR!
[dr-dolomite](https://github.com/dr-dolomite) for simpleadmin 2.0 and QuecManager!
[tarunVreddy](https://github.com/tarunVreddy) for helping with the SA band aggregation parse
### Existing projects:
Simpleadmin heavily uses the AT Command Parsing Scripts (Basically a copy with new changes and tweaks) of Dairyman's Rooter Source https://github.com/ofmodemsandmen/ROOterSource2203
Tailscale was obtained through Tailscale's static build page. Since these modems have a 32-bit ARM processor on-board I used the arm package. https://pkgs.tailscale.com/stable/#static
Entware/opkg was obtained through [Entware's wiki](https://github.com/Entware/Entware/wiki/Alternative-install-vs-standard) and the installer heavily modified by [iamromulan](https://github.com/iamromulan) for use with Quectel modems
TTYd was obtained from the [TTYd Project](https://github.com/tsl0922/ttyd)

View File

@@ -1,938 +0,0 @@
#!/bin/sh
# Define toolkit paths
GITUSER="iamromulan"
GITTREE="development"
GITMAINTREE="main"
GITDEVTREE="development"
TMP_DIR="/tmp"
USRDATA_DIR="/usrdata"
SOCAT_AT_DIR="/usrdata/socat-at-bridge"
SOCAT_AT_SYSD_DIR="/usrdata/socat-at-bridge/systemd_units"
SIMPLE_ADMIN_DIR="/usrdata/simpleadmin"
SIMPLE_FIREWALL_DIR="/usrdata/simplefirewall"
SIMPLE_FIREWALL_SCRIPT="$SIMPLE_FIREWALL_DIR/simplefirewall.sh"
SIMPLE_FIREWALL_SYSTEMD_DIR="$SIMPLE_FIREWALL_DIR/systemd"
TAILSCALE_DIR="/usrdata/tailscale"
TAILSCALE_SYSD_DIR="/usrdata/tailscale/systemd"
# AT Command Script Variables and Functions
DEVICE_FILE="/dev/smd7"
TIMEOUT=4 # Set a timeout for the response
# Function to remount file system as read-write
remount_rw() {
mount -o remount,rw /
}
# Function to remount file system as read-only
remount_ro() {
mount -o remount,ro /
}
# Basic AT commands without socat bridge for fast responce commands only
start_listening() {
cat "$DEVICE_FILE" > /tmp/device_readout &
CAT_PID=$!
}
send_at_command() {
echo -e "\e[1;31mThis only works for basic quick responding commands!\e[0m" # Red
echo -e "\e[1;36mType 'install' to simply type atcmd in shell from now on\e[0m"
echo -e "\e[1;36mThe installed version is much better than this portable version\e[0m"
echo -e "\e[1;32mEnter AT command (or type 'exit' to quit): \e[0m"
read at_command
if [ "$at_command" = "exit" ]; then
return 1
fi
if [ "$at_command" = "install" ]; then
install_update_at_socat
echo -e "\e[1;32mInstalled. Type atcmd from adb shell or ssh to start an AT Command session\e[0m"
return 1
fi
echo -e "${at_command}\r" > "$DEVICE_FILE"
}
wait_for_response() {
local start_time=$(date +%s)
local current_time
local elapsed_time
echo -e "\e[1;32mCommand sent, waiting for response...\e[0m"
while true; do
if grep -qe "OK" -e "ERROR" /tmp/device_readout; then
echo -e "\e[1;32mResponse received:\e[0m"
cat /tmp/device_readout
return 0
fi
current_time=$(date +%s)
elapsed_time=$((current_time - start_time))
if [ "$elapsed_time" -ge "$TIMEOUT" ]; then
echo -e "\e[1;31mError: Response timed out.\e[0m" # Red
echo -e "\e[1;32mIf the responce takes longer than a second or 2 to respond this will not work\e[0m" # Green
echo -e "\e[1;36mType install to install the better version of this that will work.\e[0m" # Cyan
return 1
fi
sleep 1
done
}
cleanup() {
kill "$CAT_PID"
wait "$CAT_PID" 2>/dev/null
rm -f /tmp/device_readout
}
send_at_commands() {
if [ -c "$DEVICE_FILE" ]; then
while true; do
start_listening
send_at_command
if [ $? -eq 1 ]; then
cleanup
break
fi
wait_for_response
cleanup
done
else
echo -e "\e[1;31mError: Device $DEVICE_FILE does not exist!\e[0m"
fi
}
# Check for existing Entware/opkg installation, install if not installed
ensure_entware_installed() {
remount_rw
if [ ! -f "/opt/bin/opkg" ]; then
echo -e "\e[1;32mInstalling Entware/OPKG\e[0m"
cd /tmp && wget -O installentware.sh "https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/installentware.sh" && chmod +x installentware.sh && ./installentware.sh
if [ "$?" -ne 0 ]; then
echo -e "\e[1;31mEntware/OPKG installation failed. Please check your internet connection or the repository URL.\e[0m"
exit 1
fi
cd /
else
echo -e "\e[1;32mEntware/OPKG is already installed.\e[0m"
if [ "$(readlink /bin/login)" != "/opt/bin/login" ]; then
opkg update && opkg install shadow-login shadow-passwd shadow-useradd
if [ "$?" -ne 0 ]; then
echo -e "\e[1;31mPackage installation failed. Please check your internet connection and try again.\e[0m"
exit 1
fi
# Replace the login and passwd binaries and set home for root to a writable directory
rm /opt/etc/shadow
rm /opt/etc/passwd
cp /etc/shadow /opt/etc/
cp /etc/passwd /opt/etc
mkdir -p /usrdata/root/bin
touch /usrdata/root/.profile
echo "# Set PATH for all shells" > /usrdata/root/.profile
echo "export PATH=/bin:/usr/sbin:/usr/bin:/sbin:/opt/sbin:/opt/bin:/usrdata/root/bin" >> /usrdata/root/.profile
chmod +x /usrdata/root/.profile
sed -i '1s|/home/root:/bin/sh|/usrdata/root:/bin/bash|' /opt/etc/passwd
rm /bin/login /usr/bin/passwd
ln -sf /opt/bin/login /bin
ln -sf /opt/bin/passwd /usr/bin/
ln -sf /opt/bin/useradd /usr/bin/
echo -e "\e[1;31mPlease set the root password.\e[0m"
/opt/bin/passwd
# Install basic and useful utilities
opkg install mc htop dfc lsof
ln -sf /opt/bin/mc /bin
ln -sf /opt/bin/htop /bin
ln -sf /opt/bin/dfc /bin
ln -sf /opt/bin/lsof /bin
fi
if [ ! -f "/usrdata/root/.profile" ]; then
opkg update && opkg install shadow-useradd
mkdir -p /usrdata/root/bin
touch /usrdata/root/.profile
echo "# Set PATH for all shells" > /usrdata/root/.profile
echo "export PATH=/bin:/usr/sbin:/usr/bin:/sbin:/opt/sbin:/opt/bin:/usrdata/root/bin" >> /usrdata/root/.profile
chmod +x /usrdata/root/.profile
sed -i '1s|/home/root:/bin/sh|/usrdata/root:/bin/bash|' /opt/etc/passwd
fi
fi
if [ ! -f "/opt/sbin/useradd" ]; then
echo "useradd does not exist. Installing shadow-useradd..."
opkg install shadow-useradd
else
echo "useradd already exists. Continuing..."
fi
}
#Uninstall Entware if the Users chooses
uninstall_entware() {
echo -e '\033[31mInfo: Starting Entware/OPKG uninstallation...\033[0m'
# Stop services
systemctl stop rc.unslung.service
/opt/etc/init.d/rc.unslung stop
rm /lib/systemd/system/multi-user.target.wants/rc.unslung.service
rm /lib/systemd/system/rc.unslung.service
systemctl stop opt.mount
rm /lib/systemd/system/multi-user.target.wants/start-opt-mount.service
rm /lib/systemd/system/opt.mount
rm /lib/systemd/system/start-opt-mount.service
# Unmount /opt if mounted
mountpoint -q /opt && umount /opt
# Remove Entware installation directory
rm -rf /usrdata/opt
rm -rf /opt
# Reload systemctl daemon
systemctl daemon-reload
# Optionally, clean up any modifications to /etc/profile or other system files
# Restore original link to login binary compiled by Quectel
rm /bin/login
ln /bin/login.shadow /bin/login
echo -e '\033[32mInfo: Entware/OPKG has been uninstalled successfully.\033[0m'
}
# function to configure the fetures of simplefirewall
configure_simple_firewall() {
if [ ! -f "$SIMPLE_FIREWALL_SCRIPT" ]; then
echo -e "\033[0;31mSimplefirewall is not installed, would you like to install it?\033[0m"
echo -e "\033[0;32m1) Yes\033[0m"
echo -e "\033[0;31m2) No\033[0m"
read -p "Enter your choice (1-2): " install_choice
case $install_choice in
1)
install_simple_firewall
;;
2)
return
;;
*)
echo -e "\033[0;31mInvalid choice. Please select either 1 or 2.\033[0m"
;;
esac
fi
echo -e "\e[1;32mConfigure Simple Firewall:\e[0m"
echo -e "\e[38;5;208m1) Configure incoming port block\e[0m"
echo -e "\e[38;5;27m2) Configure TTL\e[0m"
read -p "Enter your choice (1-2): " menu_choice
case $menu_choice in
1)
# Original ports configuration code with exit option
current_ports_line=$(grep '^PORTS=' "$SIMPLE_FIREWALL_SCRIPT")
ports=$(echo "$current_ports_line" | cut -d'=' -f2 | tr -d '()' | tr ' ' '\n' | grep -o '[0-9]\+')
echo -e "\e[1;32mCurrent configured ports:\e[0m"
echo "$ports" | awk '{print NR") "$0}'
while true; do
echo -e "\e[1;32mEnter a port number to add/remove, or type 'done' or 'exit' to finish:\e[0m"
read port
if [ "$port" = "done" ] || [ "$port" = "exit" ]; then
if [ "$port" = "exit" ]; then
echo -e "\e[1;31mExiting without making changes...\e[0m"
return
fi
break
elif ! echo "$port" | grep -qE '^[0-9]+$'; then
echo -e "\e[1;31mInvalid input: Please enter a numeric value.\e[0m"
elif echo "$ports" | grep -q "^$port\$"; then
ports=$(echo "$ports" | grep -v "^$port\$")
echo -e "\e[1;32mPort $port removed.\e[0m"
else
ports=$(echo "$ports"; echo "$port" | grep -o '[0-9]\+')
echo -e "\e[1;32mPort $port added.\e[0m"
fi
done
if [ "$port" != "exit" ]; then
new_ports_line="PORTS=($(echo "$ports" | tr '\n' ' '))"
sed -i "s/$current_ports_line/$new_ports_line/" "$SIMPLE_FIREWALL_SCRIPT"
fi
;;
2)
# TTL configuration code
ttl_value=$(cat /usrdata/simplefirewall/ttlvalue)
if [ "$ttl_value" -eq 0 ]; then
echo -e "\e[1;31mTTL is not set.\e[0m"
else
echo -e "\e[1;32mTTL value is set to $ttl_value.\e[0m"
fi
echo -e "\e[1;31mType 'exit' to cancel.\e[0m"
read -p "What do you want the TTL value to be: " new_ttl_value
if [ "$new_ttl_value" = "exit" ]; then
echo -e "\e[1;31mExiting TTL configuration...\e[0m"
return
elif ! echo "$new_ttl_value" | grep -qE '^[0-9]+$'; then
echo -e "\e[1;31mInvalid input: Please enter a numeric value.\e[0m"
return
else
/usrdata/simplefirewall/ttl-override stop
echo "$new_ttl_value" > /usrdata/simplefirewall/ttlvalue
/usrdata/simplefirewall/ttl-override start
echo -e "\033[0;32mTTL value updated to $new_ttl_value.\033[0m"
fi
;;
*)
echo -e "\e[1;31mInvalid choice. Please select either 1 or 2.\e[0m"
;;
esac
systemctl restart simplefirewall
echo -e "\e[1;32mFirewall configuration updated.\e[0m"
}
set_simpleadmin_passwd(){
ensure_entware_installed
opkg update
opkg install libaprutil
wget -O /usrdata/root/bin/htpasswd https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/htpasswd && chmod +x /usrdata/root/bin/htpasswd
wget -O /usrdata/root/bin/simplepasswd https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleadmin/simplepasswd && chmod +x /usrdata/root/bin/simplepasswd
echo -e "\e[1;32mTo change your simpleadmin (admin) password in the future...\e[0m"
echo -e "\e[1;32mIn the console type simplepasswd and press enter\e[0m"
/usrdata/root/bin/simplepasswd
}
set_root_passwd() {
echo -e "\e[1;31mPlease set the root/console password.\e[0m"
/opt/bin/passwd
}
# Function to install/update Simple Admin
install_simple_admin() {
while true; do
echo -e "\e[1;32mWhat version of Simple Admin do you want to install? This will start a webserver on port 80/443 on test build\e[0m"
echo -e "\e[1;32m1) Stable current version, (Main Branch)\e[0m"
echo -e "\e[1;31m2) Install Test Build (Development Branch)\e[0m"
echo -e "\e[0;33m3) Return to Main Menu\e[0m"
echo -e "\e[1;32mSelect your choice: \e[0m"
read choice
case $choice in
1)
echo -e "\e[1;32mYou are using the development toolkit; Use the one from main if you want the stable version right now\e[0m"
break
;;
2)
ensure_entware_installed
echo -e "\e[1;31m2) Installing simpleadmin from the development test branch\e[0m"
mkdir /usrdata/simpleupdates > /dev/null 2>&1
mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1
wget -O /usrdata/simpleupdates/scripts/update_socat-at-bridge.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_socat-at-bridge.sh && chmod +x /usrdata/simpleupdates/scripts/update_socat-at-bridge.sh
echo -e "\e[1;32mInstalling/updating dependency: socat-at-bridge\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_socat-at-bridge.sh
echo -e "\e[1;32m Dependency: socat-at-bridge has been updated/installed.\e[0m"
sleep 1
wget -O /usrdata/simpleupdates/scripts/update_simplefirewall.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_simplefirewall.sh && chmod +x /usrdata/simpleupdates/scripts/update_simplefirewall.sh
echo -e "\e[1;32mInstalling/updating dependency: simplefirewall\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_simplefirewall.sh
echo -e "\e[1;32m Dependency: simplefirewall has been updated/installed.\e[0m"
sleep 1
set_simpleadmin_passwd
wget -O /usrdata/simpleupdates/scripts/update_simpleadmin.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_simpleadmin.sh && chmod +x /usrdata/simpleupdates/scripts/update_simpleadmin.sh
echo -e "\e[1;32mInstalling/updating: Simpleadmin content\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_simpleadmin.sh
echo -e "\e[1;32mSimpleadmin content has been updated/installed.\e[0m"
sleep 1
break
;;
3)
echo "Returning to main menu..."
break
;;
*)
echo "Invalid choice. Please try again."
;;
esac
done
}
# Function to Uninstall Simpleadmin and dependencies
uninstall_simpleadmin_components() {
echo -e "\e[1;32mStarting the uninstallation process for Simpleadmin components.\e[0m"
echo -e "\e[1;32mNote: Uninstalling certain components may affect the functionality of others.\e[0m"
remount_rw
# Uninstall Simple Firewall
echo -e "\e[1;32mDo you want to uninstall Simplefirewall?\e[0m"
echo -e "\e[1;31mIf you do, the TTL part of simpleadmin will no longer work.\e[0m"
echo -e "\e[1;32m1) Yes\e[0m"
echo -e "\e[1;31m2) No\e[0m"
read -p "Enter your choice (1 or 2): " choice_simplefirewall
if [ "$choice_simplefirewall" -eq 1 ]; then
echo "Uninstalling Simplefirewall..."
systemctl stop simplefirewall
systemctl stop ttl-override
rm -f /lib/systemd/system/simplefirewall.service
rm -f /lib/systemd/system/ttl-override.service
systemctl daemon-reload
rm -rf "$SIMPLE_FIREWALL_DIR"
echo "Simplefirewall uninstalled."
fi
# Uninstall socat-at-bridge
echo -e "\e[1;32mDo you want to uninstall socat-at-bridge?\e[0m"
echo -e "\e[1;31mIf you do, AT commands and the stat page will no longer work. atcmd won't either.\e[0m"
echo -e "\e[1;32m1) Yes\e[0m"
echo -e "\e[1;31m2) No\e[0m"
read -p "Enter your choice (1 or 2): " choice_socat_at_bridge
if [ "$choice_socat_at_bridge" -eq 1 ]; then
echo -e "\033[0;32mRemoving installed AT Socat Bridge services...\033[0m"
systemctl stop at-telnet-daemon > /dev/null 2>&1
systemctl disable at-telnet-daemon > /dev/null 2>&1
systemctl stop socat-smd11 > /dev/null 2>&1
systemctl stop socat-smd11-to-ttyIN > /dev/null 2>&1
systemctl stop socat-smd11-from-ttyIN > /dev/null 2>&1
systemctl stop socat-smd7 > /dev/null 2>&1
systemctl stop socat-smd7-to-ttyIN2 > /dev/null 2>&1
systemctl stop socat-smd7-to-ttyIN > /dev/null 2>&1
systemctl stop socat-smd7-from-ttyIN2 > /dev/null 2>&1
systemctl stop socat-smd7-from-ttyIN > /dev/null 2>&1
rm /lib/systemd/system/at-telnet-daemon.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd11.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd11-to-ttyIN.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd11-from-ttyIN.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd7.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd7-to-ttyIN2.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd7-to-ttyIN.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd7-from-ttyIN.service > /dev/null 2>&1
rm /lib/systemd/system/socat-smd7-from-ttyIN2.service > /dev/null 2>&1
systemctl daemon-reload > /dev/null 2>&1
rm -rf "$SOCAT_AT_DIR" > /dev/null 2>&1
rm -rf "$SOCAT_AT_DIR" > /dev/null 2>&1
rm -rf "/usrdata/micropython" > /dev/null 2>&1
rm -rf "/usrdata/at-telnet" > /dev/null 2>&1
echo -e "\033[0;32mAT Socat Bridge services removed!...\033[0m"
fi
# Uninstall ttyd
echo -e "\e[1;32mDo you want to uninstall ttyd (simpleadmin console)?\e[0m"
echo -e "\e[1;31mWarning: Do not uninstall if you are currently using ttyd to do this!!!\e[0m"
echo -e "\e[1;32m1) Yes\e[0m"
echo -e "\e[1;31m2) No\e[0m"
read -p "Enter your choice (1 or 2): " choice_simpleadmin
if [ "$choice_simpleadmin" -eq 1 ]; then
echo -e "\e[1;34mUninstalling ttyd...\e[0m"
systemctl stop ttyd
rm -rf /usrdata/ttyd
rm /lib/systemd/system/ttyd.service
rm /lib/systemd/system/multi-user.target.wants/ttyd.service
rm /bin/ttyd
echo -e "\e[1;32mttyd has been uninstalled.\e[0m"
fi
echo "Uninstalling the rest of Simpleadmin..."
# Check if Lighttpd service is installed and remove it if present
if [ -f "/lib/systemd/system/lighttpd.service" ]; then
echo "Lighttpd detected, uninstalling Lighttpd and its modules..."
systemctl stop lighttpd
opkg --force-remove --force-removal-of-dependent-packages remove lighttpd-mod-authn_file lighttpd-mod-auth lighttpd-mod-cgi lighttpd-mod-openssl lighttpd-mod-proxy lighttpd
rm -rf $LIGHTTPD_DIR
fi
systemctl stop simpleadmin_generate_status
systemctl stop simpleadmin_httpd
rm -f /lib/systemd/system/simpleadmin_httpd.service
rm -f /lib/systemd/system/simpleadmin_generate_status.service
systemctl daemon-reload
rm -rf "$SIMPLE_ADMIN_DIR"
echo "The rest of Simpleadmin and Lighttpd (if present) uninstalled."
remount_ro
echo "Uninstallation process completed."
}
# Function for Tailscale Submenu
tailscale_menu() {
while true; do
echo -e "\e[1;32mTailscale Menu\e[0m"
echo -e "\e[1;32m1) Install/Update Tailscale\e[0m"
echo -e "\e[1;36m2) Configure Tailscale\e[0m"
echo -e "\e[1;31m3) Return to Main Menu\e[0m"
read -p "Enter your choice: " tailscale_choice
case $tailscale_choice in
1) install_update_tailscale;;
2) configure_tailscale;;
3) break;;
*) echo "Invalid option";;
esac
done
}
# Function to install, update, or remove Tailscale
install_update_tailscale() {
echo -e "\e[1;31m2) Installing tailscale from the $GITTREE branch\e[0m"
mkdir /usrdata/simpleupdates > /dev/null 2>&1
mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1
wget -O /usrdata/simpleupdates/scripts/update_tailscale.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_tailscale.sh && chmod +x /usrdata/simpleupdates/scripts/update_tailscale.sh
echo -e "\e[1;32mInstalling/updating: Tailscale\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
remount_rw
/usrdata/simpleupdates/scripts/update_tailscale.sh
echo -e "\e[1;32m Tailscale has been updated/installed.\e[0m"
}
# Function to Configure Tailscale
configure_tailscale() {
while true; do
echo "Configure Tailscale"
echo -e "\e[38;5;40m1) Enable Tailscale Web UI at http://192.168.225.1:8088 (Gateway on port 8088)\e[0m" # Green
echo -e "\e[38;5;196m2) Disable Tailscale Web UI\e[0m" # Red
echo -e "\e[38;5;27m3) Connect to Tailnet\e[0m" # Brown
echo -e "\e[38;5;87m4) Connect to Tailnet with SSH ON\e[0m" # Light cyan
echo -e "\e[38;5;105m5) Reconnect to Tailnet with SSH OFF\e[0m" # Light magenta
echo -e "\e[38;5;172m6) Disconnect from Tailnet (reconnects at reboot)\e[0m" # Light yellow
echo -e "\e[1;31m7) Logout from tailscale account\e[0m"
echo -e "\e[38;5;27m8) Return to Tailscale Menu\e[0m"
read -p "Enter your choice: " config_choice
case $config_choice in
1)
remount_rw
cd /lib/systemd/system/
wget -O tailscale-webui.service https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/main/tailscale/systemd/tailscale-webui.service
wget -O tailscale-webui-trigger.service https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/main/tailscale/systemd/tailscale-webui-trigger.service
ln -sf /lib/systemd/system/tailscale-webui-trigger.service /lib/systemd/system/multi-user.target.wants/
systemctl daemon-reload
echo "Tailscale Web UI Enabled"
echo "Starting Web UI..."
systemctl start tailscale-webui
echo "Web UI started!"
remount_ro
;;
2)
remount_rw
systemctl stop tailscale-webui
systemctl disable tailscale-webui-trigger
rm /lib/systemd/system/multi-user.target.wants/tailscale-webui.service
rm /lib/systemd/system/multi-user.target.wants/tailscale-webui-trigger.service
rm /lib/systemd/system/tailscale-webui.service
rm /lib/systemd/system/tailscale-webui-trigger.service
systemctl daemon-reload
echo "Tailscale Web UI Stopped and Disabled"
remount_ro
;;
3) $TAILSCALE_DIR/tailscale up --accept-dns=false --reset;;
4) $TAILSCALE_DIR/tailscale up --ssh --accept-dns=false --reset;;
5) $TAILSCALE_DIR/tailscale up --accept-dns=false --reset;;
6) $TAILSCALE_DIR/tailscale down;;
7) $TAILSCALE_DIR/tailscale logout;;
8) break;;
*) echo "Invalid option";;
esac
done
}
# Function to manage Daily Reboot Timer
manage_reboot_timer() {
# Remount root filesystem as read-write
mount -o remount,rw /
# Check if the rebootmodem service, timer, or trigger already exists
if [ -f /lib/systemd/system/rebootmodem.service ] || [ -f /lib/systemd/system/rebootmodem.timer ] || [ -f /lib/systemd/system/rebootmodem-trigger.service ]; then
echo -e "\e[1;32mThe rebootmodem service/timer/trigger is already installed.\e[0m"
echo -e "\e[1;32m1) Change\e[0m" # Green
echo -e "\e[1;31m2) Remove\e[0m" # Red
read -p "Enter your choice (1 for Change, 2 for Remove): " reboot_choice
case $reboot_choice in
2)
# Stop and disable timer and trigger service by removing symlinks
systemctl stop rebootmodem.timer
systemctl stop rebootmodem-trigger.service
# Remove symbolic links and files
rm -f /lib/systemd/system/multi-user.target.wants/rebootmodem-trigger.service
rm -f /lib/systemd/system/rebootmodem.service
rm -f /lib/systemd/system/rebootmodem.timer
rm -f /lib/systemd/system/rebootmodem-trigger.service
rm -f "$USRDATA_DIR/reboot_modem.sh"
# Reload systemd to apply changes
systemctl daemon-reload
echo -e "\e[1;32mRebootmodem service, timer, trigger, and script removed successfully.\e[0m"
;;
1)
printf "Enter the new time for daily reboot (24-hour format in Coordinated Universal Time, HH:MM): "
read new_time
# Validate the new time format using grep
if ! echo "$new_time" | grep -qE '^([01]?[0-9]|2[0-3]):[0-5][0-9]$'; then
echo "Invalid time format. Exiting."
exit 1
else
# Remove old symlinks and script
rm -f /lib/systemd/system/multi-user.target.wants/rebootmodem-trigger.service
rm -f "$USRDATA_DIR/reboot_modem.sh"
# Set the user time to the new time and recreate the service, timer, trigger, and script
user_time=$new_time
create_service_and_timer
fi
;;
*)
echo -e "\e[1;31mInvalid choice. Exiting.\e[0m"
exit 1
;;
esac
else
printf "Enter the time for daily reboot (24-hour format in UTC, HH:MM): "
read user_time
# Validate the time format using grep
if ! echo "$user_time" | grep -qE '^([01]?[0-9]|2[0-3]):[0-5][0-9]$'; then
echo "Invalid time format. Exiting."
exit 1
else
create_service_and_timer
fi
fi
# Remount root filesystem as read-only
mount -o remount,ro /
}
# Function to create systemd service and timer files with the user-specified time for the reboot timer
create_service_and_timer() {
remount_rw
# Define the path for the modem reboot script
MODEM_REBOOT_SCRIPT="$USRDATA_DIR/reboot_modem.sh"
# Create the modem reboot script
echo "#!/bin/sh
/bin/echo -e 'AT+CFUN=1,1 \r' > /dev/smd7" > "$MODEM_REBOOT_SCRIPT"
# Make the script executable
chmod +x "$MODEM_REBOOT_SCRIPT"
# Create the systemd service file for reboot
echo "[Unit]
Description=Reboot Modem Daily
[Service]
Type=oneshot
ExecStart=/bin/sh /usrdata/reboot_modem.sh
Restart=no
RemainAfterExit=no" > /lib/systemd/system/rebootmodem.service
# Create the systemd timer file with the user-specified time
echo "[Unit]
Description=Starts rebootmodem.service daily at the specified time
[Timer]
OnCalendar=*-*-* $user_time:00
Persistent=false" > /lib/systemd/system/rebootmodem.timer
# Create a trigger service that starts the timer at boot
echo "[Unit]
Description=Trigger the rebootmodem timer at boot
[Service]
Type=oneshot
ExecStart=/bin/systemctl start rebootmodem.timer
RemainAfterExit=yes" > /lib/systemd/system/rebootmodem-trigger.service
# Create symbolic links for the trigger service in the wanted directory
ln -sf /lib/systemd/system/rebootmodem-trigger.service /lib/systemd/system/multi-user.target.wants/
# Reload systemd to recognize the new timer and trigger service
systemctl daemon-reload
sleep 2s
# Start the trigger service, which will start the timer
systemctl start rebootmodem-trigger.service
remount_ro
# Confirmation
echo -e "\e[1;32mRebootmodem-trigger service created and started successfully.\e[0m"
echo -e "\e[1;32mReboot schedule set successfully. The modem will reboot daily at $user_time UTC.\e[0m"
}
manage_cfun_fix() {
cfun_service_path="/lib/systemd/system/cfunfix.service"
cfun_fix_script="/usrdata/cfun_fix.sh"
mount -o remount,rw /
if [ -f "$cfun_service_path" ]; then
echo -e "\e[1;32mThe CFUN fix is already installed. Do you want to remove it?\e[0m" # Green
echo -e "\e[1;32m1) Yes\e[0m" # Green
echo -e "\e[1;31m2) No\e[0m" # Red
read -p "Enter your choice: " choice
if [ "$choice" = "1" ]; then
echo "Removing CFUN fix..."
systemctl stop cfunfix.service
rm -f /lib/systemd/system/multi-user.target.wants/cfunfix.service
rm -f "$cfun_service_path"
rm -f "$cfun_fix_script"
systemctl daemon-reload
echo "CFUN fix has been removed."
else
echo "Returning to main menu..."
fi
else
echo -e "\e[1;32mInstalling CFUN fix...\e[0m"
# Create the CFUN fix script
echo "#!/bin/sh
/bin/echo -e 'AT+CFUN=1 \r' > /dev/smd7" > "$cfun_fix_script"
chmod +x "$cfun_fix_script"
# Create the systemd service file to execute the CFUN fix script at boot
echo "[Unit]
Description=CFUN Fix Service
After=network.target
[Service]
Type=oneshot
ExecStart=$cfun_fix_script
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target" > "$cfun_service_path"
ln -sf "$cfun_service_path" "/lib/systemd/system/multi-user.target.wants/"
systemctl daemon-reload
mount -o remount,ro /
echo -e "\e[1;32mCFUN fix has been installed and will execute at every boot.\e[0m"
fi
}
install_sshd() {
if [ -d "/usrdata/sshd" ]; then
echo -e "\e[1;31mSSHD is currently installed.\e[0m"
echo -e "Do you want to update or uninstall?"
echo -e "1.) Update"
echo -e "2.) Uninstall"
read -p "Select an option (1 or 2): " sshd_choice
case $sshd_choice in
1)
echo -e "\e[1;31m2) Installing sshd from the $GITTREE branch\e[0m"
;;
2)
echo -e "\e[1;31mUninstalling SSHD...\e[0m"
systemctl stop sshd
rm /lib/systemd/system/sshd.service
opkg remove openssh-server-pam
echo -e "\e[1;32mSSHD has been uninstalled successfully.\e[0m"
return 0
;;
*)
echo -e "\e[1;31mInvalid option. Please select 1 or 2.\e[0m"
return 1
;;
esac
fi
# Proceed with installation or updating if not uninstalling
ensure_entware_installed
mkdir /usrdata/simpleupdates > /dev/null 2>&1
mkdir /usrdata/simpleupdates/scripts > /dev/null 2>&1
wget -O /usrdata/simpleupdates/scripts/update_sshd.sh https://raw.githubusercontent.com/$GITUSER/quectel-rgmii-toolkit/$GITTREE/simpleupdates/scripts/update_sshd.sh && chmod +x /usrdata/simpleupdates/scripts/update_sshd.sh
echo -e "\e[1;32mInstalling/updating: SSHd\e[0m"
echo -e "\e[1;32mPlease Wait....\e[0m"
/usrdata/simpleupdates/scripts/update_sshd.sh
echo -e "\e[1;32m SSHd has been updated/installed.\e[0m"
}
# Main menu
while true; do
echo " .%+: "
echo " .*@@@-. "
echo " :@@@@- "
echo " @@@@#. "
echo " -@@@@#. "
echo " :. %@@@@: -# "
echo " .+- #@@@@%.+@- "
echo " .#- . +@@@@# #@- "
echo " -@*@*@% @@@@@::@@= "
echo ".+%@@@@@@@@@%=. =@@@@# #@@- .. "
echo " .@@@@@: :@@@@@ =@@@..%= "
echo " -::@-.+. @@@@@.=@@@- =@- "
echo " .@- .@@@@@:.@@@* @@. "
echo " .%- -@@@@@:=@@@@ @@# "
echo " .#- .%@@@@@@#. +@@@@@.#@@@@ @@@."
echo " .*- .@@@@@@@@@@=. @@@@@@ @@@@@ @@@:"
echo " :. .%@@@@@@@@@@@%. .@@@@@+:@@@@@ @@@-"
echo " -@@@@@@@@@@@@@@@..@@@@@@.-@@@@@ .@@@-"
echo " -@@@@@@@@@@%. .@@@@@@. @@@@@+ =@@@="
echo " =@@@@@@@@* .@@@@@@. @@@@@@..@@@@-"
echo " #@@@@@@@@-*@@@@@%..@@@@@@+ #@@@@-"
echo " @@@@@@:.-@@@@@@. @@@@@@= %@@@@@."
echo " .@@@@. *@@@@@@- .+@@@@@@-.@@@@@@+ "
echo " %@@. =@@@@@*. +@@@@@@%.-@@@@@@% "
echo " .@@ .@@@@@= :@@@@@@@@..@@@@@@@= "
echo " =@.+@@@@@. -@@@@@@@*.:@@@@@@@*. "
echo " %.*@@@@= .@@@@@@@-.:@@@@@@@+. "
echo " ..@@@@= .@@@@@@: #@@@@@@@: "
echo " .@@@@ +@@@@..%@@@@@+. "
echo " .@@@. @@@@.:@@@@+. "
echo " @@@. @@@. @@@* .@. "
echo " :@@@ %@@..@@#. *@ "
echo " -*: .@@* :@@. @@. -..@@ "
echo " =@@@@@@.*@- :@% @* =@:=@# "
echo " .@@@-+@@@@:%@..%- ...@%:@@: "
echo " .@@. @@-%@: .%@@*@@%. "
echo " :@@ :+ *@ *@@#*@@@. "
echo " =@@@.@@@@ "
echo " .*@@@:=@@@@: "
echo " .@@@@:.@@@@@: "
echo " .@@@@#.-@@@@@. "
echo " #@@@@: =@@@@@- "
echo " .@@@@@..@@@@@@* "
echo " -@@@@@. @@@@@@#. "
echo " -@@@@@ @@@@@@% "
echo " @@@@@. #@@@@@@. "
echo " :@@@@# =@@@@@@% "
echo " @@@@@: @@@@@@@: "
echo " *@@@@ @@@@@@@. "
echo " .@@@@ @@@@@@@ "
echo " #@@@. @@@@@@* "
echo " @@@# @@@@@@@ "
echo " .@@+=@@@@@@. "
echo " *@@@@@@ "
echo " :@@@@@= "
echo " .@@@@@@. "
echo " :@@@@@*. "
echo " .=@@@@@- "
echo " :+##+. "
echo -e "\e[92m"
echo "Welcome to iamromulan's RGMII Toolkit script for Quectel RMxxx Series modems!"
echo "Visit https://github.com/iamromulan for more!"
echo -e "\e[0m"
echo "Select an option:"
echo -e "\e[0m"
echo -e "\e[96m1) Send AT Commands\e[0m" # Cyan
echo -e "\e[93m2) Install Simple Admin\e[0m" # Yellow
echo -e "\e[95m3) Set Simpleadmin (admin) password\e[0m" # Light Purple
echo -e "\e[94m4) Set Console/ttyd (root) password\e[0m" # Light Blue
echo -e "\e[91m5) Uninstall Simple Admin\e[0m" # Light Red
echo -e "\e[95m6) Simple Firewall Management\e[0m" # Light Purple
echo -e "\e[94m7) Tailscale Management\e[0m" # Light Blue
echo -e "\e[92m8) Install/Change or remove Daily Reboot Timer\e[0m" # Light Green
echo -e "\e[96m9) Install/Uninstall CFUN 0 Fix\e[0m" # Cyan (repeated color for additional options)
echo -e "\e[91m10) Uninstall Entware/OPKG\e[0m" # Light Red
echo -e "\e[92m11) Install Speedtest.net CLI app (speedtest command)\e[0m" # Light Green
echo -e "\e[92m12) Install Fast.com CLI app (fast command)(tops out at 40Mbps)\e[0m" # Light Green
echo -e "\e[92m13) Install OpenSSH Server\e[0m" # Light Green
echo -e "\e[93m14) Exit\e[0m" # Yellow (repeated color for exit option)
read -p "Enter your choice: " choice
case $choice in
1)
send_at_commands
;;
2)
install_simple_admin
;;
3) set_simpleadmin_passwd
;;
4)
set_root_passwd
;;
5)
uninstall_simpleadmin_components
;;
6)
configure_simple_firewall
;;
7)
tailscale_menu
;;
8)
manage_reboot_timer
;;
9)
manage_cfun_fix
;;
10)
echo -e "\033[31mAre you sure you want to uninstall entware?\033[0m"
echo -e "\033[31m1) Yes\033[0m"
echo -e "\033[31m2) No\033[0m"
read -p "Select an option (1 or 2): " user_choice
case $user_choice in
1)
# If yes, uninstall existing entware
echo -e "\033[31mUninstalling existing entware...\033[0m"
uninstall_entware # Assuming uninstall_entware is a defined function or command
echo -e "\033[31mEntware has been uninstalled.\033[0m"
;;
2)
# If no, exit the script
echo -e "\033[31mUninstallation cancelled.\033[0m"
exit # Use 'exit' to terminate the script outside a loop
;;
*)
# Handle invalid input
echo -e "\033[31mInvalid option. Please select 1 or 2.\033[0m"
;;
esac
;;
11)
ensure_entware_installed
echo -e "\e[1;32mInstalling Speedtest.net CLI (speedtest command)\e[0m"
remount_rw
mkdir /usrdata/root
mkdir /usrdata/root/bin
cd /usrdata/root/bin
wget https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-armhf.tgz
tar -xzf ookla-speedtest-1.2.0-linux-armhf.tgz
rm ookla-speedtest-1.2.0-linux-armhf.tgz
rm speedtest.md
cd /
ln -sf /usrdata/root/bin/speedtest /bin
remount_ro
echo -e "\e[1;32mSpeedtest CLI (speedtest command) installed!!\e[0m"
echo -e "\e[1;32mTry running the command 'speedtest'\e[0m"
echo -e "\e[1;32mNote that it will not work unless you login to the root account first\e[0m"
echo -e "\e[1;32mNormaly only an issue in adb, ttyd and ssh you are forced to login\e[0m"
echo -e "\e[1;32mIf in adb just type login and then try to run the speedtest command\e[0m"
;;
12)
echo -e "\e[1;32mInstalling fast.com CLI (fast command)\e[0m"
remount_rw
mkdir /usrdata/root
mkdir /usrdata/root/bin
cd /usrdata/root/bin
wget -O fast https://github.com/ddo/fast/releases/download/v0.0.4/fast_linux_arm && chmod +x fast
cd /
ln -sf /usrdata/root/bin/fast /bin
remount_ro
echo -e "\e[1;32mFast.com CLI (speedtest command) installed!!\e[0m"
echo -e "\e[1;32mTry running the command 'fast'\e[0m"
echo -e "\e[1;32mThe fast.com test tops out at 40Mbps on the modem\e[0m"
;;
13)
install_sshd
;;
14)
echo -e "\e[1;32mGoodbye!\e[0m"
break
;;
*)
echo -e "\e[1;31mInvalid option\e[0m"
;;
esac
done

View File

@@ -0,0 +1,6 @@
Package: sdxpinn-firstboot
Version: 1.0
Architecture: sdxpinn
Maintainer: Cameron Thompson iamromulan@github.com
Source: github.com/iamromulan
Description: A first boot init after a flash or factory reset

View File

@@ -0,0 +1,5 @@
#!/bin/ash
service first-boot enable
exit 0

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1,31 @@
#!/bin/sh /etc/rc.common
START=99
STOP=15
USE_PROCD=1
start_service() {
# Create log file
touch /usrdata/first-boot.log
# Redirect all output to log file
exec >>/usrdata/first-boot.log 2>&1
echo "Starting first boot script: $(date)"
echo "Remounting the real rootfs as rw"
mount -o remount,rw /real_rootfs
echo "Sending AT Commands"
atcmd 'AT+QCFG="usbnet",1'
atcmd 'AT+QCFG="pcie/mode",1'
echo "Disabling first-boot service"
service first-boot disable
echo "Restarting modem"
atcmd 'AT+CFUN=1,1'
echo "Removing first-boot service"
rm /real_rootfs/etc/init.d/first-boot
echo "First boot script completed: $(date)"
}

View File

@@ -0,0 +1,6 @@
Package: sdxpinn-patch
Version: 2.5
Architecture: all
Maintainer: Cameron Thompson iamromulan@github.com
Source: github.com/iamromulan
Description: A general first system patch for SDXPINN OpenWRT

View File

@@ -0,0 +1,5 @@
#!/bin/ash
echo "Complete"
exit 0

View File

@@ -0,0 +1,211 @@
#!/bin/ash
clean_distfeeds() {
# Define the list of items to comment out
items_to_comment=$(cat <<EOF
src/gz openwrt_core https://downloads.openwrt.org/releases/22.03.5/targets/sdx75/generic/packages
src/gz openwrt_qtiagm https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiagm
src/gz openwrt_qtiargs https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiargs
src/gz openwrt_qtiaudio https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiaudio
src/gz openwrt_qtiaudioprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiaudioprop
src/gz openwrt_qtibsp https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtibsp
src/gz openwrt_qtibspprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtibspprop
src/gz openwrt_qtibt https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtibt
src/gz openwrt_qtibtprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtibtprop
src/gz openwrt_qticore https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qticore
src/gz openwrt_qticoreinternal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qticoreinternal
src/gz openwrt_qticoreprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qticoreprop
src/gz openwrt_qtictainternal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtictainternal
src/gz openwrt_qtidata https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtidata
src/gz openwrt_qtidatainternal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtidatainternal
src/gz openwrt_qtidataprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtidataprop
src/gz openwrt_qtiipq https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiipq
src/gz openwrt_qtiipqezmesh https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiipqezmesh
src/gz openwrt_qtiipqprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiipqprop
src/gz openwrt_qtilocation https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtilocation
src/gz openwrt_qtilocationinternal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtilocationinternal
src/gz openwrt_qtilocationprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtilocationprop
src/gz openwrt_qtimsdcprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtimsdcprop
src/gz openwrt_qtinternal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtinternal
src/gz openwrt_qtipal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtipal
src/gz openwrt_qtiperfprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiperfprop
src/gz openwrt_qtippatprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtippatprop
src/gz openwrt_qtiquectel https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiquectel
src/gz openwrt_qtiquectelprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiquectelprop
src/gz openwrt_qtirilprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtirilprop
src/gz openwrt_qtisecurity https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtisecurity
src/gz openwrt_qtisecurityinternal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtisecurityinternal
src/gz openwrt_qtisecurityprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtisecurityprop
src/gz openwrt_qtisensorsinternal https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtisensorsinternal
src/gz openwrt_qtisensorsprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtisensorsprop
src/gz openwrt_qtissdk https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtissdk
src/gz openwrt_qtissmgr https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtissmgr
src/gz openwrt_qtissmgrprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtissmgrprop
src/gz openwrt_qtiwlan https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiwlan
src/gz openwrt_qtiwlanprop https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/qtiwlanprop
EOF
)
# Define the list of items to ensure are uncommented
items_to_keep=$(cat <<EOF
src/gz openwrt_base https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/22.03.5/packages/aarch64_cortex-a53/telephony/
EOF
)
# Input file to process
INPUT_FILE="/etc/opkg/distfeeds.conf"
# Backup the original file
cp "$INPUT_FILE" "${INPUT_FILE}.bak"
# Create a temporary file for the modified content
TEMP_FILE="${INPUT_FILE}.tmp"
: > "$TEMP_FILE" # Clear/create the temp file
# Process each line in the input file
while IFS= read -r line || [ -n "$line" ]; do
# Skip empty lines
[ -z "$line" ] && continue
# Skip malformed lines
echo "$line" | grep -qE '^(#[[:space:]]*)?src/gz ' || continue
# Remove any existing comment marks for comparison
clean_line=$(echo "$line" | sed 's/^#[[:space:]]*//')
# Check if line should be commented
if echo "$items_to_comment" | grep -Fxq "$clean_line"; then
echo "# $clean_line" >> "$TEMP_FILE"
continue
fi
# Check if line should be kept uncommented
if echo "$items_to_keep" | grep -Fxq "$clean_line"; then
echo "$clean_line" >> "$TEMP_FILE"
continue
fi
# Preserve other lines as-is
echo "$line" >> "$TEMP_FILE"
done < "$INPUT_FILE"
# Add any missing items_to_keep entries
echo "$items_to_keep" | while IFS= read -r keep_item; do
[ -z "$keep_item" ] && continue
if ! grep -Fxq "$keep_item" "$TEMP_FILE"; then
echo "$keep_item" >> "$TEMP_FILE"
fi
done
# Replace the original file with the modified one
mv "$TEMP_FILE" "$INPUT_FILE"
echo "Processed '$INPUT_FILE'. Backup saved as '${INPUT_FILE}.bak'."
}
repo_iamromulanSDXPINN_check() {
# Define the repository and key details
STABLE_REPO_LINE="src/gz iamromulan-SDXPINN-repo https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/SDXPINN/opkg-feed"
DEV_REPO_LINE="src/gz iamromulan-SDXPINN-repo https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development-SDXPINN/opkg-feed"
FEEDS_FILE="/etc/opkg/customfeeds.conf"
PUBLIC_KEY_URL="https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/SDXPINN/opkg-feed/iamromulan-SDXPINN-repo.key"
TMP_KEY="/tmp/iamromulan-SDXPINN-repo.key"
KEYS_DIR="/etc/opkg/keys"
# Remove duplicate and development repo lines
if grep -q "iamromulan-SDXPINN-repo" "$FEEDS_FILE"; then
echo "Cleaning up duplicate or development repo entries in $FEEDS_FILE."
sed -i "/iamromulan-SDXPINN-repo/d" "$FEEDS_FILE"
fi
# Add the stable repository to customfeeds.conf
echo "Adding stable repository to $FEEDS_FILE."
echo "$STABLE_REPO_LINE" >> "$FEEDS_FILE" || {
echo "Error: Could not add repository to $FEEDS_FILE."
return 1
}
# Download the key temporarily for verification
curl -fsSL "$PUBLIC_KEY_URL" -o "$TMP_KEY" || {
echo "Error: Failed to download public key from $PUBLIC_KEY_URL."
return 1
}
# Check if the key already exists in /etc/opkg/keys/
local key_installed=0
for key in "$KEYS_DIR"/*; do
if cmp -s "$TMP_KEY" "$key"; then
echo "Public key already installed: $(basename "$key")."
key_installed=1
break
fi
done
# If the key is not installed, add it
if [ "$key_installed" -eq 0 ]; then
echo "Installing public key..."
opkg-key add "$TMP_KEY" || {
echo "Error: Failed to add public key."
rm -f "$TMP_KEY"
return 1
}
echo "Public key installed successfully."
fi
# Clean up temporary key file
rm -f "$TMP_KEY"
return 0
}
noprerm_mount_fix() {
if [ -f /real_rootfs/usr/lib/opkg/info/sdxpinn-mount-fix.prerm ]; then
mount -o remount,rw /real_rootfs
sleep 1
rm /real_rootfs/usr/lib/opkg/info/sdxpinn-mount-fix.prerm
sleep 1
mount -o remount,ro /real_rootfs
fi
if [ -f /usr/lib/opkg/info/sdxpinn-mount-fix.prerm ]; then
rm /usr/lib/opkg/info/sdxpinn-mount-fix.prerm
fi
}
opkg_arch_patch() {
if [ ! -f /etc/opkg/arch.conf ]; then
cat > /etc/opkg/arch.conf << 'EOF'
arch all 1
arch noarch 1
arch sdxpinn 2
arch aarch64_cortex-a53 10
arch aarch64_generic 20
EOF
else
for arch in "all 1" "noarch 1" "sdxpinn 2" "aarch64_cortex-a53 10" "aarch64_generic 20"; do
if ! grep -q "^arch $arch$" /etc/opkg/arch.conf; then
echo "arch $arch" >> /etc/opkg/arch.conf
fi
done
fi
}
# Begin Patch Process
echo -e "\e[92mBegining sdxpinn-patch process...\e[0m"
echo -e "\e[92mEnsuring distfeeds is clean of any non-working sources and has stock OpenWRT ones...\e[0m"
clean_distfeeds
echo -e "\e[92mEnsuring iamromulan's SDXPINN repo is listed in customfeeds and public key is installed...\e[0m"
repo_iamromulanSDXPINN_check
echo -e "\e[92miamromulan's SDXPINN repo source and key is installed.\e[0m"
echo -e "\e[92mEnsuring mount-fix does not have a prerm\e[0m"
noprerm_mount_fix
echo -e "\e[92mEnsuring opkg reconizes needed archs\e[0m"
opkg_arch_patch
echo -e "\e[92msdxpinn-patch process complete.\e[0m"
exit 0

View File

@@ -0,0 +1,5 @@
#!/bin/ash
echo -e "\e[38;5;196mINFO: This package can not be removed by opkg\e[0m"
echo -e "\e[38;5;40mINFO: This package can be upgraded...\e[0m"
exit 0

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

Binary file not shown.

View File

@@ -0,0 +1,6 @@
Package: sdxpinn-firstboot
Version: 1.0
Architecture: sdxpinn
Maintainer: Cameron Thompson iamromulan@github.com
Source: github.com/iamromulan
Description: A first boot init after a flash or factory reset

View File

@@ -0,0 +1,5 @@
#!/bin/ash
service first-boot enable
exit 0

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1,31 @@
#!/bin/sh /etc/rc.common
START=99
STOP=15
USE_PROCD=1
start_service() {
# Create log file
touch /usrdata/first-boot.log
# Redirect all output to log file
exec >>/usrdata/first-boot.log 2>&1
echo "Starting first boot script: $(date)"
echo "Remounting the real rootfs as rw"
mount -o remount,rw /real_rootfs
echo "Sending AT Commands"
atcmd 'AT+QCFG="usbnet",1'
atcmd 'AT+QCFG="pcie/mode",1'
echo "Disabling first-boot service"
service first-boot disable
echo "Restarting modem"
atcmd 'AT+CFUN=1,1'
echo "Removing first-boot service"
rm /real_rootfs/etc/init.d/first-boot
echo "First boot script completed: $(date)"
}

View File

@@ -0,0 +1,6 @@
Package: sdxpinn-patch
Version: 2.5
Architecture: all
Maintainer: Cameron Thompson iamromulan@github.com
Source: github.com/iamromulan
Description: A general first system patch for SDXPINN OpenWRT

View File

@@ -0,0 +1,5 @@
#!/bin/ash
echo "Complete"
exit 0

View File

@@ -0,0 +1,213 @@
#!/bin/ash
clean_distfeeds() {
# Define the list of items to comment out
items_to_comment=$(cat <<EOF
src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.4/targets/sdx75/generic/packages
src/gz openwrt_qtiagm https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiagm
src/gz openwrt_qtiargs https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiargs
src/gz openwrt_qtiaudio https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiaudio
src/gz openwrt_qtiaudioprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiaudioprop
src/gz openwrt_qtibsp https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtibsp
src/gz openwrt_qtibspprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtibspprop
src/gz openwrt_qtibt https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtibt
src/gz openwrt_qtibtprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtibtprop
src/gz openwrt_qticore https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qticore
src/gz openwrt_qticoreinternal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qticoreinternal
src/gz openwrt_qticoreprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qticoreprop
src/gz openwrt_qtictainternal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtictainternal
src/gz openwrt_qtidata https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtidata
src/gz openwrt_qtidatainternal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtidatainternal
src/gz openwrt_qtidataprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtidataprop
src/gz openwrt_qtiemergencyalertprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiemergencyalertprop
src/gz openwrt_qtigplv2 https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtigplv2
src/gz openwrt_qtiipq https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiipq
src/gz openwrt_qtiipqezmesh https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiipqezmesh
src/gz openwrt_qtiipqprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiipqprop
src/gz openwrt_qtilocation https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtilocation
src/gz openwrt_qtilocationinternal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtilocationinternal
src/gz openwrt_qtilocationprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtilocationprop
src/gz openwrt_qtimsdcprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtimsdcprop
src/gz openwrt_qtinternal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtinternal
src/gz openwrt_qtipal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtipal
src/gz openwrt_qtiperfprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiperfprop
src/gz openwrt_qtippatprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtippatprop
src/gz openwrt_qtiquectel https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiquectel
src/gz openwrt_qtiquectelprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiquectelprop
src/gz openwrt_qtirilprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtirilprop
src/gz openwrt_qtisecurity https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtisecurity
src/gz openwrt_qtisecurityinternal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtisecurityinternal
src/gz openwrt_qtisecurityprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtisecurityprop
src/gz openwrt_qtisensorsinternal https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtisensorsinternal
src/gz openwrt_qtisensorsprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtisensorsprop
src/gz openwrt_qtissdk https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtissdk
src/gz openwrt_qtissmgr https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtissmgr
src/gz openwrt_qtissmgrprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtissmgrprop
src/gz openwrt_qtiwlan https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiwlan
src/gz openwrt_qtiwlanprop https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/qtiwlanprop
EOF
)
# Define the list of items to ensure are uncommented
items_to_keep=$(cat <<EOF
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/routing
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.4/packages/aarch64_cortex-a53/telephony
EOF
)
# Input file to process
INPUT_FILE="/etc/opkg/distfeeds.conf"
# Backup the original file
cp "$INPUT_FILE" "${INPUT_FILE}.bak"
# Create a temporary file for the modified content
TEMP_FILE="${INPUT_FILE}.tmp"
: > "$TEMP_FILE" # Clear/create the temp file
# Process each line in the input file
while IFS= read -r line || [ -n "$line" ]; do
# Skip empty lines
[ -z "$line" ] && continue
# Skip malformed lines
echo "$line" | grep -qE '^(#[[:space:]]*)?src/gz ' || continue
# Remove any existing comment marks for comparison
clean_line=$(echo "$line" | sed 's/^#[[:space:]]*//')
# Check if line should be commented
if echo "$items_to_comment" | grep -Fxq "$clean_line"; then
echo "# $clean_line" >> "$TEMP_FILE"
continue
fi
# Check if line should be kept uncommented
if echo "$items_to_keep" | grep -Fxq "$clean_line"; then
echo "$clean_line" >> "$TEMP_FILE"
continue
fi
# Preserve other lines as-is
echo "$line" >> "$TEMP_FILE"
done < "$INPUT_FILE"
# Add any missing items_to_keep entries
echo "$items_to_keep" | while IFS= read -r keep_item; do
[ -z "$keep_item" ] && continue
if ! grep -Fxq "$keep_item" "$TEMP_FILE"; then
echo "$keep_item" >> "$TEMP_FILE"
fi
done
# Replace the original file with the modified one
mv "$TEMP_FILE" "$INPUT_FILE"
echo "Processed '$INPUT_FILE'. Backup saved as '${INPUT_FILE}.bak'."
}
repo_iamromulanSDXPINN_check() {
# Define the repository and key details
STABLE_REPO_LINE="src/gz iamromulan-SDXPINN-repo https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/SDXPINN/opkg-feed"
DEV_REPO_LINE="src/gz iamromulan-SDXPINN-repo https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/development-SDXPINN/opkg-feed"
FEEDS_FILE="/etc/opkg/customfeeds.conf"
PUBLIC_KEY_URL="https://raw.githubusercontent.com/iamromulan/quectel-rgmii-toolkit/SDXPINN/opkg-feed/iamromulan-SDXPINN-repo.key"
TMP_KEY="/tmp/iamromulan-SDXPINN-repo.key"
KEYS_DIR="/etc/opkg/keys"
# Remove duplicate and development repo lines
if grep -q "iamromulan-SDXPINN-repo" "$FEEDS_FILE"; then
echo "Cleaning up duplicate or development repo entries in $FEEDS_FILE."
sed -i "/iamromulan-SDXPINN-repo/d" "$FEEDS_FILE"
fi
# Add the stable repository to customfeeds.conf
echo "Adding stable repository to $FEEDS_FILE."
echo "$STABLE_REPO_LINE" >> "$FEEDS_FILE" || {
echo "Error: Could not add repository to $FEEDS_FILE."
return 1
}
# Download the key temporarily for verification
curl -fsSL "$PUBLIC_KEY_URL" -o "$TMP_KEY" || {
echo "Error: Failed to download public key from $PUBLIC_KEY_URL."
return 1
}
# Check if the key already exists in /etc/opkg/keys/
local key_installed=0
for key in "$KEYS_DIR"/*; do
if cmp -s "$TMP_KEY" "$key"; then
echo "Public key already installed: $(basename "$key")."
key_installed=1
break
fi
done
# If the key is not installed, add it
if [ "$key_installed" -eq 0 ]; then
echo "Installing public key..."
opkg-key add "$TMP_KEY" || {
echo "Error: Failed to add public key."
rm -f "$TMP_KEY"
return 1
}
echo "Public key installed successfully."
fi
# Clean up temporary key file
rm -f "$TMP_KEY"
return 0
}
noprerm_mount_fix() {
if [ -f /real_rootfs/usr/lib/opkg/info/sdxpinn-mount-fix.prerm ]; then
mount -o remount,rw /real_rootfs
sleep 1
rm /real_rootfs/usr/lib/opkg/info/sdxpinn-mount-fix.prerm
sleep 1
mount -o remount,ro /real_rootfs
fi
if [ -f /usr/lib/opkg/info/sdxpinn-mount-fix.prerm ]; then
rm /usr/lib/opkg/info/sdxpinn-mount-fix.prerm
fi
}
opkg_arch_patch() {
if [ ! -f /etc/opkg/arch.conf ]; then
cat > /etc/opkg/arch.conf << 'EOF'
arch all 1
arch noarch 1
arch sdxpinn 2
arch aarch64_cortex-a53 10
arch aarch64_generic 20
EOF
else
for arch in "all 1" "noarch 1" "sdxpinn 2" "aarch64_cortex-a53 10" "aarch64_generic 20"; do
if ! grep -q "^arch $arch$" /etc/opkg/arch.conf; then
echo "arch $arch" >> /etc/opkg/arch.conf
fi
done
fi
}
# Begin Patch Process
echo -e "\e[92mBegining sdxpinn-patch process...\e[0m"
echo -e "\e[92mEnsuring distfeeds is clean of any non-working sources and has stock OpenWRT ones...\e[0m"
clean_distfeeds
echo -e "\e[92mEnsuring iamromulan's SDXPINN repo is listed in customfeeds and public key is installed...\e[0m"
repo_iamromulanSDXPINN_check
echo -e "\e[92miamromulan's SDXPINN repo source and key is installed.\e[0m"
echo -e "\e[92mEnsuring mount-fix does not have a prerm\e[0m"
noprerm_mount_fix
echo -e "\e[92mEnsuring opkg reconizes needed archs\e[0m"
opkg_arch_patch
echo -e "\e[92msdxpinn-patch process complete.\e[0m"
exit 0

View File

@@ -0,0 +1,5 @@
#!/bin/ash
echo -e "\e[38;5;196mINFO: This package can not be removed by opkg\e[0m"
echo -e "\e[38;5;40mINFO: This package can be upgraded...\e[0m"
exit 0

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1,10 @@
# For preping a firmware before capture of the mtd block
This directory is for custom firmware development. It contains special versions of ipks intended to be installed as apart of a custom firmware.
This is mostly here to help me simplify the firmware creation process
R01 is for R01 firmware on OpenWRT 22.03.5
R02 is for R02 firmware on OpenWRT 23.05.4
~iamromulan

View File

@@ -1,167 +0,0 @@
#!/bin/sh
# Modified by iamromulan to set up a proper entware environment for Quectel RM5xx series m.2 modems
TYPE='generic'
#|---------|-----------------|
#| TARGET | Quectel Modem |
#| ARCH | armv7sf-k3.2 |
#| LOADER | ld-linux.so.3 |
#| GLIBC | 2.27 |
#|---------|-----------------|
unset LD_LIBRARY_PATH
unset LD_PRELOAD
ARCH=armv7sf-k3.2
LOADER=ld-linux.so.3
GLIBC=2.27
PRE_OPKG_PATH=$(which opkg)
# Remount filesystem as read-write
mount -o remount,rw /
create_opt_mount() {
# Bind /usrdata/opt to /opt
echo -e '\033[32mInfo: Setting up /opt mount to /usrdata/opt...\033[0m'
cat <<EOF > /lib/systemd/system/opt.mount
[Unit]
Description=Bind /usrdata/opt to /opt
[Mount]
What=/usrdata/opt
Where=/opt
Type=none
Options=bind
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl start opt.mount
# Additional systemd service to ensure opt.mount starts at boot
echo -e '\033[32mInfo: Creating service to start opt.mount at boot...\033[0m'
cat <<EOF > /lib/systemd/system/start-opt-mount.service
[Unit]
Description=Ensure opt.mount is started at boot
After=network.target
[Service]
Type=oneshot
ExecStart=/bin/systemctl start opt.mount
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
ln -s /lib/systemd/system/start-opt-mount.service /lib/systemd/system/multi-user.target.wants/start-opt-mount.service
}
if [ -n "$PRE_OPKG_PATH" ]; then
# Automatically rename the existing opkg binary
mv "$PRE_OPKG_PATH" "${PRE_OPKG_PATH}_old"
echo -e "\033[32mFactory/Already existing opkg has been renamed to opkg_old.\033[0m"
else
echo "Info: no existing opkg binary detected, proceeding with installation"
fi
echo -e '\033[32mInfo: Creating /opt mount pointed to /usrdata/opt ...\033[0m'
create_opt_mount
echo -e '\033[32mInfo: Proceeding with main installation ...\033[0m'
# no need to create many folders. entware-opt package creates most
for folder in bin etc lib/opkg tmp var/lock
do
if [ -d "/opt/$folder" ]; then
echo -e '\033[31mWarning: Folder /opt/$folder exists!\033[0m'
echo -e '\033[31mWarning: If something goes wrong please clean /opt folder and try again.\033[0m'
else
mkdir -p /opt/$folder
fi
done
echo -e '\033[32mInfo: Opkg package manager deployment...\033[0m'
URL=http://bin.entware.net/${ARCH}/installer
wget $URL/opkg -O /opt/bin/opkg
chmod 755 /opt/bin/opkg
wget $URL/opkg.conf -O /opt/etc/opkg.conf
echo -e '\033[32mInfo: Basic packages installation...\033[0m'
/opt/bin/opkg update
/opt/bin/opkg install entware-opt
# Fix for multiuser environment
chmod 777 /opt/tmp
for file in passwd group shells shadow gshadow; do
if [ $TYPE = 'generic' ]; then
if [ -f /etc/$file ]; then
ln -sf /etc/$file /opt/etc/$file
else
[ -f /opt/etc/$file.1 ] && cp /opt/etc/$file.1 /opt/etc/$file
fi
else
if [ -f /opt/etc/$file.1 ]; then
cp /opt/etc/$file.1 /opt/etc/$file
fi
fi
done
[ -f /etc/localtime ] && ln -sf /etc/localtime /opt/etc/localtime
# Create and enable rc.unslung service
echo -e '\033[32mInfo: Creating rc.unslung (Entware init.d service)...\033[0m'
cat <<EOF > /lib/systemd/system/rc.unslung.service
[Unit]
Description=Start Entware services
[Service]
Type=oneshot
# Add a delay to give /opt time to mount
ExecStartPre=/bin/sleep 5
ExecStart=/opt/etc/init.d/rc.unslung start
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
ln -s /lib/systemd/system/rc.unslung.service /lib/systemd/system/multi-user.target.wants/rc.unslung.service
systemctl start rc.unslung.service
echo -e '\033[32mInfo: Congratulations!\033[0m'
echo -e '\033[32mInfo: If there are no errors above then Entware was successfully initialized.\033[0m'
echo -e '\033[32mInfo: Add /opt/bin & /opt/sbin to $PATH variable\033[0m'
ln -sf /opt/bin/opkg /bin
echo -e '\033[32mInfo: Patching Quectel Login Binary\033[0m'
opkg update && opkg install shadow-login shadow-passwd shadow-useradd
if [ "$?" -ne 0 ]; then
echo -e "\e[1;31mPackage installation failed. Please check your internet connection and try again.\e[0m"
exit 1
fi
# Replace the login and passwd binaries and set home for root to a writable directory
rm /opt/etc/shadow
rm /opt/etc/passwd
cp /etc/shadow /opt/etc/
cp /etc/passwd /opt/etc
mkdir /usrdata/root
mkdir /usrdata/root/bin
touch /usrdata/root/.profile
echo "# Set PATH for all shells" > /usrdata/root/.profile
echo "export PATH=/bin:/usr/sbin:/usr/bin:/sbin:/opt/sbin:/opt/bin:/usrdata/root/bin" >> /usrdata/root/.profile
chmod +x /usrdata/root/.profile
sed -i '1s|/home/root:/bin/sh|/usrdata/root:/bin/bash|' /opt/etc/passwd
rm /bin/login /usr/bin/passwd
ln -sf /opt/bin/login /bin
ln -sf /opt/bin/passwd /usr/bin/
ln -sf /opt/bin/useradd /usr/bin/
echo -e "\e[1;31mPlease set the root password.\e[0m"
/usr/bin/passwd
# Install basic and useful utilites
opkg install mc htop dfc lsof
ln -sf /opt/bin/mc /bin
ln -sf /opt/bin/htop /bin
ln -sf /opt/bin/dfc /bin
ln -sf /opt/bin/lsof /bin
# Remount filesystem as read-only
mount -o remount,ro /

View File

@@ -0,0 +1,13 @@
Package: atinout
Version: 0.9.1
Depends: libc
Source: feeds/kiddin9/atinout
SourceName: atinout
License: GPLv2
LicenseFiles: LICENSE
Section: net
SourceDateEpoch: 1691250335
Maintainer: Adrian Guenter <a@gntr.me>
Architecture: aarch64_cortex-a53
Installed-Size: 3571
Description: Atinout is a program that will execute AT commands in sequence and capture the response from the modem.

View File

@@ -0,0 +1,5 @@
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_postinst $0 $@

View File

@@ -0,0 +1,4 @@
#!/bin/sh
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_prerm $0 $@

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1,2 @@
/etc/config/
/etc/atinout/

Binary file not shown.

View File

@@ -0,0 +1,7 @@
Package: kmod-wireguard
Depends: sdxpinn-patch
Version: 1
Architecture: sdxpinn
Maintainer: Cameron Thompson iamromulan@github.com
Source: github.com/iamromulan
Description: Wireguard is compiled into the kernel

View File

@@ -0,0 +1,5 @@
#!/bin/ash
echo "kmod-wireguard registration Complete"
exit 0

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,14 @@
Package: libucode20230711
Version: 2024.07.22~b610860d-r3
Depends: libc, libjson-c5
Provides: libucode
Source: https://dl.openwrt.ai/packages-24.10/aarch64_cortex-a53/base/libucode20230711_2025.02.10~a8a11aea-r1_aarch64_cortex-a53.ipk
SourceName: ucode
License: ISC
Section: libs
SourceDateEpoch: 1729600843
ABIVersion: 20230711
Maintainer: Jo-Philipp Wich <jo@mein.io>
Architecture: aarch64_cortex-a53
Installed-Size: 204800
Description: The libucode package provides the shared runtime library for the ucode interpreter.

View File

@@ -0,0 +1,5 @@
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_postinst $0 $@

View File

@@ -0,0 +1,4 @@
#!/bin/sh
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_prerm $0 $@

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1 @@
/etc/config/argon

View File

@@ -0,0 +1,12 @@
Package: luci-app-argon-config
Version: 0.9-1
Depends: libc, luci-compat, luci-lib-ipkg
Recommends: luci-theme-argon
Source: github.com/jerrykuku/luci-app-argon-config/releases/tag/v0.9
SourceName: luci-app-argon-config
Section: luci
SourceDateEpoch: 1650782942
Maintainer: github.com/jerrykuku
Architecture: all
Installed-Size: 3586
Description: LuCI page for Argon Config

View File

@@ -0,0 +1,5 @@
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_postinst $0 $@

View File

@@ -0,0 +1,7 @@
[ -n "${IPKG_INSTROOT}" ] || {
(. /etc/uci-defaults/luci-argon-config) && rm -f /etc/uci-defaults/luci-argon-config
rm -f /tmp/luci-indexcache
rm -rf /tmp/luci-modulecache/
killall -HUP rpcd 2>/dev/null
exit 0
}

View File

@@ -0,0 +1,4 @@
#!/bin/sh
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_prerm $0 $@

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1,9 @@
config global
option primary '#5e72e4'
option dark_primary '#483d8b'
option blur '10'
option blur_dark '10'
option transparency '0.5'
option transparency_dark '0.5'
option mode 'normal'
option bing_background '0'

View File

@@ -0,0 +1,6 @@
#!/bin/sh
sed -i 's/cbi.submit\"] = true/cbi.submit\"] = \"1\"/g' /usr/lib/lua/luci/dispatcher.lua
rm -f /tmp/luci-indexcache
exit 0

View File

@@ -0,0 +1,10 @@
module("luci.controller.argon-config", package.seeall)
function index()
if not nixio.fs.access('/www/luci-static/argon/css/cascade.css') then
return
end
local page = entry({"admin", "system", "argon-config"}, form("argon-config"), _("Argon Config"), 90)
page.acl_depends = { "luci-app-argon-config" }
end

View File

@@ -0,0 +1,217 @@
local nxfs = require 'nixio.fs'
local wa = require 'luci.tools.webadmin'
local opkg = require 'luci.model.ipkg'
local sys = require 'luci.sys'
local http = require 'luci.http'
local nutil = require 'nixio.util'
local name = 'argon'
local uci = require 'luci.model.uci'.cursor()
local fstat = nxfs.statvfs(opkg.overlay_root())
local space_total = fstat and fstat.blocks or 0
local space_free = fstat and fstat.bfree or 0
local space_used = space_total - space_free
local free_byte = space_free * fstat.frsize
local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity, mode
if nxfs.access('/etc/config/argon') then
primary = uci:get_first('argon', 'global', 'primary')
dark_primary = uci:get_first('argon', 'global', 'dark_primary')
blur_radius = uci:get_first('argon', 'global', 'blur')
blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark')
blur_opacity = uci:get_first('argon', 'global', 'transparency')
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
mode = uci:get_first('argon', 'global', 'mode')
bing_background = uci:get_first('argon', 'global', 'bing_background')
end
function glob(...)
local iter, code, msg = nxfs.glob(...)
if iter then
return nutil.consume(iter)
else
return nil, code, msg
end
end
local transparency_sets = {
0,
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8,
0.9,
1
}
-- [[ 模糊设置 ]]--
br = SimpleForm('config', translate('Argon Config'), translate('Here you can set the blur and transparency of the login page of argon theme, and manage the background pictures and videos.[Chrome is recommended]'))
br.reset = false
br.submit = false
s = br:section(SimpleSection)
o = s:option(ListValue, 'bing_background', translate('Wallpaper Source'))
o:value('0', translate('Built-in'))
o:value('1', translate('Bing Wallpapers'))
o.default = bing_background
o.rmempty = false
o = s:option(ListValue, 'mode', translate('Theme mode'))
o:value('normal', translate('Follow System'))
o:value('light', translate('Force Light'))
o:value('dark', translate('Force Dark'))
o.default = mode
o.rmempty = false
o.description = translate('You can choose Theme color mode here')
o = s:option(Value, 'primary', translate('[Light mode] Primary Color'), translate('A HEX Color ; ( Default: #5e72e4 )'))
o.default = primary
o.datatype = ufloat
o.rmempty = false
o = s:option(ListValue, 'transparency', translate('[Light mode] Transparency'), translate('0 transparent - 1 opaque ; ( Suggest: transparent: 0 or translucent preset: 0.5 )'))
for _, v in ipairs(transparency_sets) do
o:value(v)
end
o.default = blur_opacity
o.datatype = ufloat
o.rmempty = false
o = s:option(Value, 'blur', translate('[Light mode] Frosted Glass Radius'), translate('Larger value will more blurred ; ( Suggest: clear: 1 or blur preset: 10 )'))
o.default = blur_radius
o.datatype = ufloat
o.rmempty = false
o = s:option(Value, 'dark_primary', translate('[Dark mode] Primary Color'), translate('A HEX Color ; ( Default: #483d8b )'))
o.default = dark_primary
o.datatype = ufloat
o.rmempty = false
o = s:option(ListValue, 'transparency_dark', translate('[Dark mode] Transparency'), translate('0 transparent - 1 opaque ; ( Suggest: Black translucent preset: 0.5 )'))
for _, v in ipairs(transparency_sets) do
o:value(v)
end
o.default = blur_opacity_dark
o.datatype = ufloat
o.rmempty = false
o = s:option(Value, 'blur_dark', translate('[Dark mode] Frosted Glass Radius'), translate('Larger value will more blurred ; ( Suggest: clear: 1 or blur preset: 10 )'))
o.default = blur_radius_dark
o.datatype = ufloat
o.rmempty = false
o = s:option(Button, 'save', translate('Save Changes'))
o.inputstyle = 'reload'
function br.handle(self, state, data)
if (state == FORM_VALID and data.blur ~= nil and data.blur_dark ~= nil and data.transparency ~= nil and data.transparency_dark ~= nil and data.mode ~= nil) then
nxfs.writefile('/tmp/aaa', data)
for key, value in pairs(data) do
uci:set('argon','@global[0]',key,value)
end
uci:commit('argon')
end
return true
end
ful = SimpleForm('upload', translate('Upload (Free: ') .. wa.byte_format(free_byte) .. ')', translate("You can upload files such as jpg,png,gif,mp4,webm files, To change the login page background."))
ful.reset = false
ful.submit = false
sul = ful:section(SimpleSection, '', translate("Upload file to '/www/luci-static/argon/background/'"))
fu = sul:option(FileUpload, '')
fu.template = 'argon-config/other_upload'
um = sul:option(DummyValue, '', nil)
um.template = 'argon-config/other_dvalue'
local dir, fd
dir = '/www/luci-static/argon/background/'
nxfs.mkdir(dir)
http.setfilehandler(
function(meta, chunk, eof)
if not fd then
if not meta then
return
end
if meta and chunk then
fd = nixio.open(dir .. meta.file, 'w')
end
if not fd then
um.value = translate('Create upload file error.')
return
end
end
if chunk and fd then
fd:write(chunk)
end
if eof and fd then
fd:close()
fd = nil
um.value = translate('File saved to') .. ' "/www/luci-static/argon/background/' .. meta.file .. '"'
end
end
)
if http.formvalue('upload') then
local f = http.formvalue('ulfile')
if #f <= 0 then
um.value = translate('No specify upload file.')
end
end
local function getSizeStr(size)
local i = 0
local byteUnits = {' kB', ' MB', ' GB', ' TB'}
repeat
size = size / 1024
i = i + 1
until (size <= 1024)
return string.format('%.1f', size) .. byteUnits[i]
end
local inits, attr = {}
for i, f in ipairs(glob(dir .. '*')) do
attr = nxfs.stat(f)
if attr then
inits[i] = {}
inits[i].name = nxfs.basename(f)
inits[i].mtime = os.date('%Y-%m-%d %H:%M:%S', attr.mtime)
inits[i].modestr = attr.modestr
inits[i].size = getSizeStr(attr.size)
inits[i].remove = 0
inits[i].install = false
end
end
form = SimpleForm('filelist', translate('Background file list'), nil)
form.reset = false
form.submit = false
tb = form:section(Table, inits)
nm = tb:option(DummyValue, 'name', translate('File name'))
mt = tb:option(DummyValue, 'mtime', translate('Modify time'))
sz = tb:option(DummyValue, 'size', translate('Size'))
btnrm = tb:option(Button, 'remove', translate('Remove'))
btnrm.render = function(self, section, scope)
self.inputstyle = 'remove'
Button.render(self, section, scope)
end
btnrm.write = function(self, section)
local v = nxfs.unlink(dir .. nxfs.basename(inits[section].name))
if v then
table.remove(inits, section)
end
return v
end
return br, ful, form

View File

@@ -0,0 +1,7 @@
<%+cbi/valueheader%>
<% if self:cfgvalue(section) ~= false then %>
<input class="cbi-button cbi-input-<%=self.inputstyle or "button" %>" style="display: <%= display %>" type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.inputtitle or self.title)%> />
<% else %>
-
<% end %>
<%+cbi/valuefooter%>

View File

@@ -0,0 +1,8 @@
<%+cbi/valueheader%>
<span style="color: red">
<%
local val = self:cfgvalue(section) or self.default or ""
write(pcdata(val))
%>
</span>
<%+cbi/valuefooter%>

View File

@@ -0,0 +1,5 @@
<%+cbi/valueheader%>
<label class="cbi-value" style="display:inline-block; width: 130px" for="ulfile"><%:Choose local file:%></label>
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" accept="image/png, image/jpeg, image/gif, video/mp4, video/webm"/>
<input type="submit" class="btn cbi-button cbi-input-apply" name="upload" value="<%:Upload%>" />
<%+cbi/valuefooter%>

View File

@@ -0,0 +1,11 @@
{
"luci-app-argon-config": {
"description": "Grant UCI access for luci-app-argon-config",
"read": {
"uci": [ "argon" ]
},
"write": {
"uci": [ "argon" ]
}
}
}

View File

@@ -0,0 +1 @@
/etc/config/atcommands.user

View File

@@ -0,0 +1,12 @@
Package: luci-app-atinout-mod
Version: 1.3.4-20250119
Depends: libc, atinout, luci-compat
Source: package/luci-app-atinout-mod
SourceName: luci-app-atinout-mod
License: GPLv3
Section: luci
SourceDateEpoch: 1636930326
Maintainer: OpenWrt LuCI community
Architecture: all
Installed-Size: 3790
Description: Web UI for atinout modded by iamromulan preset for use on SDXPINN

View File

@@ -0,0 +1,5 @@
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_postinst $0 $@

View File

@@ -0,0 +1,7 @@
#!/bin/sh
chmod +x /sbin/set_at_port.sh
chmod +x /usr/bin/luci-app-atinout
rm -rf /tmp/luci-indexcache
rm -rf /tmp/luci-modulecache/
/sbin/set_at_port.sh
exit 0

View File

@@ -0,0 +1,4 @@
#!/bin/sh
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_prerm $0 $@

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1,30 @@
Reboot;AT+CFUN=1,1
Disconnect;AT+CFUN=0
Connect;AT+CFUN=1
Signal Info;AT+QENG="servingcell"
CA Info;AT+QCAINFO
Get current SIM Slot;AT+QUIMSLOT?
Switch to SIM Slot 1;AT+QUIMSLOT=1
Switch to SIM Slot 2;AT+QUIMSLOT=2
Get current APN List;AT+CGDCONT?
Set APN to NRBROADBAND;AT+CGDCONT=1,"IPV4V6","NRBROADBAND"
Show Current IMEI;AT+EGMR=0,7
Show Current Network Mode;AT+QNWPREFCFG="mode_pref"
Set Network Mode to AUTO;AT+QNWPREFCFG="mode_pref",AUTO
Set Network Mode to 5G NR/4G LTE Only;AT+QNWPREFCFG="mode_pref",NR5G:LTE
Set Network Mode to 5G NR Only;AT+QNWPREFCFG="mode_pref",NR5G
Set Network Mode to 4G LTE Only;AT+QNWPREFCFG="mode_pref",LTE
Check to see if SA or NSA is disabled;AT+QNWPREFCFG="nr5g_disable_mode"
Enable Both SA and NSA;AT+QNWPREFCFG="nr5g_disable_mode",0
Disable SA Only;AT+QNWPREFCFG="nr5g_disable_mode",1
Disable NSA Only;AT+QNWPREFCFG="nr5g_disable_mode",2
Get Currently Enabled 5G/NR SA Bands;AT+QNWPREFCFG="nr5g_band"
Get Currently Enabled 5G/NR NSA Bands;AT+QNWPREFCFG="nsa_nr5g_band"
Get Currently Enabled 4G/LTE Bands;AT+QNWPREFCFG="lte_band"
View assigned IPv4/IPv6 addresses from the provider;AT+QMAP="WWAN"
Enable IPPT paste in MAC for FF:FF:FF...;AT+QMAP="MPDN_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF"
Disable IPPT;AT+QMAP="MPDN_rule",0
Set IPv4 DMZ....replace iphere;AT+QMAP="DMZ",1,4,iphere
Set IPv6 DMZ....replace iphere;AT+QMAP="DMZ",1,6,iphere
Disable IPv4 DMZ;AT+QMAP="DMZ",0,4
Disable IPv6 DMZ;AT+QMAP="DMZ",0,6

View File

@@ -0,0 +1,4 @@
config atinout 'general'
option atcport '/dev/smd7'

View File

@@ -0,0 +1,21 @@
#!/bin/sh
# Copyright 2020-2021 Rafał Wabik (IceG) - From eko.one.pl forum
# Licensed to the GNU General Public License v3.0.
work=false
for port in /dev/ttyUSB*
do
[[ -e $port ]] || continue
gcom -d $port info &> /tmp/testusb
testUSB=`cat /tmp/testusb | grep "Error\|Can't"`
if [ -z "$testUSB" ]; then
work=$port
break
fi
done
rm -rf /tmp/testusb
if [ $work != false ]; then
uci set atinout.@atinout[0].atcport=$work
uci commit atinout
fi

View File

@@ -0,0 +1,21 @@
#!/bin/sh
# Copyright 2020-2021 Rafał Wabik (IceG) - From eko.one.pl forum
# Licensed to the GNU General Public License v3.0.
work=false
for port in /dev/ttyUSB*
do
[[ -e $port ]] || continue
gcom -d $port info &> /tmp/testusb
testUSB=`cat /tmp/testusb | grep "Error\|Can't"`
if [ -z "$testUSB" ]; then
work=$port
break
fi
done
rm -rf /tmp/testusb
if [ $work != false ]; then
uci set atinout.@atinout[0].atcport=$work
uci commit atinout
fi

View File

@@ -0,0 +1,8 @@
#!/bin/sh
ARGS=$1
DEVPORT=$(uci -q get atinout.general.atcport)
if [ "$DEVPORT" ]; then
echo "${ARGS}" | /usr/bin/atinout - ${DEVPORT} -
fi

View File

@@ -0,0 +1,49 @@
local e=require"luci.util"
local e=require"nixio.fs"
local e=require"luci.sys"
local e=require"luci.http"
local e=require"luci.dispatcher"
local e=require"luci.http"
local t=require"luci.sys"
local t=require"luci.model.uci".cursor()
module("luci.controller.modem.atc",package.seeall)
function index()
entry({"admin","modem"},firstchild(),"Modem",30).dependent=false
entry({"admin","modem","atc"},alias("admin","modem","atc","atcommand"),translate("AT Commands"),10).acl_depends={"luci-app-atinout-mod"}
entry({"admin","modem","atc","atcommand"},template("modem/atcommand"),translate("AT Commands"),10)
entry({"admin","modem","atc","atconfig"},cbi("modem/atconfig"),translate("Configuration"),20)
entry({"admin","modem","webcmd"},call("webcmd"))
entry({"admin","modem","atc","user_atc"},call("useratc"),nil).leaf=true
end
function webcmd()
local t=e.formvalue("cmd")
if t then
local t=io.popen("/usr/bin/luci-app-atinout "..t:gsub("[$]","\\\$"):gsub("\"","\\\"").." 2>&1")
local a=t:read("*a")
t:close()
e.write(tostring(a))
else
e.write_json(e.formvalue())
end
end
function uussd(t)
local e=nixio.fs.access("/etc/config/atcommands.user")and
io.popen("cat /etc/config/atcommands.user")
if e then
for a in e:lines()do
local e=a
if e then
t[#t+1]={
usd=e
}
end
end
e:close()
end
end
function useratc()
local e={}
uussd(e)
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@@ -0,0 +1,35 @@
local e=require"luci.util"
local o=require"nixio.fs"
local e=require"luci.sys"
local e=require"luci.http"
local e=require"luci.dispatcher"
local e=require"luci.http"
local e=require"luci.sys"
local e=require"luci.model.uci".cursor()
local n="/etc/config/atcommands.user"
local t
local e
local i
local a=nixio.fs.glob("/dev/tty[A-Z][A-Z]*")
t=Map("atinout",translate("Atinout Configuration"),
translate("Configuration panel for atinout."))
e=t:section(NamedSection,'general',"atinout",""..translate("AT Commands Terminal Settings"))
e.anonymous=true
i=e:option(Value,"atcport",translate("AT Command Sending Port"))
if a then
local e
for e in a do
i:value(e,e)
end
end
local e=e:option(TextValue,"user_atcommands",translate("User AT Commands"),translate("Each line must have the following format: 'AT Command name;AT Command'. Save to file '/etc/config/atcommands.user'."))
e.rows=20
e.rmempty=false
function e.cfgvalue(e,e)
return o.readfile(n)
end
function e.write(t,t,e)
e=e:gsub("\r\n","\n")
o.writefile(n,e)
end
return t

View File

@@ -0,0 +1,133 @@
<%+header%>
<!--
This module gives some convinience to access the shell via web, in
case that you don't have a uart console or telnet/ssh connection.
Hua Shao <nossiac@163.com>
-->
<h2><%:AT Commands%></h2>
<label><%:Web UI for sending AT Commands.%></label>
<p></p>
<h4><%:Sending commands to modem%></h4>
<div class="table" width="100%">
<div class="tr">
<div class="td left" width="23%"><%:User AT Commands%>:</div>
<div class="td left" style="width:55%;">
<select name="ussd" id="pl" onclick="copyFunction()">
</select>
</div>
<div class="td left" style="width:55%;"></div>
</div>
<div class="tr">
<div class="td left" style="width:23%;"><%:Command to send%>:</div>
<div class="td left" ><input type="text" id="code" required size="20" ></div>
</div>
</div>
<div class="table" width="100%">
<div class="td left" style="width:23%;"><%:Reply%>:
<p>
<pre id="result" style="visibility: hidden; width:77%;"></pre></div>
<div class="tr cbi-rowstyle-2">
<div class="td right"><div style="float: left;"><div class="ifacebadge"><a href="https://eko.one.pl">e1</a></div></div><input type="button" style="margin-right: 23%"; id="sendcmd" class="btn cbi-button cbi-button-neutral" value="<%:Send Command%>" /></div>
</div>
</div>
<script type="text/javascript">
window.onload = function readUSER() {
XHR.get('<%=luci.dispatcher.build_url("admin", "modem", "atc", "user_atc")%>', null,
function(x, json)
{
select = document.getElementById('pl');
var count = Object.keys(json).length;
for(var d=0;d<=count;d++)
{
var opt = document.createElement('option');
var s = json[d].usd;
var fields = s.split(/;/);
var name = fields[0];
var code = fields[1];
opt.text = name;
opt.value = code.trim();
opt.innerHTML = name;
select.appendChild(opt);
}
}
);
}
function copyFunction() {
var node = document.getElementById('result');
node.style.visibility = 'hidden';
var x = document.getElementById("pl").value;
document.getElementById("code").value = x;
document.getElementById("result").innerHTML = "";
}
function postcmd(cmd) {
(new XHR()).post("<%=luci.dispatcher.build_url("admin", "modem", "webcmd")%>", {"cmd":cmd}, function(x) {
console.log(x.response)
console.log(x)
var aStr = x.response;
var myre = /(^[ \t]*\n)/gm;
var bStr = aStr.replace(myre,"");
document.getElementById("result").innerHTML = bStr;
});
return false;
}
document.addEventListener('DOMContentLoaded', function (ev) {var button = document.getElementById("sendcmd");
button.addEventListener("click", function () {
var s = document.getElementById("code").value;
if ( s.length == 0 )
{
document.getElementById("result").innerHTML = "";
alert("<%:Please enter a AT Command%>");
return false;
}
var cmd = document.getElementById("code");
postcmd(cmd.value);
cmd.value = "";
var node = document.getElementById('result');
if (node.style.visibility=='visible') {
node.style.visibility = 'hidden';
}
else
node.style.visibility = 'visible'
return true;
});
}, true);
</script>
<%+footer%>

View File

@@ -0,0 +1,17 @@
{
"luci-app-atinout-mod": {
"description": "Grant UCI and file access for luci-app-atinout-mod",
"read": {
"uci": [ "atinout" ]
},
"write": {
"uci": [ "atinout" ]
}
}
}

View File

@@ -0,0 +1 @@
/etc/config/wireguard

View File

@@ -0,0 +1,11 @@
Package: luci-app-go-wireguard
Version: 4.500-2
Depends: libc, wireguard-tools, kmod-wireguard, luci-proto-wireguard, udptunnel, eoip
Source: package/rooter/0optionalapps/ext-wireguard
SourceName: ext-wireguard
Section: utils
SourceDateEpoch: 1716401566
Maintainer: Created by DM/makefile by Cobia@whirlpool
Architecture: all
Installed-Size: 23912
Description: Install scripts for Wireguard

View File

@@ -0,0 +1,3 @@
#!/bin/sh
ln -sf /usr/bin/udptunnel /sbin/udptunnel
exit 0

View File

@@ -0,0 +1,74 @@
#!/bin/sh
# Script for building OpenWRT .ipk packages using tar by iamromulan
# Works with SDXPPINN OpenWRT - iamromulan
# This script accepts an optional path to the directory containing the `CONTROL` and `root` directories.
# Usage: ./build-ipk.sh [path]
# If no path is provided, the script will look in the current directory for `CONTROL` and `root` directories.
# This will spit out an ipk in the current directory
# Check if the script is run as root. If not, rerun with sudo.
if [ "$(id -u)" -ne 0 ]; then
echo "Script is not running as root. Re-executing with sudo..."
exec sudo "$0" "$@"
fi
# Set the default build path to the current directory
build_path="."
# Check if a path is provided as the first argument
if [ "$1" ]; then
build_path="$1"
fi
# Check if the required directories are present in the specified path
if [ ! -d "${build_path}/CONTROL" ] || [ ! -d "${build_path}/root" ]; then
echo "Error: CONTROL and root directories must be present in the specified path (${build_path})."
exit 1
fi
# Extract values from the CONTROL/control file in the specified path
pkgname=$(grep -i '^Package:' "${build_path}/CONTROL/control" | awk '{print $2}')
version=$(grep -i '^Version:' "${build_path}/CONTROL/control" | awk '{print $2}')
architecture=$(grep -i '^Architecture:' "${build_path}/CONTROL/control" | awk '{print $2}')
# Check if values are extracted correctly
if [ -z "$pkgname" ] || [ -z "$version" ] || [ -z "$architecture" ]; then
echo "Error: Failed to extract Package, Version, or Architecture from ${build_path}/CONTROL/control."
exit 1
fi
# Set the final IPK name based on the extracted values
ipkname="${pkgname}_${version}_${architecture}.ipk"
# Ensure all CONTROL scripts are executable
echo "Setting permissions for CONTROL scripts..."
chmod +x "${build_path}/CONTROL"/*
# Set ownership for CONTROL and root files
echo "Setting ownership for all package files..."
chown -R root:root "${build_path}/CONTROL"/*
chown -R root:root "${build_path}/root"/*
# Create control.tar.gz from the CONTROL directory
echo "Creating control.tar.gz..."
tar -czvf control.tar.gz -C "${build_path}/CONTROL" .
# Create data.tar.gz from the root directory
echo "Creating data.tar.gz..."
tar -czvf data.tar.gz -C "${build_path}/root" .
# Create debian-binary file (must contain exactly "2.0" without a newline)
echo -n "2.0" > debian-binary
chown -R root:root debian-binary
# Combine the components into the final .ipk file using tar
echo "Packaging ${ipkname}..."
tar -czvf "$ipkname" debian-binary control.tar.gz data.tar.gz
# Clean up intermediate files
echo "Cleaning up temporary files..."
rm -f control.tar.gz data.tar.gz debian-binary
echo "IPK package ${ipkname} created successfully using tar."

View File

@@ -0,0 +1,5 @@
config settings 'settings'
option enabled '0'
option client '0'
option server '0'

View File

@@ -0,0 +1,36 @@
config wireguard_recipe b_client
option _description "Wireguard Client"
option _role "client"
option client "1"
option port "51280"
option auto '0'
option addresses ''
option dns ''
option privatekey ''
option name ''
option keepalive '25'
option publickey ''
option presharedkey ''
option ips ''
option ra_ips '1'
option endpoint_host ''
option sport '51280'
option active '0'
option udptunnel '0'
option mtu '1280'
config wireguard_recipe b_server
option _description "Wireguard Server"
option _role "server"
option client "0"
option port "51280"
option auto '0'
option addresses ''
option publickey ''
option privatekey ''
option usepre '0'
option presharedkey ''
option active '0'
option udptunnel '0'
option udpport '54321'
option mtu '1280'

View File

@@ -0,0 +1,92 @@
#!/bin/sh /etc/rc.common
. /lib/functions.sh
# Copyright (C) 2006 OpenWrt.org
START=99
log() {
logger -t "WireGuard Init.d : " "$@"
}
chk_zone() {
local config=$1
config_get src $config src
config_get dest $config dest
if [ $src = "lan" -a $dest = "wg" ]; then
uci set firewall."$config".dest="wan"
uci commit firewall
fi
}
check_config () {
log "Check Client Interfaces"
uci delete network.wg0
uci delete network.wg1
uci commit network
uci set network.wg0=interface
uci set network.wg0.proto="wireguard"
uci set network.wg0.auto="0"
uci set network.wg0.private_key=""
uci set network.wg0.listen_port=""
uci add_list network.wg0.addresses=""
uci set network.wg1=interface
uci set network.wg1.proto="wireguard"
uci set network.wg1.auto="0"
uci set network.wg1.private_key=""
uci set network.wg1.listen_port=""
uci add_list network.wg1.addresses=""
uci commit network
uci delete firewall.wgzone
uci delete firewall.wgwforward
uci delete firewall.wwgforward
uci delete firewall.lwgforward
uci delete firewall.wglforward
uci commit firewall
uci set firewall.wgzone=zone
uci set firewall.wgzone.name="wg"
uci set firewall.wgzone.forward="ACCEPT"
uci set firewall.wgzone.output="ACCEPT"
uci set firewall.wgzone.network="wg0 wg1"
uci set firewall.wgzone.input="ACCEPT"
uci set firewall.wgzone.masq="1"
uci set firewall.wgzone.mtu_fix="1"
uci commit firewall
config_load firewall
config_foreach chk_zone forwarding
/etc/init.d/firewall restart
}
chk_start() {
local config=$1
config_get auto $config auto
uci set wireguard."$config".active="0"
uci commit wireguard
if [ $auto = '1' ]; then
/usr/lib/wireguard/startvpn.sh $config
else
/usr/lib/wireguard/stopvpn.sh $config
fi
}
start() {
uci set wireguard.settings.client="0"
uci set wireguard.settings.server="0"
uci commit wireguard
if [ ! -e /etc/openvpn ]; then
mkdir /etc/openvpn
fi
check_config
config_load wireguard
config_foreach chk_start wireguard
if [ -e /etc/crontabs/root ]; then
sed -i '/wireguard_watchdog/d' /etc/crontabs/root
fi
echo '* * * * * /usr/bin/wireguard_watchdog' >> /etc/crontabs/root
/etc/init.d/cron restart
}

View File

@@ -0,0 +1,111 @@
-- Copyright 2016-2017 Dan Luedtke <mail@danrl.com>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.wireguard", package.seeall)
I18N = require "luci.i18n"
translate = I18N.translate
function index()
local multilock = luci.model.uci.cursor():get("custom", "multiuser", "multi") or "0"
local rootlock = luci.model.uci.cursor():get("custom", "multiuser", "root") or "0"
if (multilock == "0") or (multilock == "1" and rootlock == "1") then
entry({"admin", "vpn", "wireguard"}, cbi("wireguard"), _("Wireguard"), 63)
entry( {"admin", "vpn", "wireguard", "client"}, cbi("wireguard-client"), nil ).leaf = true
entry( {"admin", "vpn", "wireguard", "server"}, cbi("wireguard-server"), nil ).leaf = true
end
entry( {"admin", "vpn", "wireguard", "wupload"}, call("conf_upload"))
entry( {"admin", "vpn", "generateconf"}, call("conf_gen"))
entry( {"admin", "vpn", "textconf"}, call("text_gen"))
entry( {"admin", "vpn", "wirestatus"}, call("wirestatus"))
end
function conf_upload()
local fs = require("nixio.fs")
local http = require("luci.http")
local util = require("luci.util")
local uci = require("luci.model.uci").cursor()
local upload = http.formvalue("ovpn_file")
local name = http.formvalue("instance_name2")
local file = "/etc/openvpn/" ..name.. ".conf"
if name and upload then
local fp
http.setfilehandler(
function(meta, chunk, eof)
local data = util.trim(chunk:gsub("\r\n", "\n")) .. "\n"
data = util.trim(data:gsub("[\128-\255]", ""))
if not fp and meta and meta.name == "ovpn_file" then
fp = io.open(file, "w")
end
if fp and data then
fp:write(data)
end
if fp and eof then
fp:close()
end
end
)
if fs.access(file) then
os.execute("/usr/lib/wireguard/conf.sh " .. name .. " " .. file)
end
end
http.redirect(luci.dispatcher.build_url('admin/vpn/wireguard'))
end
function conf_gen()
os.execute("/usr/lib/wireguard/create.sh")
end
function text_gen()
local set = luci.http.formvalue("set")
os.execute("/usr/lib/wireguard/text.sh " .. "\"" .. set .. "\"")
end
function wirestatus()
local data = { }
local last_device = ""
local wg_dump = io.popen("wg show all dump")
if wg_dump then
local line
for line in wg_dump:lines() do
local line = string.split(line, "\t")
if not (last_device == line[1]) then
last_device = line[1]
data[line[1]] = {
name = line[1],
public_key = line[3],
listen_port = line[4],
fwmark = line[5],
peers = { }
}
else
local peer = {
public_key = line[2],
endpoint = line[4],
allowed_ips = { },
latest_handshake = line[6],
transfer_rx = line[7],
transfer_tx = line[8],
persistent_keepalive = line[9]
}
if not (line[4] == '(none)') then
for ipkey, ipvalue in pairs(string.split(line[5], ",")) do
if #ipvalue > 0 then
table.insert(peer['allowed_ips'], ipvalue)
end
end
end
table.insert(data[line[1]].peers, peer)
end
end
end
luci.http.prepare_content("application/json")
luci.http.write_json(data)
end

View File

@@ -0,0 +1,104 @@
require("luci.ip")
require("luci.model.uci")
--luci.sys.call("/usr/lib/wireguard/keygen.sh " .. arg[1])
local m = Map("wireguard", translate("Wireguard Client"), translate("Set up a Wireguard Client"))
e = m:section(NamedSection, "settings", "")
m.on_init = function(self)
--luci.sys.call("/usr/lib/wireguard/keygen.sh " .. arg[1])
end
btn = e:option(Button, "_btn", translate(" "))
btn.inputtitle = translate("Back to Main Page")
btn.inputstyle = "apply"
btn.redirect = luci.dispatcher.build_url(
"admin", "vpn", "wireguard"
)
function btn.write(self, section, value)
luci.http.redirect( self.redirect )
end
local s = m:section( NamedSection, arg[1], "wireguard", translate("Client") )
ip = s:option(Value, "addresses", translate("IP Addresses :"), translate("Comma separated list of IP Addresses that server will accept from this client"));
ip.rmempty = true;
ip.optional=false;
ip.default="10.14.0.2/24";
port = s:option(Value, "port", translate("Listen Port :"), translate("Client Listen Port"));
port.rmempty = true;
port.optional=false;
port.default="51820";
ul = s:option(ListValue, "udptunnel", translate("Enable UDP over TCP :"));
ul:value("0", translate("No"))
ul:value("1", translate("Yes"))
ul.default=0
dns = s:option(Value, "dns", translate("DNS Servers :"), translate("Comma separated list of DNS Servers."));
dns.rmempty = true;
dns.optional=false;
mtu = s:option(Value, "mtu", translate("MTU :"), translate("Maximum MTU"));
mtu.rmempty = true;
mtu.optional=false;
mtu.datatype = 'range(1280,1420)';
mtu.default="1280";
pka = s:option(Value, "persistent_keepalive", translate("Persistent Keep Alive :"), translate("Seconds between keep alive messages"));
pka.rmempty = true;
pka.optional=false;
pka.datatype = 'range(1,100)';
pka.default="25";
pkey = s:option(Value, "privatekey", translate("Private Key :"), translate("Private Key supplied by the Server"));
pkey.rmempty = true;
pkey.optional=false;
il = s:option(ListValue, "wginter", translate("Interface to Use :"));
il:value("0", translate("WG0"))
il:value("1", translate("WG1"))
il.default="0"
bl = s:option(ListValue, "auto", translate("Start on Boot :"));
bl:value("0", translate("No"))
bl:value("1", translate("Yes"))
bl.default="0"
xbl = s:option(ListValue, "forward", translate("All Traffic Through Tunnel :"));
xbl:value("0", translate("No"))
xbl:value("1", translate("Yes"))
xbl.default="1"
s = m:section( NamedSection, arg[1], "wireguard", translate("Server") )
name = s:option( Value, "name", translate("Server Name :"), translate("Optional Server name"))
pukey = s:option(Value, "publickey", translate("Public Key :"), translate("Public Key of the Server"));
pukey.rmempty = true;
pukey.optional=false;
prkey = s:option(Value, "presharedkey", translate("Presharedkey :"), translate("PreShared Key from the Server"));
prkey.rmempty = true;
prkey.optional=false;
host = s:option(Value, "endpoint_host", translate("Server Address :"), translate("URL or IP Address of Server"));
host.rmempty = true;
host.optional=false;
host.default="";
sport = s:option(Value, "sport", translate("Listen Port :"), translate("Server Listen Port"));
sport.rmempty = true;
sport.optional=false;
sport.default="51820";
sip = s:option(Value, "ips", translate("Allowed IP Addresses :"), translate("Comma separated list of IP Addresses that server will accept"));
sip.rmempty = true;
sip.optional=false;
sip.default="10.14.0.0/24";
return m

View File

@@ -0,0 +1,130 @@
require("luci.ip")
require("luci.model.uci")
--luci.sys.call("/usr/lib/wireguard/keygen.sh " .. arg[1])
local m = Map("wireguard", translate("Wireguard Server"), translate("Set up a Wireguard Server"))
e = m:section(NamedSection, "settings", "")
m.on_init = function(self)
luci.sys.call("/usr/lib/wireguard/keygen.sh " .. arg[1])
end
m.on_after_save = function(self)
luci.sys.call("/usr/lib/wireguard/keygen.sh " .. arg[1] .. "&")
end
btn = e:option(Button, "_btn", translate(" "))
btn.inputtitle = translate("Back to Main Page")
btn.inputstyle = "apply"
btn.redirect = luci.dispatcher.build_url(
"admin", "vpn", "wireguard"
)
function btn.write(self, section, value)
luci.http.redirect( self.redirect )
end
local s = m:section( NamedSection, arg[1], "wireguard", translate("Server") )
ip = s:option(Value, "addresses", translate("Internal IP Address :"));
ip.rmempty = true;
ip.optional=false;
ip.default="10.14.0.1/32";
ip.datatype = "ipaddr"
host = s:option(Value, "endpoint_host", translate("Server Address :"), translate("URL or IP Address of Server"));
host.rmempty = true;
host.optional=false;
host.default="example.wireguard.org";
port = s:option(Value, "port", translate("Port :"), translate("Server Listen Port. Default is 51280"));
port.rmempty = true;
port.optional=false;
port.default="51280";
ul = s:option(ListValue, "udptunnel", "Enable UDP over TCP :");
ul:value("0", translate("No"))
ul:value("1", translate("Yes"))
ul.default=0
uport = s:option(Value, "udpport", translate("UDP over TCP Port :"), translate("Server Local TCP Port. Default is 54321"));
uport.rmempty = true;
uport.optional=false;
uport.default="54321";
uport:depends("udptunnel", "1")
pkey = s:option(DummyValue, "privatekey", translate("Private Key :"));
pkey.optional=false;
pukey = s:option(DummyValue, "publickey", translate("Public Key :"), translate("Server Public key sent to Clients"));
pukey.optional=false;
pl = s:option(ListValue, "usepre", "Use PreSharedKey :");
pl:value("0", translate("No"))
pl:value("1", translate("Yes"))
pl.default=0
prkey = s:option(DummyValue, "presharedkey", translate("PreShared Key :"), translate("PreShared Key sent to Client"));
prkey.optional=false;
prkey:depends("usepre", "1")
bl = s:option(ListValue, "auto", translate("Start on Boot :"));
bl:value("0", translate("No"))
bl:value("1", translate("Yes"))
bl.default="0"
xbl = s:option(ListValue, "forward", translate("All Traffic Through Tunnel :"));
xbl:value("0", translate("No"))
xbl:value("1", translate("Yes"))
xbl.default="1"
b3 = s:option(DummyValue, "blank", " ");
sx = s:option(Value, "_dmy1", translate(" "))
sx.template = "wireguard/conf"
ss = m:section(TypedSection, "custom" .. arg[1], translate("Clients"), translate("Clients of this server"))
ss.anonymous = true
ss.addremove = true
name = ss:option(Value, "name", translate("Client Name"))
name.optional=false;
cport = ss:option(Value, "endpoint_port", translate("Listen Port :"), translate("Port sent to Client. Default is 51280"));
cport.rmempty = true;
cport.optional=false;
cport.default="";
aip = ss:option(Value, "address", translate("Assigned IP Address :"), translate("IP Address assigned to Client"));
aip.rmempty = true;
aip.optional=false;
aip.default="10.14.0.2/32";
dns = ss:option(Value, "dns", translate("DNS Servers :"), translate("Comma separated list of DNS Servers sent to Client"));
dns.rmempty = true;
dns.optional=false;
dns.default="";
mtu = ss:option(Value, "mtu", translate("MTU :"), translate("Maximum MTU"));
mtu.rmempty = true;
mtu.optional=false;
mtu.datatype = 'range(1280,1420)';
mtu.default="1280";
aip = ss:option(Value, "allowed_ips", translate("Allowed IP Address :"), translate("Comma separated list of IP Addresses allowed from Client"));
aip.rmempty = true;
aip.optional=false;
aip.default="0.0.0.0/0,::/0";
pukey = ss:option(DummyValue, "publickey", translate("Public Key :"), translate("Client Public Key"));
pukey.optional=false;
pikey = ss:option(DummyValue, "privatekey", translate("Private Key :"), translate("Private Key sent to Client"));
pikey.optional=false;
b3 = ss:option(DummyValue, "blank", " ");
return m

View File

@@ -0,0 +1,182 @@
local fs = require "nixio.fs"
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
local testfullps = sys.exec("ps --help 2>&1 | grep BusyBox") --check which ps do we have
local psstring = (string.len(testfullps)>0) and "ps w" or "ps axfw" --set command we use to get pid
local m = Map("wireguard", translate("Wireguard"), translate("Set up a Wireguard VPN Tunnel on your Router"))
local s = m:section( TypedSection, "wireguard", translate("Instances"), translate("Below is a list of configured Wireguard Instances and their current state") )
s.template = "cbi/tblsection"
s.template_addremove = "wireguard/cbi-select-input-add"
s.addremove = true
s.add_select_options = { }
local cfg = s:option(DummyValue, "config")
function cfg.cfgvalue(self, section)
local file_cfg = self.map:get(section, "client")
if file_cfg == "1" then
s.extedit = luci.dispatcher.build_url("admin", "vpn", "wireguard", "client", "%s")
else
s.extedit = luci.dispatcher.build_url("admin", "vpn", "wireguard", "server", "%s")
end
end
uci:load("wireguard_recipes")
uci:foreach( "wireguard_recipes", "wireguard_recipe",
function(section)
s.add_select_options[section['.name']] =
section['_description'] or section['.name']
end
)
function s.parse(self, section)
local recipe = luci.http.formvalue(
luci.cbi.CREATE_PREFIX .. self.config .. "." ..
self.sectiontype .. ".select"
)
if recipe and not s.add_select_options[recipe] then
self.invalid_cts = true
else
TypedSection.parse( self, section )
end
end
function s.create(self, name)
local recipe = luci.http.formvalue(
luci.cbi.CREATE_PREFIX .. self.config .. "." ..
self.sectiontype .. ".select"
)
local name = luci.http.formvalue(
luci.cbi.CREATE_PREFIX .. self.config .. "." ..
self.sectiontype .. ".text"
)
if #name > 3 and not name:match("[^a-zA-Z0-9_]") then
local s = uci:section("wireguard", "wireguard", name)
if s then
local options = uci:get_all("wireguard_recipes", recipe)
for k, v in pairs(options) do
if k ~= "_role" and k ~= "_description" then
if type(v) == "boolean" then
v = v and "1" or "0"
end
uci:set("wireguard", name, k, v)
end
end
uci:save("wireguard")
uci:commit("wireguard")
if extedit then
luci.http.redirect( self.extedit:format(name) )
end
end
elseif #name > 0 then
self.invalid_cts = true
end
return 0
end
function s.remove(self, name)
local cfg_file = "/etc/openvpn/" ..name.. ".conf"
local auth_file = "/etc/openvpn/" ..name.. ".auth"
if fs.access(cfg_file) then
fs.unlink(cfg_file)
end
if fs.access(auth_file) then
fs.unlink(auth_file)
end
uci:delete("wireguard", name)
uci:save("wireguard")
uci:commit("wireguard")
end
local port = s:option( DummyValue, "client", translate("Type") )
function port.cfgvalue(self, section)
local val = AbstractValue.cfgvalue(self, section)
if val == nil then
val = 0
end
if val == "1" then
return "Client"
else
return "Server"
end
end
local addr = s:option( DummyValue, "addresses", translate("IP Addresses") )
function addr.cfgvalue(self, section)
local val = AbstractValue.cfgvalue(self, section)
return val or "----"
end
local auto = s:option( DummyValue, "udptunnel", translate("UDP over TCP") )
function auto.cfgvalue(self, section)
local val = AbstractValue.cfgvalue(self, section)
if val == nil then
val = 0
end
if val == "1" then
return "Yes"
else
return "No"
end
end
local auto = s:option( DummyValue, "auto", translate("Start on Boot") )
function auto.cfgvalue(self, section)
local val = AbstractValue.cfgvalue(self, section)
if val == nil then
val = 0
end
if val == "1" then
return "Yes"
else
return "No"
end
end
local active = s:option( DummyValue, "active", translate("Started") )
function active.cfgvalue(self, section)
local val = AbstractValue.cfgvalue(self, section)
if val == nil then
val = 0
end
if val == "1" then
return "Yes"
else
return "No"
end
end
local updown = s:option( Button, "_updown", translate("Start/Stop") )
updown._state = false
updown.redirect = luci.dispatcher.build_url(
"admin", "vpn", "wireguard"
)
function updown.cbid(self, section)
local file_cfg = self.map:get(section, "active")
if file_cfg == "1" then
pid = 1
else
pid = nil
end
self._state = pid ~= nil
self.option = self._state and "stop" or "start"
return AbstractValue.cbid(self, section)
end
function updown.cfgvalue(self, section)
self.title = self._state and "stop" or "start"
self.inputstyle = self._state and "reset" or "reload"
end
function updown.write(self, section, value)
if self.option == "stop" then
sys.call("/usr/lib/wireguard/stopvpn.sh %s" % section)
else
sys.call("/usr/lib/wireguard/startvpn.sh %s" % section)
end
luci.http.redirect( self.redirect )
end
m:section(SimpleSection).template = "wireguard/wireguard"
return m

View File

@@ -0,0 +1,111 @@
<script type="text/javascript">
//<![CDATA[
function vpn_add()
{
var vpn_name = div_add.querySelector("#instance_name1").value.replace(/[^\x00-\x7F]|[\s\.!@#$%^&*()\-+=\[\]{};':"\\|,<>\/?]/g,'');
var vpn_template = div_add.querySelector("#instance_template").value;
var form = document.getElementsByName('cbi')[0];
if (!vpn_name || !vpn_name.length)
{
return info_message(vpn_output, "<%=pcdata(translate("The 'Name' field must not be empty!"))%>", 2000);
}
document.getElementById("instance_name1").value = vpn_name;
if (document.getElementById("cbi-wireguard-" + vpn_name) != null)
{
return info_message(vpn_output, "<%=pcdata(translate("Instance with that name already exists!"))%>", 2000);
}
if (!vpn_template || !vpn_template.length)
{
return info_message(vpn_output, "<%=pcdata(translate("Please select a valid VPN template!"))%>", 2000);
}
if (form)
{
form.submit();
}
}
function vpn_upload()
{
var vpn_name = div_upload.querySelector("#instance_name2").value.replace(/[^\x00-\x7F]|[\s\.!@#$%^&*()\-+=\[\]{};':"\\|,<>\/?]/g,'');
var vpn_file = document.getElementById("ovpn_file").value;
var form = document.getElementsByName('cbi')[0];
if (!vpn_name || !vpn_name.length)
{
return info_message(vpn_output, "<%=pcdata(translate("The 'Name' field must not be empty!"))%>", 2000);
}
document.getElementById("instance_name2").value = vpn_name;
if (document.getElementById("cbi-wireguard-" + vpn_name) != null)
{
return info_message(vpn_output, "<%=pcdata(translate("Instance with that name already exists!"))%>", 2000);
}
if (!vpn_file || !vpn_file.length)
{
return info_message(vpn_output, "<%=pcdata(translate("Please select a valid CONF config file to upload!"))%>", 2000);
}
if (form)
{
form.enctype = 'multipart/form-data';
form.action = '<%=url('admin/vpn/wireguard/wupload')%>';
form.submit();
}
}
function info_message(output, msg, timeout)
{
timeout = timeout || 0;
output.innerHTML = '<em>' + msg + '</em>';
if (timeout > 0)
{
setTimeout(function(){ output.innerHTML=""}, timeout);
}
}
//]]>
</script>
<%+wireguard/ovpn_css%>
<div class="cbi-section-node">
<div class="table cbi-section-table">
<h4><%:Template based configuration%></h4>
<div class="tr cbi-section-table-row" id="div_add">
<div class="td left">
<input type="text" maxlength="20" placeholder="Instance name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.text" id="instance_name1" />
</div>
<div class="td left">
<select id="instance_template" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.select">
<option value="" selected="selected" disabled="disabled"><%:Select template ...%></option>
<%- for k, v in luci.util.kspairs(self.add_select_options) do %>
<option value="<%=k%>"><%=luci.xml.pcdata(v)%></option>
<% end -%>
</select>
</div>
<div class="td left">
<input class="cbi-button cbi-button-add" type="submit" onclick="vpn_add(); return false;" value="<%:Add%>" title="<%:Add template based configuration%>" /><br />
</div>
</div>
<h4><%:Conf configuration file upload%></h4>
<div class="tr cbi-section-table-row" id="div_upload">
<div class="td left">
<input type="text" maxlength="20" placeholder="Instance name" name="instance_name2" id="instance_name2" />
</div>
<div class="td left">
<input type="file" name="ovpn_file" id="ovpn_file" accept="application/x-wireguard-profile,.conf" />
</div>
<div class="td left">
<input class="cbi-button cbi-button-add" type="submit" onclick="vpn_upload(); return false;" value="<%:Upload%>" title="<%:Upload conf file%>" />
</div>
</div>
</div>
<div class="vpn-output">
<span id="vpn_output"></span>
</div>
</div>

View File

@@ -0,0 +1,27 @@
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
<script type="text/javascript">//<![CDATA[
function generateconf()
{
XHR.get('<%=luci.dispatcher.build_url("admin", "vpn", "generateconf")%>',
null,
function(x, rv)
{
window.open('http://'+window.location.hostname+'/package/wgconf.tar.gz', '_self')
}
);
}
//]]></script>
<fieldset class="cbi-section" id="cbi-family">
<table width="550" border="0">
<tr>
<td width="20%">&nbsp;</td>
<td width="17%"><input type="button" type="submit" id="generate" class="cbi-button cbi-button-apply" value="<%:Generate Conf Files%>" onclick="return generateconf()" /></td>
<td width="17%">&nbsp;</td>
<td width="46%">&nbsp;</td>
</tr>
</table>
</fieldset>

View File

@@ -0,0 +1,38 @@
<style type="text/css">
h4
{
white-space: nowrap;
border-bottom: 0px;
margin: 10px 5px 5px 5px;
}
.tr
{
border: 0px;
text-align: left;
}
.vpn-output
{
box-shadow: none;
margin: 10px 5px 5px 5px;
color: #a22;
}
textarea
{
border: 1px solid #cccccc;
padding: 5px;
font-size: 12px;
font-family: monospace;
resize: none;
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;
}
a
{
line-height: 1.5;
}
hr
{
margin: 0.5em 0;
}
</style>

View File

@@ -0,0 +1,30 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Licensed to the public under the Apache License 2.0.
-%>
<%+openvpn/ovpn_css%>
<div class="cbi-section">
<h3>
<a href="<%=url('admin/vpn/wireguard')%>"><%:Overview%></a> &#187;
<%=luci.i18n.translatef("Instance \"%s\"", self.instance)%>
</h3>
<% if self.mode == "basic" then %>
<a href="<%=url('admin/vpn/wireguard/advanced', self.instance, "Service")%>"><%:Switch to advanced configuration%> &#187;</a><p/>
<hr />
<% elseif self.mode == "advanced" then %>
<a href="<%=url('admin/vpn/wireguard/basic', self.instance)%>"><%:Switch to basic configuration%> &#187;</a><p/>
<hr />
<%:Configuration category%>:
<% for i, c in ipairs(self.categories) do %>
<% if c == self.category then %>
<strong><%=translate(c)%></strong>
<% else %>
<a href="<%=luci.dispatcher.build_url("admin", "vpn", "wireguard", "advanced", self.instance, c)%>"><%=translate(c)%></a>
<% end %>
<% if next(self.categories, i) then %>|<% end %>
<% end %>
<% end %>
</div>

View File

@@ -0,0 +1,61 @@
<%
%>
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
<script type="text/javascript">//<![CDATA[
function uploadc(btn)
{
var conf = document.getElementById("conf").value;
if ( conf == "" )
{
alert("<%:You must enter a Conf file!!%>");
return false;
}
var iname = document.getElementById("iname").value;
if ( iname == "" )
{
alert("<%:You must enter an Instance name!!%>");
return false;
}
var boot = document.getElementById('boot').checked;
bootn = "0";
if ( boot == true )
{
bootn= "1";
}
confile = bootn + "?" + iname + "?" + conf +"\n?";
XHR.get('<%=luci.dispatcher.build_url("admin", "vpn", "textconf")%>',
{ set: confile },
function(x, rv)
{
window.location.reload(false);
}
);
}
//]]></script>
<fieldset class="cbi-section" id="cbi-family">
<legend><%:Paste Configuration File Here%></legend>
<table id="ctxt" width="700" border="0" style="display:table;">
<tr>
<td width="50%">
<textarea name="conf" id="conf" rows="10" style="width: 600px;" maxlength="1000"></textarea>
</td>
</tr>
</table>
<table id="btxt" width="700" border="0" style="display:table;">
<tr>
<td width="10%"><input type="button" id="apply1" class="cbi-button cbi-button-apply" value="<%:Upload Conf File%>" onclick="return uploadc(this)" /></td>
<td width="10%"><div align="right"><strong><%:Instance Name : %></strong></div></td>
<td width="12%"><input type="text" name="iname" id="iname" class="cbi-input-text" style="width: 150px;" maxlength="100" value="SardisTel"></input></td>
<td width="10%"><div align="right"><strong><%:Start on Boot : %></strong></div></td>
<td width="8%">
<input type="checkbox" id="boot" checked />
</td>
<td width="50%">&nbsp;</td>
</tr>
</table>
</fieldset>

View File

@@ -0,0 +1,228 @@
<%#
Copyright 2016-2017 Dan Luedtke <mail@danrl.com>
Licensed to the public under the Apache License 2.0.
-%>
<%
-%>
<script type="text/javascript">//<![CDATA[
function bytes_to_str(bytes) {
bytes = parseFloat(bytes);
if (bytes < 1) { return "0 B"; }
var sizes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'];
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];
};
function timestamp_to_str(timestamp) {
if (timestamp < 1) {
return '<%:Never%>';
}
var now = new Date();
var seconds = (now.getTime() / 1000) - timestamp;
var ago = "";
if (seconds < 60) {
ago = parseInt(seconds) + '<%:s ago%>';
} else if (seconds < 3600) {
ago = parseInt(seconds / 60) + '<%:m ago%>';
} else if (seconds < 86401) {
ago = parseInt(seconds / 3600) + '<%:h ago%>';
} else {
ago = '<%:over a day ago%>';
}
var t = new Date(timestamp * 1000);
return t.toUTCString() + ' (' + ago + ')';
}
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "vpn", "wirestatus")%>', null,
function(x, data) {
both = {};
bothbp={};
iii = 1;
for (var key in data) {
if (!data.hasOwnProperty(key)) { continue; }
var ifname = key;
var iface = data[key];
var s = "";
if (iface.public_key == '(none)') {
s += '<em><%:Interface does not have a public key!%></em>';
} else {
s += String.format(
'<strong><%:Public Key%>: </strong>%s',
iface.public_key
);
}
if (iface.listen_port > 0) {
s += String.format(
'<br /><strong><%:Listen Port%>: </strong>%s',
iface.listen_port
);
}
if (iface.fwmark != 'off') {
s += String.format(
'<br /><strong><%:Firewall Mark%>: </strong>%s',
iface.fwmark
);
}
if ( iii == 1 )
{
document.getElementById("iinfo").innerHTML = s;
document.getElementById("leg").innerHTML = ifname;
}
else
{
document.getElementById("iinfo1").innerHTML = s;
document.getElementById("leg1").innerHTML = ifname;
}
for (var i = 0, ilen = iface.peers.length; i < ilen; i++) {
var peer = iface.peers[i];
var s = String.format(
'<strong><%:Public Key%>: </strong>%s',
peer.public_key
);
if (peer.endpoint != '(none)') {
s += String.format(
'<br /><strong><%:Endpoint%>: </strong>%s',
peer.endpoint
);
}
if (peer.allowed_ips.length > 0) {
s += '<br /><strong><%:Allowed IPs%>:</strong>';
for (var k = 0, klen = peer.allowed_ips.length; k < klen; k++) {
s += '<br />&nbsp;&nbsp;&bull;&nbsp;' + peer.allowed_ips[k];
}
}
if (peer.persistent_keepalive != 'off') {
s += String.format(
'<br /><strong><%:Persistent Keepalive%>: </strong>%ss',
peer.persistent_keepalive
);
}
var icon = '<img src="<%=resource%>/icons/wireguard_disabled.png" />';
var now = new Date();
if (((now.getTime() / 1000) - peer.latest_handshake) < 140) {
icon = '<img src="<%=resource%>/icons/wireguard.png" />';
}
s += String.format(
'<br /><strong><%:Latest Handshake%>: </strong>%s',
timestamp_to_str(peer.latest_handshake)
);
s += String.format(
'<br /><strong><%:Data Received%>: </strong>%s' +
'<br /><strong><%:Data Transmitted%>: </strong>%s',
bytes_to_str(peer.transfer_rx),
bytes_to_str(peer.transfer_tx)
);
if ( iii == 1 )
{
document.getElementById("config").innerHTML = icon;
document.getElementById("info").innerHTML = s;
}
else
{
document.getElementById("config1").innerHTML = icon;
document.getElementById("info1").innerHTML = s;
}
}
iii = iii + 1;
}
});
//]]></script>
<h2><%:WireGuard Status%></h2>
<fieldset class="cbi-section">
<div>
<table width="900" border="0">
<tr>
<td width="50px" style="vertical-align:center;font-size : 25px">
<div><%:Interface %></div>
</td>
<td width="100px" id="leg" style="width:100px; text-align:left; padding:3px;font-size : 25px">&nbsp;</td>
<td width="650px">&nbsp;</td>
</tr>
</table>
<table width="900" border="0">
<tr>
<td width="20px">&nbsp;</td>
<td width="150px" style="vertical-align:center;font-size : 20px">
<div><%:Configuration%></div>
</td>
<td width="100px" id="config" style="width:16px; text-align:center; padding:3px">&nbsp;</td>
<td width="50px">&nbsp;</td>
<td width="580px">
<div id="info" style="vertical-align:middle; padding: 3px">
<em><%:Collecting data...%></em>
</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="vertical-align:center;font-size : 20px">
<div><%:Peer%></div>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>
<div id="iinfo" style="vertical-align:middle; padding: 3px">
<em><%:Collecting data...%></em>
</div>
</td>
</tr>
</table>
<table width="900" border="0" id="second1">
<tr>
<td width="50px" style="vertical-align:center;font-size : 25px">
<div><%:Interface %></div>
</td>
<td width="100px" id="leg1" style="width:100px; text-align:left; padding:3px;font-size : 25px">&nbsp;</td>
<td width="650px">&nbsp;</td>
</tr>
</table>
<table width="900" border="0" id="second">
<tr>
<td width="20px">&nbsp;</td>
<td width="150px" style="vertical-align:center;font-size : 20px">
<div><%:Configuration%></div>
</td>
<td width="100px" id="config1" style="width:16px; text-align:center; padding:3px">&nbsp;</td>
<td width="50px">&nbsp;</td>
<td width="580px">
<div id="info1" style="vertical-align:middle; padding: 3px">
<em><%:Collecting data...%></em>
</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="vertical-align:center;font-size : 20px">
<div><%:Peer%></div>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>
<div id="iinfo1" style="vertical-align:middle; padding: 3px">
<em><%:Collecting data...%></em>
</div>
</td>
</tr>
</table>
<!--
<table id="cmdtxt" width="700" border="0" style="display:table;">
<tr>
<td width="100%">
<textarea readonly="readonly" name="attxt" id="attxt" rows="6" style="width: 600px;" maxlength="160"></textarea>
</td>
</tr>
</table> -->
</div>
</fieldset>

View File

@@ -0,0 +1,134 @@
#!/bin/sh
log() {
modlog "Wireguard Conf" "$@"
}
name=$1
file=$2
auto=$3
if [ -z $auto ]; then
auto="0"
fi
extract() {
line=$1
PD=$(echo "$line" | grep "#")
if [ ! -z "$PD" ]; then
return
fi
PRK=$(echo "$line" | grep "PrivateKey" | tr " " ",")
if [ ! -z "$PRK" ]; then
PrivateKey=$(echo $PRK | cut -d, -f3)
fi
PRK=$(echo "$line" | grep "PublicKey" | tr " " ",")
if [ ! -z "$PRK" ]; then
PublicKey=$(echo $PRK | cut -d, -f3)
fi
PRK=$(echo "$line" | grep "PresharedKey" | tr " " ",")
if [ ! -z "$PRK" ]; then
PreSharedKey=$(echo $PRK | cut -d, -f3)
fi
INTER=$(echo "$line" | grep "WGinterface" | tr " " ",")
if [ ! -z "$INTER" ]; then
wginter=$(echo $INTER | cut -d, -f3)
if [ "$wginter" -gt 1 ]; then
wginter="1"
fi
fi
PRK=$(echo "$line" | grep "Address" | tr " " "#")
if [ ! -z "$PRK" ]; then
if [ -z $Address ]; then
Address=$(echo $PRK | cut -d# -f3)
else
Address=$Address","$(echo $PRK | cut -d# -f3)
fi
fi
PRK=$(echo "$line" | grep "dns" | tr " " "#")
if [ ! -z "$PRK" ]; then
dns=$(echo $PRK | cut -d# -f3)
fi
PRK=$(echo "$line" | grep "DNS" | tr " " "#")
if [ ! -z "$PRK" ]; then
dns=$(echo $PRK | cut -d# -f3)
fi
PRK=$(echo "$line" | grep "ListenPort" | tr " " ",")
if [ ! -z "$PRK" ]; then
listenport=$(echo $PRK | cut -d, -f3)
fi
PRK=$(echo "$line" | grep "AllowedIPs" | tr " " "#")
if [ ! -z "$PRK" ]; then
if [ -z $allowedips ]; then
allowedips=$(echo $PRK | cut -d# -f3)
else
allowedips=$allowedips","$(echo $PRK | cut -d# -f3)
fi
fi
PRK=$(echo "$line" | grep "Endpoint" | tr " " ",")
if [ ! -z "$PRK" ]; then
endpoint=$(echo $PRK | cut -d, -f3)
fi
MTU=$(echo "$line" | grep "MTU" | tr " " ",")
if [ ! -z "$MTU" ]; then
mtu=$(echo $MTU | cut -d, -f3)
fi
}
listenport="51280"
dns=""
sed -i -e "s!PrivateKey= !PrivateKey=!g" $file
sed -i -e "s!PrivateKey=!PrivateKey = !g" $file
sed -i -e "s!PublicKey= !PublicKey=!g" $file
sed -i -e "s!PublicKey=!PublicKey = !g" $file
sed -i -e "s!PresharedKey= !PresharedKey=!g" $file
sed -i -e "s!PresharedKey=!PresharedKey = !g" $file
sed -i -e "s!Address= !Address=!g" $file
sed -i -e "s!Address=!Address = !g" $file
sed -i -e "s!WGinterface=!WGinterface = !g" $file
sed -i -e "s!WGinterface= !WGinterface = !g" $file
sed -i -e "s!dns= !dns=!g" $file
sed -i -e "s!dns=!dns = !g" $file
sed -i -e "s!DNS= !DNS=!g" $file
sed -i -e "s!DNS=!DNS = !g" $file
sed -i -e "s!ListenPort= !ListenPort=!g" $file
sed -i -e "s!ListenPort=!ListenPort = !g" $file
sed -i -e "s!AllowedIPs= !AllowedIPs=!g" $file
sed -i -e "s!AllowedIPs=!AllowedIPs = !g" $file
sed -i -e "s!Endpoint= !Endpoint=!g" $file
sed -i -e "s!Endpoint=!Endpoint = !g" $file
sed -i -e "s!MTU= !MTU=!g" $file
sed -i -e "s!MTU=!MTU = !g" $file
while IFS= read -r linex
do
extract "$linex"
done < $file
extract "$linex"
PRK=$(echo "$endpoint" | tr ":" ",")
endpoint=$(echo $PRK | cut -d, -f1)
sport=$(echo $PRK | cut -d, -f2)
if [ -z "$wginter" ]; then
wginter="0"
fi
uci delete wireguard.$name
uci set wireguard.$name=wireguard
uci set wireguard.$name.auto=$auto
uci set wireguard.$name.client="1"
uci set wireguard.$name.active="0"
uci set wireguard.$name.privatekey="$PrivateKey"
uci set wireguard.$name.presharedkey="$PreSharedKey"
uci set wireguard.$name.port="$listenport"
uci set wireguard.$name.addresses="$Address"
uci set wireguard.$name.dns="$dns"
uci set wireguard.$name.wginter="$wginter"
uci set wireguard.$name.publickey="$PublicKey"
uci set wireguard.$name.endpoint_host="$endpoint"
uci set wireguard.$name.ips="$allowedips"
uci set wireguard.$name.name="$name"
uci set wireguard.$name.sport="$sport"
uci set wireguard.$name.mtu="$mtu"
uci set wireguard.$name.persistent_keepalive='25'
uci commit wireguard
rm -f $file

View File

@@ -0,0 +1,81 @@
#!/bin/sh
. /lib/functions.sh
log() {
logger -t "Wireguard Conf" "$@"
}
WG=$(cat /tmp/wginst)
do_create() {
local config=$1
config_get name $config name
if [ -z $name ]; then
name=$config
fi
echo "----Start Conf File for "$name" ----" >> ${PKI_DIR}/package/wg.conf
echo "[Interface]" >> ${PKI_DIR}/package/wg.conf
config_get privatekey $config privatekey
echo "PrivateKey = "$privatekey >> ${PKI_DIR}/package/wg.conf
config_get address $config address
echo "Address = "$address >> ${PKI_DIR}/package/wg.conf
config_get endpoint_port $config endpoint_port
if [ ! -z $endpoint_port ]; then
echo "ListenPort = "$endpoint_port >> ${PKI_DIR}/package/wg.conf
fi
config_get dns $config dns
if [ ! -z $dns ]; then
echo "DNS = "$dns >> ${PKI_DIR}/package/wg.conf
fi
config_get mtu $config mtu
if [ ! -z $mtu ]; then
echo "MTU = "$mtu >> ${PKI_DIR}/package/wg.conf
fi
config_get wginter $config wginter
if [ -z"$wginter"]; then
wginter=0
fi
#echo "PrivateKey = "$wginter >> ${PKI_DIR}/package/wg.conf
echo " " >> ${PKI_DIR}/package/wg.conf
echo "[Peer]" >> ${PKI_DIR}/package/wg.conf
PUB=$(uci get wireguard."$WG".publickey)
echo "PublicKey = "$PUB >> ${PKI_DIR}/package/wg.conf
USE=$(uci get wireguard."$WG".usepre)
if [ $USE = "1" ]; then
PRE=$(uci get wireguard."$WG".presharedkey)
echo "PresharedKey = "$PRE >> ${PKI_DIR}/package/wg.conf
fi
HOST=$(uci get wireguard."$WG".endpoint_host)
PORT=$(uci get wireguard."$WG".port)
if [ ! -z $PORT ]; then
HOST=$HOST":"$PORT
fi
echo "Endpoint = "$HOST >> ${PKI_DIR}/package/wg.conf
config_get allowed_ips $config allowed_ips
echo "AllowedIPs = "$allowed_ips >> ${PKI_DIR}/package/wg.conf
echo "----EndConf File for "$name" ----" >> ${PKI_DIR}/package/wg.conf
echo " " >> ${PKI_DIR}/package/wg.conf
}
#PKI_DIR="/tmp/wireguard"
PKI_DIR="/www"
#rm -rfv "$PKI_DIR"
#mkdir -p ${PKI_DIR}
#chmod -R 0777 ${PKI_DIR}
cd ${PKI_DIR}
mkdir -p package
cd ..
chmod -R 0777 ${PKI_DIR}/package
#rm -rfv "/www/package"
#ln -s ${PKI_DIR}/package /www/package
rm -f ${PKI_DIR}/package/wg.conf
config_load wireguard
config_foreach do_create custom$WG
cd ${PKI_DIR}/package
tar -czf wgconf.tar.gz wg.conf

View File

@@ -0,0 +1,68 @@
#!/bin/sh
. /lib/functions.sh
log() {
modlog "Wireguard KeyGen" "$@"
}
WG=$1
ww=$(echo "$WG" | grep "https")
if [ ! -z "$ww" ]; then
exit 0
fi
echo "$WG" > /tmp/wginst
sleep 5
EXST=$(uci get wireguard."$WG")
if [ -z $EXST ]; then
uci set wireguard."$WG"="wireguard"
uci commit wireguard
fi
PRIV=$(uci get wireguard."$WG".privatekey)
if [ -z $PRIV ]; then
umask u=rw,g=,o=
wg genkey | tee /tmp/wgserver.key | wg pubkey > /tmp/wgclient.pub
wg genpsk > /tmp/wg.psk
WG_KEY="$(cat /tmp/wgserver.key)" # private key
WG_PSK="$(cat /tmp/wg.psk)" # shared key
WG_PUB="$(cat /tmp/wgclient.pub)" # public key to be used on other end
rm -f /tmp/wgserver.key
rm -f /tmp/wg.psk
rm -f /tmp/wgclient.pub
uci set wireguard."$WG".privatekey=$WG_KEY
uci set wireguard."$WG".publickey=$WG_PUB
uci set wireguard."$WG".presharedkey=$WG_PSK
uci commit wireguard
fi
do_custom() {
local config=$1
config_get privatekey $config privatekey
if [ -z "$privatekey" ]; then
umask u=rw,g=,o=
wg genkey | tee /tmp/wgserver.key | wg pubkey > /tmp/wgclient.pub
wg genpsk > /tmp/wg.psk
WG_KEY="$(cat /tmp/wgserver.key)" # private key
WG_PSK="$(cat /tmp/wg.psk)" # shared key
WG_PUB="$(cat /tmp/wgclient.pub)" # public key to be used on other end
rm -f /tmp/wgserver.key
rm -f /tmp/wg.psk
rm -f /tmp/wgclient.pub
log "$WG_KEY"
uci set wireguard."$config".privatekey=$WG_KEY
uci set wireguard."$config".publickey=$WG_PUB
uci set wireguard."$config".presharedkey=$WG_PSK
uci set wireguard."$config".persistent_keepalive='25'
uci set wireguard."$config".route_allowed_ips='1'
fi
}
config_load wireguard
config_foreach do_custom custom$WG
uci commit wireguard

View File

@@ -0,0 +1,328 @@
#!/bin/sh
. /lib/functions.sh
log() {
logger -t "Wireguard Start" "$@"
}
WG=$1
chk_zone() {
local config=$1
config_get src $config src
config_get dest $config dest
if [ $src = "lan" -a $dest = "wan" ]; then
uci set firewall."$config".dest="wg"
uci commit firewall
fi
}
do_dns() {
cdns=$1
local ifce=$2
ldns=$(uci -q get network.wg$ifce.dns)
ex=$(echo "$ldns" | grep "$cdns")
if [ -z $ex ]; then
log "Add DNS $cdns to WG$ifce"
uci add_list network.wg$ifce.dns="$cdns"
uci commit network
/etc/init.d/network reload
fi
}
do_port() {
PORT=$1
udp=$2
# look for rule for this port
INB="inbound"$PORT$udp
RULE=$(uci -q get firewall.$INB)
if [ -z $RULE ]; then
uci set firewall.$INB=rule
uci set firewall.$INB.name=$INB
uci set firewall.$INB.target=ACCEPT
uci set firewall.$INB.src=*
uci set firewall.$INB.proto=$udp
uci set firewall.$INB.dest_port=$PORT
uci commit firewall
/etc/init.d/firewall reload
fi
}
do_delete() {
local config=$1
uci delete network.$1
}
create_speer() {
local config=$1
uci set network.$config="wireguard_wg1"
config_get persistent_keepalive $config persistent_keepalive
uci set network.$config.persistent_keepalive="$persistent_keepalive"
config_get route_allowed_ips $config route_allowed_ips
uci set network.$config.route_allowed_ips="$route_allowed_ips"
config_get publickey $config publickey
uci set network.$config.public_key="$publickey"
usepre=$(uci -q get wireguard.$WG.usepre)
log "$usepre"
if [ $usepre = "1" ]; then
presharedkey=$(uci -q get wireguard.$WG.presharedkey)
log "$presharedkey"
uci set network.$config.preshared_key="$presharedkey"
fi
config_get allowed_ips $config allowed_ips
allowed_ips=$allowed_ips","
ips=$(echo $allowed_ips | cut -d, -f1)
i=1
while [ ! -z $ips ]
do
uci add_list network.$config.allowed_ips="$ips"
i=$((i+1))
ips=$(echo $allowed_ips | cut -d, -f$i)
done
}
create_cpeer() {
local config=$1
local ifce=$2
uci set network.$config="wireguard_wg$ifce"
publickey=$(uci -q get wireguard."$config".publickey)
uci set network.$config.public_key="$publickey"
presharedkey=$(uci -q get wireguard."$WG".presharedkey)
if [ ! -z $presharedkey ]; then
uci set network.$config.preshared_key="$presharedkey"
fi
persistent_keepalive=$(uci -q get wireguard."$config".persistent_keepalive)
if [ -z $persistent_keepalive ]; then
persistent_keepalive=25
fi
uci set network.$config.persistent_keepalive="$persistent_keepalive"
route_allowed_ips=1
uci set network.$config.route_allowed_ips="$route_allowed_ips"
if [ $UDP = 1 ]; then
endpoint_host="127.0.0.1"
uci set network.$config.endpoint_host="$endpoint_host"
sport=$(uci -q get wireguard."$config".port)
if [ -z $sport ]; then
sport="54321"
fi
uci set network.$config.endpoint_port="$sport"
else
endpoint_host=$(uci -q get wireguard."$config".endpoint_host)
uci set network.$config.endpoint_host="$endpoint_host"
sport=$(uci -q get wireguard."$config".sport)
if [ -z $sport ]; then
sport="51280"
fi
uci set network.$config.endpoint_port="$sport"
fi
ips=$(uci -q get wireguard."$config".ips)","
cips=$(echo $ips | cut -d, -f1)
i=1
while [ ! -z $cips ]
do
uci add_list network.$config.allowed_ips="$cips"
i=$((i+1))
cips=$(echo $ips | cut -d, -f$i)
done
}
handle_server() {
config_foreach do_delete wireguard_wg1
uci delete network.wg1
uci set network.wg1="interface"
uci set network.wg1.proto="wireguard"
auto=$(uci -q get wireguard."$WG".auto)
if [ -z $auto ]; then
auto="0"
fi
uci set network.wg1.auto="$auto"
port=$(uci -q get wireguard."$WG".port)
if [ -z $port ]; then
port="51280"
fi
uci set network.wg1.listen_port="$port"
do_port $port udp
privatekey=$(uci -q get wireguard."$WG".privatekey)
uci set network.wg1.private_key="$privatekey"
ips=$(uci -q get wireguard."$WG".addresses)","
cips=$(echo $ips | cut -d, -f1)
i=1
while [ ! -z $cips ]
do
uci add_list network.wg1.addresses="$cips"
i=$((i+1))
cips=$(echo $ips | cut -d, -f"$i")
if [ -z $cips ]; then
break
fi
done
config_load wireguard
config_foreach create_speer custom$WG
uci commit network
}
handle_client() {
ifce=$1
config_foreach do_delete wireguard_wg$ifce
uci delete network.wg$ifce
uci set network.wg$ifce="interface"
uci set network.wg$ifce.proto="wireguard"
uci set network.wg$ifce.metric="1"
auto=$(uci -q get wireguard."$WG".auto)
if [ -z $auto ]; then
auto="0"
fi
uci set network.wg$ifce.auto="$auto"
mtu=$(uci -q get wireguard."$WG".mtu)
if [ ! -z $mtu ]; then
uci set network.wg$ifce.mtu="$mtu"
fi
dns=$(uci -q get wireguard."$WG".dns)
if [ ! -z $dns ]; then
do_dns $dns $ifce
fi
port=$(uci -q get wireguard."$WG".port)
if [ -z $port ]; then
port="51280"
fi
uci set network.wg$ifce.listen_port="$port"
do_port $port udp
privatekey=$(uci -q get wireguard."$WG".privatekey)
uci set network.wg$ifce.private_key="$privatekey"
ips=$(uci -q get wireguard."$WG".addresses)","
cips=$(echo $ips | cut -d, -f1)
i=1
while [ ! -z "$cips" ]
do
uci add_list network.wg$ifce.addresses="$cips"
i=$((i+1))
cips=$(echo "$ips" | cut -d, -f"$i")
if [ -z "$cips" ]; then
break
fi
done
uci add_list network.wg$ifce.addresses="::/0"
create_cpeer $WG $ifce
uci commit network
}
udp_server() {
local config=$1
udpport=$(uci -q get wireguard."$WG".udpport)
if [ -z $udpport ]; then
udpport="54321"
fi
port=$(uci -q get wireguard."$WG".port)
if [ -z $port ]; then
port="54321"
fi
do_port $udpport tcp
udptunnel -s -v "0.0.0.0:"$udpport "127.0.0.1:"$port &
#log "udptunnel -s -v 0.0.0.0:$udpport 127.0.0.1:$port"
}
udp_client() {
local config=$1
port=$(uci -q get wireguard."$WG".port)
if [ -z $port ]; then
port="54321"
fi
endpoint_host=$(uci -q get wireguard.$WG.endpoint_host)
sport=$(uci -q get wireguard.$WG.sport)
if [ -z $sport ]; then
sport="51280"
fi
udptunnel "127.0.0.1:"$port $endpoint_host":"$sport &
#log "udptunnel 127.0.0.1:$port $endpoint_host:$sport"
}
forward=$(uci -q get wireguard."$WG".forward)
if [ "$forward" != "0" ]; then
config_load firewall
config_foreach chk_zone forwarding
else
uci set firewall.wgwforward=forwarding
uci set firewall.wgwforward.dest="wan"
uci set firewall.wgwforward.src="wg"
uci set firewall.wwgforward=forwarding
uci set firewall.wwgforward.dest="wg"
uci set firewall.wwgforward.src="wan"
uci set firewall.lwgforward=forwarding
uci set firewall.lwgforward.dest="wg"
uci set firewall.lwgforward.src="lan"
uci set firewall.wglforward=forwarding
uci set firewall.wglforward.dest="lan"
uci set firewall.wglforward.src="wg"
uci commit firewall
fi
/etc/init.d/firewall restart
config_load network
SERVE=$(uci -q get wireguard."$WG".client)
if [ $SERVE = "0" ]; then
running=$(uci -q get wireguard.settings.server)
if [ $running = 1 ]; then
exit 0
fi
UDP=$(uci -q get wireguard."$WG".udptunnel)
if [ $UDP = 1 ]; then
udp_server $WG
fi
handle_server
uci commit network
ifup wg1
sleep 2
uci set wireguard.settings.server="1"
else
running=$(uci -q get wireguard.settings.client)
log "Client running $running"
INTER=$(uci -q get wireguard."$WG".wginter)
if [ -z "$INTER" ]; then
INTER=0
fi
UDP=$(uci -q get wireguard."$WG".udptunnel)
if [ $UDP = 1 ]; then
udp_client $WG
fi
handle_client $INTER
uci commit network
log "Start Interface"
ifup wg$INTER
sleep 2
uci set wireguard.settings.client="1"
if [ -e /usr/lib/wireguard/wiremwan3.sh ]; then
/usr/lib/wireguard/wiremwan3.sh start
fi
fi
uci set wireguard."$WG".active="1"
uci commit wireguard
service firewall reload

View File

@@ -0,0 +1,75 @@
#!/bin/sh
. /lib/functions.sh
log() {
logger -t "Wireguard Stop" "$@"
}
chk_zone() {
local config=$1
config_get src $config src
config_get dest $config dest
if [ $src = "lan" -a $dest = "wg" ]; then
uci set firewall."$config".dest="wan"
uci commit firewall
fi
}
WG=$1
forward=$(uci -q get wireguard."$WG".forward)
if [ "$forward" != "0" ]; then
config_load firewall
config_foreach chk_zone forwarding
else
uci delete firewall.wgwforward
uci delete firewall.wwgforward
uci delete firewall.lwgforward
uci delete firewall.wglforward
uci commit firewall
fi
/etc/init.d/firewall restart
SERVE=$(uci get wireguard."$WG".client)
if [ $SERVE = "0" ]; then
ifdown wg1
uci set wireguard.settings.server="0"
uci delete network.wg1
uci set network.wg1=interface
uci set network.wg1.proto="wireguard"
uci set network.wg1.auto="0"
uci set network.wg1.private_key=""
uci set network.wg1.listen_port=""
uci add_list network.wg1.addresses=""
uci commit network
else
INTER=$(uci -q get wireguard."$WG".wginter)
if [ -z "$INTER" ]; then
INTER=0
fi
ifdown wg$INTER
uci set wireguard.settings.client="0"
uci delete network.wg$INTER
uci set network.wg$INTER=interface
uci set network.wg$INTER.proto="wireguard"
uci set network.wg$INTER.auto="0"
uci set network.wg$INTER.private_key=""
uci set network.wg$INTER.listen_port=""
uci add_list network.wg$INTER.addresses=""
uci commit network
if [ -e /usr/lib/wireguard/wiremwan3.sh ]; then
/usr/lib/wireguard/wiremwan3.sh stop
fi
ifup wan
fi
UDP=$(uci get wireguard."$WG".udptunnel)
if [ $UDP = 1 ]; then
PID=$(ps |grep "udptunnel" | grep -v grep |head -n 1 | awk '{print $1}')
kill -9 $PID
fi
uci set wireguard."$WG".active="0"
uci commit wireguard
/etc/init.d/wireguard stop

View File

@@ -0,0 +1,19 @@
#!/bin/sh
. /lib/functions.sh
log() {
logger -t "Wireguard TextConf" "$@"
}
conf1=$1
conf=$(echo $conf1)
conf=$(echo "$conf" | tr "?" "~")
boot=$(echo "$conf" | cut -d~ -f1)
iname=$(echo "$conf" | cut -d~ -f2)
conf=$(echo "$conf1" | tr "?" "~")
confile=$(echo "$conf" | cut -d~ -f3)
echo "$confile" > /tmp/confile
/usr/lib/wireguard/conf.sh $iname /tmp/confile $boot

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

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