This commit is contained in:
Alexey
2026-08-23 10:56:00 +03:00
parent 596149cab8
commit 840b6f563a
31 changed files with 232 additions and 346 deletions
+1 -6
View File
@@ -274,12 +274,7 @@ pub(super) fn mode_enabled_for_proto(
proto_tag: ProtoTag,
is_tls: bool,
) -> bool {
mode_enabled_for_proto_with_policy(
config,
proto_tag,
is_tls,
MtprotoModePolicy::Configured,
)
mode_enabled_for_proto_with_policy(config, proto_tag, is_tls, MtprotoModePolicy::Configured)
}
fn mode_enabled_for_proto_with_policy(
+11 -3
View File
@@ -203,15 +203,23 @@ where
}
let mut matched = exact_user_id.is_some_and(|user_id| try_user_id!(user_id));
if exact_user.is_none() && let Some(user_id) = sticky_ip_hint {
if exact_user.is_none()
&& let Some(user_id) = sticky_ip_hint
{
matched = try_user_id!(user_id);
}
if exact_user.is_none() && !matched && let Some(user_id) = preferred_user_id {
if exact_user.is_none()
&& !matched
&& let Some(user_id) = preferred_user_id
{
matched = try_user_id!(user_id);
}
if exact_user.is_none() && !matched && let Some(user_id) = sticky_prefix_hint {
if exact_user.is_none()
&& !matched
&& let Some(user_id) = sticky_prefix_hint
{
matched = try_user_id!(user_id);
}