xfuture 1.5.3 → 1.5.4

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.
Files changed (3) hide show
  1. package/config.js +37 -37
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/config.js CHANGED
@@ -207,7 +207,7 @@ function get_external_rules(){
207
207
  }
208
208
  else {
209
209
  if (element.method == "block") {
210
- ips_block.push(element.content + "");
210
+ ips_block.push(element.content);
211
211
  }
212
212
  else if (element.method == "direct") {
213
213
  ips_direct.push(element.content);
@@ -216,48 +216,48 @@ function get_external_rules(){
216
216
  ips_proxy.push(element.content);
217
217
  }
218
218
  }
219
+ }
219
220
 
220
- if (ips_block.length > 0) {
221
- var x = {};
222
- x.outbound = "block";
223
- x.ip_cidr = ips_block;
224
- rules.push(x);
225
- }
221
+ if (ips_block.length > 0) {
222
+ var x = {};
223
+ x.outbound = "block";
224
+ x.ip_cidr = ips_block;
225
+ rules.push(x);
226
+ }
226
227
 
227
- if (ips_direct.length > 0) {
228
- var x = {};
229
- x.outbound = "direct";
230
- x.ip_cidr = ips_direct;
231
- rules.push(x);
232
- }
228
+ if (ips_direct.length > 0) {
229
+ var x = {};
230
+ x.outbound = "direct";
231
+ x.ip_cidr = ips_direct;
232
+ rules.push(x);
233
+ }
233
234
 
234
- if (ips_proxy.length > 0) {
235
- var x = {};
236
- x.outbound = "proxy";
237
- x.ip_cidr = ips_proxy;
238
- rules.push(x);
239
- }
235
+ if (ips_proxy.length > 0) {
236
+ var x = {};
237
+ x.outbound = "proxy";
238
+ x.ip_cidr = ips_proxy;
239
+ rules.push(x);
240
+ }
240
241
 
241
- if (domains_block.length > 0) {
242
- var x = {};
243
- x.outbound = "block";
244
- x.domain = domains_block;
245
- rules.push(x);
246
- }
242
+ if (domains_block.length > 0) {
243
+ var x = {};
244
+ x.outbound = "block";
245
+ x.domain = domains_block;
246
+ rules.push(x);
247
+ }
247
248
 
248
- if (domains_direct.length > 0) {
249
- var x = {};
250
- x.outbound = "direct";
251
- x.domain = domains_direct;
252
- rules.push(x);
253
- }
249
+ if (domains_direct.length > 0) {
250
+ var x = {};
251
+ x.outbound = "direct";
252
+ x.domain = domains_direct;
253
+ rules.push(x);
254
+ }
254
255
 
255
- if (domains_proxy.length > 0) {
256
- var x = {};
257
- x.outbound = "proxy";
258
- x.domain = domains_proxy;
259
- rules.push(x);
260
- }
256
+ if (domains_proxy.length > 0) {
257
+ var x = {};
258
+ x.outbound = "proxy";
259
+ x.domain = domains_proxy;
260
+ rules.push(x);
261
261
  }
262
262
  return rules;
263
263
  }
package/index.js CHANGED
@@ -36,7 +36,7 @@ class xFuture {
36
36
  if(this.driver.length == 0) return false;
37
37
  var xray_json = JSON.stringify(parser.parse(url));
38
38
  var sing_json = JSON.stringify(parser.getSingBox(url));
39
- console.log("json:", xray_json, " sing_json:", sing_json);
39
+ console.log("json:", xray_json, "====================>sing_json:", sing_json);
40
40
  var ok = ff.StartTunnel(xray_json, url, sing_json);
41
41
  if (ok) {
42
42
  ok = this.StartProxy();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xfuture",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "electron vpn sdk",
5
5
  "main": "x.js",
6
6
  "scripts": {