# Mixed Marzban + Pasargad patch

This build allows each `marzban` panel to select its own API mode.

- New panels: choose **Marzban standard** or **Pasargad** immediately after selecting the Marzban panel family.
- Existing panels: Admin > Manage panels > select panel > **🧩 نوع مرزبان این پنل**.
- Existing installations are migrated lazily by adding `marzban_panel.marzban_mode`. Rows left as `auto` continue using the old global setting in `config.php`.
- User creation, user information, modification, inbound/proxy extraction, panel statistics, and product API inbound extraction now use the selected panel's mode.

Recommended after upload:
1. Keep a backup of the current installation and database.
2. Replace the project files with this patched build.
3. Open the bot admin panel and set the mode separately for each existing Marzban-family panel.
4. Re-run “تنظیم پروتکل و اینباند” for each panel/product once.
5. Create one low-volume test service on each panel before enabling sales.
