المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
43 lines
1.3 KiB
Dart
43 lines
1.3 KiB
Dart
import 'dart:convert';
|
|
import 'dart:io';
|
|
import 'package:crypto/crypto.dart';
|
|
import 'package:http/http.dart' as http;
|
|
import 'package:http/io_client.dart' as http_io;
|
|
|
|
class SslPinning {
|
|
SslPinning._();
|
|
|
|
static final Map<String, List<String>> _pins = {
|
|
'intaleq.xyz': [
|
|
'/tNRUeeLxUhQU5gbgdpVWC6QBGAqc/ujg8Kcf0wQiAM=',
|
|
'Hlx/0EWNDH5Xkt2KzvqxUzbw0vvEsyZSlibialSyGqI=',
|
|
],
|
|
'siromove.com': [
|
|
'C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHESsl=',
|
|
'diGVwiVYbubAI3RW4hB9xU8e/CH2GnkuvVFZE8zmgzI=',
|
|
],
|
|
};
|
|
|
|
static final List<String> _globalPins = [
|
|
'Ex/Od4QBaJmloAIDqe/IDxjrvXVYBxftwVU1gJMINuw=',
|
|
'lrzsBiZJdvN0YHeazyjFp8/oo8Cq4RqP/O4FwL3fCMY=',
|
|
'aXKbjhWobvwXelevtxcd/GSt0owvyozxUH40RTzLFHA=',
|
|
];
|
|
|
|
static http.Client createPinnedClient() {
|
|
final httpClient = HttpClient()
|
|
..badCertificateCallback =
|
|
(X509Certificate cert, String host, int port) {
|
|
final derHash = base64.encode(sha256.convert(cert.der).bytes);
|
|
for (final entry in _pins.entries) {
|
|
if (host == entry.key || host.endsWith('.${entry.key}')) {
|
|
if (entry.value.contains(derHash)) return true;
|
|
}
|
|
}
|
|
if (_globalPins.contains(derHash)) return true;
|
|
return false;
|
|
};
|
|
return http_io.IOClient(httpClient);
|
|
}
|
|
}
|