xfuture 2.8.3 → 2.8.5

Sign up to get free protection for your applications and to get access to all the features.
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xfuture",
3
- "version": "2.8.3",
3
+ "version": "2.8.5",
4
4
  "description": "electron vpn sdk",
5
5
  "main": "x.js",
6
6
  "scripts": {
@@ -26,6 +26,7 @@
26
26
  "package/darwin/xFuture.node",
27
27
  "package/darwin/xfuture_helper",
28
28
  "package/darwin/install_helper.sh",
29
+ "package/darwin/xAdapter.framework",
29
30
  "package/darwin/xsing-box-exec",
30
31
  "package/win32/sysproxy.exe",
31
32
  "package/win32/xFuture.node",
package/parser.js CHANGED
@@ -16,9 +16,45 @@ class xParser {
16
16
  else if (uri.startsWith("trojan://")) {
17
17
  return this.parseTrojan(uri);
18
18
  }
19
+ else if (uri.startsWith("niuniu://")) {
20
+ return this.parseNiuniu(uri);
21
+ }
19
22
  return {};
20
23
  }
21
24
 
25
+ parseNiuniu(url){
26
+ url = url.substring(9);
27
+ var raw = url;
28
+
29
+ var info = raw.split("@");
30
+ if (info.length < 2) {
31
+ raw = this.decode(url);
32
+ info = raw.split("@");
33
+ }
34
+ if (info.length < 2) return {};
35
+ var config = info[1].split("?");
36
+ if (config.length < 2) return {};
37
+
38
+ var ipAddress = config[0].split(":");
39
+ if (ipAddress.length < 2) return {};
40
+
41
+ var address = ipAddress[0];
42
+ var port = ipAddress[1];
43
+ var suffix = config[1].split("#");
44
+ if (suffix.length < 2) return {};
45
+
46
+ var remark = suffix[1];
47
+
48
+ var base = {};
49
+
50
+ base.remark = remark;
51
+ base.address = address;
52
+ base.port = port * 1;
53
+
54
+ return base;
55
+
56
+ }
57
+
22
58
  parseSS(url){
23
59
  url = url.substring(5);
24
60
  if (url.includes("@")) {