fix patch links

This commit is contained in:
Den Piligrim
2026-03-21 15:29:44 +03:00
parent 21e4907aa2
commit bca723f8a0
+8 -5
View File
@@ -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');