Skip to content

Conversation

@spotty118
Copy link

Thanks for your contribution to OpenMPTCProuter!

You need to follow contributing rules.

Please remove this message before posting the pull request.

Copilot AI and others added 30 commits November 16, 2025 05:20
… aggregation, and WiFi 7 optimizations

Co-authored-by: spotty118 <[email protected]>
…zations

[WIP] Update frontend README with enhancements and optimizations
…patches

Add automated VPS-client pairing, first-boot wizard, dynamic WAN detection, and modern UI theme
Add workflow_dispatch for on-demand builds and fix Quectel RM551E-GL modem detection
No changes required - build infrastructure complete
- Updated kernel 6.6 luci to latest OpenWrt 24.10 commit
- Updated kernel 6.12 to latest OpenWrt main branch commit
- Added missing USB network drivers (aqc111, pl)
- Added Ethernet drivers (atlantic, igc, macvtap)
- Enhanced BPI-R4 and BPI-R4-PoE configs with comprehensive Quectel 5G modem support
- Added WiFi 7 enhancements (MT7915e, MT7921e firmware and drivers)
- Added MediaTek-specific drivers (mt7530, mtk-eth, dsa-mt7530)
- Enhanced kernel stability options (panic handling, printk)
- Added multi-WAN bonding support (bonding, team, ipvlan modules)
- Enhanced VPS sysctl config for multi-WAN bonding
- Added VPS kernel modules for bonding and traffic shaping

Co-authored-by: spotty118 <[email protected]>
…o 192.168.2.1

- Created comprehensive RM551E stability monitoring script with automatic recovery
- Enhanced RM551E initialization with better error handling and configuration
- Added auto-start for RM551E monitor via init script
- Cleaned up dead code and commented-out sections in build.sh
- Changed default LAN IP from 192.168.100.1 to 192.168.2.1 to avoid router conflicts
- Enabled DHCP server by default on LAN interface
- Configured DNS and network defaults for better out-of-box experience
- Updated first-boot wizard to reflect new IP address

Co-authored-by: spotty118 <[email protected]>
- Created port auto-detection that identifies upstream internet on any port
- Auto-configures detected WAN ports with DHCP and multipath support
- Auto-configures remaining ports as LAN bridge members
- Created WiFi auto-configuration with secure defaults (WPA3/SAE)
- Generates random but secure WiFi passwords
- Supports WiFi 7 (6GHz), WiFi 6 (5GHz), and WiFi 4/5/6 (2.4GHz)
- Created self-aware network monitoring daemon
- Continuously monitors network state and auto-adjusts configuration
- Detects cable plug/unplug events and reconfigures accordingly
- Monitors WAN connectivity and triggers reconfiguration if needed
- Ensures DHCP server is always running on LAN
- Runs continuously in background with procd supervision
- Auto-starts on boot and after any network changes
- Saves WiFi password to /etc/wifi-password.txt for user reference

Co-authored-by: spotty118 <[email protected]>
Copilot AI and others added 26 commits November 17, 2025 17:34
…again

Add self-contained VPS installation wizard
…ials

Fix confirmation prompt defaulting to cancel on Enter key
[WIP] Validate operating system compatibility for installation
…ecks

[WIP] Audit code for stability between VPS and router setups
…ode-again

Implement comprehensive LuCI theme with modern CSS architecture, accessibility, and interactive enhancements
Fix shell syntax error blocking all builds
This comprehensive audit identified and fixed multiple critical security
vulnerabilities, shell script bugs, and code quality issues:

CRITICAL SECURITY FIXES:
1. vps-scripts/install.sh - Completely rewritten
   - Was broken (only contained "debian9-x86_64.sh")
   - Now properly wraps wizard.sh with fallback logic
   - Added error handling and download capability

2. sign.sh - Command injection vulnerability fixed
   - Added proper quoting for all variables
   - Added input validation for key and path parameters
   - Added error handling with proper exit codes
   - Prevents path traversal and command injection attacks

