|
@@ -24,6 +24,7 @@ local proxy = ucic:get_first(name, 'server_subscribe', 'proxy', '0')
|
|
|
local switch = ucic:get_first(name, 'server_subscribe', 'switch', '1')
|
|
|
local subscribe_url = ucic:get_first(name, 'server_subscribe', 'subscribe_url', {})
|
|
|
local filter_words = ucic:get_first(name, 'server_subscribe', 'filter_words', '过期时间/剩余流量')
|
|
|
+local v2_tj = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray"
|
|
|
local log = function(...)
|
|
|
print(os.date("%Y-%m-%d %H:%M:%S ") .. table.concat({...}, " "))
|
|
|
end
|
|
@@ -232,7 +233,7 @@ local function processData(szType, content)
|
|
|
local userinfo = hostInfo[1]
|
|
|
local password = userinfo
|
|
|
result.alias = UrlDecode(alias)
|
|
|
- result.type = "trojan"
|
|
|
+ result.type = v2_tj
|
|
|
result.v2ray_protocol = "trojan"
|
|
|
result.server = host[1]
|
|
|
-- 按照官方的建议 默认验证ssl证书
|