mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
fix
This commit is contained in:
parent
06798d8cd3
commit
b7622d0b6e
11
app/index.js
11
app/index.js
|
@ -6,12 +6,17 @@ var FILE = require("lib/file");
|
|||
var OldBrowser = require("lib/oldbrowser");
|
||||
var HTTP = require("lib/http");
|
||||
var SYS = require("lib/system");
|
||||
var SHELL = require("lib/shell");
|
||||
|
||||
var apiUrl = CONFIG.readConfig("/Config/ApiUrl").first().text;
|
||||
var token, userId;
|
||||
|
||||
var servers = [];
|
||||
|
||||
var assignStaticIP = function() {
|
||||
SHELL.runWindow("cscript app.js shadow");
|
||||
};
|
||||
|
||||
var getApplications = function() {
|
||||
var applications = [], xmlStrings = [];
|
||||
|
||||
|
@ -157,3 +162,9 @@ if (typeof(token) !== "undefined") {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("btn_assign").onclick = function() {
|
||||
assignStaticIP();
|
||||
};
|
||||
|
||||
|
|
|
@ -27,5 +27,6 @@
|
|||
<div class="col">
|
||||
<button id="btn_logout" class="button" type="button">로그아웃</button>
|
||||
<button id="btn_pingtest" class="button" type="button">속도 재측정</button>
|
||||
<button id="btn_assign" class="button" type="button">IP 적용</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
16
config.template.json
Normal file
16
config.template.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"server": "",
|
||||
"name_server": "https://1.1.1.1/dns-query",
|
||||
"windivert_filter_string": "outbound and (ip ? ip.DstAddr != 1.2.3.4 and ip.DstAddr != 1.1.1.1 : true)",
|
||||
"ip_cidr_rules": {
|
||||
"proxy": []
|
||||
},
|
||||
"app_rules": {
|
||||
"proxy": []
|
||||
},
|
||||
"domain_rules": {
|
||||
"proxy": [],
|
||||
"direct": [],
|
||||
"blocked": []
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
// Shadowsocks API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var CONFIG = require("lib/config");
|
||||
var SHELL = require("lib/shell");
|
||||
var SYS = require("lib/system");
|
||||
|
||||
|
@ -23,13 +24,13 @@ exports.connect = function(host) {
|
|||
"-s",
|
||||
host,
|
||||
"-p",
|
||||
__config.shadowsocks.port,
|
||||
CONFIG.readConfig("/Config/SSPort").first().text,
|
||||
"-l",
|
||||
listenPort,
|
||||
"-k",
|
||||
__config.shadowsocks.password,
|
||||
CONFIG.readConfig("/Config/SSPassword").first().text,
|
||||
"-m",
|
||||
__config.shadowsocks.cipher
|
||||
CONFIG.readConfig("/Config/SSCipher").first().text
|
||||
], true);
|
||||
|
||||
return listenPort;
|
||||
|
|
|
@ -62,6 +62,14 @@ exports.run = function(cmd, fork) {
|
|||
WSH.Run(c, 0, !fork);
|
||||
};
|
||||
|
||||
exports.runWindow = function(cmd, fork) {
|
||||
var WSH = CreateObject("WScript.Shell");
|
||||
var fork = (typeof(fork) !== "undefined") ? fork : true;
|
||||
var c = "%comspec% /q /c (" + makeCommand(cmd) + ")";
|
||||
console.info("run() -> " + c);
|
||||
WSH.Run(c, 1, !fork);
|
||||
}
|
||||
|
||||
exports.createProcess = function(cmd) {
|
||||
var WSH = CreateObject("WScript.Shell");
|
||||
return WSH.Exec(makeCommand(cmd));
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
var SS = require("lib/shadowsocks");
|
||||
var SHELL = require("lib/shell");
|
||||
var SYS = require("lib/system");
|
||||
var LDPlayer = require("lib/ldplayer");
|
||||
var NoxPlayer = require("lib/noxplayer");
|
||||
var XML = require("lib/xml");
|
||||
|
@ -34,10 +35,10 @@ for (var i = 0; i < items.length; i++) {
|
|||
|
||||
exports.main = function() {
|
||||
console.info("Waiting new launched");
|
||||
sleep(10000);
|
||||
sleep(3000);
|
||||
|
||||
while (true) {
|
||||
sleep(10000);
|
||||
sleep(3000);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// LDPlayer
|
||||
|
@ -82,7 +83,7 @@ exports.main = function() {
|
|||
_NumBridges = NumBridges;
|
||||
|
||||
console.info("Waiting new launched");
|
||||
sleep(10000);
|
||||
sleep(3000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,7 +130,7 @@ exports.main = function() {
|
|||
_NumBridges = NumBridges;
|
||||
|
||||
console.info("Waiting new launched");
|
||||
sleep(10000);
|
||||
sleep(3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
17
staticip.xml
17
staticip.xml
|
@ -2,7 +2,22 @@
|
|||
<StaticIP>
|
||||
<Item>
|
||||
<Name>LDPlayer</Name>
|
||||
<UniqueID>demo</UniqueID>
|
||||
<UniqueID>LDPlayer</UniqueID>
|
||||
<IPAddress>211.238.32.1</IPAddress>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name>LDPlayer</Name>
|
||||
<UniqueID>LDPlayer-1</UniqueID>
|
||||
<IPAddress>211.238.32.2</IPAddress>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name>NoxPlayer</Name>
|
||||
<UniqueID>android-aed983db1d1b8175</UniqueID>
|
||||
<IPAddress>211.238.32.1</IPAddress>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name>NoxPlayer</Name>
|
||||
<UniqueID>android-1a0ac5d05d29cb4c</UniqueID>
|
||||
<IPAddress>211.238.32.2</IPAddress>
|
||||
</Item>
|
||||
</StaticIP>
|
1
token.txt
Normal file
1
token.txt
Normal file
|
@ -0,0 +1 @@
|
|||
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNjA0NTY1NDQ4LCJ0dGwiOjIwLCJ0eXBlIjoiYXV0aCIsImtleSI6Ijg1N2NlZDg1LTMzOWEtNDViNS04YTQ5LTJjOGM0YmE4ZDVmNCIsInByb2plY3QiOiJuZXRzb2xpZCJ9.1kpN2lnVJs_grRtSKMhIFVxdDsOnttr5IaQ8SEKVISA
|
1
userid.txt
Normal file
1
userid.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
Loading…
Reference in New Issue
Block a user