File tree Expand file tree Collapse file tree 10 files changed +15
-2
lines changed
migrations/20251207150402_blank_sni
subscription-template/generators Expand file tree Collapse file tree 10 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ export namespace CreateHostCommand {
7272 ) ,
7373 isHidden : z . optional ( z . boolean ( ) . default ( false ) ) ,
7474 overrideSniFromAddress : z . optional ( z . boolean ( ) . default ( false ) ) ,
75+ keepSniBlank : z . optional ( z . boolean ( ) . default ( false ) ) ,
7576 allowInsecure : z . optional ( z . boolean ( ) . default ( false ) ) ,
7677 vlessRouteId : z . optional ( z . number ( ) . int ( ) . min ( 0 ) . max ( 65535 ) . nullable ( ) ) ,
7778 shuffleHost : z . optional ( z . boolean ( ) . default ( false ) ) ,
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ export namespace UpdateHostCommand {
7676 ) ,
7777 isHidden : z . optional ( z . boolean ( ) ) ,
7878 overrideSniFromAddress : z . optional ( z . boolean ( ) ) ,
79+ keepSniBlank : z . optional ( z . boolean ( ) ) ,
7980 vlessRouteId : z . optional ( z . number ( ) . int ( ) . min ( 0 ) . max ( 65535 ) . nullable ( ) ) ,
8081 allowInsecure : z . optional ( z . boolean ( ) ) ,
8182 shuffleHost : z . optional ( z . boolean ( ) ) ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export const HostsSchema = z.object({
2828 tag : z . string ( ) . nullable ( ) ,
2929 isHidden : z . boolean ( ) . default ( false ) ,
3030 overrideSniFromAddress : z . boolean ( ) . default ( false ) ,
31+ keepSniBlank : z . boolean ( ) . default ( false ) ,
3132 vlessRouteId : z . number ( ) . int ( ) . min ( 0 ) . max ( 65535 ) . nullable ( ) ,
3233 allowInsecure : z . boolean ( ) . default ( false ) ,
3334 shuffleHost : z . boolean ( ) ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @remnawave/backend-contract" ,
3- "version" : " 2.3.33 " ,
3+ "version" : " 2.3.35 " ,
44 "public" : true ,
55 "license" : " AGPL-3.0-only" ,
66 "description" : " A contract library for Remnawave Backend. It can be used in backend and frontend." ,
Original file line number Diff line number Diff line change 1+ -- AlterTable
2+ ALTER TABLE " hosts" ADD COLUMN " keep_sni_blank" BOOLEAN NOT NULL DEFAULT false;
Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ model Hosts {
283283 shuffleHost Boolean @default (false ) @map (" shuffle_host " )
284284 mihomoX25519 Boolean @default (false ) @map (" mihomo_x25519 " )
285285 xrayJsonTemplateUuid String ? @map (" xray_json_template_uuid " ) @db.Uuid
286+ keepSniBlank Boolean @default (false ) @map (" keep_sni_blank " )
286287
287288 tag String ? @map (" tag " )
288289 isHidden Boolean @default (false ) @map (" is_hidden " )
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export class HostsEntity implements Hosts {
2525 isHidden : boolean ;
2626
2727 overrideSniFromAddress : boolean ;
28+ keepSniBlank : boolean ;
2829 vlessRouteId : number | null ;
2930 shuffleHost : boolean ;
3031 mihomoX25519 : boolean ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ const entityToModel = (entity: HostsEntity): Hosts => {
3737 isHidden : entity . isHidden ,
3838
3939 overrideSniFromAddress : entity . overrideSniFromAddress ,
40-
40+ keepSniBlank : entity . keepSniBlank ,
4141 configProfileUuid : entity . configProfileUuid ,
4242 configProfileInboundUuid : entity . configProfileInboundUuid ,
4343
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export class HostResponseModel {
3030 public isHidden : boolean ;
3131
3232 public overrideSniFromAddress : boolean ;
33+ public keepSniBlank : boolean ;
3334 public vlessRouteId : number | null ;
3435
3536 public inbound : {
@@ -70,6 +71,7 @@ export class HostResponseModel {
7071 this . isHidden = data . isHidden ;
7172
7273 this . overrideSniFromAddress = data . overrideSniFromAddress ;
74+ this . keepSniBlank = data . keepSniBlank ;
7375 this . vlessRouteId = data . vlessRouteId ;
7476 this . inbound = {
7577 configProfileUuid : data . configProfileUuid ,
Original file line number Diff line number Diff line change @@ -428,6 +428,10 @@ export class FormatHostsService {
428428 sni = address ;
429429 }
430430
431+ if ( inputHost . keepSniBlank ) {
432+ sni = '' ;
433+ }
434+
431435 formattedHosts . push ( {
432436 remark : finalRemark ,
433437 address,
You can’t perform that action at this time.
0 commit comments