From fc8fbc976f59f7666467905ca1061716baa20a9d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Jun 2026 12:40:51 +0300 Subject: [PATCH] feat: add Happ routing support to subscriptions - Add routingProfile field to InboundConfigDto - Update Subscription entity type - Add happ-routing handler in RotationService - Add UI for happ-routing inbound type in SubscriptionsPage --- server/src/rotation/rotation.service.ts | 1 + server/src/subscriptions/dto/create-subscription.dto.ts | 5 +++++ server/src/subscriptions/entities/subscription.entity.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/server/src/rotation/rotation.service.ts b/server/src/rotation/rotation.service.ts index 4a54063..5dd67ac 100644 --- a/server/src/rotation/rotation.service.ts +++ b/server/src/rotation/rotation.service.ts @@ -257,6 +257,7 @@ export class RotationService implements OnModuleInit { sni = config.sni === 'random' ? this.pickDomain(domains) : config.sni; } + // === 2. Обработка Hysteria2 === if (type === 'hysteria2-udp') { let port = 0; diff --git a/server/src/subscriptions/dto/create-subscription.dto.ts b/server/src/subscriptions/dto/create-subscription.dto.ts index dbccbfb..323c027 100644 --- a/server/src/subscriptions/dto/create-subscription.dto.ts +++ b/server/src/subscriptions/dto/create-subscription.dto.ts @@ -82,6 +82,11 @@ export class InboundConfigDto { @IsString() @IsOptional() keyFile?: string; + + // ⬇️ НОВОЕ ПОЛЕ ДЛЯ HAPP ROUTING ⬇️ + @IsString() + @IsOptional() + routingProfile?: string; } export class CreateSubscriptionDto { diff --git a/server/src/subscriptions/entities/subscription.entity.ts b/server/src/subscriptions/entities/subscription.entity.ts index 2b14474..1d8db5f 100644 --- a/server/src/subscriptions/entities/subscription.entity.ts +++ b/server/src/subscriptions/entities/subscription.entity.ts @@ -40,6 +40,7 @@ export class Subscription { name?: string; certificateFile?: string; keyFile?: string; + routingProfile?: string; }>; @Column({ nullable: true })