diff --git a/scripts/outbound-manager.sh b/scripts/outbound-manager.sh index c3ae946..0094147 100644 --- a/scripts/outbound-manager.sh +++ b/scripts/outbound-manager.sh @@ -2873,7 +2873,7 @@ remove_rule_from_config() { local rule_found=false while IFS= read -r line || [[ -n "$line" ]]; do - if [[ "$line" =~ ^[[:space:]]*-[[:space:]]*name:[[:space:]]*${rule_name}[[:space:]]*$ ]]; then + if [[ "$line" =~ ^[[:space:]]*-[[:space:]]*name:[[:space:]]*[\"']*${rule_name}[\"']*[[:space:]]*$ ]]; then in_target_rule=true rule_found=true continue @@ -3331,4 +3331,4 @@ prompt_config_sync() { # 如果脚本被直接执行 if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then manage_outbound -fi \ No newline at end of file +fi