Files
Hamza-AyedandClaude Opus 5 53322d87a6 feat: توجيه كل النداءات إلى api.intaleqapp.com وطيّ تبديل الدول
⚠️ الطيّ ضرورة أمان لا ترتيب: كل عائلة سيرفرات في links.dart كانت switch
بأربعة فروع (Syria · Egypt · Jordan · default)، وفروع سوريا ومصر تشير إلى
**سيرفرات سيرو الإنتاجية** (api-syria.siromove.com وغيرها). إبقاؤها في
انطلق يعني أن أي جهاز مخزَّن فيه countryCode='Syria' يخاطب إنتاج سيرو
مباشرة. انطلق نشرٌ واحد على مضيف واحد (docs/34: سيرفر لكل مستأجر)،
والدولة تُحل على السيرفر من GLOBAL_COUNTRY.

طُويت 35 كتلة switch إلى قيمة واحدة (11 rider · 11 driver · 6 admin ·
7 service)، والخريطة مأخوذة من تعليق docker/nginx/default.conf نفسه
(«نقطة واحدة لكل الخدمات — التطبيق يغيّر الدومين فقط»):
  server / rideServer   → https://api.intaleqapp.com/backend
  paymentServer         → https://api.intaleqapp.com/v2/main
  location              → …/backend/ride/location
  locationServerSide(د) → …/loction_server/siro/ride/location
  سوكيت الركاب          → https://api.intaleqapp.com:3030
  سوكيت السائقين        → https://api.intaleqapp.com:2020

وأيضاً:
- appDomain و invite: siromove.com → intaleqapp.com، والمجلد
  siromove.com/ → intaleqapp.com/ (فيه invite.php الذي يقصده التطبيق).
- روابط التنزيل siro.app → intaleqapp.com · بريد السائق المولَّد
  @siromove.com → @intaleqapp.com · صفحة التتبع · محاكاة تسجيل سوريا.
- حُذف getter `syria` الميت من links.dart الثلاثة (لا مستدعي له، وكان
  يشير إلى إنتاج سيرو).

لم يُمسّ عمداً:
- `ssl_pinning.dart`: `badCertificateCallback` لا يُستدعى إلا عند فشل
  التحقق العادي، فشهادة api.intaleqapp.com الصالحة تمرّ بلا مساس. ولا
  أختلق بصمة شهادة: تُضاف بصمة انطلق بعد إصدار الشهادة (docs/30 G7).
- `routesjo.intaleq.xyz` و `map-saas.intaleqapp.com`: خدمات خارجية قائمة
  بذاتها للمالك (قرار الخرائط المباشرة) لا تُنقل إلى api.
- `com.siromove.admin` في userAgentPackageName (5 مواضع): من عائلة هويات
  المتاجر — كوميت الهويات، وهو يحتاج قرار المالك.

⚠️ يحتاج نشراً على الطرف الآخر: invite.php و track/index.php و /driver
على intaleqapp.com.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 16:14:45 +03:00

139 lines
6.3 KiB
Dart

