From bca723f8a0bcdb58443593b125ed8b5a6a796708 Mon Sep 17 00:00:00 2001 From: Den Piligrim <89912505+vasiljevdenis@users.noreply.github.com> Date: Sat, 21 Mar 2026 15:29:44 +0300 Subject: [PATCH] fix patch links --- server/src/client/client.controller.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/server/src/client/client.controller.ts b/server/src/client/client.controller.ts index c32f912..da45a9c 100644 --- a/server/src/client/client.controller.ts +++ b/server/src/client/client.controller.ts @@ -155,11 +155,14 @@ export class ClientController { throw new HttpException('Subscription not found', HttpStatus.NOT_FOUND); } - let links = sub.inbounds - ?.map(i => i.link) - .filter(l => l && l.length > 0) || []; - - links = links.map(link => this.patchLink(link, relayHost)); + const links = sub.inbounds + ?.filter(i => i.link && i.link.length > 0) + .map(i => { + if (i.protocol === 'custom') { + return i.link; + } + return this.patchLink(i.link, relayHost); + }) || []; const plainTextList = links.join('\n'); const base64Config = Buffer.from(plainTextList).toString('base64');