200 Commits

Author SHA1 Message Date
5278561f13 Release PronBox v1.14.0: protocol setup docs and wg-obfs profile switch.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 11:56:47 +03:00
d447adc133 chore: replace em dashes with ASCII hyphens.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 11:56:37 +03:00
1337e31579 Release PronBox v1.13.0: RU stealth defaults and mixed port 19090.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 11:56:00 +03:00
4b0eee3eb5 Release PronBox v1.12.0 from NIH TechnoPron.
Rename Magisk branding to PronBox (author: TechnoPron team), stop customize.sh from forcing Box for Magisk, and ship wg-obfuscator plus Manage Profiles templates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 09:09:32 +03:00
89d0adb27c Release VeilBox v1.11.0: switchable TrustTunnel/olcrtc profiles.
Rename display name to VeilBox, add box.profile + sbfr p switcher, and ship scrubbed sing-box profile templates for quick TT/olcrtc flips.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 20:34:21 +03:00
07d81c9249 первый комит 2026-08-12 15:12:01 +03:00
moeyuki
4cec20f8d8 Theoretically optimized a bit of performance (#207) 2025-10-21 18:56:00 +07:00
taamarin
9f479cd546 fix(ctr): sanitize last_check_time, safe return, and add alt SSID method 2025-09-08 00:13:29 +07:00
taamarin
ee005eefa3 fix(box.service): simplify sed rule for adding enhanced-mode 2025-09-07 17:12:32 +07:00
taamarin
4580a552e3 feat(box.tool): mask sensitive token in subscription URL logs 2025-09-06 23:11:15 +07:00
taamarin
6074f4c6f0 fix(scripts): use /system/bin/sh and add curl timeout options in box.tool 2025-09-05 10:25:16 +07:00
taamarin
6a3acff87c box.tool(subs): extend protocol detection & clarify error log 2025-09-04 03:05:36 +07:00
taamarin
cf3e360be0 feat: support Base64 subscription(clash/momo) file in box.tool 2025-09-04 02:30:05 +07:00
taamarin
8d74c59e45 box: switch sing-box to single config file
- Add log_backup flag (default: false) for optional log backup
- Include Android user 999 in tun config
- Use -c "${sing_config}" instead of -C for sing-box check/run
2025-08-25 09:23:18 +07:00
taamarin
f61566bb2a refactor(scripts): simplify inotify & utils with busybox awk and case logic
- 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.
2025-08-23 09:03:36 +07:00
taamarin
5378a141ee fix(network-switch): improve WiFi SSID list handling
- 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
2025-08-21 14:24:40 +07:00
taamarin
28056d9358 chore(scripts): remove tun_forward_ip_rules support
Hotspot issue in sing-tun might have already been fixed:
https://github.com/SagerNet/sing-tun
2025-08-19 09:32:38 +07:00
taamarin
bafca21025 fix: improve logging, startup handling, and binary checks 2025-08-18 09:05:31 +07:00
taamarin
d28ba2f645 scripts: add settings.ini validation to all entry scripts
- 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.
2025-08-17 05:23:42 +07:00
taamarin
7cb8f49373 refactor(customize): improve binary update flow and mirror selection 2025-08-16 20:04:15 +07:00
taamarin
823f262363 box.service: refine log cleanup rules
- Change log retention from 3 days → 1 day
- Include both *.log and *.bak in cleanup target
2025-08-16 14:46:01 +07:00
taamarin
b8a51ee1c2 feat: introduce network-based service control with Wi-Fi/SSID options 2025-08-16 14:46:01 +07:00
taamarin
042d079b17 feat(clash): add support for multiple subscription URLs and configs
- 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)
2025-08-16 14:45:54 +07:00
taamarin
515eae8447 feat: improve install & update flow, add progress bars, ghfast prompt, and logging polish
- box.service:
  • Add check for empty interva_update before scheduling GeoX & subscription updates
  • Improve logging for crontab setup

- box.tool:
  • Change ghproxy URL to https://ghfast.top
  • Add --progress-bar to curl commands for better download visibility
  • Suppress noisy extraction outputs, log only success/failure
  • Cleanup temp files after updates (SHA256SUMS, yq.bak)
  • Improve GeoX update logs with timestamp and bin_name
  • Return 1 instead of exiting for failed downloads in upkernel
  • Minor log output polish and error suppression

