fix: correct small points

This commit is contained in:
divocat
2025-12-01 16:38:26 +02:00
parent 622e092317
commit dd3e70153a
8 changed files with 80 additions and 34 deletions

View File

@@ -96,14 +96,16 @@ export function validateHysteria2Url(url: string): ValidationResult {
) {
return {
valid: false,
message: 'Invalid HY2 URL: obfs-password required when obfs is set',
message: _(
'Invalid HY2 URL: obfs-password required when obfs is set',
),
};
}
if (paramsKeys.includes('sni') && !params.sni) {
return {
valid: false,
message: 'Invalid HY2 URL: sni cannot be empty',
message: _('Invalid HY2 URL: sni cannot be empty'),
};
}
}