feat: мимикрия протокола (opcode 6 + LZ4) и фиксы UI (истории, 2FA)

This commit is contained in:
klockky
2026-06-02 18:28:31 +00:00
parent d35729e911
commit 5ff914b0dc
10 changed files with 177 additions and 40 deletions
+7 -7
View File
@@ -171,7 +171,7 @@ class Api {
String architecture = 'arm64';
String appVersion = SpoofingService.hardcodedAppVersion;
int buildNumber = SpoofingService.hardcodedBuildNumber;
String screen = '1920x1080';
String screen = '420dpi 420dpi 1080x2340';
tz.initializeTimeZones();
final timeZoneName = await FlutterTimezone.getLocalTimezone();
@@ -237,25 +237,25 @@ class Api {
_userAgent = {
'deviceType': deviceType,
'locale': locale,
'deviceLocale': deviceLocale,
'osVersion': osVersion,
'deviceName': deviceName,
'appVersion': appVersion,
'screen': screen,
'osVersion': osVersion,
'timezone': timezone,
'screen': screen,
'pushDeviceType': 'GCM',
'arch': architecture,
'locale': locale,
'buildNumber': buildNumber,
'deviceName': deviceName,
'deviceLocale': deviceLocale,
};
_deviceId = deviceId;
final payload = <dynamic, dynamic>{
'mt_instanceid': await DeviceIdentity.instanceId(),
'userAgent': _userAgent,
'clientSessionId': DeviceIdentity.clientSessionId,
'deviceId': deviceId,
'userAgent': _userAgent,
};
return sendRequest(Opcode.sessionInit, payload);
+5
View File
@@ -674,6 +674,11 @@ class AccountModule {
);
}
Future<TwoFactorDetails> get2faStatus() async {
final trackId = await enter2faPanel();
return get2faDetails(trackId);
}
Future<void> check2faPassword(String trackId, String password) async {
_ensureOnline();
final packet = await _api.sendRequest(Opcode.authLoginCheckPassword, {