diff --git a/frontend/src/pages/inbounds/InboundFormModal.new.tsx b/frontend/src/pages/inbounds/InboundFormModal.new.tsx index eb3f7f40..1c182e97 100644 --- a/frontend/src/pages/inbounds/InboundFormModal.new.tsx +++ b/frontend/src/pages/inbounds/InboundFormModal.new.tsx @@ -16,6 +16,7 @@ import { Typography, message, } from 'antd'; +import { SyncOutlined } from '@ant-design/icons'; import { HttpUtil, NumberFormatter, RandomUtil, SizeFormatter } from '@/utils'; import { @@ -23,6 +24,8 @@ import { formValuesToWirePayload, } from '@/lib/xray/inbound-form-adapter'; import { createDefaultInboundSettings } from '@/lib/xray/inbound-defaults'; +import { isSS2022 } from '@/lib/xray/protocol-capabilities'; +import { SSMethodSchema } from '@/schemas/protocols/inbound/shadowsocks'; import { InboundFormBaseSchema, InboundFormSchema, @@ -95,6 +98,11 @@ export default function InboundFormModalNew({ const isNodeEligible = NODE_ELIGIBLE_PROTOCOLS.has(protocol); const sniffingEnabled = Form.useWatch(['sniffing', 'enabled'], form) ?? false; const vlessEncryption = Form.useWatch(['settings', 'encryption'], form) ?? ''; + const ssMethod = Form.useWatch(['settings', 'method'], form); + const isSSWith2022 = isSS2022({ + protocol, + settings: typeof ssMethod === 'string' ? { method: ssMethod } : {}, + }); const matchesVlessAuth = ( block: { id?: string; label?: string } | undefined | null, @@ -326,6 +334,61 @@ export default function InboundFormModalNew({ const protocolTab = ( <> + {protocol === Protocols.SHADOWSOCKS && ( + <> +