Skip to content

Commit

Permalink
show tun_stack in Log
Browse files Browse the repository at this point in the history
  • Loading branch information
tearmoon committed Dec 21, 2023
1 parent 8cee2df commit 389a4eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion box/scripts/box.service
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,10 @@ box_bin_status() {
return 1
fi

stack=$(if [ "${bin_name}" != "clash" ]; then find "/data/adb/box/sing-box" -type f -name "*.json" -exec busybox awk -F'"' '/"stack"/{print $4}' {} +; else busybox awk '!/^ *#/ && /stack: / { print $2;found=1; exit}' "${clash_config}"; fi)

log Info "${bin_name} service is running."
log Info "Proxy-mode: ${proxy_mode}, $(if [ "${proxy_mode}" != "tun" ]; then echo Network-mode: ${network_mode}; fi)"
log Info "proxy: ${proxy_mode} | $(if [ "${proxy_mode}" != "tun" ]; then echo network: ${network_mode}; fi) | $(if [[ "${proxy_mode}" == "tun" || ${network_mode} == "mixed" ]]; then echo stack: ${stack}; fi)"

# Get the memory usage of the binary
rss=$(grep VmRSS /proc/$PID/status | busybox awk '{ print $2 }')
Expand Down

0 comments on commit 389a4eb

Please sign in to comment.