xfuture 1.2.3 → 1.2.5

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
@@ -37,6 +37,7 @@ class xFuture {
37
37
 
38
38
  StopTunnel(){
39
39
  ff.StopTunnel();
40
+ this.StopProxy();
40
41
  }
41
42
 
42
43
  StartProxy(){
@@ -78,11 +79,12 @@ class xFuture {
78
79
  }
79
80
 
80
81
  SetGlobalMode(isGlobalMode, ipdir){
82
+ console.log("isGlobalMode:", isGlobalMode, " dir:", ipdir);
83
+ ff.SetGlobalMode(isGlobalMode, ipdir);
81
84
  if (isGlobalMode == parser.isGlobalMode) {
82
85
  return;
83
86
  }
84
87
  parser.isGlobalMode = isGlobalMode;
85
- ff.SetGlobalMode(isGlobalMode, ipdir);
86
88
  let K_Connected = 2;
87
89
  if (this.GetCurrentStatus() == K_Connected) {
88
90
  var url = this.GetCurrentURI();
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xfuture",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "electron vpn sdk",
5
5
  "main": "x.js",
6
6
  "scripts": {
@@ -30,8 +30,8 @@
30
30
  "package/windows/sysproxy.exe",
31
31
  "package/windows/xFuture.node",
32
32
  "package/windows/xray.dll",
33
- "package/resources/geoip.dat",
34
- "package/resources/geosite.dat"
33
+ "resources/geoip.dat",
34
+ "resources/geosite.dat"
35
35
  ],
36
36
  "build": {
37
37
  "mac": {
package/parser.js CHANGED
@@ -58,7 +58,7 @@ class xParser {
58
58
  var password = accountPasswords[1];
59
59
  var routing = {};
60
60
  var rules = [];
61
- if (this.isGlobalMode) {
61
+ if (!this.isGlobalMode) {
62
62
  rules = this.getRules();
63
63
  routing.domainStrategy = "IPIfNonMatch";
64
64
  }
@@ -110,7 +110,7 @@ class xParser {
110
110
 
111
111
  var routing = {};
112
112
  var rules = [];
113
- if (this.isGlobalMode) {
113
+ if (!this.isGlobalMode) {
114
114
  rules = this.getRules();
115
115
  routing.domainStrategy = "IPIfNonMatch";
116
116
  }
@@ -154,7 +154,7 @@ class xParser {
154
154
  var remark = suffix[1];
155
155
  var routing = {};
156
156
  var rules = [];
157
- if (this.isGlobalMode) {
157
+ if (!this.isGlobalMode) {
158
158
  rules = this.getRules();
159
159
  routing.domainStrategy = "IPIfNonMatch";
160
160
  }
@@ -184,7 +184,7 @@ class xParser {
184
184
  }
185
185
  var routing = {};
186
186
  var rules = [];
187
- if (this.isGlobalMode) {
187
+ if (!this.isGlobalMode) {
188
188
  rules = this.getRules();
189
189
  routing.domainStrategy = "IPIfNonMatch";
190
190
  }
@@ -202,7 +202,7 @@ class xParser {
202
202
 
203
203
  getRules() {
204
204
  var rules = [];
205
- if (this.isGlobalMode) {
205
+ if (!this.isGlobalMode) {
206
206
  var A = {};
207
207
  A.type = "field";
208
208
  A.domain = ["geosite:cn"];
@@ -211,13 +211,13 @@ class xParser {
211
211
 
212
212
  var B = {};
213
213
  B.type = "field";
214
- B.domain = ["geosite:cn"];
214
+ B.ip = ["geoip:private", "geoip:cn"];
215
215
  B.outboundTag = "direct";
216
216
  rules.push(B);
217
217
 
218
218
  var C = {};
219
219
  C.type = "field";
220
- C.domain = ["geosite:cn"];
220
+ C.domain = ["geosite:geolocation-!cn"];
221
221
  C.outboundTag = "direct";
222
222
  rules.push(C);
223
223
  }
@@ -261,7 +261,7 @@ class xParser {
261
261
  "outbounds":[
262
262
  {
263
263
  "protocol": "freedom",
264
- "tag": "direct"
264
+ "tag": "proxy"
265
265
  },
266
266
  {
267
267
  "protocol": "freedom",
@@ -270,8 +270,8 @@ class xParser {
270
270
  {
271
271
  "settings": {
272
272
  "response": {
273
- "type": "http"
274
- }
273
+ "type": "http"
274
+ }
275
275
  },
276
276
  "protocol": "blackhole",
277
277
  "tag": "block"
Binary file