Commit Graph

333 Commits

Author SHA1 Message Date
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
github-actions[bot]
275b04ea44 v1.9.1 2025-08-09 11:09:03 +07:00
taamarin
19641a3f14 ci: refine release workflow 2025-08-02 07:21:40 +07:00
taamarin
5c1c5a72bd fix(iptables): switch to --set-xmark and reorder TProxy skip e4114de391 2025-08-02 03:46:56 +07:00
taamarin
a40d57cd96 v1.9.0 2025-07-20 06:22:54 +07:00
taamarin
0a59c0448a fix(box): use busybox paste for better compatibility on older Android 2025-07-20 04:24:38 +07:00
taamarin
128006d6e4 Update README 2025-07-20 02:46:11 +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
taamarin
361e4210f5 feat: Add sbfr shortcut for direct execution 2025-06-25 15:29:26 +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
16f2455413 update readme 2025-06-17 01:48:43 +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
Agus Suristyono
6b8d7005a2 Add skip_mount to prevent suspicious mountpoint detections. (#179)
* 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
2025-02-20 20:00:42 +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
Шоколад
80c5d7313c Update upload-artifact action from v3 to v4 2025-02-03 19:52:42 +07:00
Шоколад
1672bb721f refactor box.iptables: Improve readability and structure 2025-02-03 19:51:19 +07:00
Шоколад
982a1aad5e fix condition for fake-ip range in box.iptables based on enhanced-mode 2025-01-16 14:19:48 +07:00
Шоколад
57f9dbd4d1 feat: Improve download handling by adding curl fallback 2024-12-25 17:14:50 +07:00
Шоколад
7caf827136 Added logic to use curl if available for file downloading, falling back to wget if curl is not found. https://github.com/taamarin/box_for_magisk/issues/172 2024-12-25 15:30:47 +07:00
Шоколад
1278e2a635 v1.8 2024-12-22 18:10:41 +07:00
dependabot-preview[bot]
6abd57ab6e readme 2024-12-14 21:17:45 +07:00
dependabot-preview[bot]
d9cc218b89 refactor: Modularize service management with functions
- Added run_as_su, stop_service, and start_service for better readability and reuse.
- Improved process check with /proc/${PID}.
2024-12-14 17:38:33 +07:00
dependabot-preview[bot]
aab21126c2 Switch list mode from whitelist to blacklist and clean up configuration
- Changed the mode from `whitelist` to `blacklist`.
- Simplified and reorganized package list formatting for clarity.
- Removed unused and commented-out package entries to streamline the file.
- Updated examples and annotations for better readability.
2024-12-14 13:46:11 +07:00
dependabot-preview[bot]
97aaa92a1e Revert "Add script to check if xyz.chz.bfm app is installed and notify about module compatibility"
This reverts commit 01c74b4829.
2024-12-14 13:43:39 +07:00
dependabot-preview[bot]
097a327f9e Refactored and optimized settings script:
- Improved comments and formatting
- Introduced interface allow/ignore list from configuration
- Simplified logging and notification logic
2024-12-13 17:00:54 +07:00
twnesss
6033ddbbc0 Fix Mistake 2024-12-09 04:13:43 +07:00
moeyuki
18040d211b 更正正则表达式,以删除package.list.cfg无用字段,并添加gid支持 (#169)
* 添加Gid支持,简化配置内容
* 更正正则表达式,以移除package.list.cfg无用字段,并添加package.list.cfg的gid支持
2024-12-08 21:22:47 +07:00
twnesss
1da4ec527f Add default mode:white if empty in $pkg_config file. 2024-12-07 16:05:24 +07:00
twnesss
01c74b4829 Add script to check if xyz.chz.bfm app is installed and notify about module compatibility 2024-12-07 14:27:01 +07:00
twnesss
404206561b (adjust) white/black list mode 2024-12-07 13:53:08 +07:00
moeyuki
8f0c649ef2 Remove useless code without any functional changes (#167) 2024-12-07 11:55:45 +07:00
moeyuki
5ff94d02e3 Change the default option to whitelist mode (#166)
* Create 待办.md
* Delete 待办.md

* Create package.list.cfg

添加黑白名单模式选择,以及包名配置

* Delete box/package.list.ini

使用.cfg,移除.ini

* Optimizing details and adding black / white list configuration options to support custom comments

Optimizing details and adding black / white list configuration options to support custom comments

* Replace the configuration file path to get the method

* 更新 settings.ini

Move options that do not require manual configuration to the bottom of the file

* 更新 package.list.cfg

Change the default option to whitelist mode
2024-12-07 00:53:51 +07:00
moeyuki
72361987a8 To modify a variable misreference (#162)
To modify a variable misreference
2024-12-05 01:01:07 +07:00
moeyuki
b15fa6a343 Add a black and white list config. (#161)
添加黑/名单包名配置文件
* 添加黑/名单包名配置文件获取

添加黑/名单包名配置文件获取,现在修改名单列表只需要编辑文件:package.list.ini
2024-12-04 21:28:05 +07:00
twnesss
e3b147a4b5 v1.7.5 2024-11-17 17:50:36 +07:00