Integrates WARP (install, uninstall, configure, status) functionality
into the web panel's settings page. Users can now manage WARP
directly from the UI.
- Add service status validation before editing subpath
- Use systemctl reload for Caddy config changes
- Add fallback to restart if reload fails
- Enhance user feedback with old/new subpath comparison
- Improve error handling and status verification
Refactored normalsub.py to use the user's password as the identifier in the subscription URL path instead of the username, enhancing privacy by making user enumeration harder.
fix: Changed DNS-over-HTTPS (DoH) implementation to standard UDP DNS resolution to prevent potential service disruptions in regions where HTTPS DNS domains may be blocked or restricted.
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.
- Added `edit_normalsub_subpath` function to `cli_api.py` to
interact with the `normalsub.sh edit_subpath` command, including
input validation for the new subpath.
- Updated the `normal-sub` command in `cli.py`:
- Added 'edit_subpath' as a valid action.
- Introduced a '--subpath' option for specifying the new path.
- Modified the command logic to call the new API function when
the 'edit_subpath' action is selected.
This commit introduces a new 'edit_subpath' command to the
normalsub.sh script. This allows users to change the SUBPATH
variable in the .env file and automatically restarts the
hysteria-normal-sub service to apply the changes.