- customize.sh:
  • Add interactive prompt for enabling ghfast mirror before downloads
  • Improve Kernel & GeoX download prompt with auto-download fallback
  • Enhance restore process with per-component logging
  • Add detailed extraction and permission setup logs
  • Final polish on cleanup, symlink creation, and completion messages

- module.prop:
  • Update module name to “Box for Magisk/KernelSU/APatch”
2025-08-14 09:02:36 +07:00
taamarin
f13c8608bb feat(subscriptions): add sing-box subscription support
- 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.
2025-08-13 15:40:26 +07:00
taamarin
e9eda0e417 fix(subscription): restart box.service on subscription update, if renew=true 2025-08-13 08:30:40 +07:00
taamarin
acfa76b2af fix: create clash_provide_config file and update subscription settings
- Improved comments in settings.ini for better clarity on renew behavior and subscription URL usage.
2025-08-13 07:29:37 +07:00
taamarin
768d5bbeb5 feat: improve logging, add help menus, and enhance update/reload routines
- 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
2025-08-11 07:17:23 +07:00
taamarin
82618ef4e4 fix: revert socket MARK rules in box.iptables to restore UDP connectivity
Ref: https://github.com/taamarin/box_for_magisk/issues/195
2025-08-09 14:45:48 +07:00
taamarin
0dcebed687 fix(service): add unified config error handler to update module status 2025-08-09 11:49:02 +07:00
taamarin
256c06f045 feat(service): improve config file handling (Sync BFR Manager) 2025-08-09 11:49:02 +07:00
taamarin
d8a5229700 chore(scripts): unify output suppression format to >/dev/null 2>&1 2025-08-09 11:48:48 +07:00
taamarin
5c1c5a72bd fix(iptables): switch to --set-xmark and reorder TProxy skip e4114de391 2025-08-02 03:46:56 +07:00
taamarin
0a59c0448a fix(box): use busybox paste for better compatibility on older Android 2025-07-20 04:24:38 +07:00
taamarin
97e2db3781 fix(box): remove all '0:, 10: and :999' prefixes from package list in Clash(tun) config 2025-07-20 02:05:12 +07:00
taamarin
42b355f0e4 fix: sanitize package list before inserting into config
- 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.
2025-07-20 01:26:39 +07:00
NOOBie
b4a2c00ee2 fix: duplicate dns address output on some devices (#191) 2025-07-10 22:50:14 +07:00
taamarin
2dcc4ca30d Updated find_packages_uid() to compute UID based on user ID and app ID for entries like "user:package". 2025-07-10 21:16:54 +07:00
ratabb
c9c4be52b0 Improve box.iptables logic with Android version check via major version parsing (#189) 2025-06-18 17:51:21 +07:00
taamarin
cac3186215 hysteria: update config and Validated network_mode in iptables and service 2025-06-16 01:06:22 +07:00
twnesss
c80f57a024 Extend routing/NAT rules for tun device
- Add POSTROUTING MASQUERADE rule for tun interface
- Re-enable IPv6 rules for ULA (`fc00::/7`, `fd00::/8`) and link-local (`fe80::/10`)
2025-06-03 20:17:25 +07:00
twnesss
a8ee2493a9 feat(cgroup): refactor memcg/cpuset/blkio logic, update settings
- 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
2025-05-26 10:29:32 +07:00
twnesss
3b6fe424c9 refactor: simplify sing-box(1.12+) config, remove legacy rules and sniff options 2025-05-25 23:31:44 +07:00
twnesss
b43b05937a feat(cron): improve crond handling and cleanup
- 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.
2025-05-25 23:10:53 +07:00
Шоколад
1619f1944c fix: force redir-host mode when fake-ip is used with GID, packages, or AP ignore list 2025-05-02 10:18:16 +07:00
ratabb
02f1be31b2 Filters out local DNS info ipv4 only & local IP as array (#182)
* info local DNS only ipv4
* info local IP treat as array, same as local DNS
2025-03-15 17:59:16 +07:00
ratabb
13e773c861 add info local IP & DNS at box.services status (#180) 2025-03-05 23:41:04 +07:00
Шоколад
9fbaa9914b Misc 2025-02-09 12:24:51 +07:00
Шоколад
8b000cd4c2 feat: update TUN device handling https://github.com/taamarin/box_for_magisk/issues/177
- 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.
2025-02-09 01:31:37 +07:00
Шоколад
1672bb721f refactor box.iptables: Improve readability and structure 2025-02-03 19:51:19 +07:00