feat: support script engine probe

This commit is contained in:
ReaJason
2025-11-20 00:36:25 +08:00
parent fb5b39a4c6
commit cdb90b6cb1
16 changed files with 146 additions and 13 deletions
@@ -31,6 +31,7 @@ const PROBE_OPTIONS = [
{ value: "JDK" as const, label: "jdk" },
{ value: "Command" as const, label: "command" },
{ value: "Bytecode" as const, label: "bytecode" },
{ value: "ScriptEngine" as const, label: "script" },
] as const;
const MIDDLEWARE_OPTIONS = [
@@ -73,7 +74,7 @@ export default function MainConfigCard({ form, servers }: MainConfigCardProps) {
const filteredOptions = useMemo(() => {
const filterMap = {
ResponseBody: ["Command", "Bytecode"],
ResponseBody: ["Command", "Bytecode", "ScriptEngine"],
DNSLog: ["JDK", "Server"],
Sleep: ["Server"],
} as const;
@@ -207,12 +208,12 @@ export default function MainConfigCard({ form, servers }: MainConfigCardProps) {
const renderDynamicFields = useCallback(() => {
const isBodyMethod = watchedProbeMethod === "ResponseBody";
const isCommandOrBytecode =
watchedProbeContent === "Command" || watchedProbeContent === "Bytecode";
const needParam =
watchedProbeContent === "Command" || watchedProbeContent === "Bytecode" || watchedProbeContent === "ScriptEngine";
const isSleepMethod = watchedProbeMethod === "Sleep";
const isServerContent = watchedProbeContent === "Server";
if (isBodyMethod && isCommandOrBytecode) {
if (isBodyMethod && needParam) {
return RequestParamField;
}