3x-ui/web/html/modals
shatinz 3a57ebffe7 # Pull Request: Connection Reporting System & Improvements for Restricted Networks
## Description
This PR introduces a comprehensive **Connection Reporting System** designed to improve the reliability and monitoring of connections, specifically tailored for environments with restricted internet access (e.g., active censorship, GFW).

### Key Changes
1.  **New Reporting API (`/report`)**:
    *   Added `ReportController` and `ReportService` to handle incoming connection reports.
    *   Endpoint receives data such as `Latency`, `Success` status, `Protocol`, and Client Interface details.
    *   Data is persisted to the database via the new `ConnectionReport` model.

2.  **Subscription Link Updates**:
    *   Modified `subService` to append a `reportUrl` parameter to generated subscription links (VLESS, VMess, etc.).
    *   This allows compatible clients to automatically discover the reporting endpoint and send feedback.

3.  **Database Integration**:
    *   Added `ConnectionReport` schema to `database/model` and registered it in `database/db.go` for auto-migration.

## Why is this helpful for Restricted Internet Locations?
In regions with heavy internet censorship, connection stability is volatile.
*   **Dynamic Reporting Endpoint**: The `reportUrl` parameter embedded in the subscription link explicitly tells the client *where* to send connection data.
*   **Bypassing Blocking**: By decoupling the reporting URL from the node address, clients can ensure diagnostic data reaches the panel even if specific node IPs are being interfered with (assuming the panel itself is reachable).
*   **Real-time Network Intelligence**: This mechanism enables the panel to aggregate "ground truth" data from clients inside the restricted network (e.g., latency, accessibility of specific protocols), allowing admins to react faster to blocking events.
*   **Protocol Performance Tracking**: Allows comparison of different protocols (Reality vs. VLESS+TLS vs. Trojan) based on real-world latency and success rates from actual users.
*   **Rapid Troubleshooting**: Administrators can see connection quality trends and rotate IPs/domains proactively when success rates drop, minimizing downtime for users.

## Technical Details
*   **API Endpoint**: `POST /report`
*   **Payload Format**: JSON containing `SystemInfo` (Interface), `ConnectionQuality` (Latency, Success), and `ProtocolInfo`.
*   **Security**: Reports are tied to valid client request contexts (implementation detail: ensure endpoint is rate-limited or authenticated if necessary, though currently designed for open reporting from valid sub links).

## How to Test
1.  Update the panel.
2.  Generate a subscription link.
3.  Observe the `reportUrl` parameter in the link.
4.  Simulate a client POST to the report URL and verify the entry in the `ConnectionReports` table.
2026-02-04 13:30:00 +03:30
..
client_bulk_modal.html fix: sub enable warning 2025-08-04 19:09:01 +02:00
client_modal.html api (#3434) 2025-09-09 02:32:05 +02:00
dns_presets_modal.html better design for dns presets 2025-09-19 15:44:00 +02:00
inbound_info_modal.html # Pull Request: Connection Reporting System & Improvements for Restricted Networks 2026-02-04 13:30:00 +03:30
inbound_modal.html feat: Add WebSocket support for real-time updates and enhance VLESS settings (#3605) 2026-01-03 05:26:00 +01:00
prompt_modal.html Code refactoring (#2865) 2025-04-06 11:40:33 +02:00
qrcode_modal.html new: subJsonEnable 2025-09-18 13:56:04 +02:00
text_modal.html chore: create FileManager class for downloading files 2025-04-08 22:17:29 +07:00
two_factor_modal.html chore: reset two-factor authentication after changing admin credentials (#3029) 2025-07-02 11:25:25 +02:00
warp_modal.html chore: toasts translation refactoring 2025-05-09 10:46:29 +07:00
xray_balancer_modal.html Code refactoring (#2865) 2025-04-06 11:40:33 +02:00
xray_dns_modal.html max port to 65535 (#3536) 2025-09-23 19:43:56 +02:00
xray_fakedns_modal.html chore: add new dns features from v25.6.8 2025-06-18 23:24:18 +07:00
xray_outbound_modal.html Code refactoring (#2865) 2025-04-06 11:40:33 +02:00
xray_reverse_modal.html Code refactoring (#2865) 2025-04-06 11:40:33 +02:00
xray_rule_modal.html # Pull Request: Connection Reporting System & Improvements for Restricted Networks 2026-02-04 13:30:00 +03:30