This commit is contained in:
Namhyeon Go 2020-11-25 17:08:17 +09:00
parent d9dbdd8d74
commit 55b88bf212
4 changed files with 17 additions and 9 deletions

View File

@ -11,7 +11,7 @@ var LDPlayer = require("lib/ldplayer");
var NoxPlayer = require("lib/noxplayer");
var token, userId;
var apiUrl = CONFIG.readConfig("/ApiUrl").first().getText();
var apiUrl = CONFIG.getValue("ApiUrl");
var servers = [];
var applications = [];
@ -293,7 +293,9 @@ if (typeof(token) !== "undefined") {
document.getElementById("btn_close").onclick = function() {
OldBrowser.close();
};
document.getElementById("version").innerHTML = "현재 버전: " + CONFIG.getValue("Version");
assign();
} else {
OldBrowser.setContent(FILE.readFile("app\\login.html", "utf-8"));

View File

@ -89,3 +89,11 @@
</div>
</div>
</div>
<div class="cell">
<div class="col">
<div class="float-right">
<span id="version">버전 정보를 확인하고 있습니다.</span>
</div>
</div>
</div>

View File

@ -3,8 +3,6 @@
////////////////////////////////////////////////////////////////////////
var XML = require("lib/xml");
var readConfig = function(path) {
return XML.load("config.xml").select("/Config" + path);
exports.getValue = function(key) {
return XML.load("config.xml").select("/Config/" + key).first().getText();
};
exports.readConfig = readConfig;

View File

@ -25,13 +25,13 @@ var ShadowsocksObject = function() {
"-s",
host,
"-p",
CONFIG.readConfig("/SSPort").first().getText(),
CONFIG.getValue("SSPort"),
"-l",
this.listenPort,
"-k",
CONFIG.readConfig("/SSPassword").first().getText(),
CONFIG.getValue("SSPassword"),
"-m",
CONFIG.readConfig("/SSCipher").first().getText()
CONFIG.getValue("SSCipher")
]);
sleep(1000);