Files
BFR/tools/export_cfg_shape.sh
M1rsem 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

23 lines
1.0 KiB
Bash

#!/system/bin/sh
export PATH="/data/adb/magisk:/data/adb/box/bin:/system/bin:$PATH"
. /data/adb/box/settings.ini
CFG="$sing_config"
echo "CFG=$CFG"
echo "=== files ==="
ls -la /data/adb/box/sing-box/
echo "=== settings sidecar ==="
grep -E 'name_sing|sidecar_|bin_name' /data/adb/box/settings.ini
echo "=== dump redacted ==="
# redact passwords/keys from json for template base
yq -o=json '
(.outbounds[] | select(has("password")) | .password) = "REDACTED" |
(.outbounds[] | select(has("uuid")) | .uuid) = "REDACTED" |
(.outbounds[] | select(.tls.server_name != null) | .tls.server_name) = .tls.server_name
' "$CFG" 2>/dev/null | head -c 8000
echo
echo "=== route/dns/outbounds summary ==="
yq -r '"final=" + .route.final' "$CFG"
yq -r '.dns.servers[] | "dns:" + .tag + " type=" + .type + " detour=" + (.detour // "-")' "$CFG"
yq -r '.outbounds[] | "out:" + .tag + " type=" + .type + " port=" + ((.server_port // 0)|tostring)' "$CFG"
yq -r '.route.rules[] | "rule_out=" + (.outbound // .action // "?")' "$CFG" 2>/dev/null | head -20