From 82811645bffa18f0b22bd5605cb9b822ea2b31cc Mon Sep 17 00:00:00 2001 From: Den Piligrim <89912505+vasiljevdenis@users.noreply.github.com> Date: Sat, 21 Mar 2026 14:10:33 +0300 Subject: [PATCH] fix hy2 --- server/src/inbounds/inbound-builder.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/inbounds/inbound-builder.service.ts b/server/src/inbounds/inbound-builder.service.ts index 6e7f5f2..adc00ad 100644 --- a/server/src/inbounds/inbound-builder.service.ts +++ b/server/src/inbounds/inbound-builder.service.ts @@ -492,13 +492,13 @@ export class InboundBuilderService { if (fs.existsSync(configPath)) { const fileContent = fs.readFileSync(configPath, 'utf8'); - const authMatch = fileContent.match(/auth:\s*['"]?([^'"\n]+)['"]?/); + const authMatch = fileContent.match(/password:\s*['"]?([^'"\n]+)['"]?/); if (authMatch) auth = authMatch[1]; const obfsMatch = fileContent.match(/type:\s*['"]?(salamander)['"]?/); if (obfsMatch) obfs = obfsMatch[1]; - const passMatch = fileContent.match(/password:\s*['"]?([^'"\n]+)['"]?/); + const passMatch = fileContent.match(/salamander:[\s\S]*?password:\s*['"]?([^'"\n]+)['"]?/); if (passMatch) obfsPass = passMatch[1]; const listenMatch = fileContent.match(/listen:\s*['"]?:(\d+)['"]?/); @@ -512,7 +512,7 @@ export class InboundBuilderService { const params = new URLSearchParams(); params.set('insecure', '0'); - params.set('sni', sni); + params.set('sni', serverAddress); params.set('obfs', obfs); params.set('obfs-password', obfsPass);