xfuture 1.1.8 → 1.2.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/index.js CHANGED
@@ -22,6 +22,9 @@ class xFuture {
22
22
  }
23
23
 
24
24
  StartTunnel(url){
25
+ if (this.driver == null || this.driver == undefined) {
26
+ this.driver = "";
27
+ }
25
28
  if(this.driver.length == 0) return false;
26
29
  var json = JSON.stringify(parser.parse(url));
27
30
  console.log("json:", json);
@@ -71,12 +74,21 @@ class xFuture {
71
74
 
72
75
  ChangeURL(url){
73
76
  var json = JSON.stringify(parser.parse(url));
74
- return ff.ChangeURL(json, url);
77
+ return ff.ChangeURL(json, url, false);
75
78
  }
76
79
 
77
80
  SetGlobalMode(isGlobalMode, ipdir){
81
+ if (isGlobalMode == parser.isGlobalMode) {
82
+ return;
83
+ }
78
84
  parser.isGlobalMode = isGlobalMode;
79
85
  ff.SetGlobalMode(isGlobalMode, ipdir);
86
+ let K_Connected = 2;
87
+ if (this.GetCurrentStatus() == K_Connected) {
88
+ var url = this.GetCurrentURI();
89
+ var json = JSON.stringify(parser.parse(url));
90
+ this.ChangeURL(json, url, true);
91
+ }
80
92
  }
81
93
 
82
94
  // 1. Mac 请传 install_helper.sh 和 xfuture_helper 的绝对路径
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xfuture",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "description": "electron vpn sdk",
5
5
  "main": "x.js",
6
6
  "scripts": {