xfuture 1.9.5 → 1.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  let os = require("os");
2
- const { spawn } = require('child_process')
2
+ const { spawn, spawnSync } = require('child_process')
3
3
  var isMac = false;
4
4
  const parser = require('./parser');
5
5
  const fs = require('fs');
@@ -62,8 +62,15 @@ class xFuture {
62
62
  }
63
63
 
64
64
  stopTunnelPrivate() {
65
- var driver = this.workingDir + "\\mao-dou-xray-vpn-driver.exe";
66
- spawn(driver, ["kill"]);
65
+ try {
66
+ var driver = this.workingDir + "\\mao-dou-xray-vpn-driver.exe";
67
+ spawnSync(driver, ["kill"]);
68
+ console.log("Driver killed");
69
+ }
70
+ catch (error) {
71
+ console.error('Error executing command:', error);
72
+ }
73
+
67
74
  }
68
75
 
69
76
  StopTunnel(){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xfuture",
3
- "version": "1.9.5",
3
+ "version": "1.9.6",
4
4
  "description": "electron vpn sdk",
5
5
  "main": "x.js",
6
6
  "scripts": {