x3ui-api 1.0.9-1 → 1.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/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  A Node.js client for interacting with the x3ui panel API. This library provides a simple interface to manage X-UI inbounds, clients, and system statistics.
4
4
 
5
+ ## Requirements
6
+
7
+ - x3-ui v2.7.0 or higher (for lover x3-ui versions, use v1.0.9-1 version of this library)
8
+
5
9
  ## Installation
6
10
 
7
11
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x3ui-api",
3
- "version": "1.0.9-1",
3
+ "version": "1.1.0",
4
4
  "description": "API client for x3ui panel",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -11,8 +11,8 @@
11
11
  "author": "",
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
- "axios": "^1.8.2",
15
- "form-data": "^4.0.0"
14
+ "axios": "1.12.0",
15
+ "form-data": "4.0.4"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20.11.5"
@@ -46,7 +46,7 @@ module.exports = class X3UIClient {
46
46
  if (!this.isAuthed) {
47
47
  await this.login();
48
48
  }
49
- const response = await this.client.post('/server/status');
49
+ const response = await this.client.post('/panel/api/server/status');
50
50
  return response.data.obj;
51
51
  }
52
52
 
@@ -153,13 +153,14 @@ module.exports = class X3UIClient {
153
153
 
154
154
  /**
155
155
  * Get new X25519 certificate
156
+ * @deprecated Use {@link getNewVlessEnc} for new versions of X3-UI
156
157
  * @returns {Promise<{privateKey: string, publicKey: string}>} New X25519 key pair
157
158
  */
158
159
  async getNewX25519Cert() {
159
160
  if (!this.isAuthed) {
160
161
  await this.login();
161
162
  }
162
- const response = await this.client.post('/server/getNewX25519Cert');
163
+ const response = await this.client.post('/panel/api/server/getNewX25519Cert');
163
164
  return response.data.obj;
164
165
  }
165
166
  }