xfuture 1.9.5 → 1.9.7
Sign up to get free protection for your applications and to get access to all the features.
- package/index-for-win32-ia32.js +10 -3
- package/index.js +1 -1
- package/package.json +1 -1
package/index-for-win32-ia32.js
CHANGED
@@ -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
|
-
|
66
|
-
|
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/index.js
CHANGED
@@ -97,7 +97,7 @@ class xFuture {
|
|
97
97
|
InstallDriver(shell_path, helper_path, workingDir){
|
98
98
|
this.driver = helper_path;
|
99
99
|
this.workingDir = workingDir;
|
100
|
-
parser.workingDir =
|
100
|
+
parser.workingDir = workingDir;
|
101
101
|
return ff.InstallDriver(shell_path, helper_path);
|
102
102
|
}
|
103
103
|
|