luci-app-clash: bump to 1.5.7b
This commit is contained in:
parent
4250c87510
commit
99693c81be
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-clash
|
||||
PKG_VERSION:=1.5.5
|
||||
PKG_VERSION:=1.5.8
|
||||
PKG_MAINTAINER:=frainzy1477
|
||||
|
||||
|
||||
@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/luci-app-clash
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
SUBMENU:=3. Applications
|
||||
SUBMENU:=2. Clash
|
||||
TITLE:=LuCI app for clash
|
||||
DEPENDS:=+luci-base +luci-compat +wget +iptables +coreutils-base64 +coreutils +coreutils-nohup +bash +ipset +libustream-openssl +libopenssl +openssl-util +curl +jsonfilter +ca-certificates
|
||||
DEPENDS:=+luci-compat +luci-base +wget +iptables +coreutils-base64 +coreutils +coreutils-nohup +bash +ipset +libustream-openssl +libopenssl +openssl-util +curl +jsonfilter +ca-certificates
|
||||
PKGARCH:=all
|
||||
MAINTAINER:=frainzy1477
|
||||
endef
|
||||
@ -68,6 +68,7 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
mv /usr/share/clash/config/sub/config.yaml /usr/share/clashbackup/config.bak1 2>/dev/null
|
||||
mv /usr/share/clash/config/upload/config.yaml /usr/share/clashbackup/config.bak2 2>/dev/null
|
||||
mv /usr/share/clash/config/custom/config.yaml /usr/share/clashbackup/config.bak3 2>/dev/null
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -83,7 +84,7 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
mv /usr/share/clashbackup/config.bak2 /usr/share/clash/config/upload/config.yaml 2>/dev/null
|
||||
mv /usr/share/clashbackup/config.bak3 /usr/share/clash/config/custom/config.yaml 2>/dev/null
|
||||
/etc/init.d/clash disable 2>/dev/null
|
||||
uci set clash.config.p_mode="Rule" && uci commit clash 2>/dev/null
|
||||
uci set clash.config.p_mode="Rule" && uci set clash.config.auto_clear_log="1" && uci set clash.config.auto_update="1" && uci set clash.config.auto_update_time="12" && uci set clash.config.clear_time="12" && uci commit clash 2>/dev/null
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -105,8 +106,10 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/dashboard
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/dashboard/img
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/dashboard/js
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/yacd
|
||||
$(INSTALL_DIR) $(1)/etc/clash/clashtun
|
||||
$(INSTALL_DIR) $(1)/etc/clash/dtun
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/usr/share/clashbackup
|
||||
$(INSTALL_DIR) $(1)/etc/clash/provider
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/config
|
||||
@ -138,10 +141,11 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/clash.txt $(1)/usr/share/clash/
|
||||
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/index.html $(1)/usr/share/clash/dashboard/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/main.0bddb85299f970595cb5.css $(1)/usr/share/clash/dashboard/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/main.f302eae39f433a9c3fa1.css $(1)/usr/share/clash/dashboard/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/img/33343e6117c37aaef8886179007ba6b5.png $(1)/usr/share/clash/dashboard/img/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/1.bundle.0bddb85299f970595cb5.min.js $(1)/usr/share/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/bundle.0bddb85299f970595cb5.min.js $(1)/usr/share/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/1.bundle.f302eae39f433a9c3fa1.min.js $(1)/usr/share/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/bundle.f302eae39f433a9c3fa1.min.js $(1)/usr/share/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/yacd/* $(1)/usr/share/clash/yacd/
|
||||
|
||||
$(INSTALL_DATA) ./luasrc/clash.lua $(1)/usr/lib/lua/luci/
|
||||
$(INSTALL_DATA) ./luasrc/controller/*.lua $(1)/usr/lib/lua/luci/controller/
|
||||
|
||||
@ -20,9 +20,9 @@ function index()
|
||||
entry({"admin", "services", "clash", "config"},cbi("clash/config"),_("Config"), 30).leaf = true
|
||||
|
||||
entry({"admin", "services", "clash", "create"},cbi("clash/create"),_("Create Config"), 40).leaf = true
|
||||
entry({"admin", "services", "clash", "servers"},cbi("clash/servers-config"), nil).leaf = true
|
||||
entry({"admin", "services", "clash", "servers"},cbi("clash/servers-config"), nil).leaf = true
|
||||
entry({"admin", "services", "clash", "provider"},cbi("clash/provider-config"), nil).leaf = true
|
||||
entry({"admin", "services", "clash", "groups"},cbi("clash/groups"), nil).leaf = true
|
||||
entry({"admin", "services", "clash", "groups"},cbi("clash/groups"), nil).leaf = true
|
||||
|
||||
entry({"admin", "services", "clash", "settings"}, firstchild(),_("Settings"), 50)
|
||||
entry({"admin", "services", "clash", "settings", "port"},cbi("clash/port"),_("Proxy Ports"), 60).leaf = true
|
||||
@ -31,8 +31,11 @@ function index()
|
||||
entry({"admin", "services", "clash", "settings", "list"},cbi("clash/list"),_("Custom List"), 90).leaf = true
|
||||
|
||||
entry({"admin", "services", "clash", "settings", "grules"},cbi("clash/game-settings"),_("Game Rules"), 91).dependent = false
|
||||
entry({"admin", "services", "clash", "g-rules"},cbi("clash/game-rule"), nil).leaf = true
|
||||
|
||||
entry({"admin", "services", "clash", "g-rules"},cbi("clash/game-rule"), nil).leaf = true
|
||||
entry({"admin", "services", "clash", "settings", "other"},cbi("clash/other"),_("Other Settings"), 92).leaf = true
|
||||
entry({"admin", "services", "clash", "ip-rules"},cbi("clash/ip-rules"), nil).leaf = true
|
||||
|
||||
|
||||
entry({"admin","services","clash","status"},call("action_status")).leaf=true
|
||||
entry({"admin", "services", "clash", "log"},cbi("clash/log"),_("Log"), 150).leaf = true
|
||||
entry({"admin", "services", "clash", "update"},cbi("clash/update"),_("Update"), 160).leaf = true
|
||||
|
||||
@ -36,6 +36,12 @@ o:value("1", translate("Enable"))
|
||||
o.description = translate("Set rules under Setting=>Game Rules, will take effect when client start")
|
||||
|
||||
|
||||
o = s:option(ListValue, "append_rules", translate("Append Customs Rules"))
|
||||
o.default = "0"
|
||||
o:value("0", translate("Disable"))
|
||||
o:value("1", translate("Enable"))
|
||||
o.description = translate("Set custom rules under Setting=>Others , will take effect when client start")
|
||||
|
||||
o = s:option(Button, "Apply")
|
||||
o.title = translate("Save & Apply")
|
||||
o.inputtitle = translate("Save & Apply")
|
||||
|
||||
@ -9,28 +9,7 @@ local fs = require "luci.clash"
|
||||
local http = luci.http
|
||||
local clash = "clash"
|
||||
|
||||
kk = Map(clash)
|
||||
r = kk:section(TypedSection, "clash", translate("Auto Update Config"))
|
||||
r.anonymous = true
|
||||
kk.pageaction = false
|
||||
|
||||
o = r:option(Flag, "auto_update", translate("Auto Update"))
|
||||
o.description = translate("Auto Update Server subscription")
|
||||
|
||||
o = r:option(ListValue, "auto_update_time", translate("Update time (every day)"))
|
||||
for t = 0,23 do
|
||||
o:value(t, t..":00")
|
||||
end
|
||||
o.default=0
|
||||
o.description = translate("Daily Server subscription update time. Only update config in use")
|
||||
|
||||
o = r:option(Button, "Apply")
|
||||
o.title = translate("Save & Apply")
|
||||
o.inputtitle = translate("Save & Apply")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
kk.uci:commit("clash")
|
||||
end
|
||||
|
||||
|
||||
kr = Map(clash)
|
||||
@ -138,4 +117,4 @@ if luci.http.formvalue("upload") then
|
||||
end
|
||||
|
||||
|
||||
return kr,kk,ko
|
||||
return kr,ko
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
local m, s, o
|
||||
local clash = "clash"
|
||||
local uci = luci.model.uci.cursor()
|
||||
local fs = require "nixio.fs"
|
||||
local sys = require "luci.sys"
|
||||
local sid = arg[1]
|
||||
|
||||
|
||||
m = Map(clash, translate("Edit Custom Rule & Group"))
|
||||
--m.pageaction = false
|
||||
m.redirect = luci.dispatcher.build_url("admin/services/clash/settings/other")
|
||||
if m.uci:get(clash, sid) ~= "addtype" then
|
||||
luci.http.redirect(m.redirect)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
s = m:section(NamedSection, sid, "addtype")
|
||||
s.anonymous = true
|
||||
s.addremove = false
|
||||
|
||||
|
||||
o = s:option(ListValue, "type", translate("Rule Type"))
|
||||
o.rmempty = false
|
||||
o.description = translate("Choose Type")
|
||||
o:value("DST-PORT", translate("DST-PORT"))
|
||||
o:value("SRC-PORT", translate("SRC-PORT"))
|
||||
o:value("SRC-IP-CIDR", translate("SRC-IP-CIDR"))
|
||||
o:value("IP-CIDR", translate("IP-CIDR"))
|
||||
o:value("DOMAIN", translate("DOMAIN"))
|
||||
o:value("DOMAIN-KEYWORD", translate("DOMAIN-KEYWORD"))
|
||||
o:value("DOMAIN-SUFFIX", translate("DOMAIN-SUFFIX"))
|
||||
|
||||
|
||||
o = s:option(ListValue, "pgroup", translate("Select Proxy Group"))
|
||||
uci:foreach("clash", "conf_groups",
|
||||
function(s)
|
||||
if s.name ~= "" and s.name ~= nil then
|
||||
o:value(s.name)
|
||||
end
|
||||
end)
|
||||
o:value("DIRECT")
|
||||
o:value("REJECT")
|
||||
o.rmempty = false
|
||||
o.description = translate("Select a policy group to add rule")
|
||||
|
||||
|
||||
o = s:option(Value, "ipaaddr", translate("IP/Domain/Address/Keyword/Port"))
|
||||
o.rmempty = false
|
||||
|
||||
|
||||
return m
|
||||
128
package/ntlf9t/luci-app-clash/luasrc/model/cbi/clash/other.lua
Normal file
128
package/ntlf9t/luci-app-clash/luasrc/model/cbi/clash/other.lua
Normal file
@ -0,0 +1,128 @@
|
||||
|
||||
local NXFS = require "nixio.fs"
|
||||
local SYS = require "luci.sys"
|
||||
local HTTP = require "luci.http"
|
||||
local DISP = require "luci.dispatcher"
|
||||
local UTIL = require "luci.util"
|
||||
local uci = luci.model.uci.cursor()
|
||||
local fs = require "luci.clash"
|
||||
local http = luci.http
|
||||
local clash = "clash"
|
||||
|
||||
kk = Map(clash)
|
||||
s = kk:section(TypedSection, "clash", translate("Auto Update Config"))
|
||||
s.anonymous = true
|
||||
kk.pageaction = false
|
||||
|
||||
o = s:option(Flag, "auto_update", translate("Auto Update"))
|
||||
o.description = translate("Auto Update Server subscription")
|
||||
|
||||
o = s:option(ListValue, "auto_update_time", translate("Update time (every day)"))
|
||||
o:value("1", translate("Every Hour"))
|
||||
o:value("6", translate("Every 6 Hours"))
|
||||
o:value("12", translate("Every 12 Hours"))
|
||||
o:value("24", translate("Every 24 Hours"))
|
||||
o.description = translate("Daily Server subscription update time. Only update config in use")
|
||||
|
||||
o = s:option(Button, "Apply")
|
||||
o.title = translate("Save & Apply")
|
||||
o.inputtitle = translate("Save & Apply")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
kk.uci:commit("clash")
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
m = Map("clash")
|
||||
s = m:section(TypedSection, "clash" , translate("Clear Clash Log"))
|
||||
s.anonymous = true
|
||||
|
||||
o = s:option(Flag, "auto_clear_log", translate("Auto Clear Log"))
|
||||
o.description = translate("Auto Clear Log")
|
||||
|
||||
|
||||
o = s:option(ListValue, "clear_time", translate("Clear Time (Time of Day)"))
|
||||
o:value("1", translate("Every Hour"))
|
||||
o:value("6", translate("Every 6 Hours"))
|
||||
o:value("12", translate("Every 12 Hours"))
|
||||
o:value("24", translate("Every 24 Hours"))
|
||||
o.description = translate("Clear Log Time")
|
||||
|
||||
o=s:option(Button,"clear_clear")
|
||||
o.inputtitle = translate("Save & Apply")
|
||||
o.title = translate("Save & Apply")
|
||||
o.inputstyle = "reload"
|
||||
o.write = function()
|
||||
m.uci:commit("clash")
|
||||
end
|
||||
|
||||
|
||||
y = Map("clash")
|
||||
x = y:section(TypedSection, "addtype", translate("Custom Rules"))
|
||||
x.anonymous = true
|
||||
x.addremove = true
|
||||
x.sortable = false
|
||||
x.template = "cbi/tblsection"
|
||||
x.extedit = luci.dispatcher.build_url("admin/services/clash/ip-rules/%s")
|
||||
function x.create(...)
|
||||
local sid = TypedSection.create(...)
|
||||
if sid then
|
||||
luci.http.redirect(x.extedit % sid)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
o = x:option(DummyValue, "type", translate("Rule Type"))
|
||||
function o.cfgvalue(...)
|
||||
return Value.cfgvalue(...) or translate("None")
|
||||
end
|
||||
|
||||
o = x:option(DummyValue, "ipaaddr", translate("IP/Domain/Address/Keyword/Port"))
|
||||
function o.cfgvalue(...)
|
||||
return Value.cfgvalue(...) or translate("None")
|
||||
end
|
||||
|
||||
|
||||
o = x:option(DummyValue, "pgroup", translate("Policy Groups"))
|
||||
function o.cfgvalue(...)
|
||||
return Value.cfgvalue(...) or translate("None")
|
||||
end
|
||||
|
||||
|
||||
|
||||
local t = {
|
||||
{Load,Apply}
|
||||
}
|
||||
|
||||
k = Form("apply")
|
||||
k.reset = false
|
||||
k.submit = false
|
||||
s = k:section(Table, t)
|
||||
|
||||
|
||||
o = s:option(Button, "Load")
|
||||
o.inputtitle = translate("Load Groups")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
m.uci:commit("clash")
|
||||
luci.sys.call("bash /usr/share/clash/load_groups.sh >/dev/null 2>&1 &")
|
||||
luci.sys.call("sleep 3")
|
||||
HTTP.redirect(luci.dispatcher.build_url("admin", "services", "clash", "settings", "other"))
|
||||
end
|
||||
|
||||
o = s:option(Button, "Apply")
|
||||
o.inputtitle = translate("Save & Apply")
|
||||
o.inputstyle = "apply"
|
||||
o.write = function()
|
||||
m.uci:commit("clash")
|
||||
if luci.sys.call("pidof clash >/dev/null") == 0 then
|
||||
SYS.call("/etc/init.d/clash restart >/dev/null 2>&1 &")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash"))
|
||||
else
|
||||
HTTP.redirect(luci.dispatcher.build_url("admin", "services", "clash", "settings", "other"))
|
||||
end
|
||||
end
|
||||
|
||||
return kk, m,y,k
|
||||
@ -257,6 +257,7 @@ o:depends("obfs", "websocket")
|
||||
o:depends("type", "vmess")
|
||||
o:depends("type", "socks5")
|
||||
o:depends("type", "http")
|
||||
o:depends("obfs_vmess", "none")
|
||||
|
||||
-- [[ TLS ]]--
|
||||
o = s:option(ListValue, "tls", translate("TLS"))
|
||||
@ -267,6 +268,7 @@ o:value("false")
|
||||
o:depends("type", "vmess")
|
||||
o:depends("type", "socks5")
|
||||
o:depends("type", "http")
|
||||
o:depends("obfs_vmess", "none")
|
||||
|
||||
local apply = luci.http.formvalue("cbi.apply")
|
||||
if apply then
|
||||
|
||||
@ -7,6 +7,7 @@ local uci = require("luci.model.uci").cursor()
|
||||
local m , r, k
|
||||
local http = luci.http
|
||||
|
||||
font_red = [[<font color="red">]]
|
||||
font_green = [[<font color="green">]]
|
||||
font_off = [[</font>]]
|
||||
bold_on = [[<strong>]]
|
||||
@ -17,24 +18,50 @@ bold_off = [[</strong>]]
|
||||
ko = Map("clash")
|
||||
ko.reset = false
|
||||
ko.submit = false
|
||||
sul =ko:section(TypedSection, "clash","")
|
||||
sul =ko:section(TypedSection, "clash",translate("Manual Upload"))
|
||||
sul.anonymous = true
|
||||
sul.addremove=false
|
||||
o = sul:option(FileUpload, "")
|
||||
o.description = translate("NB: Upload only Dreamacro clash tun core - (https://github.com/Dreamacro/clash/releases/tag/TUN)")
|
||||
o.description =''..font_red..bold_on..translate("Manually download, unzip and rename clash core from links below and upload")..bold_off..font_off..' '
|
||||
.."<br />"
|
||||
..translate("Dreamacro clash tun core (dtun) - (https://github.com/Dreamacro/clash/releases/tag/TUN)")
|
||||
.."<br />"
|
||||
..translate("comzyh clash tun core (ctun) - (https://github.com/comzyh/clash/releases)")
|
||||
.."<br />"
|
||||
..translate("Dreamacro clash core - (https://github.com/Dreamacro/clash/releases)")
|
||||
.."<br />"
|
||||
..translate("Frainzy1477 clashr core - (https://github.com/frainzy1477/clashrdev/releases)")
|
||||
.."<br />"
|
||||
..translate("Frainzy1477 clash core - (https://github.com/frainzy1477/clash_dev/releases)")
|
||||
.."<br />"
|
||||
..translate("Frainzy1477 clash(ctun) core - (https://github.com/frainzy1477/clashtun/releases)")
|
||||
|
||||
o.title = translate(" ")
|
||||
o.template = "clash/clash_upload"
|
||||
o.template = "clash/upload_core"
|
||||
um = sul:option(DummyValue, "", nil)
|
||||
um.template = "clash/clash_dvalue"
|
||||
|
||||
local dir, fd
|
||||
dir = "/etc/clash/dtun/"
|
||||
local dir, fd,dtun,ctun,cssr
|
||||
dir = "/etc/clash/"
|
||||
cssr="/usr/bin/"
|
||||
dtun="/etc/clash/dtun/"
|
||||
ctun="/etc/clash/clashtun/"
|
||||
|
||||
http.setfilehandler(
|
||||
function(meta, chunk, eof)
|
||||
local fp = HTTP.formvalue("file_type")
|
||||
if not fd then
|
||||
if not meta then return end
|
||||
|
||||
if meta and chunk then fd = nixio.open(dir .. meta.file, "w") end
|
||||
|
||||
if fp == "clash" then
|
||||
if meta and chunk then fd = nixio.open(dir .. meta.file, "w") end
|
||||
elseif fp == "clashr" then
|
||||
if meta and chunk then fd = nixio.open(cssr .. meta.file, "w") end
|
||||
elseif fp == "clashctun" then
|
||||
if meta and chunk then fd = nixio.open(ctun .. meta.file, "w") end
|
||||
elseif fp == "clashdtun" then
|
||||
if meta and chunk then fd = nixio.open(dtun .. meta.file, "w") end
|
||||
end
|
||||
|
||||
if not fd then
|
||||
um.value = translate("upload file error.")
|
||||
@ -47,8 +74,21 @@ http.setfilehandler(
|
||||
if eof and fd then
|
||||
fd:close()
|
||||
fd = nil
|
||||
SYS.exec("chmod 755 /etc/clash/dtun/clash 2>&1 &")
|
||||
um.value = translate("File saved to") .. ' "/etc/clash/dtun/"'
|
||||
|
||||
if fp == "clash" then
|
||||
SYS.exec("chmod 755 /etc/clash/clash 2>&1 &")
|
||||
um.value = translate("File saved to") .. ' "/etc/clash/'..meta.file..'"'
|
||||
elseif fp == "clashr" then
|
||||
SYS.exec("chmod 755 /usr/bin/clash 2>&1 &")
|
||||
um.value = translate("File saved to") .. ' "/usr/bin/'..meta.file..'"'
|
||||
elseif fp == "clashctun" then
|
||||
SYS.exec("chmod 755 /etc/clash/clashtun/clash 2>&1 &")
|
||||
um.value = translate("File saved to") .. ' "/etc/clash/clashtun/'..meta.file..'"'
|
||||
elseif fp == "clashdtun" then
|
||||
SYS.exec("chmod 755 /etc/clash/dtun/clash 2>&1 &")
|
||||
um.value = translate("File saved to") .. ' "/etc/clash/dtun/'..meta.file..'"'
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
@ -68,7 +108,7 @@ m:section(SimpleSection).template = "clash/update"
|
||||
m.pageaction = false
|
||||
|
||||
k = Map("clash")
|
||||
s = k:section(TypedSection, "clash")
|
||||
s = k:section(TypedSection, "clash",translate("Download Online"))
|
||||
s.anonymous = true
|
||||
o = s:option(ListValue, "dcore", translate("Core Type"))
|
||||
o.default = "clashcore"
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
<tr><td width="50%"><span><%:Clash Config%></span></td><td id="_conf"><em><%:Collecting data...%></em></td> </tr>
|
||||
<tr><td width="50%"><span><%:Config Type%></span></td><td id="_conf_path"><em><%:Collecting data...%></em></td> </tr>
|
||||
<tr><td width="50%"><span><%:Clash Dashboard%></span></td><td id="_web"><em> <%:Collecting data...%> </em></td> </tr>
|
||||
<tr><td width="50%"><span><%:Yacd Dashboard%></span></td><td id="_webb"><em> <%:Collecting data...%> </em></td> </tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
@ -74,7 +75,7 @@ let IP = {
|
||||
},
|
||||
|
||||
getIpipnetIP: () => {
|
||||
IP.get(`https://myip.ipip.net/?z=${random}`, 'text')
|
||||
IP.get(`http://myip.ipip.net/?z=${random}`, 'text')
|
||||
.then((resp) => {
|
||||
let data = resp.data.replace('当前 IP:', '').split(' 来自于:');
|
||||
document.getElementById('d-ip').innerHTML = `${data[0]} ${data[1]}`;
|
||||
@ -130,7 +131,7 @@ var HTTP = {
|
||||
var tbip = document.getElementsByTagName('HEAD').item(0);
|
||||
var tbipScript= document.createElement("script");
|
||||
tbipScript.async = "async";
|
||||
tbipScript.src='https://myip.ipip.net/?z=${random}';
|
||||
tbipScript.src='http://myip.ipip.net/?z=${random}';
|
||||
tbip.appendChild( tbipScript);
|
||||
|
||||
var sbip = document.getElementsByTagName('HEAD').item(0);
|
||||
@ -143,9 +144,10 @@ var HTTP = {
|
||||
|
||||
const $$ = document;
|
||||
random = parseInt(Math.random() * 100000000);
|
||||
setTimeout("Load()",1000*8);
|
||||
setTimeout("Load()",1000*8);
|
||||
}
|
||||
var web = document.getElementById('_web');
|
||||
var webb = document.getElementById('_webb');
|
||||
var clash = document.getElementById('_clash');
|
||||
var ip = document.getElementById('_ip');
|
||||
var port = document.getElementById('_port');
|
||||
@ -159,6 +161,7 @@ var HTTP = {
|
||||
XHR.poll(1, '<%=luci.dispatcher.build_url("admin", "services", "clash", "status")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
web.innerHTML = status.clash ? '<a type="button" class="btn" style="background-color:black;padding: 5px;" href="http://'+window.location.hostname+':'+status.dash_port+'/ui" target="_blank"/><b><font color="green"><%:DASHBOARD%></font></b></a>' : '<b><font color="red"><%:NOT RUNNING%></font></b>';
|
||||
webb.innerHTML = status.clash ? '<a type="button" class="btn" style="background-color:black;padding: 5px;" href="http://'+window.location.hostname+'/luci-static/yacd" target="_blank"/><b><font color="green"><%:DASHBOARD%></font></b></a>' : '<b><font color="red"><%:NOT RUNNING%></font></b>';
|
||||
clash.innerHTML = status.clash ? '<b><font color="green"><%:RUNNING%></font> </b>' : '<b><font color="red"><%:NOT RUNNING%></font></b>';
|
||||
ip.innerHTML = status.localip ? '<b><font color="green">'+status.localip+'</font> </b>' : '<em><b><font color="red"><%:NOT SET%></font></b></em>';
|
||||
port.innerHTML = status.dash_port ? '<b><font color="green">'+status.dash_port+'</font> </b>' : '<em><b><font color="red"><%:NOT SET%></font></b></em>';
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
<%+cbi/valueheader%>
|
||||
<select name="file_type" style="width:20%">
|
||||
<option value="clash" selected="selected"><%:clash%></option>
|
||||
<option value="clashr"><%:clashr%></option>
|
||||
<option value="clashctun"><%:clash(ctun)%></option>
|
||||
<option value="clashdtun"><%:clash(dtun)%></option>
|
||||
</select>
|
||||
<input class="cbi-input-file" style="width: 60%" type="file" id="ulfile" name="ulfile" />
|
||||
<input type="submit" style="width: 100%" class="cbi-button cbi-input-apply" name="upload" value="<%:Upload%>" />
|
||||
|
||||
<%+cbi/valuefooter%>
|
||||
|
||||
@ -269,10 +269,7 @@ msgid "DASHBOARD"
|
||||
msgstr "外部控制"
|
||||
|
||||
msgid "Clash Dashboard"
|
||||
msgstr "Clash外部控制"
|
||||
|
||||
msgid "Yac Dashboard"
|
||||
msgstr "Yacd外部控制"
|
||||
msgstr "Clash控制面板"
|
||||
|
||||
msgid "Client"
|
||||
msgstr "客户端"
|
||||
@ -964,3 +961,63 @@ msgstr "读取代理集"
|
||||
|
||||
msgid "Enable to read Proxy Provider"
|
||||
msgstr "启用读取代理集"
|
||||
|
||||
msgid "Every Hour"
|
||||
msgstr "每个小时"
|
||||
|
||||
msgid "Every 6 Hours"
|
||||
msgstr "每个6小时"
|
||||
|
||||
msgid "Every 12 Hours"
|
||||
msgstr "每个12小时"
|
||||
|
||||
msgid "Every 24 Hours"
|
||||
msgstr "每个24小时"
|
||||
|
||||
msgid "Clear Clash Log"
|
||||
msgstr "清除日志"
|
||||
|
||||
msgid "Auto Clear Log"
|
||||
msgstr "自动清除日志"
|
||||
|
||||
msgid "Clear Time (Time of Day)"
|
||||
msgstr "清除时间(一天中的时间)"
|
||||
|
||||
msgid "Clear Log Time"
|
||||
msgstr "清除日志时间"
|
||||
|
||||
msgid "Other Settings"
|
||||
msgstr "其他设置"
|
||||
|
||||
msgid "Rule Type"
|
||||
msgstr "规则类型"
|
||||
|
||||
msgid "Choose Type"
|
||||
msgstr "选择类型"
|
||||
|
||||
msgid "Set custom rules under Setting=>Others , will take effect when client start"
|
||||
msgstr "在“设置”=>“其他”下设置自定义规则,将在客户端启动时生效"
|
||||
|
||||
msgid "Append Customs Rules"
|
||||
msgstr "附加自定义规则"
|
||||
|
||||
msgid "Edit Custom Rule & Group"
|
||||
msgstr "编辑自定义规则组"
|
||||
|
||||
msgid "Custom Rules"
|
||||
msgstr "自定义规则"
|
||||
|
||||
msgid "IP/Domain/Address/Keyword/Port"
|
||||
msgstr "IP/域/地址/关键字/端口"
|
||||
|
||||
msgid "Manually download, unzip and rename clash core from links below and upload"
|
||||
msgstr "从下面的链接手动下载、解压和重命名到clash然后上载"
|
||||
|
||||
msgid "Manual Upload"
|
||||
msgstr "手动上载"
|
||||
|
||||
msgid "Download Online"
|
||||
msgstr "在线下载"
|
||||
|
||||
msgid "Yacd Dashboard"
|
||||
msgstr "Yacd控制面板"
|
||||
@ -23,6 +23,12 @@ config clash 'config'
|
||||
option dnscache '0'
|
||||
option config_type '1'
|
||||
option p_mode 'Rule'
|
||||
option auto_clear_log '1'
|
||||
option auto_update '1'
|
||||
option auto_update_time '12'
|
||||
option clear_time '12'
|
||||
option append_rules '0'
|
||||
|
||||
|
||||
config groups
|
||||
option old_name '❌AdBlock'
|
||||
@ -51,4 +57,27 @@ config groups
|
||||
option name '🔑Proxy'
|
||||
list other_group 'ALL'
|
||||
|
||||
config addtype
|
||||
option type 'SRC-IP-CIDR'
|
||||
option pgroup 'DIRECT'
|
||||
list ipaaddr '192.168.1.4/30'
|
||||
|
||||
config addtype
|
||||
option type 'SRC-IP-CIDR'
|
||||
option pgroup 'DIRECT'
|
||||
option ipaaddr '192.168.1.2/31'
|
||||
|
||||
config addtype
|
||||
option type 'DOMAIN-KEYWORD'
|
||||
option pgroup 'DIRECT'
|
||||
option ipaaddr 'baidu'
|
||||
|
||||
config addtype
|
||||
option type 'SRC-PORT'
|
||||
option pgroup 'DIRECT'
|
||||
option ipaaddr '22'
|
||||
|
||||
config addtype
|
||||
option type 'DST-PORT'
|
||||
option pgroup 'DIRECT'
|
||||
option ipaaddr '443'
|
||||
|
||||
66
package/ntlf9t/luci-app-clash/root/etc/init.d/clash
Executable file → Normal file
66
package/ntlf9t/luci-app-clash/root/etc/init.d/clash
Executable file → Normal file
@ -34,13 +34,17 @@ add_cron(){
|
||||
config_type=$(uci get clash.config.config_type 2>/dev/null)
|
||||
#===========================================================================================================================
|
||||
sed -i '/clash.txt/d' $CRON_FILE
|
||||
echo '0 0 * * 0 echo "" >> /usr/share/clash/clash.txt' >> $CRON_FILE
|
||||
[ -n "$(grep -w "/usr/share/clash/clash.sh" $CRON_FILE)" ] && sed -i '/\/usr\/share\/clash\/clash.sh/d' $CRON_FILE
|
||||
[ -n "$(grep -w "/usr/share/clash/v2ssr.sh" $CRON_FILE)" ] && sed -i '/\/usr\/share\/clash\/v2ssr.sh/d' $CRON_FILE
|
||||
|
||||
clear=$(uci get clash.config.auto_clear_log 2>/dev/null)
|
||||
if [ "${clear}" -eq 1 ]; then
|
||||
[ -z "$(grep -w "/usr/share/clash/clash.txt" $CRON_FILE)" ] && echo "0 */$(uci get clash.config.clear_time 2>/dev/null) * * * echo '' >/usr/share/clash/clash.txt" >> $CRON_FILE
|
||||
fi
|
||||
|
||||
auto=$(uci get clash.config.auto_update 2>/dev/null)
|
||||
if [ "${auto}" -eq 1 ]; then
|
||||
[ -z "$(grep -w "/usr/share/clash/update_all.sh" $CRON_FILE)" ] && echo "0 $(uci get clash.config.auto_update_time 2>/dev/null) * * * /usr/share/clash/update_all.sh" >> $CRON_FILE
|
||||
[ -z "$(grep -w "/usr/share/clash/update_all.sh" $CRON_FILE)" ] && echo "0 */$(uci get clash.config.auto_update_time 2>/dev/null) * * * /usr/share/clash/update_all.sh" >> $CRON_FILE
|
||||
fi
|
||||
|
||||
auto_geoip=$(uci get clash.config.auto_update_geoip 2>/dev/null)
|
||||
if [ "${auto_geoip}" -eq 1 ]; then
|
||||
day=$(uci get clash.config.geoip_update_day 2>/dev/null)
|
||||
@ -126,6 +130,12 @@ game_rules() {
|
||||
#===========================================================================================================================
|
||||
}
|
||||
|
||||
ip_rules() {
|
||||
#===========================================================================================================================
|
||||
sh /usr/share/clash/iprules.sh 2>/dev/null
|
||||
#===========================================================================================================================
|
||||
}
|
||||
|
||||
|
||||
yml_dns_change(){
|
||||
#===========================================================================================================================
|
||||
@ -221,7 +231,7 @@ rules(){
|
||||
iptables -t nat -A clash -d "${lan_ip}" -j RETURN
|
||||
if [ ! -z "${wan}" ]; then
|
||||
iptables -t nat -A clash -d "${wan}" -j RETURN
|
||||
fi
|
||||
fi
|
||||
iptables -t nat -A clash -p tcp -j REDIRECT --to-ports "${redir_port}"
|
||||
iptables -t nat -A PREROUTING -p tcp -j clash
|
||||
|
||||
@ -263,8 +273,8 @@ rules(){
|
||||
ipset add localnetwork 172.16.0.0/12
|
||||
ipset add localnetwork "${lan_ip}"
|
||||
if [ ! -z "${wan}" ]; then
|
||||
ipset add localnetwork "${wan}"
|
||||
fi
|
||||
ipset add localnetwork "${wan}"
|
||||
fi
|
||||
if [ "${core}" -eq 3 ];then
|
||||
ip tuntap add user root mode tun $TUN_DEVICE_NAME
|
||||
ip link set $TUN_DEVICE_NAME up
|
||||
@ -274,16 +284,15 @@ rules(){
|
||||
ip route replace default dev utun table "$PROXY_ROUTE_TABLE"
|
||||
fi
|
||||
|
||||
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
|
||||
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
|
||||
|
||||
iptables -t mangle -N clash
|
||||
iptables -t mangle -F clash
|
||||
iptables -t mangle -A clash -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
|
||||
iptables -t mangle -A clash -m set --match-set localnetwork dst -j RETURN
|
||||
iptables -t mangle -I OUTPUT -j clash
|
||||
iptables -t mangle -I PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK"
|
||||
iptables -t mangle -N clash
|
||||
iptables -t mangle -F clash
|
||||
iptables -t mangle -A clash -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
|
||||
iptables -t mangle -A clash -m set --match-set localnetwork dst -j RETURN
|
||||
iptables -t mangle -I OUTPUT -j clash
|
||||
iptables -t mangle -I PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK"
|
||||
|
||||
|
||||
if [ -f /usr/sbin/ip6tables ] && [ "${ipv6}" -eq 1 ]; then
|
||||
ip6tables -t mangle -I PREROUTING -j MARK --set-mark "$PROXY_FWMARK"
|
||||
fi
|
||||
@ -412,8 +421,12 @@ if [ -f $CONFIG_YAML ] && [ "$(ls -l $CONFIG_YAML|awk '{print int($5/1024)}')"
|
||||
sleep 2
|
||||
|
||||
game_rules >/dev/null 2>&1
|
||||
|
||||
if [ "${core}" -eq 1 ];then
|
||||
|
||||
sleep 1
|
||||
|
||||
ip_rules >/dev/null 2>&1
|
||||
|
||||
if [ "${core}" -eq 1 ];then
|
||||
nohup $CLASH -d "$CLASH_CONFIG" > /usr/share/clash/clash.txt 2>&1 &
|
||||
|
||||
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
|
||||
@ -448,7 +461,7 @@ if [ -f $CONFIG_YAML ] && [ "$(ls -l $CONFIG_YAML|awk '{print int($5/1024)}')"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
ln -s /usr/share/clash/yacd /www/luci-static/yacd 2>/dev/null
|
||||
sleep 2
|
||||
|
||||
|
||||
@ -615,6 +628,7 @@ stop(){
|
||||
fi
|
||||
|
||||
iptables -t nat -F clash >/dev/null 2>&1 && iptables -t nat -X clash >/dev/null 2>&1
|
||||
|
||||
nat_indexs=$(iptables -nvL PREROUTING -t nat | sed 1,2d | sed -n '/clash/=' | sort -r)
|
||||
for nat_index in $nat_indexs; do
|
||||
iptables -t nat -D PREROUTING $nat_index >/dev/null 2>&1
|
||||
@ -622,14 +636,14 @@ stop(){
|
||||
|
||||
|
||||
fake=$(iptables -nvL OUTPUT -t nat |sed 1,2d |sed -n '/198.18.0.0\/16/=' |sort -r)
|
||||
for fake in $fake; do
|
||||
for fake in $fake; do
|
||||
iptables -t nat -D OUTPUT $fake >/dev/null 2>&1
|
||||
done
|
||||
done
|
||||
|
||||
fake2=$(iptables -nvL OUTPUT -t nat |sed 1,2d |sed -n '/198.18.0.1\/16/=' |sort -r)
|
||||
for fake2 in $fake2; do
|
||||
for fake2 in $fake2; do
|
||||
iptables -t nat -D OUTPUT $fake2 >/dev/null 2>&1
|
||||
done
|
||||
done
|
||||
|
||||
remove_mark >/dev/null 2>&1
|
||||
|
||||
@ -644,7 +658,7 @@ stop(){
|
||||
fi
|
||||
|
||||
kill -9 `pidof clash|sed "s/$//g"` 2>/dev/null
|
||||
|
||||
rm -rf /www/luci-static/yacd 2>/dev/null
|
||||
sleep 1
|
||||
|
||||
if [ ! -z "${delandns}" ];then
|
||||
@ -663,7 +677,7 @@ stop(){
|
||||
fi
|
||||
|
||||
del_cron >/dev/null 2>&1
|
||||
sleep 1
|
||||
sleep 1
|
||||
|
||||
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
|
||||
echo "Restarting Dnsmasq " >$REAL_LOG
|
||||
@ -672,7 +686,7 @@ stop(){
|
||||
fi
|
||||
|
||||
revert_dns >/dev/null 2>&1
|
||||
sleep 1
|
||||
sleep 1
|
||||
|
||||
echo "" >/usr/share/clash/clash.txt >/dev/null 2>&1
|
||||
|
||||
@ -705,7 +719,7 @@ restart(){
|
||||
stop >/dev/null 2>&1
|
||||
start >/dev/null 2>&1
|
||||
else
|
||||
start >/dev/null 2>&1
|
||||
start >/dev/null 2>&1
|
||||
fi
|
||||
#===========================================================================================================================
|
||||
}
|
||||
|
||||
@ -1,49 +1,32 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
sleeptime=300
|
||||
logfile="/tmp/clash.log"
|
||||
CLASH="/etc/clash/clash"
|
||||
CLASH_CONFIG="/etc/clash"
|
||||
sleeptime=150
|
||||
enable=$(uci get clash.config.enable 2>/dev/null)
|
||||
|
||||
clean_log(){
|
||||
logrow=$(grep -c "" ${logfile})
|
||||
logrow1=$(grep -c "" ${logfile1})
|
||||
if [ $logrow -ge 1000 ];then
|
||||
cat /dev/null > ${logfile}
|
||||
echo "$curtime Logs exceeded limit,cleaning logs now..!" >> ${logfile}
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if [ -f /usr/share/clashbackup/history ];then
|
||||
|
||||
HISTORY_PATH="/usr/share/clashbackup/history"
|
||||
SECRET=$(uci get clash.config.dash_pass 2>/dev/null)
|
||||
LAN_IP=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)
|
||||
PORT=$(uci get clash.config.dash_port 2>/dev/null)
|
||||
|
||||
if [ ! -z "$(grep "#*#" "$HISTORY_PATH")" ]; then
|
||||
cat $HISTORY_PATH |while read line
|
||||
do
|
||||
GORUP_NAME=$(echo $line |awk -F '#*#' '{print $1}')
|
||||
NOW_NAME=$(echo $line |awk -F '#*#' '{print $3}')
|
||||
curl -H "Authorization: Bearer ${SECRET}" -H "Content-Type:application/json" -X PUT -d '{"name":"'"$NOW_NAME"'"}' http://"$LAN_IP":"$PORT"/proxies/"$GORUP_NAME" >/dev/null 2>&1
|
||||
done
|
||||
cat $HISTORY_PATH |while read line
|
||||
do
|
||||
if [ -z "$(echo $line |grep "#*#")" ]; then
|
||||
continue
|
||||
else
|
||||
GORUP_NAME=$(echo $line |awk -F '#*#' '{print $1}')
|
||||
NOW_NAME=$(echo $line |awk -F '#*#' '{print $3}')
|
||||
curl -H "Authorization: Bearer ${SECRET}" -H "Content-Type:application/json" -X PUT -d '{"name":"'"$NOW_NAME"'"}' http://"$LAN_IP":"$PORT"/proxies/"$GORUP_NAME" >/dev/null 2>&1
|
||||
fi
|
||||
done >/dev/null 2>&1
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
while [ $enable -eq 1 ];
|
||||
do
|
||||
curtime=`date "+%H:%M:%S"`
|
||||
if pidof clash>/dev/null; then
|
||||
clean_log
|
||||
fi
|
||||
if ! pidof clash>/dev/null; then
|
||||
/etc/init.d/clash restart 2>&1 &
|
||||
echo "$curtime Clash Is Restarting!" >> ${logfile}
|
||||
fi
|
||||
|
||||
sleep ${sleeptime}
|
||||
|
||||
@ -82,19 +82,19 @@ fi
|
||||
fi
|
||||
|
||||
if [ -f /usr/share/clash/core_version ];then
|
||||
VER=$(sed -n 1p /usr/share/clash/core_version 2>/dev/null)
|
||||
VER=$(rm -rf /usr/share/clash/core_version 2>/dev/null && /etc/clash/clash -v | awk -F ' ' '{print $2}' >> /usr/share/clash/core_version 2>/dev/null | sed -n 1p /usr/share/clash/core_version)
|
||||
else
|
||||
VER=0
|
||||
fi
|
||||
|
||||
if [ -f /usr/share/clash/corer_version ];then
|
||||
VERR=$(sed -n 1p /usr/share/clash/corer_version 2>/dev/null)
|
||||
VERR=$(rm -rf /usr/share/clash/corer_version 2>/dev/null && /usr/bin/clash -v | awk -F ' ' '{print $2}' >> /usr/share/clash/corer_version 2>/dev/null | sed -n 1p /usr/share/clash/corer_version)
|
||||
else
|
||||
VERR=0
|
||||
fi
|
||||
|
||||
if [ -f /usr/share/clash/tun_version ];then
|
||||
VERS=$(sed -n 1p /usr/share/clash/tun_version 2>/dev/null)
|
||||
VERS=$(rm -rf /usr/share/clash/tun_version 2>/dev/null && /etc/clash/clashtun/clash -v | awk -F ' ' '{print $2}' >> /usr/share/clash/tun_version | sed -n 1p /usr/share/clash/tun_version)
|
||||
else
|
||||
VERS=0
|
||||
fi
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="icon" type="image/x-icon" href="https://cdn.jsdelivr.net/gh/Dreamacro/clash/docs/logo.png" />
|
||||
<title>Clash Dashboard</title>
|
||||
<link href="main.0bddb85299f970595cb5.css" rel="stylesheet"></head>
|
||||
<title>Clash</title>
|
||||
<link href="main.f302eae39f433a9c3fa1.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="text/javascript" src="js/1.bundle.0bddb85299f970595cb5.min.js"></script><script type="text/javascript" src="js/bundle.0bddb85299f970595cb5.min.js"></script></body>
|
||||
<script type="text/javascript" src="js/1.bundle.f302eae39f433a9c3fa1.min.js"></script><script type="text/javascript" src="js/bundle.f302eae39f433a9c3fa1.min.js"></script></body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -54,7 +54,7 @@ sed -i '/#*******GAME-RULE-START**********#/,/#*******GAME-RULE-END**********#/d
|
||||
|
||||
if [ ! -z "$(grep "^ \{0,\}- GEOIP" "/etc/clash/config.yaml")" ]; then
|
||||
sed -i '1,/^ \{0,\}- GEOIP,/{/^ \{0,\}- GEOIP,/s/^ \{0,\}- GEOIP,/#*******GAME-RULE-START**********#\n&/}' "$CLASH_CONFIG" 2>/dev/null
|
||||
elif [ ! -z "$(grep "^ \{0,\}- MATCH," "$RULE_FILE")" ]; then
|
||||
elif [ ! -z "$(grep "^ \{0,\}- MATCH," "/etc/clash/config.yaml")" ]; then
|
||||
sed -i '1,/^ \{0,\}- MATCH,/{/^ \{0,\}- MATCH,/s/^ \{0,\}- MATCH,/#*******GAME-RULE-START**********#\n&/}' "$CLASH_CONFIG" 2>/dev/null
|
||||
else
|
||||
echo "#*******GAME RULE START**********#" >> "$CLASH_CONFIG" 2>/dev/null
|
||||
|
||||
50
package/ntlf9t/luci-app-clash/root/usr/share/clash/iprules.sh
Executable file
50
package/ntlf9t/luci-app-clash/root/usr/share/clash/iprules.sh
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash /etc/rc.common
|
||||
. /lib/functions.sh
|
||||
|
||||
|
||||
CUSTOM_RULE_FILE="/tmp/ipadd.conf"
|
||||
CLASH_CONFIG="/etc/clash/config.yaml"
|
||||
append=$(uci get clash.config.append_rules 2>/dev/null)
|
||||
if [ "${append}" -eq 1 ];then
|
||||
|
||||
|
||||
if [ -f $CUSTOM_RULE_FILE ];then
|
||||
rm -rf $CUSTOM_RULE_FILE 2>/dev/null
|
||||
fi
|
||||
|
||||
|
||||
ipadd()
|
||||
{
|
||||
|
||||
|
||||
local section="$1"
|
||||
config_get "pgroup" "$section" "pgroup" ""
|
||||
config_get "ipaaddr" "$section" "ipaaddr" ""
|
||||
config_get "type" "$section" "type" ""
|
||||
echo "- $type,$ipaaddr,$pgroup">>/tmp/ipadd.conf
|
||||
}
|
||||
|
||||
|
||||
config_load clash
|
||||
config_foreach ipadd "addtype"
|
||||
|
||||
|
||||
if [ -f $CUSTOM_RULE_FILE ];then
|
||||
|
||||
sed -i -e "\$a#*******CUSTOM-RULE-END**********#" $CUSTOM_RULE_FILE 2>/dev/null
|
||||
sed -i '/#*******CUSTOM-RULE-START**********#/,/#*******CUSTOM-RULE-END**********#/d' "$CLASH_CONFIG" 2>/dev/null
|
||||
|
||||
if [ ! -z "$(grep "^ \{0,\}- GEOIP" "/etc/clash/config.yaml")" ]; then
|
||||
sed -i '1,/^ \{0,\}- GEOIP,/{/^ \{0,\}- GEOIP,/s/^ \{0,\}- GEOIP,/#*******CUSTOM-RULE-START**********#\n&/}' "$CLASH_CONFIG" 2>/dev/null
|
||||
elif [ ! -z "$(grep "^ \{0,\}- MATCH," "/etc/clash/config.yaml")" ]; then
|
||||
sed -i '1,/^ \{0,\}- MATCH,/{/^ \{0,\}- MATCH,/s/^ \{0,\}- MATCH,/#*******CUSTOM-RULE-START**********#\n&/}' "$CLASH_CONFIG" 2>/dev/null
|
||||
else
|
||||
echo "#*******CUSTOM RULE START**********#" >> "$CLASH_CONFIG" 2>/dev/null
|
||||
fi
|
||||
|
||||
sed -i '/CUSTOM-RULE-START/r/tmp/ipadd.conf' "$CLASH_CONFIG" 2>/dev/null
|
||||
fi
|
||||
|
||||
else
|
||||
sed -i '/#*******CUSTOM-RULE-START**********#/,/#*******CUSTOM-RULE-END**********#/d' "$CLASH_CONFIG" 2>/dev/null
|
||||
fi
|
||||
@ -1 +1 @@
|
||||
1.5.5
|
||||
1.5.8
|
||||
|
||||
@ -491,7 +491,7 @@ yml_groups_set()
|
||||
echo " type: $type" >>$GROUP_FILE 2>/dev/null
|
||||
|
||||
group_name="$name"
|
||||
echo " proxies: $group_name" >>$GROUP_FILE
|
||||
echo " proxies: " >>$GROUP_FILE
|
||||
|
||||
#if [ "$type" == "url-test" ] || [ "$type" == "load-balance" ] || [ "$type" == "fallback" ] ; then
|
||||
# echo " proxies:" >>$GROUP_FILE 2>/dev/null
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,14 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
@ -0,0 +1,28 @@
|
||||
/*! modern-normalize v0.6.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{box-sizing:border-box}:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{padding:0}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}
|
||||
._2MMSFnbhST{stroke-dasharray:890;stroke-dashoffset:890;-webkit-animation:apL4DUAKgd 3s ease-in-out infinite normal forwards;animation:apL4DUAKgd 3s ease-in-out infinite normal forwards}@-webkit-keyframes apL4DUAKgd{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}@keyframes apL4DUAKgd{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}
|
||||
._3oi0NFbeOm{opacity:.5;width:100%;height:100%;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}
|
||||
._1rJPiLWN4s{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;padding:20px;background:var(--color-background);color:var(--color-text);text-align:center}._3h_IywJG1l{color:#2a477a;opacity:.6;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;padding:40px}.aXXDDfyTjE,._3h_IywJG1l{-webkit-box-align:center;align-items:center}.aXXDDfyTjE{display:-webkit-inline-box;display:inline-flex;color:var(--color-text-secondary)}.aXXDDfyTjE:active,.aXXDDfyTjE:hover{color:#387cec}.aXXDDfyTjE svg{margin-right:5px}
|
||||
._30oJwXNik9{background:var(--color-bg-sidebar);position:relative}._1SsCcpJvxN{display:block}._2r8EkOI78X{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;padding:25px 0 15px;color:#2a477a;-webkit-transition:color .3s ease-in-out;transition:color .3s ease-in-out}@media (max-width:768px){._2r8EkOI78X{display:none}}._2r8EkOI78X:hover{-webkit-animation:_2KRqAfqV8c .3s ease-in-out 0s infinite alternate;animation:_2KRqAfqV8c .3s ease-in-out 0s infinite alternate}._2r8EkOI78X img{width:80px;height:80px}@-webkit-keyframes _2KRqAfqV8c{0%{color:#2a477a}to{color:#1f52ac}}@keyframes _2KRqAfqV8c{0%{color:#2a477a}to{color:#1f52ac}}@media (max-width:768px){._2vUQ0Hs_C5{display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;overflow:scroll}}._8mEn9Wlw1n{color:var(--color-text);text-decoration:none;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:6px 16px}@media screen and (min-width:30em){._8mEn9Wlw1n{padding:8px 20px}}@media (max-width:768px){._8mEn9Wlw1n{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}._8mEn9Wlw1n svg{color:var(--color-icon);width:22px;height:22px}@media screen and (min-width:30em){._8mEn9Wlw1n svg{width:24px;height:24px}}._1WyHmd6t6y{background:var(--color-sb-active-row-bg)}@media (max-width:768px){._1WyHmd6t6y{background:none;border-bottom:2px solid #387cec}}._2eMIYGbP9O{padding-left:14px;font-size:.75em}@media (max-width:768px){._2eMIYGbP9O{padding-left:0;padding-top:5px}}@media screen and (min-width:30em){._2eMIYGbP9O{font-size:1em}}.nURY8qkFLS{--sz:50px;position:absolute;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--sz);height:var(--sz);padding:20px 0;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}@media (max-width:768px){.nURY8qkFLS{display:none}}.nURY8qkFLS svg{display:block;color:var(--color-icon)}
|
||||
.SNYKRrv_2I{height:76px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.VG1cD2OYvg{padding:0 15px;font-size:1.7em;text-align:left;margin:0}@media screen and (min-width:30em){.VG1cD2OYvg{padding:0 40px;font-size:2em}}
|
||||
._37kQcxVR4T{color:var(--color-text);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;flex-wrap:wrap}._37kQcxVR4T .sec{padding:10px;width:180px}._37kQcxVR4T .sec div:first-child{color:var(--color-text-secondary);font-size:.7em}._37kQcxVR4T .sec div:nth-child(2){padding:10px 0 0;font-size:1.8em}
|
||||
._1EnK5MMInH{width:100%;height:100%;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}._39z9L5I2ao{--color1:#ddd;--size:40px;width:var(--size);height:var(--size);margin:10px;background-color:var(--color1);border-radius:100%;-webkit-animation:_1DSWK2a-pe 1s ease-in-out infinite;animation:_1DSWK2a-pe 1s ease-in-out infinite}@-webkit-keyframes _1DSWK2a-pe{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1);opacity:0}}@keyframes _1DSWK2a-pe{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1);opacity:0}}
|
||||
._2rN7aLQPCl{padding:6px 15px}@media screen and (min-width:30em){._2rN7aLQPCl{padding:10px 40px}}
|
||||
._1u5AP7XMF9{padding:0 40px 5px}._2zeyKJDdFH{position:relative;height:40px}._3DQ7SXxKRA{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;width:100%}._1f-XUgRxH1{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px 0 35px;-webkit-transition:border-color .2s cubic-bezier(.645,.045,.355,1);transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._3PLtWxZwrd{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:10px}
|
||||
._2tpN_G7FeO{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;flex-wrap:wrap;font-size:.9em;padding:10px}._3wuPHKqO5W{color:#eee;flex-shrink:0;text-align:center;width:66px;background:green;border-radius:5px;padding:3px 5px;margin:0 8px}.IwiVCclCSC{flex-shrink:0;color:#999;font-size:14px}._3I1beKAMFt{flex-shrink:0;display:-webkit-box;display:flex;font-family:Roboto Mono,Menlo,monospace;-webkit-box-align:center;align-items:center;padding:8px 0;width:100%;white-space:pre;overflow:auto}._2MDNI6JESq{margin:0;padding:0;color:var(--color-text)}._2MDNI6JESq li,._2MDNI6JESq li.even{background:var(--color-background)}._3KX1sKJ1QD{padding:10px 40px}._19_8g6kTIV{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;color:#2d2d30}._19_8g6kTIV div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._3ljFcrWmBC{opacity:.3}
|
||||
input.nJQwngxVo8[type=checkbox]{--white:#fff;--grey:#d3d3d3;--color-theme:#047aff;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;background-color:darken(var(--white),2%);border:1px solid var(--grey);border-radius:26px;box-shadow:inset 0 0 0 1px var(--grey);cursor:pointer;height:28px;position:relative;-webkit-transition:border .25s .15s,box-shadow .25s .3s,padding .25s;transition:border .25s .15s,box-shadow .25s .3s,padding .25s;width:44px;vertical-align:top}input.nJQwngxVo8[type=checkbox]:after{background-color:var(--white);border:1px solid var(--grey);border-radius:24px;box-shadow:inset 0 -3px 3px rgba(0,0,0,.025),0 1px 4px rgba(0,0,0,.15),0 4px 4px rgba(0,0,0,.1);content:"";display:block;height:26px;left:0;position:absolute;right:16px;top:0;-webkit-transition:border .25s .15s,left .25s .1s,right .15s .175s;transition:border .25s .15s,left .25s .1s,right .15s .175s}input.nJQwngxVo8[type=checkbox]:checked{border-color:var(--color-theme);box-shadow:inset 0 0 0 13px var(--color-theme);padding-left:18px;-webkit-transition:border .25s,box-shadow .25s,padding .25s .15s;transition:border .25s,box-shadow .25s,padding .25s .15s}input.nJQwngxVo8[type=checkbox]:checked:after{border-color:var(--color-theme);left:16px;right:0;-webkit-transition:border .25s,left .15s .25s,right .25s .175s;transition:border .25s,left .15s .25s,right .25s .175s}
|
||||
._3evbv-Ui87{-webkit-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #525252;color:var(--color-text);background:var(--color-toggle-bg);display:-webkit-box;display:flex;position:relative}._3evbv-Ui87 input{position:absolute;left:0;opacity:0}._3evbv-Ui87 label{-webkit-box-flex:1;flex:1;z-index:2;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;padding:10px 0;cursor:pointer}._1ok8KIb1RH{z-index:1;position:absolute;display:block;left:0;height:100%;-webkit-transition:left .2s ease-out;transition:left .2s ease-out;background:var(--color-toggle-selected)}
|
||||
._2S85tjFa1n{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:4px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px;-webkit-transition:border-color .2s cubic-bezier(.645,.045,.355,1);transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._2S85tjFa1n:focus{border-color:var(--color-focus-blue)}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
|
||||
h2._1p7G03ShKD{margin:0;font-size:1.3em}@media screen and (min-width:30em){h2._1p7G03ShKD{font-size:1.5em}}h2._1p7G03ShKD span:nth-child(2){font-size:12px;color:#777;font-weight:400;margin:0 .3em}body.light{--loading-dot-1-1:rgba(0,0,0,0.1);--loading-dot-1-2:rgba(0,0,0,0.5);--loading-dot-1-3:rgba(0,0,0,0.3);--loading-dot-2-1:rgba(0,0,0,0.3);--loading-dot-2-2:rgba(0,0,0,0.1);--loading-dot-2-3:rgba(0,0,0,0.5);--loading-dot-3-1:rgba(0,0,0,0.5);--loading-dot-3-2:rgba(0,0,0,0.3);--loading-dot-3-3:rgba(0,0,0,0.1)}body.dark{--loading-dot-1-1:hsla(0,0%,100%,0.5);--loading-dot-1-2:hsla(0,0%,100%,0.1);--loading-dot-1-3:hsla(0,0%,100%,0.3);--loading-dot-2-1:hsla(0,0%,100%,0.3);--loading-dot-2-2:hsla(0,0%,100%,0.5);--loading-dot-2-3:hsla(0,0%,100%,0.1);--loading-dot-3-1:hsla(0,0%,100%,0.1);--loading-dot-3-2:hsla(0,0%,100%,0.3);--loading-dot-3-3:hsla(0,0%,100%,0.5)}._1l_b31nvKC,._1l_b31nvKC:after,._1l_b31nvKC:before{display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;font-size:0}._1l_b31nvKC{position:relative;background-color:var(--loading-dot-2-1);-webkit-animation:AmeWPxQSDb 1s step-start infinite;animation:AmeWPxQSDb 1s step-start infinite}._1l_b31nvKC:before{content:"";position:absolute;left:-12px;background-color:var(--loading-dot-1-1);-webkit-animation:_1C49ms67Ai 1s step-start infinite;animation:_1C49ms67Ai 1s step-start infinite}._1l_b31nvKC:after{content:"";position:absolute;right:-12px;background-color:var(--loading-dot-3-1);-webkit-animation:p_etI2Ova8 1s step-start infinite;animation:p_etI2Ova8 1s step-start infinite}@-webkit-keyframes _1C49ms67Ai{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@keyframes _1C49ms67Ai{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@-webkit-keyframes AmeWPxQSDb{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@keyframes AmeWPxQSDb{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@-webkit-keyframes p_etI2Ova8{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}@keyframes p_etI2Ova8{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}
|
||||
._2A0HoxnDqc{-webkit-appearance:none;outline:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;color:var(--color-btn-fg);background:var(--color-btn-bg);border:1px solid #555;border-radius:100px;font-size:.85em;padding:4px 7px}._2A0HoxnDqc:focus{border-color:var(--color-focus-blue)}._2A0HoxnDqc:hover{background:#387cec;border:1px solid #387cec;color:#fff}._2A0HoxnDqc:active{-webkit-transform:scale(.97);transform:scale(.97)}@media screen and (min-width:30em){._2A0HoxnDqc{font-size:1em;padding:6px 12px}}._2A0HoxnDqc.rBrOhcv1IU{border-color:transparent;background:none}._2A0HoxnDqc.rBrOhcv1IU:focus{border-color:var(--color-focus-blue)}._2A0HoxnDqc.rBrOhcv1IU:hover{color:#fff;background:#387cec;border:1px solid #387cec}.CtvjIaf7QB{margin-right:5px;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.CtvjIaf7QB,._2KAqQdptfT{display:-webkit-inline-box;display:inline-flex}._2KAqQdptfT{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}
|
||||
._2id19fefQX{display:-webkit-box;display:flex;flex-wrap:wrap}._2QQQyNTKoG{-webkit-box-flex:0;flex-grow:0;margin-right:10px;margin-bottom:10px;cursor:pointer;border:2px solid transparent}.XJkW0wZSAx{border-color:#387cec}
|
||||
._2OZZRrEL0J>div{min-width:345px}@media screen and (min-width:30em){._2OZZRrEL0J>div{width:360px}}._2OZZRrEL0J,.lF_ZoyIdZN{padding:6px 15px 15px}@media screen and (min-width:30em){._2OZZRrEL0J,.lF_ZoyIdZN{padding:10px 40px 40px}}.VduFBb2hWX{padding:0 15px}@media screen and (min-width:30em){.VduFBb2hWX{padding:0 40px}}.VduFBb2hWX>div{border-top:1px dashed #373737}._2NQoBOQcGA{padding:16px 0}
|
||||
._29HgaNl_dV ._73r9mFp69q{display:grid;grid-template-columns:repeat(11,-webkit-max-content);grid-template-columns:repeat(11,max-content)}.hEAcjybq1r{padding:8px 10px;height:50px;background:var(--color-background);position:-webkit-sticky;position:sticky;top:0;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}._1x7JSEXzR8{padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._1x7JSEXzR8._3n5sGVMC-F{background:var(--color-row-odd)}._26SQDJZWya{text-align:right}._3LKH-WXUjR{display:-webkit-inline-box;display:inline-flex;margin-left:10px;width:16px;height:16px}._1CoVX1S_So{-webkit-transform:rotate(180deg);transform:rotate(180deg)}
|
||||
.ctrHyq7uir{position:fixed;top:0;right:0;left:0;bottom:0;background:#444;z-index:1024}._17mHpKiOUD{outline:none;position:absolute;color:#ddd;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background:#444;padding:20px;border-radius:10px}
|
||||
._3R-iKwDVj-{background-color:rgba(0,0,0,.6)}._1vh9rFTHqn{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;-webkit-transform:translate(-50%,-50%) scale(1.5);transform:translate(-50%,-50%) scale(1.5);opacity:.6;-webkit-transition:all .3s ease;transition:all .3s ease}._3bTCBReMiZ{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}._1lwetyauPD{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;margin-top:30px}
|
||||
.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0 0 10px;padding:0 30px}.react-tabs__tab{display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:#0188fe;outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}
|
||||
.duOnUwq-nI{height:100%;display:-webkit-box;display:flex;color:var(--color-background);opacity:.1}.CCpULSE9Uh,.duOnUwq-nI{-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.CCpULSE9Uh{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:-webkit-inline-box;display:inline-flex;background-color:var(--bg-near-transparent);border-radius:30px}
|
||||
._1r-KsYFNaj{position:relative;padding:10px 0}._1r-KsYFNaj input{-webkit-appearance:none;background-color:initial;background-image:none;border:none;border-radius:0;border-bottom:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 8px;-webkit-transition:border-color .2s cubic-bezier(.645,.045,.355,1);transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._1r-KsYFNaj input:focus{border-color:var(--color-focus-blue)}._1r-KsYFNaj label{position:absolute;left:8px;bottom:22px;-webkit-transition:-webkit-transform .15s ease-in-out;transition:-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out;transition:transform .15s ease-in-out,-webkit-transform .15s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}._1r-KsYFNaj input:focus+label,._1r-KsYFNaj label.Hn6h5kxOg7{-webkit-transform:scale(.75) translateY(-25px);transform:scale(.75) translateY(-25px)}._1r-KsYFNaj input:focus+label{color:var(--color-focus-blue)}
|
||||
._3hz7LVhvUv:focus{outline:none}._3HF-KB9mgO{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}._3HF-KB9mgO ._3HzgPICn91{color:#2d2d30;opacity:.4;-webkit-transition:opacity .4s;transition:opacity .4s}._3HF-KB9mgO ._3HzgPICn91:hover{opacity:.7}._1wpZuvoD5I{padding:30px 0 10px}.L7jTy-EFJ2{display:-webkit-box;display:flex}.L7jTy-EFJ2 div{-webkit-box-flex:1;flex:1 1 auto}.L7jTy-EFJ2 div:nth-child(2){-webkit-box-flex:0;flex-grow:0;flex-basis:120px;margin-left:10px}._2fehqRU9GV{padding:30px 0 10px;display:-webkit-box;display:flex;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-align:center;align-items:center}
|
||||
._3D3ZNp4oBz{background:none;position:fixed;top:0;bottom:0;left:0;right:0;-webkit-transform:none;transform:none;padding:0;border-radius:0}.tgH3yv-xGR{position:absolute;top:10%;left:50%;-webkit-transform:translate(-50%);transform:translate(-50%);max-width:376px;margin:0 auto}._3MMuzHtwZL{background:#222}
|
||||
@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;src:local("Roboto Mono"),local("RobotoMono-Regular"),url(https://cdn.jsdelivr.net/npm/@hsjs/fonts@0.0.1/robotomono/v5/L0x5DF4xlVMF-BfR8bXMIjhLq3-cXbKD.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}.border-bottom,.border-left,.border-top,.relative{position:relative}.border-top:before{top:0}.border-bottom:after,.border-top:before{position:absolute;content:"";height:1px;width:100%;-webkit-transform:scaleY(.5) translateZ(0);transform:scaleY(.5) translateZ(0);left:0;right:0;background:#555}.border-bottom:after{bottom:0}.border-left:before{position:absolute;content:"";height:100%;width:1px;-webkit-transform:scaleX(.5) translateZ(0);transform:scaleX(.5) translateZ(0);top:0;bottom:0;background:#555;left:0}*,:after,:before{box-sizing:border-box}:root{--font-mono:"Roboto Mono",Menlo,monospace;--font-normal:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,"PingFang SC","Microsoft YaHei","微软雅黑",Arial,sans-serif;--color-focus-blue:#1a73e8}body{font-family:Merriweather Sans,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,PingFang SC,Microsoft YaHei,微软雅黑;margin:0;padding:0}body,body.dark{--color-background:#202020;--color-text:#ddd;--color-text-secondary:#ccc;--color-bg-sidebar:#2d2d30;--color-sb-active-row-bg:#494b4e;--color-input-bg:#2d2d30;--color-input-border:#3f3f3f;--color-toggle-bg:#353535;--color-toggle-selected:#181818;--color-icon:#c7c7c7;--color-btn-bg:#232323;--color-btn-fg:#bebebe;--color-bg-proxy-selected:#303030;--color-row-odd:#282828;--bg-modal:#1f1f20;--bg-near-transparent:hsla(0,0%,100%,0.1)}body.light{--color-background:#fbfbfb;--color-text:#222;--color-text-secondary:#646464;--color-bg-sidebar:#e7e7e7;--color-sb-active-row-bg:#d0d0d0;--color-input-bg:#fff;--color-input-border:silver;--color-toggle-bg:#fff;--color-toggle-selected:#d7d7d7;--color-icon:#5b5b5b;--color-btn-bg:#f4f4f4;--color-btn-fg:#101010;--color-bg-proxy-selected:#cfcfcf;--color-row-odd:#f5f5f5;--bg-modal:#fbfbfb;--bg-near-transparent:rgba(0,0,0,0.1)}.flexCenter{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.fabgrp{position:fixed;z-index:3;right:20px;bottom:20px}
|
||||
._35EMVy62Je{display:-webkit-box;display:flex;background:var(--color-background);color:var(--color-text);min-height:300px;height:100vh}@media (max-width:768px){._35EMVy62Je{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}.AwL8oIubvP{-webkit-box-flex:1;flex-grow:1;overflow:auto}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,62 @@
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
|
||||
/*!
|
||||
Copyright (c) 2015 Jed Watson.
|
||||
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Copyright (c) 2017 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Adapted from jQuery UI core
|
||||
*
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/category/ui-core/
|
||||
*/
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
/** @license React v0.0.0-experimental-241c4467e
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v16.6.1
|
||||
* react-cache.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="shortcut icon" href="yacd.ico">
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="yacd-64.png">
|
||||
<link rel="icon" type="image/png" sizes="128x128" href="yacd-128.png">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name=viewport content="width=device-width, initial-scale=1">
|
||||
<meta name="application-name" content="yacd">
|
||||
<meta name="description" content="Yet Another Clash Dashboard">
|
||||
<meta name="theme-color" content="#202020">
|
||||
<title>yacd - Yet Another Clash Dashboard</title>
|
||||
<link href="https://fonts.loli.net/css?family=Merriweather+Sans:400,700|Roboto+Mono&display=swap" rel="stylesheet">
|
||||
<!-- <link rel="prefetch" href="https://cdn.jsdelivr.net/npm/@hsjs/fonts@0.0.1/robotomono/v5/L0x5DF4xlVMF-BfR8bXMIjhLq3-cXbKD.woff2"> -->
|
||||
<!-- <link rel="prefetch" href="https://fonts.loli.net/css?family=Merriweather+Sans:400,700&display=swap" rel="stylesheet"> -->
|
||||
<meta property="og:image" content="https://user-images.githubusercontent.com/1166872/47304841-536f3d80-d65a-11e8-8908-1917127dafc5.png">
|
||||
<meta property="og:site_name" content="yacd">
|
||||
<meta property="og:type" content="object">
|
||||
<meta property="og:title" content="yacd">
|
||||
<meta property="og:url" content="http://yacd.haishan.me">
|
||||
<meta property="og:description" content="Yet Another Clash Dashboard">
|
||||
|
||||
|
||||
<link href="app.02ba11cfe63c3d5e1e73.css" rel="stylesheet">
|
||||
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
|
||||
<script src="runtime.bff50a6a16255f3cd6b4.js" type="text/javascript"></script>
|
||||
|
||||
<script src="core-js~app.ed5efc5f285120e8ca95.js" type="text/javascript"></script>
|
||||
|
||||
<script src="react~app.71e146262a2c1f21d27e.js" type="text/javascript"></script>
|
||||
|
||||
<script src="app.bd4b077ac38d27d94ff2.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,17 @@
|
||||
/** @license React v0.0.0-experimental-241c4467e
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v0.0.0-experimental-241c4467e
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{BVyM:function(e,t,a){"use strict";a.r(t);var r=a("ODXe"),n=a("q1tI"),c=a.n(n),i=a("5Wrh"),l=a("iR1w"),o=a("OAQO"),u=a("WfPo"),s=a("OADI"),f=a("DKqX"),p=a("17x9"),m=a.n(p),d=a("xrux"),v=a.n(d),b={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function y(e){var t=e.type,a=e.payload,r=e.proxy,n=e.id,i=function(e){var t=e.proxy,a=b._default;return b[t]&&(a=b[t]),{color:a}}({proxy:r});return c.a.createElement("div",{className:v.a.rule},c.a.createElement("div",{className:v.a.left},n),c.a.createElement("div",null,c.a.createElement("div",{className:v.a.b},a),c.a.createElement("div",{className:v.a.a},c.a.createElement("div",{className:v.a.type},t),c.a.createElement("div",{style:i},r))))}y.propTypes={id:m.a.number,type:m.a.string,payload:m.a.string,proxy:m.a.string};var O=y,E=a("II4a"),h=a("EwbC"),g=Object(u.a)((function(e){return{searchText:Object(h.d)(e),updateSearchText:h.f}}))(E.a),w=a("Kv4h"),x=c.a.memo,j=c.a.useEffect,k=c.a.useMemo,C=c.a.useCallback;function N(e,t){return t[e].id}var I=x((function(e){var t=e.index,a=e.style,r=e.data[t];return c.a.createElement("div",{style:a},c.a.createElement(O,r))}),l.b);t.default=Object(u.a)((function(e){return{apiConfig:Object(s.b)(e),rules:Object(h.c)(e)}}))((function(e){var t=e.dispatch,a=e.apiConfig,n=e.rules,u=C((function(){t(Object(h.a)(a))}),[a,t]);j((function(){t(Object(h.b)(a))}),[t,a]);var s=Object(w.a)(),p=Object(r.a)(s,2),m=p[0],d=p[1],v=k((function(){return c.a.createElement(o.a,{width:16})}),[]);return c.a.createElement("div",null,c.a.createElement(f.a,{title:"Rules"}),c.a.createElement(g,null),c.a.createElement("div",{ref:m,style:{paddingBottom:30}},c.a.createElement(l.a,{height:d-30,width:"100%",itemCount:n.length,itemSize:80,itemData:n,itemKey:N},I)),c.a.createElement("div",{className:"fabgrp"},c.a.createElement(i.a,{text:"Refresh",start:v,onClick:u})))}))},OAQO:function(e,t,a){"use strict";var r=a("q1tI"),n=a.n(r),c=a("17x9"),i=a.n(c);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},c=Object.keys(e);for(r=0;r<c.length;r++)a=c[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)a=c[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var u=function(e){var t=e.color,a=e.size,r=o(e,["color","size"]);return n.a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r),n.a.createElement("polyline",{points:"23 4 23 10 17 10"}),n.a.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))};u.propTypes={color:i.a.string,size:i.a.oneOfType([i.a.string,i.a.number])},u.defaultProps={color:"currentColor",size:"24"},t.a=u},xrux:function(e,t,a){e.exports={rule:"_3eSLieOhVX",left:"_2n1pW09UvV",a:"t1XJIwvW7A",b:"_1fNf8kj0HA",type:"_3yJmN0tON0"}}}]);
|
||||
@ -0,0 +1 @@
|
||||
._3eSLieOhVX{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:6px 15px}@media screen and (min-width:30em){._3eSLieOhVX{padding:10px 40px}}._2n1pW09UvV{width:40px;padding-right:15px;color:var(--color-text-secondary);opacity:.4}.t1XJIwvW7A{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;font-size:12px;opacity:.8}._1fNf8kj0HA{padding:10px 0;font-family:Roboto Mono,Menlo,monospace;font-size:16px}@media screen and (min-width:30em){._1fNf8kj0HA{font-size:19px}}._3yJmN0tON0{width:110px}
|
||||
@ -0,0 +1 @@
|
||||
!function(e){function t(t){for(var n,o,i=t[0],l=t[1],f=t[2],s=t[3]||[],d=0,h=[];d<i.length;d++)o=i[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&h.push(a[o][0]),a[o]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(p&&p(t),u.push.apply(u,s);h.length;)h.shift()();return c.push.apply(c,f||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;o<r.length;o++){var f=r[o];0!==a[f]&&(n=!1)}n&&(c.splice(t--,1),e=l(l.s=r[0]))}return 0===c.length&&(u.forEach((function(e){if(void 0===a[e]){a[e]=null;var t=document.createElement("link");l.nc&&t.setAttribute("nonce",l.nc),t.rel="prefetch",t.as="script",t.href=i(e),document.head.appendChild(t)}})),u.length=0),e}var n={},o={5:0},a={5:0},c=[],u=[];function i(e){return l.p+""+({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"c47b16ee58ce8279a498",4:"14d9a873af5f71681a8b",6:"7079553c634b376d7c1c",7:"0af997e119f76c516134",8:"3361cb36d32327fae41e"}[e]+".js"}function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{2:1,4:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n=({2:"proxies",4:"rules",6:"vendors~chartjs",7:"vendors~proxies"}[e]||e)+"."+{2:"241abbb3a6eecf3d305f",4:"f60a65ba29535b87ba96",6:"31d6cfe0d16ae931b73c",7:"31d6cfe0d16ae931b73c",8:"31d6cfe0d16ae931b73c"}[e]+".css",a=l.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var i=(s=c[u]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(i===n||i===a))return t()}var f=document.getElementsByTagName("style");for(u=0;u<f.length;u++){var s;if((i=(s=f[u]).getAttribute("data-href"))===n||i===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],d.parentNode.removeChild(d),r(c)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,l.nc&&u.setAttribute("nonce",l.nc),u.src=i(e);var f=new Error;c=function(t){u.onerror=u.onload=null,clearTimeout(s);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",f.name="ChunkLoadError",f.type=n,f.request=o,r[1](f)}a[e]=void 0}};var s=setTimeout((function(){c({type:"timeout",target:u})}),12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(t)},l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],s=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var p=s;r()}([]);
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Chart.js v2.9.3
|
||||
* https://www.chartjs.org
|
||||
* (c) 2019 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,14 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
package/ntlf9t/luci-app-clash/root/usr/share/clash/yacd/yacd.ico
Normal file
BIN
package/ntlf9t/luci-app-clash/root/usr/share/clash/yacd/yacd.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@ -15,15 +15,19 @@ elif [ $lang == "zh_cn" ];then
|
||||
echo "DNS设置检查..." >$REAL_LOG
|
||||
fi
|
||||
|
||||
if [ -z "$(grep "^ \{0,\}tun:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}listen:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}enhanced-mode:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}enable:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}dns:" $CONFIG_YAML)" ] ;then
|
||||
|
||||
#===========================================================================================================================
|
||||
if [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
|
||||
if [ -z "$(grep "^ \{0,\}tun:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}listen:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}enhanced-mode:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}enable:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}dns:" $CONFIG_YAML)" ] ;then
|
||||
uci set clash.config.mode="0" && uci set clash.config.tun_mode="1" && uci commit clash
|
||||
else
|
||||
fi
|
||||
elif [ "${core}" -eq 1 ] || [ "${core}" -eq 2 ];then
|
||||
if [ -z "$(grep "^ \{0,\}listen:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}enhanced-mode:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}enable:" $CONFIG_YAML)" ] || [ -z "$(grep "^ \{0,\}dns:" $CONFIG_YAML)" ] ;then
|
||||
uci set clash.config.mode="1" && uci set clash.config.tun_mode="0" && uci commit clash
|
||||
fi
|
||||
fi
|
||||
#===========================================================================================================================
|
||||
fi
|
||||
|
||||
|
||||
sleep 2
|
||||
#===========================================================================================================================
|
||||
|
||||
Loading…
Reference in New Issue
Block a user