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');