- Replaced awk with busybox awk for better compatibility on Android.
- Simplified logging function indentation in ctr.inotify.
- Added clean_old_logs using busybox awk for log retention (24h).
- Unified service control logic:
- Use case for WiFi blacklist/whitelist matching.
- Consistent calls to ${scripts_dir}/box.service and ${scripts_dir}/box.iptables.
- Improved SSID retrieval:
- Use cmd wifi status as primary method.
- Fallback to iwconfig when available.
- Updated is_allowed_wifi:
- Convert array → comma-separated string internally.
- Trim spaces on SSID and list entries before comparison.
- Removed unused service_script and iptables_script vars.
- More descriptive log outputs for network events.
This refactor reduces duplication, improves Android compatibility,
and makes WiFi service control logic more maintainable.
- Changed log file path from Networkswitch_debug.log to netswitch.log
- Updated WiFi SSID check to properly handle array values from settings.ini
- Modified is_allowed_wifi to accept array arguments instead of comma-separated strings
- Adjusted calls to is_allowed_wifi in ctr.inotify to pass array correctly
- Added syntax validation for `/data/adb/box/settings.ini` at the start of:
* box.inotify
* box.iptables
* box.service
* box.tool
* ctr.inotify
* start.sh
- If validation fails, an error message is logged to
`/data/adb/box/run/settings_err.log` and the script exits immediately.
- Ensures misconfigured settings.ini do not break runtime scripts.
- subscription_url_clash now supports arrays for multiple URLs
- name_provide_clash_config updated to support arrays matching the URLs
- Added validation to ensure URL and config counts match
- When renew=true, only the first index is processed
- Loop through all subscriptions for clash_provide_config updates
- Improved logging for mismatches and update failures
- Refactored clash_provide_config to use base path clash_provide_path
- Updated settings.ini:
- subscription_url_clash → array
- name_provide_clash_config → array
- default renew=false (fetch proxies only)
- Added subscription update support for sing-box:
- Downloads config from subscription_url_singbox.
- Restarts service if update is successful.
- Updated settings.ini:
- Added subscription_url_singbox entry.
- box.inotify: redirect service actions to inotify.log instead of service.log
- box.iptables: add help|-h|--help commands with usage descriptions, remove color codes from errors
- box.service:
- rewrite log cleanup to timestamped backup with clearer messages
- add help menu for service control commands
- remove unnecessary inline comments
- box.tool:
- add detailed logging for config checks, reload, and update operations
- improve error handling and skip steps on failure
- add backup steps before updating curl, yq, and other binaries
- enhance geo data update with explicit logging and cleanup
- refine kernel updates for sing-box, clash, xray/v2fly, hysteria with clearer output and checks
- improve cgroup management log messages
- add comprehensive help menu for all commands
- Remove "0:" prefix from package names before injecting into Sing-box and Clash configurations.
- Ensures consistent formatting of include/exclude package lists.
- Prevents malformed entries in sing_config and clash_config.
- Parameterize PID file and fallback values
- Improve detection and assignment of cgroup paths
- Update default memcg limit to 100M, cpuset CPU range, blkio weight
- Refine CPU core detection using /proc/[pid]/stat
- Replaced existing crond startup logic with cleaner, safer implementation.
- Added `pkill` fallback mechanism for stopping `crond`.
- Removed redundant `touch` and `chmod` on crontab file; now using descriptive header and appending additional config from `crontab.cfg`.
- Adjusted logging messages for clarity ("crond enable"/"crond disable").
- Updated service status emojis in `description=` fields for better UX.
* Add skip_mount to prevent suspicious mountpoints.
Since the scripts and binary had it's own separate folder, we don't need to mount anything on top of overlayfs.
This prevent detection of suspicious mountpoints.
Documentation: https://topjohnwu.github.io/Magisk/guides.html#magisk-modules
* add skip_mount extraction command to customize.sh
forgot about that, silly me :P
- Change default TUN device from utun to meta (Clash).
- Rename TUN interface from utun9 to sing (Sing-Box).
- Disable /dev/net/tun creation.
- Set mixed as the default stack.