mirror of
https://github.com/jerrykuku/luci-app-vssr.git
synced 2023-12-18 13:29:53 +08:00
修复部分订阅中节点名称含有NETWORK时 导致FLAG 识别为TW的问题
This commit is contained in:
parent
d39d753391
commit
31b636aa74
@ -89,8 +89,9 @@ function _M.get_flag(remark, host)
|
||||
|
||||
local iso_code = nil
|
||||
if (remark ~= nil) then
|
||||
remark = string.gsub(remark, "NETWORKS", "")
|
||||
for i, v in pairs(emoji_table) do
|
||||
if (string.find(string.lower(remark), string.lower(v))) then
|
||||
if (string.find(string.lower(remark), string.lower(v)) ~= nil) then
|
||||
iso_code = string.lower(iso_table[i])
|
||||
break
|
||||
end
|
||||
|
@ -1,7 +1,6 @@
|
||||
local ucursor = require 'luci.model.uci'.cursor()
|
||||
local name = 'vssr'
|
||||
local json = require 'luci.jsonc'
|
||||
local proto = 'socks'
|
||||
local socks_switch = ucursor:get_first(name, 'socks5_proxy', 'enable_server')
|
||||
local auth_type = ucursor:get_first(name, 'socks5_proxy', 'enable_auth')
|
||||
local local_port = ucursor:get_first(name, 'socks5_proxy', 'local_port')
|
||||
@ -15,7 +14,7 @@ local http_user = ucursor:get_first(name, 'http_proxy', 'http_user')
|
||||
local http_pass = ucursor:get_first(name, 'http_proxy', 'http_pass')
|
||||
|
||||
function gen_inbound(sw, auth_type, local_port, user, pass, proto)
|
||||
local bound = {}
|
||||
local bound
|
||||
if sw == 0 then
|
||||
bound = nil
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user