Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
59f1b4e
chore: release v2.2.1
kastov Oct 26, 2025
4805e25
chore: release v2.2.2
kastov Oct 26, 2025
03d11c0
chore: release v2.2.3
kastov Oct 27, 2025
b72f651
chore: release v2.2.4
kastov Nov 2, 2025
faa3b83
chore: release v2.2.5
kastov Nov 2, 2025
ac9bcfd
chore: release v2.2.6
kastov Nov 6, 2025
1993c22
chore: release v2.3.0
kastov Dec 7, 2025
493d9e3
chore: release v2.3.1
kastov Dec 8, 2025
ac41e67
chore: release v2.3.2
kastov Dec 9, 2025
58f04bd
chore: release v2.4.0
kastov Dec 19, 2025
28fcd16
chore: release v2.4.1
kastov Dec 20, 2025
a6da063
chore: release v2.4.2
kastov Dec 20, 2025
8dc6cad
chore: release v2.4.3
kastov Dec 20, 2025
0f344f3
chore: release v2.4.4
kastov Dec 22, 2025
9f5ec03
chore: release v2.5.0
kastov Jan 7, 2026
9e5cc9d
chore: release v2.5.1
kastov Jan 7, 2026
38e5d89
chore: release v2.5.2
kastov Jan 7, 2026
010a0ec
chore: release v2.5.3
kastov Jan 9, 2026
8f8da19
chore: release v2.5.4
kastov Jan 16, 2026
248cfa2
chore: release v2.5.5
kastov Jan 17, 2026
57338d2
chore: release v2.5.6
kastov Jan 20, 2026
cc76d8f
chore: release v2.5.7
kastov Jan 21, 2026
43d6ee2
chore: release v2.6.0
kastov Jan 30, 2026
f4fbcce
chore: release v2.6.1
kastov Feb 16, 2026
3684048
chore: release v2.6.2
kastov Feb 24, 2026
59f2a02
chore: release v2.6.3
kastov Feb 25, 2026
02ea60a
fix: update default value for includeHiddenHosts in Mihomo generator …
kastov Feb 25, 2026
8f4c3e7
chore: release v2.6.4
kastov Feb 25, 2026
dd4fbba
feat: send x-hwid-limit header with false value when HWID is active a…
this-xkit Mar 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class MihomoGeneratorService {
const yamlConfig = yamlConfigDb as unknown as any;

const { remnawave, ...cleanConfig } = yamlConfig ?? {};
const includeHidden = remnawave?.includeHiddenHosts ?? true;
const includeHidden = remnawave?.includeHiddenHosts ?? false;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value for includeHiddenHosts has been changed from true to false on this line, but this breaking change is not mentioned in the PR description. The PR description states only subscription.service.ts is modified ("Один файл"), yet this file is also changed.

Mihomo/Stash users who have not explicitly set remnawave.includeHiddenHosts in their templates will silently lose hidden hosts from their subscriptions after this update — a breaking behavior change for existing deployments.

Please document this change in the PR description and consider whether existing users need migration guidance.


const data: ClashData = {
proxies: [],
Expand Down
35 changes: 30 additions & 5 deletions src/modules/subscription/subscription.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export class SubscriptionService {

const subscriptionSettings = srrContext.subscriptionSettings;

let hwidLimitHeader: string | undefined;

if (subscriptionSettings.hwidSettings.enabled) {
const isAllowed = await this.checkHwidDeviceLimit(
user.response,
Expand Down Expand Up @@ -199,6 +201,10 @@ export class SubscriptionService {

return response;
}

if (isAllowed.isOk && isAllowed.response.isNewDevice) {
hwidLimitHeader = 'false'; // v2rayTUN
}
} else {
await this.checkAndUpsertHwidUserDevice(user.response, hwidHeaders);
}
Expand Down Expand Up @@ -243,12 +249,18 @@ export class SubscriptionService {
hostsOverrides,
});

const headers = await this.getUserProfileHeadersInfo(
user.response,
isXrayExtSupported,
subscriptionSettings,
);

if (hwidLimitHeader !== undefined) {
headers['x-hwid-limit'] = hwidLimitHeader;
}

return new SubscriptionWithConfigResponse({
headers: await this.getUserProfileHeadersInfo(
user.response,
isXrayExtSupported,
subscriptionSettings,
),
headers,
body: subscription.subscription,
contentType: subscription.contentType,
});
Expand Down Expand Up @@ -321,6 +333,10 @@ export class SubscriptionService {

isHwidLimited = true;
}

if (isAllowed.isOk && isAllowed.response.isNewDevice) {
headers['x-hwid-limit'] = 'false'; // v2rayTUN
}
} else {
await this.checkAndUpsertHwidUserDevice(user, hwidHeaders);

Expand Down Expand Up @@ -778,6 +794,7 @@ export class SubscriptionService {
isSubscriptionAllowed: boolean;
maxDeviceReached: boolean;
hwidNotSupported: boolean;
isNewDevice: boolean;
}>
> {
try {
Expand All @@ -796,6 +813,7 @@ export class SubscriptionService {
isSubscriptionAllowed: true,
maxDeviceReached: false,
hwidNotSupported: false,
isNewDevice: false,
});
}

Expand All @@ -804,6 +822,7 @@ export class SubscriptionService {
isSubscriptionAllowed: false,
maxDeviceReached: false,
hwidNotSupported: true,
isNewDevice: false,
});
}

Expand All @@ -827,6 +846,7 @@ export class SubscriptionService {
isSubscriptionAllowed: true,
maxDeviceReached: false,
hwidNotSupported: false,
isNewDevice: false,
});
}
}
Expand All @@ -840,6 +860,7 @@ export class SubscriptionService {
isSubscriptionAllowed: false,
maxDeviceReached: true,
hwidNotSupported: false,
isNewDevice: false,
});
}

Expand All @@ -848,6 +869,7 @@ export class SubscriptionService {
isSubscriptionAllowed: false,
maxDeviceReached: true,
hwidNotSupported: false,
isNewDevice: false,
});
}

Expand All @@ -871,6 +893,7 @@ export class SubscriptionService {
isSubscriptionAllowed: false,
maxDeviceReached: true,
hwidNotSupported: false,
isNewDevice: false,
});
}

Expand All @@ -883,13 +906,15 @@ export class SubscriptionService {
isSubscriptionAllowed: true,
maxDeviceReached: false,
hwidNotSupported: false,
isNewDevice: true,
});
} catch (error) {
this.logger.error(`Error checking hwid device limit: ${error}`);
return ok({
isSubscriptionAllowed: false,
maxDeviceReached: true,
hwidNotSupported: false,
isNewDevice: false,
});
}
}
Expand Down