update-10.27
This commit is contained in:
parent
b6b437ecf8
commit
dda2d31901
|
@ -521,7 +521,11 @@ function action_rule_mode()
|
|||
local cn_port = cn_port()
|
||||
if not daip or not cn_port then return end
|
||||
info = json.parse(luci.sys.exec(string.format('curl -sL -m 3 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -XGET http://"%s":"%s"/configs', dase, daip, cn_port)))
|
||||
mode = info["mode"] or "rule"
|
||||
if info then
|
||||
mode = info["mode"]
|
||||
else
|
||||
mode = uci:get("openclash", "config", "proxy_mode") or "rule"
|
||||
end
|
||||
else
|
||||
mode = uci:get("openclash", "config", "proxy_mode") or "rule"
|
||||
end
|
||||
|
@ -591,7 +595,11 @@ function action_log_level()
|
|||
local cn_port = cn_port()
|
||||
if not daip or not cn_port then return end
|
||||
info = json.parse(luci.sys.exec(string.format('curl -sL -m 3 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -XGET http://"%s":"%s"/configs', dase, daip, cn_port)))
|
||||
level = info["log-level"] or "info"
|
||||
if info then
|
||||
level = info["log-level"]
|
||||
else
|
||||
level = uci:get("openclash", "config", "log_level") or "info"
|
||||
end
|
||||
else
|
||||
level = uci:get("openclash", "config", "log_level") or "info"
|
||||
end
|
||||
|
|
|
@ -162,9 +162,9 @@ end
|
|||
o = s:option(DummyValue, "udp", translate("UDP Support"))
|
||||
function o.cfgvalue(...)
|
||||
if Value.cfgvalue(...) == "true" then
|
||||
return translate("支持")
|
||||
return translate("Enable")
|
||||
elseif Value.cfgvalue(...) == "false" then
|
||||
return translate("不支持")
|
||||
return translate("Disable")
|
||||
else
|
||||
return translate("None")
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@ local dsp = require "luci.dispatcher"
|
|||
domain: pings[i].getAttribute("hint")
|
||||
},
|
||||
function(x, result) {
|
||||
pings[result.index].innerHTML = (result.ping ? "<b><font color=green>"+result.ping+"</font></b> ms" : "<b><font color=red><%: 检测失败 %></font></b>");
|
||||
pings[result.index].innerHTML = (result.ping ? "<b><font color=green>"+result.ping+"</font></b> ms" : "<b><font color=red><%:Test failed%></font></b>");
|
||||
}
|
||||
);
|
||||
XHR.poll(10,'<%=dsp.build_url("admin", "services", "openclash", "ping")%>',{
|
||||
|
@ -24,7 +24,7 @@ local dsp = require "luci.dispatcher"
|
|||
domain: pings[i].getAttribute("hint")
|
||||
},
|
||||
function(x, result) {
|
||||
pings[result.index].innerHTML = (result.ping ? "<b><font color=green>"+result.ping+"</font></b> ms" : "<b><font color=red><%: 检测失败 %></font></b>");
|
||||
pings[result.index].innerHTML = (result.ping ? "<b><font color=green>"+result.ping+"</font></b> ms" : "<b><font color=red><%:Test failed%></font></b>");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2450,3 +2450,5 @@ msgstr "未抓取到任何域名..."
|
|||
msgid "Will Run Once Immediately After Started, The Interval Does Not Need To Be Too Short (Take Effect Immediately After Commit)"
|
||||
msgstr "启动后会立即执行一次,间隔无需太短(修改后保存配置即可生效)"
|
||||
|
||||
msgid "Test failed"
|
||||
msgstr "检测失败"
|
|
@ -42,7 +42,7 @@ local function debug_getcon()
|
|||
if not addr then
|
||||
luci.sys.exec(string.format('echo "%s. SourceIP:【%s】 - Host:【%s】 - DestinationIP:【%s】 - Network:【%s】 - RulePayload:【%s】 - Lastchain:【%s】" >> /tmp/openclash_debug.log', i, (info.connections[i].metadata.sourceIP), host, (info.connections[i].metadata.destinationIP), (info.connections[i].metadata.network), (info.connections[i].rulePayload),(info.connections[i].chains[1])))
|
||||
elseif addr == "netflix-nflxvideo" then
|
||||
if string.match(host, "nflxvideo.net") then
|
||||
if string.match(host, "nflxvideo.net") or string.match(host, "amazonaws.com") then
|
||||
print(host)
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue