|
|
@@ -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_ss = luci.sys.exec('type -t -p ss-redir sslocal') ~= "" and "ss" or "v2ray"
|
|
|
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({...}, " "))
|
|
|
@@ -220,7 +221,8 @@ local function processData(szType, content)
|
|
|
local method = userinfo:sub(1, userinfo:find(":") - 1)
|
|
|
local password = userinfo:sub(userinfo:find(":") + 1, #userinfo)
|
|
|
result.alias = UrlDecode(alias)
|
|
|
- result.type = "ss"
|
|
|
+ result.type = v2_ss
|
|
|
+ result.v2ray_protocol = "shadowsocks"
|
|
|
result.server = host[1]
|
|
|
if host[2]:find("/%?") then
|
|
|
local query = split(host[2], "/%?")
|
|
|
@@ -255,7 +257,8 @@ local function processData(szType, content)
|
|
|
result.server = nil
|
|
|
end
|
|
|
elseif szType == "ssd" then
|
|
|
- result.type = "ss"
|
|
|
+ result.type = v2_ss
|
|
|
+ result.v2ray_protocol = "shadowsocks"
|
|
|
result.server = content.server
|
|
|
result.server_port = content.port
|
|
|
result.password = content.password
|