mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:04:42 +00:00
fix: refine clash pattern matching for data protection and improve spinner handling
This commit is contained in:
@@ -280,9 +280,18 @@ readonly DATA_PROTECTED_BUNDLES=(
|
|||||||
"com.telerik.Fiddler"
|
"com.telerik.Fiddler"
|
||||||
"com.usebruno.app"
|
"com.usebruno.app"
|
||||||
|
|
||||||
# Network Proxy & VPN Tools
|
# Network Proxy & VPN Tools (Clash variants - use specific patterns to avoid false positives)
|
||||||
"*clash*"
|
"com.clash.*"
|
||||||
"*Clash*"
|
"ClashX*"
|
||||||
|
"clash-*"
|
||||||
|
"Clash-*"
|
||||||
|
"*-clash"
|
||||||
|
"*-Clash"
|
||||||
|
"clash.*"
|
||||||
|
"Clash.*"
|
||||||
|
"clash_*"
|
||||||
|
"clashverge*"
|
||||||
|
"ClashVerge*"
|
||||||
"com.nssurge.surge-mac"
|
"com.nssurge.surge-mac"
|
||||||
"*surge*"
|
"*surge*"
|
||||||
"*Surge*"
|
"*Surge*"
|
||||||
@@ -678,10 +687,10 @@ should_protect_data() {
|
|||||||
com.sublimetext.* | com.sublimehq.* | Cursor | Claude | ChatGPT | Ollama)
|
com.sublimetext.* | com.sublimehq.* | Cursor | Claude | ChatGPT | Ollama)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
com.nssurge.* | com.v2ray.* | ClashX* | Surge* | Shadowrocket* | Quantumult*)
|
com.nssurge.* | com.v2ray.* | com.clash.* | ClashX* | Surge* | Shadowrocket* | Quantumult*)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
*clash* | *Clash*)
|
clash-* | Clash-* | *-clash | *-Clash | clash.* | Clash.* | clash_* | clashverge* | ClashVerge*)
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
com.docker.* | com.getpostman.* | com.insomnia.*)
|
com.docker.* | com.getpostman.* | com.insomnia.*)
|
||||||
|
|||||||
@@ -626,12 +626,12 @@ start_section_spinner() {
|
|||||||
# Stop spinner and clear the line
|
# Stop spinner and clear the line
|
||||||
# Usage: stop_section_spinner
|
# Usage: stop_section_spinner
|
||||||
stop_section_spinner() {
|
stop_section_spinner() {
|
||||||
# Only clear line if spinner was actually running
|
# Always try to stop spinner (function handles empty PID gracefully)
|
||||||
if [[ -n "${INLINE_SPINNER_PID:-}" ]]; then
|
stop_inline_spinner 2> /dev/null || true
|
||||||
stop_inline_spinner 2> /dev/null || true
|
# Always clear line to handle edge cases where spinner output remains
|
||||||
if [[ -t 1 ]]; then
|
# (e.g., spinner was stopped elsewhere but line not cleared)
|
||||||
echo -ne "\r\033[2K" >&2 || true
|
if [[ -t 1 ]]; then
|
||||||
fi
|
printf "\r\033[2K" >&2 || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user