func optimization

This commit is contained in:
Den Piligrim
2026-01-31 18:44:09 +03:00
parent 6db895bcc7
commit 27310c0bc0
39 changed files with 1989 additions and 539 deletions
@@ -4,7 +4,7 @@ import { v4 as uuidv4 } from 'uuid';
@Injectable()
export class InboundBuilderService {
private readonly flag = process.env.COUNTRY_FLAG ?? '%F0%9F%92%AF';
private flag = process.env.COUNTRY_FLAG ?? '%F0%9F%92%AF';
buildVlessRealityTcp(params: { port: number; uuid: string; domain: string; privateKey: string; publicKey: string }) {
const { port, uuid, domain, privateKey, publicKey } = params;
@@ -196,7 +196,8 @@ export class InboundBuilderService {
return uuidv4();
}
buildInboundLink(inbound: any, domain: string, idOrPass: string): string {
buildInboundLink(inbound: any, domain: string, idOrPass: string, flagEmoji: string): string {
this.flag = flagEmoji;
let link = "";
switch (inbound.protocol) {
@@ -286,7 +287,7 @@ export class InboundBuilderService {
id: uuid,
net: stream.network || "tcp",
path: "/",
port: inbound.port,
port: inbound.port.toString(),
ps: decodeURIComponent(this.flag) + ' ' + inbound.remark,
scy: "",
sni: "",