-
-
Notifications
You must be signed in to change notification settings - Fork 137
/
settings.ini
executable file
·90 lines (78 loc) · 2.97 KB
/
settings.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/system/bin/sh
export PATH="/data/adb/magisk:/data/adb/ksu/bin:$PATH:/system/bin"
# define the settings and paths
settings="/data/adb/box/settings.ini"
# set the port numbers for tproxy and redir
tproxy_port="9898"
redir_port="9797"
# enable/disable port detection: true / false
port_detect="false"
# enable/disable IPv6: true / false
ipv6="false"
# list of available kernel binaries
bin_list=("clash" "sing-box" "xray" "v2fly")
# select the client to use : clash / sing-box / xray / v2fly
bin_name="clash"
# This script is used to set the user and group for the BFM core files.
# If you want to change the user or group, make sure the BFM core files are located in the /system/bin directory, otherwise the changes will not take effect.
# If you are using Magisk, you can copy the BFM core files (sing-box, clash, etc.) to /data/adb/modules/box_for_root/system/bin/ and reboot the phone.
# box_user_group="bin:system"
box_user_group="root:net_admin"
# redirect: tcp only, / tproxy: for tcp+udp with tproxy, / mixed: mode with redirect[tcp] and tun[udp]
# Network mode: tproxy for transparent proxying
network_mode="tproxy"
# Proxy mode: blacklist / whitelist / tun (only tun auto-route)
proxy_mode="blacklist"
# List of package names to be proxied
packages_list=()
# Display AP info by typing "ifconfig" in terminal
ap_list=( "softap+" "wlan+" "swlan+" "ap+" "rndis+" )
# Ignore AP in the out list
ignore_out_list=()
# Set update interval using cron, for more information: https://crontab.guru/
crontab_sec='false'
update_interval="0 12 */3 * *" # updates will run at 12 noon every three days.
# Update sub&geo
# Type "su -c /data/adb/box/scripts/box.tool subgeo" to update
auto_update_geox="true"
# Only update clash subscription URL
auto_update_subscription="false"
subscription_url=""
# Set cgroup to limit memory usage
cgroup_memory="false"
cgroup_memory_limit="50M"
cgroup_memory_path=""
# Set box directory variables
data_dir="/data/adb/box"
run_path="${data_dir}/run"
logs_file="${run_path}/runs.log"
pid_file="${run_path}/box.pid"
bin_kernel="${data_dir}/bin"
bin_path="${bin_kernel}/${bin_name}"
scripts_dir="${data_dir}/scripts"
system_packages_file="/data/system/packages.list"
uid_list=("/data/adb/box/run/appuid.list")
# config clash
name_clash_config="config.yaml"
clash_config="${data_dir}/clash/${name_clash_config}"
# Set DNS variables, doc dns https://adguard-dns.io/kb/general/dns-providers/
intervaldns=""
# intervaldns="*/10 * * * *" #
static_dns1="94.140.14.14"
static_dns2="2a10:50c0::ad1:ff"
log() {
# Get the current time
now=$(date +"%R")
case $1 in
info) color="\033[1;34m" ;; # print the log message in blue
error) color="\033[1;31m" ;; # print the log message in red
warn) color="\033[1;33m" ;; # print the log message in yellow
*) color="\033[1;32m" ;; # print the log message in magenta
esac
message="${now} [$1]: $2"
if [ -t 1 ]; then
echo -e "${color}${message}\033[0m"
else
echo "${message}" | tee -a ${logs_file} >> /dev/null 2>&1
fi
}