3. wizard.sh & omr-vps-install.sh - Sed injection vulnerabilities
   - Fixed unescaped user input in sed commands
   - VPS IP and passwords now properly escaped
   - Prevents sed metacharacter exploitation

4. rm551e-init.sh - Multiple command injection vulnerabilities
   - Fixed unquoted variables in sh -c commands (lines 88, 117, 129, 136, 186)
   - Replaced echo -e with printf for POSIX compliance
   - All device paths now properly quoted

5. modems/Makefile - Bashism and quoting issues
   - Replaced shopt -s nullglob (bash-only) with portable find command
   - Added proper quoting in generated init scripts
   - Fixed command substitution quoting in kill command

CODE QUALITY FIXES:
6. wifi-autoconfig.sh - Bashism fixed
   - Replaced ${band^^} (bash-only) with portable tr command
   - Ensures compatibility with dash and other POSIX shells

7. build.sh - Error handling improvements
   - Added fallback for curl failure (line 31)
   - Fixed nested command substitution with backticks (line 45)
   - Added error suppression and fallback values
   - Prevents build failures from network issues

IMPACT:
- Eliminates command injection attack vectors
- Improves cross-platform compatibility
- Prevents build failures from network issues
- Ensures proper error handling throughout

All changes verified with bash -n syntax checks.
Copilot AI review requested due to automatic review settings November 17, 2025 23:56
Copilot finished reviewing on behalf of spotty118 November 18, 2025 00:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive suite of VPS installation scripts, auto-configuration tools, modem support (particularly for Quectel RM551E 5G), testing infrastructure, and a modern LuCI theme for OpenMPTCProuter Optimized. The changes significantly enhance the user experience with automated setup and beautiful web interfaces.

Key changes:

  • VPS wizard and installation scripts with interactive setup
  • Automated client/router configuration tools
  • Comprehensive 5G modem support (RM551E) with monitoring
  • Modern LuCI theme with dark mode and accessibility features
  • Auto-configuration scripts for WiFi, modems, and ports

Reviewed Changes

Copilot reviewed 63 out of 71 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vps-scripts/wizard.sh Interactive VPS setup wizard with step-by-step configuration
vps-scripts/omr-vps-install.sh Core VPS installation script
vps-scripts/test-*.sh Test scripts for validation
scripts/easy-install.sh, client-auto-setup.sh, auto-pair.sh Router/client setup automation
common/package/modems/* Quectel RM551E 5G modem support and monitoring
common/package/luci-theme-omr-optimized/* Modern web UI theme
common/files/usr/bin/*.sh Auto-configuration utilities
config files Hardware configuration for BPI-R4 and x86
sign.sh Enhanced image signing script
Comments suppressed due to low confidence (1)

common/package/modems/Makefile:1

  • The while read loop with find will fail if filenames contain spaces or special characters. The original shopt -s nullglob approach was actually safer as it avoided spawning a subshell. Consider using find ... -exec instead or properly quote variables. However, the || true at the end ensures the build won't fail if no files are found, which is good defensive programming.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +260 to +265
const aNum = parseFloat(aVal);
const bNum = parseFloat(bVal);

if (!isNaN(aNum) && !isNaN(bNum)) {
return isAscending ? aNum - bNum : bNum - aNum;
}
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Numeric sorting using subtraction can produce incorrect results when the difference exceeds Number.MAX_SAFE_INTEGER or with very small differences. Use comparison operators instead: return isAscending ? (aNum < bNum ? -1 : aNum > bNum ? 1 : 0) : (bNum < bNum ? -1 : bNum > aNum ? 1 : 0). Though for typical table data, this is unlikely to be an issue.

Copilot uses AI. Check for mistakes.
exit 1
fi

echo "Signing images in $path/source/bin with key $key..."
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The script outputs the key file path to the console. While this is informational, in security-sensitive contexts, avoid logging cryptographic key paths. Consider using a more generic message like "Signing images in $path/source/bin..." without revealing the key location.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants