3xui-api-client 1.0.0 → 2.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 +101 -3
- package/README.md +19 -150
- package/index.d.ts +398 -70
- package/index.js +715 -215
- package/package.json +113 -98
- package/src/builders/ProtocolBuilders.js +690 -0
- package/src/generators/CredentialGenerator.js +362 -0
- package/src/middleware/WebMiddleware.js +311 -0
- package/src/security/SecurityEnhancer.js +325 -0
- package/src/session/SessionManager.js +493 -0
- package/SECURITY.md +0 -150
package/package.json
CHANGED
|
@@ -1,98 +1,113 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "3xui-api-client",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "A Node.js client library for 3x-ui panel API
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./index.d.ts",
|
|
10
|
-
"require": "./index.js",
|
|
11
|
-
"import": "./index.mjs"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"test": "
|
|
16
|
-
"test:
|
|
17
|
-
"test:
|
|
18
|
-
"test:
|
|
19
|
-
"test:
|
|
20
|
-
"test:
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
},
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
}
|
|
98
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "3xui-api-client",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "A Node.js client library for 3x-ui panel API with built-in credential generation, session management, and web integration support",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"require": "./index.js",
|
|
11
|
+
"import": "./index.mjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "node test/main-test.js",
|
|
16
|
+
"test:jest": "jest",
|
|
17
|
+
"test:manual": "node test/main-test.js",
|
|
18
|
+
"test:main": "node test/main-test.js",
|
|
19
|
+
"test:login": "node test/login-test.js",
|
|
20
|
+
"test:inbounds": "node test/inbounds-test.js",
|
|
21
|
+
"test:create": "node test/create-inbound-test.js",
|
|
22
|
+
"lint": "eslint index.js src/",
|
|
23
|
+
"prepublishOnly": "echo 'Skipping tests for publishing'"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"3x-ui",
|
|
27
|
+
"3xui",
|
|
28
|
+
"api",
|
|
29
|
+
"client",
|
|
30
|
+
"vpn",
|
|
31
|
+
"proxy",
|
|
32
|
+
"panel",
|
|
33
|
+
"xray",
|
|
34
|
+
"v2ray",
|
|
35
|
+
"server-management",
|
|
36
|
+
"api-client",
|
|
37
|
+
"network-management",
|
|
38
|
+
"credential-generation",
|
|
39
|
+
"session-management",
|
|
40
|
+
"web-integration",
|
|
41
|
+
"express-middleware",
|
|
42
|
+
"nextjs",
|
|
43
|
+
"vless",
|
|
44
|
+
"vmess",
|
|
45
|
+
"trojan",
|
|
46
|
+
"shadowsocks",
|
|
47
|
+
"wireguard",
|
|
48
|
+
"reality"
|
|
49
|
+
],
|
|
50
|
+
"author": {
|
|
51
|
+
"name": "Helitha Guruge",
|
|
52
|
+
"email": "helithalochana@gmail.com",
|
|
53
|
+
"url": "https://github.com/iamhelitha"
|
|
54
|
+
},
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"type": "commonjs",
|
|
57
|
+
"repository": {
|
|
58
|
+
"type": "git",
|
|
59
|
+
"url": "git+https://github.com/iamhelitha/3xui-api-client.git"
|
|
60
|
+
},
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/iamhelitha/3xui-api-client/issues"
|
|
63
|
+
},
|
|
64
|
+
"homepage": "https://github.com/iamhelitha/3xui-api-client#readme",
|
|
65
|
+
"funding": {
|
|
66
|
+
"type": "github",
|
|
67
|
+
"url": "https://github.com/sponsors/iamhelitha"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=16.0.0",
|
|
71
|
+
"npm": ">=7.0.0"
|
|
72
|
+
},
|
|
73
|
+
"os": [
|
|
74
|
+
"linux",
|
|
75
|
+
"darwin",
|
|
76
|
+
"win32"
|
|
77
|
+
],
|
|
78
|
+
"files": [
|
|
79
|
+
"index.js",
|
|
80
|
+
"index.mjs",
|
|
81
|
+
"index.d.ts",
|
|
82
|
+
"src/",
|
|
83
|
+
"README.md",
|
|
84
|
+
"LICENSE",
|
|
85
|
+
"CHANGELOG.md",
|
|
86
|
+
"SECURITY.md",
|
|
87
|
+
"USAGE_EXAMPLES.md"
|
|
88
|
+
],
|
|
89
|
+
"dependencies": {
|
|
90
|
+
"axios": "^1.10.0"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"dotenv": "^16.5.0",
|
|
94
|
+
"jest": "^29.7.0",
|
|
95
|
+
"eslint": "^9.0.0",
|
|
96
|
+
"@eslint/js": "^9.0.0"
|
|
97
|
+
},
|
|
98
|
+
"jest": {
|
|
99
|
+
"testEnvironment": "node",
|
|
100
|
+
"collectCoverageFrom": [
|
|
101
|
+
"index.js",
|
|
102
|
+
"src/**/*.js"
|
|
103
|
+
],
|
|
104
|
+
"coverageDirectory": "coverage",
|
|
105
|
+
"testMatch": [
|
|
106
|
+
"**/test/**/*.js"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"publishConfig": {
|
|
110
|
+
"access": "public",
|
|
111
|
+
"registry": "https://registry.npmjs.org/"
|
|
112
|
+
}
|
|
113
|
+
}
|