3x-ui/web/html
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
..
common feat: Real-time Outbound Traffic, UI Improvements & Fix (#3629) 2026-01-05 05:50:40 +01:00
component chore: use Intl for date formatting (#3588) 2025-12-03 23:37:27 +01:00
form # Pull Request: Connection Reporting System & Improvements for Restricted Networks 2026-02-04 13:30:00 +03:30
modals # Pull Request: Connection Reporting System & Improvements for Restricted Networks 2026-02-04 13:30:00 +03:30
settings # Pull Request: Connection Reporting System & Improvements for Restricted Networks 2026-02-04 13:30:00 +03:30
inbounds.html Enhance WebSocket client connection logic and improve event listener management (#3636) 2026-01-18 15:38:57 +01:00
index.html feat: Add WebSocket support for real-time updates and enhance VLESS settings (#3605) 2026-01-03 05:26:00 +01:00
login.html fix: login animation (#3559) 2025-09-25 15:16:50 +02:00
settings.html Fix: panel redirecting to old port after restart (#3594) 2026-01-03 03:05:10 +01:00
xray.html feat: Real-time Outbound Traffic, UI Improvements & Fix (#3629) 2026-01-05 05:50:40 +01:00