mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 21:51:04 +00:00
Update shadowsocks.js, wintap.js
This commit is contained in:
parent
741ff688bb
commit
97906e8296
|
@ -11,9 +11,9 @@ exports.require = global.require;
|
||||||
|
|
||||||
var arch = SYS.getArch();
|
var arch = SYS.getArch();
|
||||||
if(arch.indexOf("64") > -1) {
|
if(arch.indexOf("64") > -1) {
|
||||||
exports.binPath = "bin/shadowsocks-lib-mingw-x86_64/ss-local";
|
exports.binPath = "bin/shadowsocks-lib-mingw-x86_64/ss-local.exe";
|
||||||
} else {
|
} else {
|
||||||
exports.binPath = "bin/shadowsocks-lib-mingw-x86/ss-local";
|
exports.binPath = "bin/shadowsocks-lib-mingw-x86/ss-local.exe";
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getRandomInt = function(min, max) {
|
exports.getRandomInt = function(min, max) {
|
||||||
|
|
33
lib/wintap.js
Normal file
33
lib/wintap.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
// WindowsTAP API
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
var SHELL = require("lib/shell");
|
||||||
|
var SYS = require("lib/system");
|
||||||
|
|
||||||
|
exports.VERSIONINFO = "WindowsTAP Lib (wintap.js) version 0.1";
|
||||||
|
exports.global = global;
|
||||||
|
exports.require = global.require;
|
||||||
|
|
||||||
|
var arch = SYS.getArch();
|
||||||
|
if(arch.indexOf("64") > -1) {
|
||||||
|
exports.binPath = "bin/tap-windows-9.24.2/amd64/tapinstall.exe";
|
||||||
|
} else {
|
||||||
|
exports.binPath = "bin/tap-windows-9.24.2/i386/tapinstall.exe";
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.install = function(inf, id) {
|
||||||
|
return SHELL.exec([exports.binPath, "install", inf, id]);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.update = function(inf, id) {
|
||||||
|
return SHELL.exec([exports.binPath, "update", inf, id]);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.query = function(id) {
|
||||||
|
return SHELL.exec([exports.binPath, "hwids", id]);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.remove = function(id) {
|
||||||
|
return SHELL.exec([exports.binPath, "remove", id]);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user