diff --git a/backend/src/core/proxy-utils/producers/clashmeta.js b/backend/src/core/proxy-utils/producers/clashmeta.js index a04ebfe1..6816d258 100644 --- a/backend/src/core/proxy-utils/producers/clashmeta.js +++ b/backend/src/core/proxy-utils/producers/clashmeta.js @@ -203,6 +203,9 @@ export default function ClashMeta_Producer() { const reg = /^(.*?)(?:\?ed=(\d+))?$/; // eslint-disable-next-line no-unused-vars const [_, path = '', ed = ''] = reg.exec(wsPath); + if (!proxy['ws-opts']) { + proxy['ws-opts'] = {}; + } proxy['ws-opts'].path = path; if (ed !== '') { proxy['ws-opts']['early-data-header-name'] =