luci-app-ssr-plus: bug fixes

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
Mattraks 2021-02-18 10:41:11 +08:00 committed by CN_SZTL
parent c5a0dafc1c
commit c9b8a0c7c9
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 2 additions and 3 deletions

View File

@ -139,8 +139,7 @@ _exit() {
}
first_type() {
local ret=$(which "/bin/${path_name}" "${TMP_BIN_PATH}/${path_name}" "${path_name}" "$@" | head -n1)
echo ${ret:=$@}
type -t -p "/bin/${1}" -p "${TMP_BIN_PATH}/${1}" -p "${1}" "$@" | head -n1
}
ln_start_bin() {

View File

@ -232,7 +232,7 @@ local function processData(szType, content)
local userinfo = hostInfo[1]
local password = userinfo
result.alias = UrlDecode(alias)
result.type = "trojan"
result.type = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray"
result.v2ray_protocol = "trojan"
result.server = host[1]
-- 按照官方的建议 默认验证ssl证书