File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55sing-box 配置文件 config.json 放在 ` /data/adb/singbox/ ` 目录, 重启手机模块生效
66
7+ ** 不修改手机 iptables 规则**
78
8- ** 黑白名单 **
9+ 发现注释 iptables 相关的代码,手机流量正常走代理(不知道具体原因)
910
10- - ` /data/adb/singbox/include.list ` 文件中的应用包名走代理
11-
12- - ` /data/adb/singbox/exclude.list ` 文件中的应用包名不走代理
13-
14- ` exclude.list ` 优先级高于 ` include.list ` :
15-
16- 如果一个应用的包名同时出现在 ` exclude.list ` 和 ` include.list ` 中,这个应用不走代理。
11+ # 参考
12+ - https://github.com/taamarin/box_for_magisk
1713
Original file line number Diff line number Diff line change 11id=box_for_magisk
22name=SingBox for Magisk
3- version=v1.2.3
4- versionCode=20250121
3+ version=v1.2.4
4+ versionCode=20250317
55author=gitduk
66description=use sing-box for tunnel proxy on android device
7- updateJson=https://github.com/gitduk/box_for_magisk/raw/master/update.json
Original file line number Diff line number Diff line change 1+ #! /system/bin/sh
2+
3+ iptables=" iptables -w 64"
4+
5+ # 红魔9Pro
6+ ${iptables} -D oem_out -j zte_fw_data_align_out 2> /dev/null
7+ ${iptables} -D OUTPUT -j zte_fw_gms 2> /dev/null
8+
Original file line number Diff line number Diff line change @@ -58,24 +58,6 @@ check_process_running() {
5858 return 1
5959}
6060
61- # 重置 iptables 规则
62- renew_iptables () {
63- if [ -z " $PID " ]; then
64- PID=$( busybox pidof " ${bin_name} " )
65- fi
66-
67- if [ -n " $PID " ]; then
68- local pid_name=" ${box_dir} /pid_name.txt"
69- ps -p $PID -o comm= > " ${pid_name} "
70- sed -i ' /^[[:space:]]*$/d' " ${pid_name} "
71- log warn " $( < " ${pid_name} " ) (PID: $PID ) service is still running, restarting box"
72- rm -f " ${pid_name} "
73- stop_box
74- return 1
75- fi
76- return 0
77- }
78-
7961# 设置IPv6环境
8062setup_ipv6 () {
8163 # 基础网络设置
@@ -168,7 +150,7 @@ start_box() {
168150 fi
169151
170152 # 设置 iptables 规则
171- ${scripts_dir} /iptables.sh " ${network_mode} "
153+ # ${scripts_dir}/iptables.sh "${network_mode}"
172154
173155 # IPv6 配置
174156 setup_ipv6
@@ -201,7 +183,7 @@ stop_box() {
201183 fi
202184
203185 # 清理 iptables 规则
204- ${scripts_dir} /iptables.sh " clear"
186+ # ${scripts_dir}/iptables.sh "clear"
205187
206188 log INFO " ${bin_name} stopped"
207189
@@ -260,3 +242,4 @@ case "$1" in
260242 exit 1
261243 ;;
262244esac
245+
You can’t perform that action at this time.
0 commit comments