3xui-api-client 3.0.1 β 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +300 -286
- package/index.d.ts +366 -49
- package/index.js +343 -56
- package/package.json +4 -8
- package/src/generators/CredentialGenerator.js +21 -18
- package/src/session/SessionManager.js +24 -1
- package/src/utils/ByteConversion.js +132 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.1.0] - 2026-06-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- π **Dual Panel Support** - Automatic panel version detection (modern React v2.x+ vs legacy Vue v1.x) with seamless fallback during login. This is also configurable via the `panelVersion` constructor option (`auto`, `modern`, `legacy`).
|
|
12
|
+
- Comprehensive Phase C API test coverage and documentation consolidation.
|
|
13
|
+
- π’ **Automatic GBβBytes Conversion** ([#6](https://github.com/iamhelitha/3xui-api-client/pull/6)) - `totalGB` values in `addClientWithCredentials`, `updateClientWithCredentials`, `addModernClient`, and `updateModernClient` are now automatically converted to bytes. Pass `totalGB: 100` and receive a proper 100 GB limit β no manual byte calculation needed. Includes safety warnings for suspiciously small values.
|
|
14
|
+
- π **`loginRetryBackoff` option** ([#7](https://github.com/iamhelitha/3xui-api-client/pull/7)) - Configurable delay (default **500 ms**) before each forced re-login on a `401` response. Prevents bursts of concurrent serverless cold starts from tripping fail2ban or 3x-ui login-rate limits. Set `loginRetryBackoff: 0` to disable.
|
|
15
|
+
- π **Session Security documentation** ([#7](https://github.com/iamhelitha/3xui-api-client/pull/7)) - New README section covering plaintext cookie storage trade-offs per store type, deterministic session key design, and serverless / multi-instance hardening guidance.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- π΄ **CRITICAL**: Fixed `updateUser` endpoint session breaking. Modifying admin credentials now automatically refreshes internal credentials and re-authenticates the session.
|
|
19
|
+
- Fixed `updateSetting` payload formatting by automatically merging updates with current settings before sending.
|
|
20
|
+
- Fixed `updateXrayConfig` to correctly accept and validate both configuration objects and JSON strings.
|
|
21
|
+
- π **Silent quota error** ([#6](https://github.com/iamhelitha/3xui-api-client/pull/6)) - Users passing `totalGB: 100` previously received a 100-byte limit instead of 100 GB. Closes [#5](https://github.com/iamhelitha/3xui-api-client/issues/5).
|
|
22
|
+
- Cleaned up obsolete testing scratch scripts.
|
|
23
|
+
- Fixed minor linting errors in `index.js`.
|
|
24
|
+
|
|
25
|
+
### Security
|
|
26
|
+
- Inline documentation added to `MemorySessionStore` and `DatabaseSessionStore` explicitly warning that session cookies (admin-equivalent credentials) are stored in plaintext and must be protected at the infrastructure level. Closes [#4](https://github.com/iamhelitha/3xui-api-client/issues/4).
|
|
27
|
+
|
|
8
28
|
## [3.0.1] - 2026-06-07
|
|
9
29
|
|
|
10
30
|
### Fixed
|