Integrates WARP (install, uninstall, configure, status) functionality
into the web panel's settings page. Users can now manage WARP
directly from the UI.
Adds a 'Configure' tab to the Normal Subscriptions section in Settings.
This tab allows users to view and edit the subpath for the NormalSub service.
- Modified settings.html:
- Added new tab link and pane for NormalSub subpath configuration.
- Tab is only visible and accessible if NormalSub service is active.
- Extended JavaScript:
- `sendRequest` function now accepts an optional `postSuccessCallback`.
- Added `isValidSubPath` for client-side validation.
- `updateServiceUI` now manages visibility of the 'Configure' tab and fetches current subpath.
- Implemented `fetchNormalSubPath` to get subpath via API.
- Implemented `editNormalSubPath` to save subpath via API.
- Integrated new input into `validateForm` and added real-time validation.
- Updated `updateDecoyStatusUI` and its calls from `setupDecoy`/`stopDecoy` to use the new `postSuccessCallback` pattern for consistency.
- Standardized form IDs (e.g., `telegram_form`, `port_form`) for better targeting in `validateForm` and `updateServiceUI`.
- Created `GetSubPathResponse` Pydantic schema for the API response.
- Added a new GET endpoint `/api/v1/config/normalsub/subpath` to fetch
the current NormalSub subpath using `cli_api.get_normalsub_subpath()`.
- Returns the subpath or null if not found/set.
This commit introduces a new PUT endpoint `/api/v1/config/normalsub/edit_subpath`
to allow modification of the NormalSub service's subpath.
- Added `EditSubPathInputBody` Pydantic model for request validation.
- Implemented the API endpoint in `normalsub.py` router, calling the
corresponding `cli_api.edit_normalsub_subpath` function.
- Includes error handling for validation and general exceptions.
- Display total user count in the card header.
- Add a new '#' column to the user table showing the row number.
- Sort the user list alphabetically by username (case-insensitive) using Jinja filter before rendering.
- Update JavaScript column index references (`td:eq(n)`) to reflect the added '#' column.
- Add POST `/api/v1/config/hysteria/webpanel/decoy/setup` endpoint to configure the decoy site.
- Add POST `/api/v1/config/hysteria/webpanel/decoy/stop` endpoint to remove the decoy site configuration.
- Implement `BackgroundTasks` for both endpoints to prevent Caddy service restarts from interrupting the API response.
- Add `SetupDecoyRequest` Pydantic schema for the setup endpoint payload.
- Add ability to configure a decoy site on port 443 while hiding the web panel
- Support both same-port and separate-port configurations
- Add commands to manage decoy sites: 'decoy' to add/configure and 'stopdecoy' to remove
- Ensure clean reversion of Caddy configuration when stopping decoy sites
- Make decoy path optional during panel startup
This enhancement improves obfuscation capabilities by serving legitimate-looking
content on standard HTTPS port while keeping the actual panel hidden behind a
secret path.
- Added user existence check before attempting removal
- Return 404 status code when user is not found
- Leveraged existing get_user functionality for consistency
- Separated HTTPException handling to preserve status codes
- Enhanced error handling to provide clearer feedback to API consumers