diff --git a/frontend/src/lib/xray/forms/transport/HysteriaMasqueradeForm.tsx b/frontend/src/lib/xray/forms/transport/HysteriaMasqueradeForm.tsx
deleted file mode 100644
index 26c59847..00000000
--- a/frontend/src/lib/xray/forms/transport/HysteriaMasqueradeForm.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import { useTranslation } from 'react-i18next';
-import { Form, Input, InputNumber, Select, Switch } from 'antd';
-import type { FormInstance } from 'antd';
-
-import { HeaderMapEditor } from '@/components/form';
-
-const MASQ_PATH = ['streamSettings', 'hysteriaSettings', 'masquerade'];
-
-interface HysteriaMasqueradeFormProps {
- form: FormInstance;
-}
-
-export default function HysteriaMasqueradeForm({ form }: HysteriaMasqueradeFormProps) {
- const { t } = useTranslation();
- return (
- <>
-
-
- {() => {
- const m = form.getFieldValue(MASQ_PATH);
- return (
-
- form.setFieldValue(
- MASQ_PATH,
- checked
- ? {
- type: '', dir: '', url: '',
- rewriteHost: false, insecure: false,
- content: '', headers: {}, statusCode: 0,
- }
- : undefined,
- )
- }
- />
- );
- }}
-
-
-
- {() => {
- const m = form.getFieldValue(MASQ_PATH) as { type?: string } | undefined;
- if (!m) return null;
- return (
- <>
-
-
-
- {m.type === 'proxy' && (
- <>
-
-
-
-
-
-
-
-
-
- >
- )}
- {m.type === 'file' && (
-
-
-
- )}
- {m.type === 'string' && (
- <>
-
-
-
-
-
-
-
-
-
- >
- )}
- >
- );
- }}
-
- >
- );
-}
diff --git a/frontend/src/lib/xray/forms/transport/index.ts b/frontend/src/lib/xray/forms/transport/index.ts
index c9b18741..d2ab3e39 100644
--- a/frontend/src/lib/xray/forms/transport/index.ts
+++ b/frontend/src/lib/xray/forms/transport/index.ts
@@ -1,2 +1 @@
export { default as FinalMaskForm } from './FinalMaskForm';
-export { default as HysteriaMasqueradeForm } from './HysteriaMasqueradeForm';
diff --git a/frontend/src/pages/inbounds/form/protocols/hysteria.tsx b/frontend/src/pages/inbounds/form/protocols/hysteria.tsx
index 905f635c..5a933778 100644
--- a/frontend/src/pages/inbounds/form/protocols/hysteria.tsx
+++ b/frontend/src/pages/inbounds/form/protocols/hysteria.tsx
@@ -1,10 +1,11 @@
import { useTranslation } from 'react-i18next';
-import { Form, InputNumber, type FormInstance } from 'antd';
+import { Form, Input, InputNumber, Select, Switch, type FormInstance } from 'antd';
-import { HysteriaMasqueradeForm } from '@/lib/xray/forms/transport';
-import type { InboundFormValues } from '@/schemas/forms/inbound-form';
+import { HeaderMapEditor } from '@/components/form';
-export default function HysteriaFields({ form }: { form: FormInstance }) {
+const MASQ_PATH = ['streamSettings', 'hysteriaSettings', 'masquerade'];
+
+export default function HysteriaFields({ form }: { form: FormInstance }) {
const { t } = useTranslation();
return (
<>
@@ -21,7 +22,107 @@ export default function HysteriaFields({ form }: { form: FormInstance
-
+
+
+ {() => {
+ const m = form.getFieldValue(MASQ_PATH);
+ return (
+
+ form.setFieldValue(
+ MASQ_PATH,
+ checked
+ ? {
+ type: '', dir: '', url: '',
+ rewriteHost: false, insecure: false,
+ content: '', headers: {}, statusCode: 0,
+ }
+ : undefined,
+ )
+ }
+ />
+ );
+ }}
+
+
+
+ {() => {
+ const m = form.getFieldValue(MASQ_PATH) as { type?: string } | undefined;
+ if (!m) return null;
+ return (
+ <>
+
+
+
+ {m.type === 'proxy' && (
+ <>
+
+
+
+
+
+
+
+
+
+ >
+ )}
+ {m.type === 'file' && (
+
+
+
+ )}
+ {m.type === 'string' && (
+ <>
+
+
+
+
+
+
+
+
+
+ >
+ )}
+ >
+ );
+ }}
+
>
);
}
diff --git a/frontend/src/pages/xray/outbounds/transport/hysteria.tsx b/frontend/src/pages/xray/outbounds/transport/hysteria.tsx
index 38f0c171..8b45d082 100644
--- a/frontend/src/pages/xray/outbounds/transport/hysteria.tsx
+++ b/frontend/src/pages/xray/outbounds/transport/hysteria.tsx
@@ -1,10 +1,11 @@
import { useTranslation } from 'react-i18next';
-import { Form, Input, InputNumber, type FormInstance } from 'antd';
+import { Form, Input, InputNumber, Select, Switch, type FormInstance } from 'antd';
-import { HysteriaMasqueradeForm } from '@/lib/xray/forms/transport';
-import type { OutboundFormValues } from '@/schemas/forms/outbound-form';
+import { HeaderMapEditor } from '@/components/form';
-export default function HysteriaForm({ form }: { form: FormInstance }) {
+const MASQ_PATH = ['streamSettings', 'hysteriaSettings', 'masquerade'];
+
+export default function HysteriaForm({ form }: { form: FormInstance }) {
const { t } = useTranslation();
return (
<>
@@ -26,7 +27,108 @@ export default function HysteriaForm({ form }: { form: FormInstance
-
+
+
+
+ {() => {
+ const m = form.getFieldValue(MASQ_PATH);
+ return (
+
+ form.setFieldValue(
+ MASQ_PATH,
+ checked
+ ? {
+ type: '', dir: '', url: '',
+ rewriteHost: false, insecure: false,
+ content: '', headers: {}, statusCode: 0,
+ }
+ : undefined,
+ )
+ }
+ />
+ );
+ }}
+
+
+
+ {() => {
+ const m = form.getFieldValue(MASQ_PATH) as { type?: string } | undefined;
+ if (!m) return null;
+ return (
+ <>
+
+
+
+ {m.type === 'proxy' && (
+ <>
+
+
+
+
+
+
+
+
+
+ >
+ )}
+ {m.type === 'file' && (
+
+
+
+ )}
+ {m.type === 'string' && (
+ <>
+
+
+
+
+
+
+
+
+
+ >
+ )}
+ >
+ );
+ }}
+
>
);
}