更新
This commit is contained in:
@@ -27,7 +27,9 @@
|
||||
"Bash(RULES_DIR=\"/tmp/hysteria-rules\" RULES_LIBRARY=\"/tmp/hysteria-rules/rules-library.yaml\" RULES_STATE=\"/tmp/hysteria-rules/rules-state.yaml\" bash -c 'source scripts/outbound-manager.sh && init_rules_library && echo \"\"=== 规则库内容 ===\"\" && cat \"\"$RULES_LIBRARY\"\" 2>/dev/null || echo \"\"规则库文件不存在\"\"')",
|
||||
"Bash(RULES_LIBRARY=\"/tmp/hysteria-rules/rules-library.yaml\" bash -c '\nsource scripts/outbound-manager.sh\necho \"\"=== 调用 view_outbound_rules 函数 ===\"\"\nview_outbound_rules\necho \"\"\"\"\necho \"\"=== 调试解析过程 ===\"\"\nin_rules_section=false\necho \"\"开始解析 YAML 文件:\"\"\nwhile IFS= read -r line; do\n echo \"\"处理行: \\\"\"$line\\\"\"\"\"\n if [[ \"\"$line\"\" =~ ^rules:[[:space:]]*$ ]]; then\n echo \"\" → 进入 rules 段\"\"\n in_rules_section=true\n continue\n fi\n \n if [ \"\"$in_rules_section\"\" = true ]; then\n if [[ \"\"$line\"\" =~ ^([a-zA-Z_][a-zA-Z0-9_]*):[[:space:]]*$ ]]; then\n echo \"\" → 遇到顶级键,退出 rules 段\"\"\n break\n fi\n \n if [[ \"\"$line\"\" =~ ^[[:space:]]{2}([a-zA-Z_][a-zA-Z0-9_]+):[[:space:]]*$ ]]; then\n rule_name=\"\"${BASH_REMATCH[1]}\"\"\n echo \"\" → 找到规则: $rule_name\"\"\n fi\n fi\ndone < \"\"$RULES_LIBRARY\"\"\n')",
|
||||
"Bash(RULES_LIBRARY=\"/tmp/hysteria-rules/rules-library.yaml\" bash -c '\nsource scripts/outbound-manager.sh\necho \"\"=== 测试查看规则功能 ===\"\"\nview_outbound_rules\necho \"\"\"\"\necho \"\"=== 测试类型冲突检测 ===\"\"\necho \"\"检查 socks5 类型冲突:\"\"\ncheck_rule_type_conflict \"\"socks5\"\"\necho \"\"\"\"\necho \"\"检查 direct 类型冲突:\"\"\ncheck_rule_type_conflict \"\"direct\"\"\necho \"\"\"\"\necho \"\"检查不存在类型 (http) 冲突:\"\"\ncheck_rule_type_conflict \"\"http\"\"\n')",
|
||||
"Bash(RULES_LIBRARY=\"/tmp/hysteria-rules/rules-library.yaml\" bash -c '\nsource scripts/outbound-manager.sh\ninit_rules_library > /dev/null 2>&1\necho \"\"=== 测试类型冲突检测 ===\"\"\necho -n \"\"检查 socks5 类型冲突: \"\"\nif result=$(check_rule_type_conflict \"\"socks5\"\"); then\n echo \"\"找到冲突规则: $result\"\"\nelse\n echo \"\"无冲突\"\"\nfi\n\necho -n \"\"检查 direct 类型冲突: \"\"\nif result=$(check_rule_type_conflict \"\"direct\"\"); then\n echo \"\"找到冲突规则: $result\"\"\nelse\n echo \"\"无冲突\"\"\nfi\n\necho -n \"\"检查 http 类型冲突: \"\"\nif result=$(check_rule_type_conflict \"\"http\"\"); then\n echo \"\"找到冲突规则: $result\"\"\nelse\n echo \"\"无冲突\"\"\nfi\n')"
|
||||
"Bash(RULES_LIBRARY=\"/tmp/hysteria-rules/rules-library.yaml\" bash -c '\nsource scripts/outbound-manager.sh\ninit_rules_library > /dev/null 2>&1\necho \"\"=== 测试类型冲突检测 ===\"\"\necho -n \"\"检查 socks5 类型冲突: \"\"\nif result=$(check_rule_type_conflict \"\"socks5\"\"); then\n echo \"\"找到冲突规则: $result\"\"\nelse\n echo \"\"无冲突\"\"\nfi\n\necho -n \"\"检查 direct 类型冲突: \"\"\nif result=$(check_rule_type_conflict \"\"direct\"\"); then\n echo \"\"找到冲突规则: $result\"\"\nelse\n echo \"\"无冲突\"\"\nfi\n\necho -n \"\"检查 http 类型冲突: \"\"\nif result=$(check_rule_type_conflict \"\"http\"\"); then\n echo \"\"找到冲突规则: $result\"\"\nelse\n echo \"\"无冲突\"\"\nfi\n')",
|
||||
"Bash(head:*)",
|
||||
"Bash(do echo \"=== $script ===\")"
|
||||
],
|
||||
"deny": []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user