import '../env/env.dart';
import '../main.dart';
import 'box_name.dart';
class AppLink {
// static final String seferPaymentServer = Env.seferPaymentServer;
// // static final String seferPaymentServer = '${Env.seferCairoServer}/ride';
static final String seferAlexandriaServer = Env.seferAlexandriaServer;
static final String seferCairoServer = Env.seferCairoServer;
static final String seferGizaServer = Env.seferGizaServer;
static String get currentCountry => box.read('countryCode') ?? 'Jordan';
static String get paymentServer {
return 'https://api.intaleqapp.com/v2/main';
}
static String get locationServer {
return 'https://api.intaleqapp.com/loction_server/siro/ride/location';
}
static String get location => locationServer;
static String get locationServerSide => locationServer;
static String get mapSaasRoute {
return 'https://map-saas.intaleqapp.com/api/maps/route';
}
static String get mapSaasPlaces {
return 'https://map-saas.intaleqapp.com/api/geocoding/places';
}
static String get routeApiBaseUrl {
return 'https://routesjo.intaleq.xyz/route/v1/driving';
}
static String seferPaymentServer0 = box.read('seferPaymentServer');
static String get endPoint {
return 'https://api.intaleqapp.com/backend';
}
static String get rideServer {
return 'https://rides.intaleq.xyz/intaleq';
}
static String get getBestDriver => "$server/Admin/driver/getBestDriver.php";
static String get server => endPoint;
static final String jwtService = '$server/jwtService.php';
static String addError = "$server/Admin/errorApp.php";
// static final String endPoint = box.read(BoxName.serverChosen);
// static final String server = Env.seferCairoServer;
// static const String server = "https://sefer.click/sefer/sefer";
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
static String llama = 'https://api.llama-api.com/chat/completions';
static String getTokens = "$server/ride/firebase/get.php";
static String gemini =
'https://generativelanguage.googleapis.com/v1beta3/models/text-bison-001:generateText';
static String uploadEgypt = "$server/uploadEgypt.php";
static String auth = '$server/auth';
static String login = "$serviceApp/login.php";
static String register = "$serviceApp/register.php";
static String signUp = "$auth/signup.php";
static String sendVerifyEmail = "$auth/sendVerifyEmail.php";
static String passengerRemovedAccountEmail =
"$auth/passenger/remove_account.php";
static String verifyEmail = "$auth/verifyEmail.php";
static String getPromptDriverDocumentsEgypt =
"$server/auth/driver/getPromptDriverDocumentsEgypt.php";
//===================Auth Captin============
static String authCaptin = '$server/auth/captin';
static String loginCaptin = "$authCaptin/login.php";
static String signUpCaptin = "$authCaptin/register.php";
static String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php";
static String verifyEmailCaptin = "$authCaptin/verifyEmail.php";
static String removeUser = "$authCaptin/removeAccount.php";
static String deletecaptainAccounr = "$authCaptin/deletecaptainAccounr.php";
static String updateAccountBank = "$authCaptin/updateAccountBank.php";
static String getAccount = "$authCaptin/getAccount.php";
static String test = "$server/test.php";
static String serviceApp = "$server/serviceapp";
static String getPassengersByPhone = "$serviceApp/getPassengersByPhone.php";
static String getDriverByPhone = "$serviceApp/getDriverByPhone.php";
static String getDriverByNational = "$serviceApp/getDriverByNational.php";
static String updateDriver = "$serviceApp/updateDriver.php";
static String updateDriverToActive = "$serviceApp/updateDriverToActive.php";
static String getNewDriverRegister = "$serviceApp/getNewDriverRegister.php";
static String getDriversPhoneNotComplete =
"$serviceApp/getDriversPhoneNotComplete.php";
static String addWelcomeDriverNote = "$serviceApp/addWelcomeDriverNote.php";
static String getDriverNotCompleteRegistration =
"$serviceApp/getDriverNotCompleteRegistration.php";
static String deleteDriverNotCompleteRegistration =
"$serviceApp/deleteDriverNotCompleteRegistration.php";
static String getDriversWaitingActive =
"$serviceApp/getDriversWaitingActive.php";
static String getPassengersNotCompleteRegistration =
"$serviceApp/getPassengersNotCompleteRegistration.php";
static String addNotesDriver = "$serviceApp/addNotesDriver.php";
static String getDriverDetailsForActivate =
"$serviceApp/getDriverDetailsForActivate.php";
static String getCarPlateNotEdit = "$serviceApp/getCarPlateNotEdit.php";
static String getdriverWithoutCar = "$serviceApp/getdriverWithoutCar.php";
static String getBestDriverGiza =
"https://gizasefer.online/sefer/Admin/driver/getBestDriver.php";
static String getBestDriverAlexandria =
"$seferAlexandriaServer/Admin/driver/getBestDriver.php";
static String addNotesPassenger = "$serviceApp/addNotesPassenger.php";
static String editCarPlate = "$serviceApp/editCarPlate.php";
static String addDriverWantWork = "$serviceApp/work/addDriverWantWork.php";
static String addCarWantWork = "$serviceApp/work/addCarWantWork.php";
static String getComplaintAllData = "$serviceApp/getComplaintAllData.php";
static String getComplaintAllDataForDriver =
"$serviceApp/getComplaintAllDataForDriver.php";
static String rejectDriver = "$serviceApp/rejectDriver.php";
static String addCriminalDocuments = "$authCaptin/addCriminalDocuments.php";
static String ride = '$server/ride';
static String addRegisrationCar = "$ride/RegisrationCar/add.php";
static String addCartoDriver = "$serviceApp/addCartoDriver.php";
static String getRegisrationCar = "$ride/RegisrationCar/get.php";
static String updateRegisrationCar = "$ride/RegisrationCar/update.php";
static String detectCountryFromPhone(String phone) {
final clean = phone.replaceAll(RegExp(r'[^0-9]'), '');
if (clean.startsWith('962')) return 'Jordan';
if (clean.startsWith('963')) return 'Syria';
if (clean.startsWith('20')) return 'Egypt';
if (clean.startsWith('07') || clean.startsWith('7')) return 'Jordan';
if (clean.startsWith('09') || clean.startsWith('9')) return 'Syria';
if (clean.startsWith('01') || clean.startsWith('1')) return 'Egypt';
return '';
}
}