luci-app-clash: sync with upstream source

This commit is contained in:
CN_SZTL 2020-06-20 18:17:23 +08:00
parent 32cda4b63d
commit d6c7bff4e4
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
95 changed files with 91516 additions and 394 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-clash
PKG_VERSION:=1.7.1
PKG_VERSION:=1.7.3.2
PKG_MAINTAINER:=frainzy1477
@ -12,7 +12,7 @@ define Package/luci-app-clash
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI app for clash
DEPENDS:=+luci-base +wget +iptables +coreutils-base64 +coreutils +coreutils-nohup +bash +ipset +libustream-openssl +curl +jsonfilter +ca-certificates +iptables-mod-tproxy
DEPENDS:=+luci-base +wget +iptables +coreutils-base64 +coreutils +coreutils-nohup +bash +ipset +libustream-openssl +curl +jsonfilter +ca-certificates +iptables-mod-tproxy +kmod-tun
PKGARCH:=all
MAINTAINER:=frainzy1477
endef
@ -93,6 +93,7 @@ endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/clash
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/clash/provider
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/clash
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(INSTALL_DIR) $(1)/etc/init.d
@ -111,7 +112,10 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/clash/dtun
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/share/clashbackup
$(INSTALL_DIR) $(1)/usr/share/clash/provider
$(INSTALL_DIR) $(1)/etc/clash/provider
$(INSTALL_DIR) $(1)/etc/clash/proxyprovider
$(INSTALL_DIR) $(1)/etc/clash/ruleprovider
$(INSTALL_DIR) $(1)/usr/share/clash/config
$(INSTALL_DIR) $(1)/usr/share/clash/config/sub
$(INSTALL_DIR) $(1)/usr/share/clash/config/upload
@ -120,8 +124,9 @@ define Package/$(PKG_NAME)/install
$(INSTALL_BIN) ./root/etc/init.d/clash $(1)/etc/init.d/clash
$(INSTALL_CONF) ./root/etc/config/clash $(1)/etc/config/clash
$(INSTALL_CONF) ./root/etc/clash/* $(1)/etc/clash/
$(INSTALL_CONF) ./root/etc/clash/Country.mmdb $(1)/etc/clash/
$(INSTALL_CONF) ./root/etc/clash/ruleprovider/* $(1)/etc/clash/ruleprovider/
$(INSTALL_BIN) ./root/usr/share/clash/provider/* $(1)/usr/share/clash/provider/
$(INSTALL_BIN) ./root/usr/share/clash/*.sh $(1)/usr/share/clash/
$(INSTALL_BIN) ./root/usr/share/clash/dns.yaml $(1)/usr/share/clash/
$(INSTALL_BIN) ./root/usr/share/clash/rules/g_rules/Steam.rules $(1)/usr/share/clash/rules/g_rules
@ -137,15 +142,16 @@ 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.1560b07adc97ac0ac265.css $(1)/usr/share/clash/dashboard/
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/main.772fa8c97df0c4f1549a.css $(1)/usr/share/clash/dashboard/
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/img/ffac0fa1d89f15922b4594863b8b32e9.png $(1)/usr/share/clash/dashboard/img/
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/1.bundle.1560b07adc97ac0ac265.min.js $(1)/usr/share/clash/dashboard/js/
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/bundle.1560b07adc97ac0ac265.min.js $(1)/usr/share/clash/dashboard/js/
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/1.bundle.772fa8c97df0c4f1549a.min.js $(1)/usr/share/clash/dashboard/js/
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/bundle.772fa8c97df0c4f1549a.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/
$(INSTALL_DATA) ./luasrc/model/cbi/clash/*.lua $(1)/usr/lib/lua/luci/model/cbi/clash/
$(INSTALL_DATA) ./luasrc/model/cbi/clash/provider/*.lua $(1)/usr/lib/lua/luci/model/cbi/clash/provider/
$(INSTALL_DATA) ./luasrc/view/clash/* $(1)/usr/lib/lua/luci/view/clash/
$(INSTALL_DATA) ./po/zh-cn/clash.zh-cn.lmo $(1)/usr/lib/lua/luci/i18n/
endef

View File

@ -18,15 +18,23 @@ function index()
entry({"admin", "services", "clash", "overview"},cbi("clash/overview"),_("Overview"), 10).leaf = true
entry({"admin", "services", "clash", "client"},cbi("clash/client"),_("Client"), 20).leaf = true
entry({"admin", "services", "clash", "import"},cbi("clash/import"),_("Import Config"), 25).leaf = true
entry({"admin", "services", "clash", "config"}, firstchild(),_("Config"), 25)
entry({"admin", "services", "clash", "config", "import"},cbi("clash/import"),_("Import Config"), 25).leaf = true
entry({"admin", "services", "clash", "config", "config"},cbi("clash/config"),_("Select Config"), 30).leaf = true
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", "config", "create"},cbi("clash/create"),_("Standard Config"), 35).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", "config", "providers"},cbi("clash/provider/providers"),_("Provider Config"), 40).leaf = true
entry({"admin", "services", "clash", "proxyprovider"},cbi("clash/provider/proxy_provider"), nil).leaf = true
entry({"admin", "services", "clash", "ruleprovider"},cbi("clash/provider/rule_provider"), nil).leaf = true
entry({"admin", "services", "clash", "rules"},cbi("clash/provider/rules"), nil).leaf = true
entry({"admin", "services", "clash", "pgroups"},cbi("clash/provider/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
entry({"admin", "services", "clash", "settings", "dns"},cbi("clash/dns"),_("DNS Settings"), 70).leaf = true

View File

@ -89,7 +89,7 @@ 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", "config"))
HTTP.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config","config"))
end
end
@ -206,7 +206,7 @@ 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", "config"))
HTTP.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config" ,"config"))
end
end
@ -306,7 +306,7 @@ 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", "config"))
HTTP.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "config"))
end
end

View File

@ -29,7 +29,6 @@ o.inputstyle = "reload"
o.write = function()
uci:commit("clash")
luci.sys.call("bash /usr/share/clash/rule.sh >>/usr/share/clash/clash.txt >/dev/null 2>&1 &")
HTTP.redirect(DISP.build_url("admin", "services", "clash", "create"))
end
local rule = "/usr/share/clash/custom_rule.yaml"
@ -117,7 +116,7 @@ o.inputtitle = translate("Save & Apply")
o.inputstyle = "apply"
o.write = function()
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "create"))
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "create"))
end
o = b:option(Button,"Delete_Severs")
@ -126,7 +125,7 @@ o.inputstyle = "reset"
o.write = function()
krk.uci:delete_all("clash", "servers", function(s) return true end)
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "create"))
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "create"))
end
o = b:option(Button,"Delete_Provider")
@ -135,7 +134,7 @@ o.inputstyle = "reset"
o.write = function()
krk.uci:delete_all("clash", "provider", function(s) return true end)
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "create"))
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "create"))
end
@ -145,7 +144,7 @@ o.inputstyle = "reset"
o.write = function()
krk.uci:delete_all("clash", "groups", function(s) return true end)
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "create"))
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "create"))
end

View File

@ -38,6 +38,34 @@ cdns = s:option(Flag, "culan", translate("Enable Lan DNS"))
cdns.default = 1
cdns.description = translate("Enabling will set custom DNS Servers for Lan")
y = s:option(ListValue, "access_control", translate("Access Control"))
y:value("0", translate("disabled"))
y:value("1", translate("Whitelist IPs"))
y:value("2", translate("Blacklist Ips"))
y.description = translate("Whitelist or Blacklist IPs to use Clash ( Only support enhanced-mode: redir-host )")
o = s:option(DynamicList, "proxy_lan_ips", translate("Proxy Lan List"))
o.datatype = "ipaddr"
o.description = translate("Only selected IPs will be proxied")
luci.ip.neighbors({ family = 4 }, function(entry)
if entry.reachable then
o:value(entry.dest:string())
end
end)
o:depends("access_control", 1)
o = s:option(DynamicList, "reject_lan_ips", translate("Bypass Lan List"))
o.datatype = "ipaddr"
o.description = translate("Selected IPs will not be proxied")
luci.ip.neighbors({ family = 4 }, function(entry)
if entry.reachable then
o:value(entry.dest:string())
end
end)
o:depends("access_control", 2)
dns = s:option(DynamicList, "landns", translate("Lan DNS servers"))
dns.description = translate("Set custom DNS Servers for Lan")

View File

@ -75,6 +75,7 @@ o = s:option(ListValue, "p_mode", translate("Proxy Mode"))
o.description = translate("Choose proxy mode")
o:value("Rule", translate("RULE"))
o:value("Global", translate("GLOBAL"))
o:value("Script", translate("SCRIPT"))
o:value("Direct", translate("DIRECT"))
o.default = "Rule"

View File

@ -0,0 +1,88 @@
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 Group"))
m.pageaction = false
m.redirect = luci.dispatcher.build_url("admin/services/clash/config/providers")
if m.uci:get(clash, sid) ~= "pgroups" then
luci.http.redirect(m.redirect)
return
end
-- [[ Groups Setting ]]--
s = m:section(NamedSection, sid, "pgroups")
s.anonymous = true
s.addremove = false
o = s:option(ListValue, "type", translate("Group Type"))
o.rmempty = true
o.description = translate("Choose The Operation Mode")
o:value("select", translate("Select"))
o:value("url-test", translate("URL-Test"))
o:value("fallback", translate("Fallback"))
o:value("load-balance", translate("Load-Balance"))
o:value("relay", translate("Relay"))
o = s:option(Value, "name", translate("Group Name"))
o.rmempty = false
o = s:option(Value, "test_url", translate("Test URL"))
o.default = "http://www.gstatic.com/generate_204"
o.rmempty = true
o:depends("type", "url-test")
o:depends("type", "fallback")
o:depends("type", "load-balance")
o = s:option(Value, "test_interval", translate("Test Interval(s)"))
o.default = "300"
o.rmempty = true
o:depends("type", "url-test")
o:depends("type", "fallback")
o:depends("type", "load-balance")
o = s:option(DynamicList, "other_group", translate("Other Group"))
o.rmempty = true
o.description = translate("Proxy Groups Must Exist In Rule")
o:value("", translate("None"))
uci:foreach("clash", "pgroups",
function(s)
if s.name ~= "" and s.name ~= nil and s.name ~= m.uci:get(clash, sid, "name") then
o:value(s.name)
end
end)
o:value("DIRECT")
o:value("REJECT")
local t = {
{Apply, Return}
}
b = m:section(Table, t)
o = b:option(Button,"Apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "apply"
o.write = function()
m.uci:commit("clash")
sys.call("/usr/share/clash/provider/pgroups.sh start >/dev/null 2>&1 &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Return")
o.inputtitle = translate("Back to Overview")
o.inputstyle = "reset"
o.write = function()
m.uci:revert(clash)
luci.http.redirect(m.redirect)
--luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
return m

View File

@ -0,0 +1,251 @@
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 fs = require "luci.clash"
local uci = require "luci.model.uci".cursor()
local s, o, krk, z, r
local clash = "clash"
local http = luci.http
krk = Map(clash)
s = krk:section(TypedSection, "clash", translate("Provider Config"))
s.anonymous = true
krk.pageaction = false
o = s:option(Flag, "provider_config", translate("Enable Create"))
o.default = 1
o.description = translate("Enable to create configuration")
o = s:option(Flag, "ppro", translate("Use Proxy Provider"))
o.description = translate("Use Proxy Provider")
o = s:option(Flag, "rulprp", translate("Use Rule Provider"))
o.description = translate("Use Rule Provider")
o = s:option(Flag, "rul", translate("Use Rules"))
o.description = translate("Use Rules")
o = s:option(Flag, "script", translate("Use Script"))
o.description = translate("Use Script")
o = s:option(Value, "name_tag")
o.title = translate("Config Name")
o.rmempty = true
o.description = translate("Give a name for your config")
local t = {
{Creat_Config, Apply, Delete_Groups, Delete_ProxyPro, Delete_RulePro,Delete_Rules}
}
b = krk:section(Table, t)
o = b:option(Button,"Creat_Config")
o.inputtitle = translate("Create Config")
o.inputstyle = "apply"
o.write = function()
krk.uci:commit("clash")
luci.sys.call("bash /usr/share/clash/provider/provider.sh >/dev/null 2>&1 &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash"))
end
o = b:option(Button,"Apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "apply"
o.write = function()
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Delete_ProxyPro")
o.inputtitle = translate("Delete Proxy Provider")
o.inputstyle = "reset"
o.write = function()
krk.uci:delete_all("clash", "proxyprovider", function(s) return true end)
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Delete_RulePro")
o.inputtitle = translate("Delete Rule Provider")
o.inputstyle = "reset"
o.write = function()
krk.uci:delete_all("clash", "ruleprovider", function(s) return true end)
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Delete_Rules")
o.inputtitle = translate("Delete Rules")
o.inputstyle = "reset"
o.write = function()
krk.uci:delete_all("clash", "rules", function(s) return true end)
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Delete_Groups")
o.inputtitle = translate("Delete Groups")
o.inputstyle = "reset"
o.write = function()
krk.uci:delete_all("clash", "pgroups", function(s) return true end)
krk.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
-- [[ Groups Manage ]]--
x = krk:section(TypedSection, "pgroups", translate("Policy Groups"))
x.anonymous = true
x.addremove = true
x.sortable = true
x.template = "cbi/tblsection"
x.extedit = luci.dispatcher.build_url("admin/services/clash/pgroups/%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("Group Type"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = x:option(DummyValue, "name", translate("Group Name"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
-- [[ Proxy-Provider Manage ]]--
z = krk:section(TypedSection, "proxyprovider", translate("Proxy Provider"))
z.anonymous = true
z.addremove = true
z.sortable = true
z.template = "cbi/tblsection"
z.extedit = luci.dispatcher.build_url("admin/services/clash/proxyprovider/%s")
function z.create(...)
local sid = TypedSection.create(...)
if sid then
luci.http.redirect(z.extedit % sid)
return
end
end
o = z:option(DummyValue, "name", translate("Provider Name"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = z:option(DummyValue, "type", translate("Provider Type"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
-- [[ Rule-Provider Manage ]]--
r = krk:section(TypedSection, "ruleprovider", translate("Rule Provider"))
r.anonymous = true
r.addremove = true
r.sortable = true
r.template = "cbi/tblsection"
r.extedit = luci.dispatcher.build_url("admin/services/clash/ruleprovider/%s")
function r.create(...)
local sid = TypedSection.create(...)
if sid then
luci.http.redirect(r.extedit % sid)
return
end
end
o = r:option(DummyValue, "name", translate("Provider Name"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = r:option(DummyValue, "type", translate("Provider Type"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = r:option(DummyValue, "behavior", translate("Provider Behavior"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
-- [[ Rule Manage ]]--
q = krk:section(TypedSection, "rules", translate("Rules"))
q.anonymous = true
q.addremove = true
q.sortable = true
q.template = "cbi/tblsection"
q.extedit = luci.dispatcher.build_url("admin/services/clash/rules/%s")
function q.create(...)
local sid = TypedSection.create(...)
if sid then
luci.http.redirect(q.extedit % sid)
return
end
end
o = q:option(DummyValue, "type", translate("Rule Type"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
o = q:option(DummyValue, "rulename", translate("Description"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("-")
end
o = q:option(DummyValue, "rulegroups", translate("Groups"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or translate("None")
end
m = Map("clash")
y = m:section(TypedSection, "clash" , translate("Script"))
y.anonymous = true
y.addremove=false
m.pageaction = false
local script="/usr/share/clash/provider/script.yaml"
sev = y:option(TextValue, "scriptt")
sev.description = translate("NB: Set Clash Mode to Script if want to use")
sev.rows = 10
sev.wrap = "off"
sev.cfgvalue = function(self, section)
return NXFS.readfile(script) or ""
end
sev.write = function(self, section, value)
NXFS.writefile(script, value:gsub("\r\n", "\n"))
end
o = y:option(Button,"Apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "apply"
o.write = function()
m.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
return krk,m

View File

@ -0,0 +1,160 @@
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]
local http = luci.http
local fss = require "luci.clash"
function IsYamlFile(e)
e=e or""
local e=string.lower(string.sub(e,-5,-1))
return e == ".yaml"
end
function IsYmlFile(e)
e=e or""
local e=string.lower(string.sub(e,-4,-1))
return e == ".yml"
end
m = Map(clash, translate("Edit Proxy Provider"))
m.pageaction = false
m.redirect = luci.dispatcher.build_url("admin/services/clash/config/providers")
if m.uci:get(clash, sid) ~= "proxyprovider" then
luci.http.redirect(m.redirect)
return
end
s = m:section(NamedSection, sid, "proxyprovider")
s.anonymous = true
s.addremove = false
o = s:option(ListValue, "type", translate("Provider Type"))
o.rmempty = false
o.description = translate("Provider Type")
o:value("http")
o:value("file")
o = s:option(FileUpload, "",translate("Upload Provider File"))
o.title = translate("Provider File")
o.template = "clash/clash_upload"
o:depends("type", "file")
um = s:option(DummyValue, "", nil)
um.template = "clash/clash_dvalue"
local dir, fd
dir = "/etc/clash/proxyprovider/"
http.setfilehandler(
function(meta, chunk, eof)
if not fd then
if not meta then return end
if meta and chunk then fd = nixio.open(dir .. meta.file, "w") end
if not fd then
um.value = translate("upload file error.")
return
end
end
if chunk and fd then
fd:write(chunk)
end
if eof and fd then
fd:close()
fd = nil
um.value = translate("File saved to") .. ' "/etc/clash/proxyprovider/"'
end
end
)
if luci.http.formvalue("upload") then
local f = luci.http.formvalue("ulfile")
if #f <= 0 then
um.value = translate("No specify upload file.")
end
end
o = s:option(Value, "name", translate("Provider Name"))
o.rmempty = false
o = s:option(ListValue, "path", translate("Provider Path"))
o.description = translate("Upload Provider File If Empty")
local p,h={}
for t,f in ipairs(fss.glob("/etc/clash/proxyprovider/*"))do
h=fss.stat(f)
if h then
p[t]={}
p[t].name=fss.basename(f)
if IsYamlFile(p[t].name) or IsYmlFile(p[t].name) then
o:value("./proxyprovider/"..p[t].name)
end
end
end
o.rmempty = true
o:depends("type", "file")
o = s:option(Value, "provider_url", translate("Provider URL"))
o.description = translate("【HTTP】./hk.yaml")
o.rmempty = true
o:depends("type", "http")
o = s:option(Value, "provider_interval", translate("Provider Interval"))
o.default = "3600"
o.rmempty = true
o:depends("type", "http")
o = s:option(ListValue, "health_check", translate("Provider Health Check"))
o:value("false", translate("Disable"))
o:value("true", translate("Enable"))
o.default=true
o = s:option(Value, "health_check_url", translate("Health Check URL"))
o.default = "http://www.gstatic.com/generate_204"
o.rmempty = true
o = s:option(Value, "health_check_interval", translate("Health Check Interval"))
o.default = "300"
o.rmempty = true
o = s:option(DynamicList, "pgroups", translate("Policy Group"))
o.rmempty = true
m.uci:foreach("clash", "pgroups",
function(s)
if s.name ~= "" and s.name ~= nil and s.type ~= "relay" then
o:value(s.name)
end
end)
local t = {
{Apply, Return}
}
b = m:section(Table, t)
o = b:option(Button,"Apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "apply"
o.write = function()
m.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Return")
o.inputtitle = translate("Back to Overview")
o.inputstyle = "reset"
o.write = function()
m.uci:revert(clash)
luci.http.redirect(m.redirect)
--luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
return m

View File

@ -0,0 +1,150 @@
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]
local http = luci.http
local fss = require "luci.clash"
function IsYamlFile(e)
e=e or""
local e=string.lower(string.sub(e,-5,-1))
return e == ".yaml"
end
function IsYmlFile(e)
e=e or""
local e=string.lower(string.sub(e,-4,-1))
return e == ".yml"
end
function IsFile(e)
e=e or""
local e=string.lower(string.sub(e,-5,-1))
return e == ".list"
end
m = Map(clash, translate("Edit Rule Provider"))
m.pageaction = false
m.redirect = luci.dispatcher.build_url("admin/services/clash/config/providers")
if m.uci:get(clash, sid) ~= "ruleprovider" then
luci.http.redirect(m.redirect)
return
end
s = m:section(NamedSection, sid, "ruleprovider")
s.anonymous = true
s.addremove = false
o = s:option(Value, "name", translate("Rule Provider Name"))
o.rmempty = false
o = s:option(ListValue, "type", translate("Provider Type"))
o.rmempty = false
o.description = translate("Provider Type")
o:value("http")
o:value("file")
o = s:option(ListValue, "behavior", translate("Provider Behavior"))
o.rmempty = false
o.description = translate("ipcidr # or domain")
o:value("ipcidr")
o:value("domain")
o = s:option(FileUpload, "",translate("Upload Provider File"))
o.title = translate("Provider File")
o.template = "clash/clash_upload"
o:depends("type", "file")
um = s:option(DummyValue, "", nil)
um.template = "clash/clash_dvalue"
local dir, fd
dir = "/etc/clash/ruleprovider/"
http.setfilehandler(
function(meta, chunk, eof)
if not fd then
if not meta then return end
if meta and chunk then fd = nixio.open(dir .. meta.file, "w") end
if not fd then
um.value = translate("upload file error.")
return
end
end
if chunk and fd then
fd:write(chunk)
end
if eof and fd then
fd:close()
fd = nil
um.value = translate("File saved to") .. ' "/etc/clash/ruleprovider/"'
end
end
)
if luci.http.formvalue("upload") then
local f = luci.http.formvalue("ulfile")
if #f <= 0 then
um.value = translate("No specify upload file.")
end
end
o = s:option(ListValue, "path", translate("Provider Path"))
o.description = translate("Upload Provider File If Empty")
local p,h={}
for t,f in ipairs(fss.glob("/etc/clash/ruleprovider/*"))do
h=fss.stat(f)
if h then
p[t]={}
p[t].name=fss.basename(f)
if IsYamlFile(p[t].name) or IsYmlFile(p[t].name) or IsFile(p[t].name) then
o:value("./ruleprovider/"..p[t].name)
end
end
end
o:depends("type", "file")
o = s:option(Value, "url", translate("Provider URL"))
o.description = translate("【HTTP】./hk.yaml")
o:depends("type", "http")
o = s:option(Value, "interval", translate("Provider Interval"))
o.default = "3600"
o:depends("type", "http")
local t = {
{Apply, Return}
}
b = m:section(Table, t)
o = b:option(Button,"Apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "apply"
o.write = function()
m.uci:commit("clash")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Return")
o.inputtitle = translate("Back to Overview")
o.inputstyle = "reset"
o.write = function()
m.uci:revert(clash)
luci.http.redirect(m.redirect)
--luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
return m

View File

@ -0,0 +1,110 @@
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 Rules"))
--m.pageaction = false
m.redirect = luci.dispatcher.build_url("admin/services/clash/config/providers")
if m.uci:get(clash, sid) ~= "rules" then
luci.http.redirect(m.redirect)
return
end
s = m:section(NamedSection, sid, "rules")
s.anonymous = true
s.addremove = false
m.pageaction = false
o = s:option(ListValue, "type", translate("Rule Type"))
o.rmempty = false
o.description = translate("Choose Type")
o:value("RULE-SET", translate("RULE-SET"))
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:value("GEOIP", translate("GEOIP"))
o:value("MATCH", translate("MATCH"))
o = s:option(ListValue, "rulename", translate("Description"))
uci:foreach("clash", "ruleprovider",
function(s)
if s.name ~= "" and s.name ~= nil then
o:value(s.name)
end
end)
o.description = translate("Select rule provider name")
o:depends("type", "RULE-SET")
o = s:option(ListValue, "rulegroups", translate("Select Proxy Group"))
uci:foreach("clash", "pgroups",
function(s)
if s.name ~= "" and s.name ~= nil then
o:value(s.name)
end
end)
o:value("DIRECT")
o:value("REJECT")
o.description = translate("Select a policy group to add rule")
o = s:option(Value, "rulenamee", translate("Description"))
o:depends("type", "DST-PORT")
o:depends("type", "SRC-PORT")
o:depends("type", "SRC-IP-CIDR")
o:depends("type", "IP-CIDR")
o:depends("type", "DOMAIN")
o:depends("type", "DOMAIN-KEYWORD")
o:depends("type", "DOMAIN-SUFFIX")
o:depends("type", "GEOIP")
o = s:option(Flag, "res", translate("No Resolve"))
o.default = 0
--o:value("RULE-SET", translate("RULE-SET"))
o:depends("type", "DST-PORT")
o:depends("type", "SRC-PORT")
o:depends("type", "SRC-IP-CIDR")
o:depends("type", "IP-CIDR")
o:depends("type", "DOMAIN")
o:depends("type", "DOMAIN-KEYWORD")
o:depends("type", "DOMAIN-SUFFIX")
o:depends("type", "GEOIP")
local t = {
{Apply, Return}
}
b = m:section(Table, t)
o = b:option(Button,"Apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "apply"
o.write = function()
m.uci:commit("clash")
sys.call("/usr/share/clash/provider/rules.sh start >/dev/null 2>&1 &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
o = b:option(Button,"Return")
o.inputtitle = translate("Back to Overview")
o.inputstyle = "reset"
o.write = function()
m.uci:revert(clash)
luci.http.redirect(m.redirect)
--luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash", "config", "providers"))
end
return m

View File

@ -24,7 +24,7 @@ sul.addremove=false
o = sul:option(FileUpload, "")
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)")
..translate("Dreamacro clash tun core (dtun) - (https://github.com/Dreamacro/clash/releases/tag/premium)")
.."<br />"
..translate("comzyh clash tun core (ctun) - (https://github.com/comzyh/clash/releases)")
.."<br />"
@ -33,8 +33,7 @@ o.description =''..font_red..bold_on..translate("Manually download, unzip and re
..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/upload_core"
@ -118,7 +117,7 @@ o = s:option(ListValue, "dcore", translate("Core Type"))
o.default = "clashcore"
o:value("1", translate("Clash"))
o:value("2", translate("Clashr"))
o:value("3", translate("Clash(ctun)"))
--o:value("3", translate("Clash(ctun)"))
o.description = translate("Select core, clashr support ssr while clash does not.")

File diff suppressed because one or more lines are too long

View File

@ -1062,4 +1062,70 @@ msgid "Invalid link"
msgstr "无效格式"
msgid "Operation Aborted"
msgstr "用户取消"
msgstr "用户取消"
msgid "Standard Config"
msgstr "标准配置"
msgid "Provider Config"
msgstr "集配置"
msgid "Select Config"
msgstr "使用配置"
msgid "Provider Behavior"
msgstr "集行为"
msgid "Edit Rule Provider"
msgstr "编辑规则集"
msgid "Rule Provider Name"
msgstr "规则集别名(请勿重名)"
msgid "Edit Rules"
msgstr "编辑规则"
msgid "Description"
msgstr "描述"
msgid "Provider Config"
msgstr "集配置"
msgid "Rule Provider"
msgstr "规则集"
msgid "Use Proxy Provider"
msgstr "启用代理集"
msgid "Use Rule Provider"
msgstr "启用规则集"
msgid "Use Rules"
msgstr "启用规则"
msgid "Delete Rule Provider"
msgstr "删除规则集"
msgid "Delete Rules"
msgstr "删除规则"
msgid "Use Script"
msgstr "使用脚本"
msgid "Script"
msgstr "脚本"
msgid "SCRIPT"
msgstr "脚本模式"
msgid "NB: Set Clash Mode to Script if want to use"
msgstr "注意如果要使用请将Clash模式,设置为脚本"
msgid "Whitelist IPs"
msgstr "启用白名单IP"
msgid "Blacklist Ips"
msgstr "启用黑名单IP"
msgid "Whitelist or Blacklist IPs to use Clash ( Only support enhanced-mode: redir-host )"
msgstr "启用白名单或黑名单IP ( 仅支持enhanced-mode: redir-host )"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,177 @@
# 2020-05-20 03:00
payload:
- '1.3.0.10/32'
- '10.72.25.0/24'
- '23.42.186.24/32'
- '23.66.147.48/32'
- '23.235.156.167/32'
- '27.255.67.120/32'
- '42.51.146.207/32'
- '45.34.240.72/32'
- '46.165.197.153/32'
- '46.165.197.231/32'
- '47.89.59.182/32'
- '47.90.50.177/32'
- '47.93.103.196/32'
- '47.94.89.32/32'
- '47.96.162.122/32'
- '58.215.179.159/32'
- '58.221.28.166/32'
- '60.19.29.21/28'
- '60.190.139.164/32'
- '60.191.124.196/32'
- '60.210.17.12/24'
- '61.129.70.132/32'
- '61.132.216.232/32'
- '61.132.221.146/32'
- '61.132.255.212/32'
- '61.132.255.222/25'
- '61.147.184.18/32'
- '61.152.223.15/32'
- '61.160.200.223/32'
- '61.160.200.242/32'
- '61.160.200.252/32'
- '61.174.50.167/25'
- '61.191.12.74/32'
- '61.191.206.4/32'
- '67.229.224.28/32'
- '69.28.57.245/32'
- '74.117.182.77/32'
- '78.140.131.214/32'
- '101.201.29.182/32'
- '101.227.97.240/32'
- '101.227.200.11/32'
- '101.227.200.28/32'
- '101.251.211.235/32'
- '103.249.254.113/32'
- '104.195.62.12/32'
- '104.197.140.120/32'
- '104.198.198.188/32'
- '106.187.95.251/32'
- '106.75.65.90/32'
- '106.75.65.92/32'
- '107.21.113.76/32'
- '108.171.248.234/32'
- '111.175.220.160/29'
- '111.175.220.164/32'
- '111.206.22.0/24'
- '111.30.135.167/32'
- '111.63.135.0/24'
- '111.73.45.147/32'
- '112.124.115.215/32'
- '112.74.95.46/32'
- '113.207.57.24/32'
- '113.57.230.88/32'
- '114.247.28.96/32'
- '114.55.123.44/32'
- '114.95.102.77/32'
- '115.182.16.79/32'
- '115.29.141.121/32'
- '115.29.247.48/32'
- '116.206.22.7/32'
- '116.55.227.242/32'
- '117.25.133.209/32'
- '117.144.242.32/32'
- '117.177.248.17/32'
- '117.177.248.41/32'
- '118.144.88.126/32'
- '118.144.88.215/28'
- '118.144.88.215/32'
- '119.188.13.0/24'
- '119.4.249.166/32'
- '120.132.57.41/32'
- '120.132.63.203/32'
- '120.197.89.239/32'
- '120.198.116.0/24'
- '120.26.151.246/32'
- '120.27.34.156/32'
- '120.55.199.139/32'
- '120.76.189.132/32'
- '120.80.57.123/32'
- '121.15.207.243/32'
- '121.199.73.185/32'
- '121.201.108.2/32'
- '121.201.11.95/32'
- '121.251.255.0/24'
- '121.43.75.169/32'
- '122.225.103.120/32'
- '122.226.223.163/32'
- '122.227.254.195/32'
- '122.228.236.165/32'
- '123.125.111.0/24'
- '123.139.154.201/24'
- '123.56.152.96/32'
- '123.57.162.39/32'
- '123.57.94.184/32'
- '123.59.152.170/32'
- '123.59.78.229/32'
- '124.192.153.42/32'
- '223.87.176.139/32'
- '223.87.176.176/32'
- '223.87.177.180/32'
- '223.87.177.182/32'
- '223.87.177.184/32'
- '223.87.177.43/32'
- '223.87.177.47/32'
- '223.87.177.80/32'
- '223.87.182.101/32'
- '223.87.182.102/32'
- '223.87.182.11/32'
- '223.87.182.52/32'
- '124.14.21.147/32'
- '124.14.21.151/32'
- '124.160.194.11/32'
- '124.232.160.178/32'
- '125.46.61.28/32'
- '125.89.69.5/32'
- '139.159.32.82/32'
- '139.196.239.52/32'
- '139.224.26.92/32'
- '139.224.74.148/32'
- '146.148.85.61/32'
- '162.212.181.32/32'
- '173.208.177.227/32'
- '175.6.223.15/32'
- '180.166.52.24/32'
- '180.76.155.58/32'
- '180.76.162.60/32'
- '180.76.171.28/32'
- '180.76.172.149/32'
- '180.76.181.213/32'
- '182.92.81.104/32'
- '183.131.79.130/32'
- '183.131.79.30/32'
- '183.59.53.187/29'
- '183.59.53.237/32'
- '183.6.188.226/29'
- '198.40.52.11/32'
- '202.104.1.27/32'
- '202.105.165.202/32'
- '205.209.138.102/32'
- '211.103.159.32/32'
- '211.137.132.89/32'
- '211.139.178.49/32'
- '211.149.225.23/32'
- '211.167.105.131/32'
- '211.98.71.195/29'
- '218.25.246.118/32'
- '218.93.127.37/32'
- '219.234.83.60/32'
- '220.115.251.25/32'
- '220.196.52.141/32'
- '221.179.140.0/24'
- '221.179.183.0/24'
- '221.179.191.0/24'
- '221.179.46.190/25'
- '221.204.213.222/32'
- '221.228.17.152/32'
- '221.228.214.101/32'
- '221.231.6.79/32'
- '222.186.61.91/32'
- '222.186.61.95/32'
- '222.186.61.96/32'
- '222.186.61.97/32'
- '222.187.226.96/32'
- '222.73.156.235/32'
- '223.6.255.99/32'
- '14.29.40.3/32'

View File

@ -0,0 +1,33 @@
# 2020-05-20 03:00
payload:
# > Apple_API
- '.aaplimg.com'
- '.apple.co'
- '.apple.com'
- '.apple-cloudkit.com'
- '.appsto.re'
- '.cdn-apple.com'
- '.icloud.com'
- '.icloud-content.com'
- '.itunes.com'
- '.me.com'
- 'ocsp.apple.com'
- '.digicert.com'
- '.entrust.net'
- 'ocsp.verisign.net'
- 'blobstore.apple.com'
# > TestFlight
- 'testflight.apple.com'
# > Apple URL Shortener
- '.appsto.re'
# > iBooks Store download
- 'books.itunes.apple.com'
# > iTunes Store Moveis Trailers
- 'hls.itunes.apple.com'
# > App Store Preview
- 'apps.apple.com'
- 'itunes.apple.com'
# > Spotlight
- 'api-glb-sea.smoot.apple.com'
# > Dictionary
- 'lookup-api.apple.com'

View File

@ -0,0 +1,14 @@
# 2020-05-20 03:00
payload:
# > Apple_API
- '139.178.128.0/18'
- '144.178.0.0/19'
- '144.178.36.0/22'
- '144.178.48.0/20'
- '17.0.0.0/8'
- '192.35.50.0/24'
- '198.183.17.0/24'
- '205.180.175.0/24'
- '205.180.175.0/24'
- '63.92.224.0/19'
- '65.199.22.0/23'

View File

@ -0,0 +1,22 @@
# 2020-05-20 03:00
payload:
# > Apple itunes
- 'aod.itunes.apple.com'
- 'api.smoot.apple.cn'
- 'music.apple.com'
- 'mvod.itunes.apple.com'
# > App Store
- '.storedownloadd.'
- '.mzstatic.com'
- 'iosapps.itunes.apple.com'
- 'osxapps.itunes.apple.com'
# > Update
- 'supportdownload.apple.com'
- 'appldnld.apple.com'
- 'swcdn.apple.com'
- 'apptrailers.itunes.apple.com'
- 'updates-http.cdn-apple.com'
# > Map
- 'ls.apple.com'
- '.ls.apple.com'
- 'gs-loc-cn.apple.com'

View File

@ -0,0 +1,17 @@
# 2020-05-20 03:00
payload:
# > Apple tv
- 'np-edge.itunes.apple.com'
- 'play-edge.itunes.apple.com'
- 'tv.apple.com'
- '.tv.apple.com'
# > Apple News and Apple Map TOMTOM Version
- 'apple.comscoreresearch.com'
- 'gspe1-ssl.ls.apple.com'
- 'gateway.icloud.com'
- 'news-client.apple.com'
- 'news-edge.apple.com'
- 'news-events.apple.com'
- 'apple.news'
- '.apple.news'

View File

@ -0,0 +1,42 @@
# 2020-05-20 03:00
payload:
# > bilibili
- '.Bilibili.'
- '.acg.tv'
- '.acgvideo.com'
- '.b23.tv'
- '.biliapi.com'
- '.biliapi.net'
- '.bilibili.com'
- '.biligame.com'
- '.biligame.net'
- '.bilivideo.com'
- '.hdslb.com'
- '.im9.com'
- 'api.bilibili.com'
- 'upos-hz-mirrorakam.akamaized.net'
- '.api.bilibili.com'
- '.upos-hz-mirrorakam.akamaized.net'
# > iqiyi
- '.qiyi.*'
- '.iqiyi.*'
- '.iqiyi.com'
- '.iqiyipic.com'
- '.ppsimg.com'
- '.qiyi.com'
- '.qiyipic.com'
- '.71.am.com'
- '71.am.com'
- '.71edge'
- '.qy.net'
- 'cache.video.iqiyi.com'
- '.cache.video.iqiyi.com'
# > letv
- '.letv.com'
- '.api.mob.app.letv.com'
- 'api.mob.app.letv.com'
# > tencent
- '.vv.video.qq.com'
- 'vv.video.qq.com'

View File

@ -0,0 +1,11 @@
# 2020-05-20 03:00
payload:
# > iqiyi
- '101.227.0.0/16'
- '101.224.0.0/13'
- '119.176.0.0/12'
# > Youku
- '106.11.0.0/16'
# > Tencent
- '182.254.116.0/24'

View File

@ -0,0 +1,166 @@
# 2020-05-20 03:00
payload:
# > Binance Start
- 'resource.binance.com'
- 'binance.com'
- 'bin.bnbstatic.com'
- 'ex.bnbstatic.com'
- 'stream.binance.com'
- 'stream2.binance.com'
- 'api.binance.com'
- 'ftp.binance.com'
- 'sftp.binance.com'
- 'info.binance.com'
- 'support.binance.com'
- 'labs.binance.com'
- 'launchpad.binance.com'
- 'binance.zendesk.com'
- 'de908tco66xxm.cloudfront.net'
- 'd1eipm3vz40hy0.cloudfront.net'
- '.resource.binance.com'
- '.binance.com'
- '.bin.bnbstatic.com'
- '.ex.bnbstatic.com'
- '.stream.binance.com'
- '.stream2.binance.com'
- '.api.binance.com'
- '.ftp.binance.com'
- '.sftp.binance.com'
- '.info.binance.com'
- '.support.binance.com'
- '.labs.binance.com'
- '.launchpad.binance.com'
- '.binance.zendesk.com'
- '.de908tco66xxm.cloudfront.net'
- '.d1eipm3vz40hy0.cloudfront.net'
- 'binance.cloud'
- '.binance.cloud'
- 'zopim.com'
- '.zopim.com'
- 'bnbstatic.com'
- '.bnbstatic.com'
- 'binance.co'
- '.binance.co'
# > Huobi Start
- 'hbg.com'
- 'm.hbg.com'
- 'otc.hbg.com'
- 'blog.hbg.com'
- 'otc-api.hbg.com'
- 'huobi.br.com'
- 'dm.huobi.br.com'
- 'huobiasia.vip'
- 'hbdm.com'
- '.hbg.com'
- '.m.hbg.com'
- '.otc.hbg.com'
- '.blog.hbg.com'
- '.otc-api.hbg.com'
- '.huobi.br.com'
- '.dm.huobi.br.com'
- '.huobiasia.vip'
- 'huobi.com'
- '.huobi.com'
- 'huobiglobal.zendesk.com'
- '.huobiglobal.zendesk.com'
- 'hbabit.com'
- '.hbabit.com'
- 'mtalk.google.com'
- '.mtalk.google.com'
# > OTC Start
- 'localbitcoins.com'
- 'chain.localbitcoins.com'
- 'otcbtc.com'
- 'assets3.otcbtc.com'
- 'assets2.otcbtc.com'
- 'assets1.otcbtc.com'
- 'assets0.otcbtc.com'
- 'bb.otcbtc.com'
- 'career.otcbtc.com'
- 'support.otcbtc.com'
- 'localbitcoins.com'
- '.chain.localbitcoins.com'
- '.otcbtc.com'
- '.assets3.otcbtc.com'
- '.assets2.otcbtc.com'
- '.assets1.otcbtc.com'
- '.assets0.otcbtc.com'
- '.bb.otcbtc.com'
- '.career.otcbtc.com'
- '.support.otcbtc.com'
# > Kucoin Start
- 'kucoin.com'
- 'assets-v2.kucoin.com'
- 'kitchen-v2.kucoin.com'
- 'pangu.kucoin.com'
- 'kcs.kucoin.com'
- 'fd.kucoin.com'
- 'support.kucoin.com'
- 'kucoin.zendesk.com'
- 'sentry.kucoin.com'
- 'news.kucoin.com'
- 'kucoinn.tumblr.com'
- '.kucoin.com'
- '.assets-v2.kucoin.com'
- '.kitchen-v2.kucoin.com'
- '.pangu.kucoin.com'
- '.kcs.kucoin.com'
- '.fd.kucoin.com'
- '.support.kucoin.com'
- '.kucoin.zendesk.com'
- '.sentry.kucoin.com'
- '.news.kucoin.com'
- '.kucoinn.tumblr.com'
# > Bitfinex Start
- 'bitfinex.com'
- 'api.bitfinex.com'
- 'blog.bitfinex.com'
- 'support.bitfinex.com'
- '.bitfinex.com'
- '.api.bitfinex.com'
- '.blog.bitfinex.com'
- '.support.bitfinex.com'
# > Bitmex Start
- 'bitmex.com'
- 'blog.bitmex.com'
- 'testnet.bitmex.com'
- 'sentry.bitmex.com'
- 'testnet-static.bitmex.com'
- 'static.bitmex.com'
- '.bitmex.com'
- '.blog.bitmex.com'
- '.testnet.bitmex.com'
- '.sentry.bitmex.com'
- '.testnet-static.bitmex.com'
- '.static.bitmex.com'
# > Hitbtc Start
- 'hitbtc.com'
- 'auth.hitbtc.com'
- 'support.hitbtc.com'
- 'mt.hitbtc.com'
- 'blog.hitbtc.com'
- '.hitbtc.com'
- '.auth.hitbtc.com'
- '.support.hitbtc.com'
- '.mt.hitbtc.com'
- '.blog.hitbtc.com'
# > Okex Start
- 'okex.com'
- 'blog.okex.com'
- 'www.okex.com'
- 'support.okex.com'
- '.okex.com'
- '.blog.okex.com'
- '.www.okex.com'
- '.support.okex.com'
# > Gate Start
- 'gate.io'
- 'web02.gate.io'
- 'support.gate.io'
- 'data.gate.io'
- 'jp.gate.io'
- '.gate.io'
- '.web02.gate.io'
- '.support.gate.io'
- '.data.gate.io'
- '.jp.gate.io'

View File

@ -0,0 +1,18 @@
# 2020-05-20 03:00
payload:
# > DisneyPlus
- '.Disney*.'
- '.Disney+*.'
- 'cdn.cdn.unid.go.com'
- 'cdn.registerdisney.go.com'
- '.bamgrid.com'
- '.braze.com'
- '.conviva.com'
- '.disney-plus.net'
- '.disney.demdex.net'
- '.disneyplus.com'
- '.dssott.com'
- '.execute-api.us-east-1.amazonaws.com'

View File

@ -0,0 +1,837 @@
#2020.5.23 21:45
payload:
# > keyword
- '.alicdn.'
- '.alipay.'
- '.taobao.'
- '.officecdn.'
- '.baidu.'
- '.YYeTs*.'
- '.12306.'
- '.hearthstone*.'
- '.alimama.'
- '.appzapp.'
- '.baidupcs.'
- '.ccgslb.'
- '.chinacache.'
- '.duobao.'
- '.duolingo.'
- '.jdpay.'
- '.moke.'
- '.qhimg.'
- '.vpimg.'
- '.xiami.'
- '.xiaomi.'
- '.announce.'
- '.torrent.'
- '.tracker.'
# > 360
- '.360.com'
- '.360in.com'
- '.360kuai.com'
- '.360safe.com'
- '.dhrest.com'
- '.qhres.com'
- '.qhstatic.com'
- '.qhupdate.com'
- '.so.com'
# > 4399
- '.4399.com'
- '.4399pk.com'
- '.5054399.com'
- '.img4399.com'
# > Alibaba
- '.1688.com'
- '.aliapp.org'
- '.alibaba.com'
- '.alibabacloud.com'
- '.alibabausercontent.com'
- '.alicdn.com'
- '.aliexpress.com'
- '.aliimg.com'
- '.alikunlun.com'
- '.alipay.com'
- '.alipayobjects.com'
- '.alisoft.com'
- '.aliyun.com'
- '.aliyuncdn.com'
- '.aliyuncs.com'
- '.amap.com'
- '.autonavi.com'
- '.dingtalk.com'
- '.ele.me'
- '.hichina.com'
- '.mmstat.com'
- '.mxhichina.com'
- '.soku.com'
- '.taobao.com'
- '.taobaocdn.com'
- '.tbcache.com'
- '.tbcdn.com'
- '.tmall.com'
- '.tmall.hk'
- '.ucweb.com'
- '.xiami.com'
- '.xiami.net'
- '.ykimg.com'
- '.youku.com'
# > Baidu
- '.baidu.com'
- '.baidubcr.com'
- '.baidupcs.com'
- '.baidustatic.com'
- '.bcebos.com'
- '.bdimg.com'
- '.bdstatic.com'
- '.bdurl.net'
- '.hao123.com'
- '.hao123img.com'
- '.jomodns.com'
- '.yunjiasu-cdn.net'
# > Prior
- 'client.amplifi.com'
- 'ip.bjango.com'
- '.alphassl.com'
- '.edu.cn'
# > ByteDance
- '.bytedance.com'
- '.bytedance.net'
- '.bytedns.net'
- '.byteimg.com'
- '.feiliao.com'
- '.gifshow.com'
- '.huoshan.com'
- '.iesdouyin.com'
- '.ixigua.com'
- '.kspkg.com'
- '.pstatp.com'
- '.snssdk.com'
- '.toutiao.com'
- '.toutiao13.com'
- '.toutiaocdn.com'
- '.toutiaocdn.net'
- '.toutiaocloud.com'
- '.toutiaohao.com'
- '.toutiaohao.net'
- '.toutiaoimg.com'
- '.toutiaopage.com'
- '.wukong.com'
- '.zijieimg.com'
- '.zjbyte.com'
- '.zjcdn.com'
# > CCTV
- '.cctv.com'
- '.cctvpic.com'
- '.livechina.com'
# > ChinaNet
- '.21cn.com'
# > DiDi
- '.didialift.com'
- '.didiglobal.com'
- '.udache.com'
# > Douyu 斗鱼
- '.douyu.com'
- '.douyu.tv'
- '.douyutv.com'
# > 蛋蛋赞
- '.343480.com'
- '.baduziyuan.com'
- '.com-hs-hkdy.com'
- '.czybjz.com'
- '.dandanzan.com'
- '.fjhps.com'
- '.kuyunbo.club'
# > Gameloft
- '.gameloft.com'
# > HuaWei
- '.dbankcdn.com'
- '.hc-cdn.com'
- '.hicloud.com'
- '.huawei.com'
- '.huaweicloud.com'
- '.huaweishop.net'
- '.hwccpc.com'
- '.vmall.com'
- '.vmallres.com'
# > Iflytek 科大讯飞
- '.iflyink.com'
- '.iflyrec.com'
- '.iflytek.com'
# > HunanTV
- '.hitv.com'
- '.mgtv.com'
# > JD
- '.360buy.com'
- '.360buyimg.com'
- '.jcloudcs.com'
- '.jd.com'
- '.jd.hk'
- '.jdcloud.com'
- '.jdpay.com'
- '.paipai.com'
# > Kingsoft
- '.iciba.com'
- '.ksosoft.com'
- '.ksyun.com'
# > Meitu
- '.meitu.com'
- '.meitudata.com'
- '.meitustat.com'
- '.meipai.com'
# > MI
- '.duokan.com'
- '.mi-img.com'
- '.miui.com'
- '.miwifi.com'
- '.xiaomi.com'
- '.xiaomi.net'
- '.xiaomicp.com'
# > NetEase
- '.163.com'
- '.126.net'
- '.126.com'
- '.127.net'
- '.163yun.com'
- '.lofter.com'
- '.netease.com'
- '.ydstatic.com'
- '.youdao.com'
# > Sina
- '.leju.com'
- '.miaopai.com'
- '.sina.com'
- '.sinaapp.com'
- '.sinaimg.com'
- '.weibo.com'
- '.weibocdn.com'
- '.weibo.cn'
- '.weico.cc'
- '.xiaoka.tv'
# > Sohu
- '.sohuno.com'
- '.sohurdc.com'
- '.sohu.com'
- '.sohucs.com'
- '.sohu-inc.com'
- '.v-56.com'
# > Sogo
- '.go2map.com'
- '.sogo.com'
- '.sogou.com'
- '.sogoucdn.com'
# > Tencent
- '.foxmail.com'
- '.gtimg.com'
- '.idqqimg.com'
- '.igamecj.com'
- '.myapp.com'
- '.myqcloud.com'
- '.qq.com'
- '.qqmail.com'
- '.qqurl.com'
- '.smtcdns.com'
- '.smtcdns.net'
- '.soso.com'
- '.tencent-cloud.net'
- '.tencent.com'
- '.tencentmind.com'
- '.tenpay.com'
- '.wechat.com'
- '.weixin.com'
- '.weiyun.com'
- '.servicewechat.com'
- 'file-igamecj.akamaized.net'
# > 唯品会
- '.appsimg.com'
- '.appvipshop.com'
- '.vip.com'
- '.vipstatic.com'
# > Ximalaya
- '.ximalaya.com'
- '.xmcdn.com'
# > Xunlei
- '.00cdn.com'
- '.88cdn.com'
- '.kanimg.com'
- '.kankan.com'
- '.p2cdn.com'
- '.sandai.net'
- '.thundercdn.com'
- '.xunlei.com'
# > ulike
- '.byteoversea.com'
- '.faceu.mobi'
- '.ibytedtos.com'
# > YYeTs
- '.got001.com'
- '.jstucdn.com'
- '.zimuzu.io'
- '.zimuzu.tv'
- '.zmz001.com'
- '.zmz002.com'
- '.zmz003.com'
- '.zmz004.com'
- '.zmz2019.com'
- '.zmzapi.com'
- '.zmzapi.net'
- '.zmzfile.com'
# > Content Delivery Network
- '.ccgslb.com'
- '.ccgslb.net'
- '.chinanetcenter.com'
- '.meixincdn.com'
- '.ourdvs.com'
- '.staticdn.net'
- '.wangsu.com'
# > IP Query
- '.ipip.net'
- '.ip.la'
- '.ip-cdn.com'
- '.ipv6-test.com'
- '.test-ipv6.com'
- '.whatismyip.com'
# > Private Tracker
- '.awesome-hd.me'
- '.broadcasthe.net'
- '.chdbits.co'
- '.classix-unlimited.co.uk'
- '.empornium.me'
- '.gazellegames.net'
- '.hdchina.org'
- '.hdsky.me'
- '.icetorrent.org'
- '.jpopsuki.eu'
- '.keepfrds.com'
- '.madsrevolution.net'
- '.m-team.cc'
- '.nanyangpt.com'
- '.ncore.cc'
- '.open.cd'
- '.ourbits.club'
- '.passthepopcorn.me'
- '.privatehd.to'
- '.redacted.ch'
- '.springsunday.net'
- '.tjupt.org'
- '.totheglory.im'
# > Scholar
- '.acm.org'
- '.acs.org'
- '.aip.org'
- '.ams.org'
- '.annualreviews.org'
- '.aps.org'
- '.ascelibrary.org'
- '.asm.org'
- '.asme.org'
- '.astm.org'
- '.bmj.com'
- '.cambridge.org'
- '.cas.org'
- '.clarivate.com'
- '.ebscohost.com'
- '.emerald.com'
- '.engineeringvillage.com'
- '.icevirtuallibrary.com'
- '.ieee.org'
- '.imf.org'
- '.iop.org'
- '.jamanetwork.com'
- '.jhu.edu'
- '.jstor.org'
- '.karger.com'
- '.libguides.com'
- '.madsrevolution.net'
- '.mpg.de'
- '.myilibrary.com'
- '.nature.com'
- '.oecd-ilibrary.org'
- '.osapublishing.org'
- '.oup.com'
- '.ovid.com'
- '.oxfordartonline.com'
- '.oxfordbibliographies.com'
- '.oxfordmusiconline.com'
- '.pnas.org'
- '.proquest.com'
- '.rsc.org'
- '.sagepub.com'
- '.sciencedirect.com'
- '.sciencemag.org'
- '.scopus.com'
- '.siam.org'
- '.spiedigitallibrary.org'
- '.springer.com'
- '.springerlink.com'
- '.tandfonline.com'
- '.un.org'
- '.uni-bielefeld.de'
- '.webofknowledge.com'
- '.westlaw.com'
- '.wiley.com'
- '.worldbank.org'
- '.worldscientific.com'
# > manhuagui
- 'manhuagui.com'
- '.manhuagui.com'
- 'hamreus.com'
- '.hamreus.com'
# > mytoken
- '.mytoken.io'
- 'mytoken.io'
- '.mytoken.com'
- 'mytoken.com'
- '.mytokencap.com'
- 'mytokencap.com'
- '.mytokenapi.com'
- 'mytokenapi.com'
- '.mytoken.org'
- 'mytoken.org'
- '.mytokencap.com'
- 'mytokencap.com'
# > Plex Media Server
- '.plex.tv'
# > TeamViewer
- '.teamviewer.com'
# > Private Tracker
- '.animetorrents.me'
- '.awesome-hd.me'
- '.beitai.pt'
- '.bittorrent.com'
- '.broadcasthe.net'
- '.chdbits.co'
- '.classix-unlimited.co.uk'
- '.empornium.me'
- '.gazellegames.net'
- '.hd4fans.org'
- '.hdchina.org'
- '.hdhome.org'
- '.hdsky.me'
- '.hdtime.org'
- '.hdzone.me'
- '.icetorrent.org'
- '.jpopsuki.eu'
- '.keepfrds.com'
- '.leaguehd.com'
- '.m-team.cc'
- '.madsrevolution.net'
- '.msg.vg'
- '.nanyangpt.com'
- '.ncore.cc'
- '.open.cd'
- '.ourbits.club'
- '.passthepopcorn.me'
- '.privatehd.to'
- '.pthome.net'
- '.redacted.ch'
- '.springsunday.net'
- '.tjupt.org'
- '.totheglory.im'
- '.trontv.com'
# > Public Direct CDN 公共直连
- '.code.jquery.com'
- '.baomitu.com'
- '.bootcss.com'
- '.jiasule.com'
- '.jsdelivr.net'
- '.staticfile.org'
- '.upaiyun.com'
# > pdd
- '.pinduoduo.com'
- '.yangkeduo.com'
# > logite
- '.logitech.com'
- 'logitech.com'
- '.logitech.com.cn'
- 'logitech.com.cn'
- '.logi.com'
- 'download01.logi.com'
# > smzdm
- 'smzdm01.wt-cn01.net'
# > Other
- '.12306.cn'
- '.12306.com'
- '.17173.com'
- '.178.com'
- '.17jita.com'
- '.17k.com'
- '.360doc.com'
- '.36kr.com'
- '.3dmgame.com'
- '.51cto.com'
- '.51job.com'
- '.51jobcdn.com'
- '.51ym.me'
- '.56.com'
- '.58.com'
- '.5ihome.net'
- '.8686c.com'
- '.abchina.com'
- '.abercrombie.com'
- '.accuweather.com'
- '.acfun.tv'
- '.adobesc.com'
- '.aicoinstorge.com'
- '.air-matters.com'
- '.air-matters.io'
- '.aixifan.com'
- '.algocasts.io'
- '.amd.com'
- '.apache.org'
- '.api.crisp.chat'
- '.appshike.com'
- '.appstore.com'
- '.aweme.snssdk.com'
- '.b612.net'
- '.bababian.com'
- '.babytree.com'
- '.babytreeimg.com'
- '.baicizhan.com'
- '.baidupan.com'
- '.baike.com'
- '.battlenet.com'
- '.bdatu.com'
- '.beatsbydre.com'
- '.beitaichufang.com'
- '.beplay'
- '.bet365.com'
- '.bilibili.com'
- '.bilivideo.com'
- '.biqudu.com'
- '.biquge.com'
- '.bitauto.com'
- '.bjango.com'
- '.booking.com'
- '.bstatic.com'
- '.c-ctrip.com'
- '.cailianpress.com'
- '.caiyunapp.com'
- '.camera360.com'
- '.cdnmama.com'
- '.cdp.cloud.unity3d.com'
- '.chaoxing.com'
- '.che168.com'
- '.chinacache.net'
- '.chinaso.com'
- '.chinaz.com'
- '.chinaz.net'
- '.chua.pro'
- '.chuimg.com'
- '.chunbo.com'
- '.chunboimg.com'
- '.chunyu.mobi'
- '.chushou.tv'
- '.cibntv.net'
- '.clashroyaleapp.com'
- '.client.amplifi.com'
- '.clouddn.com'
- '.cloudsigma.com'
- '.cloudxns.net'
- '.cmbchina.com'
- '.cmbimg.com'
- '.cmct.tv'
- '.cmfu.com'
- '.cn'
- '.cn163.net'
- '.cnbeta.com'
- '.cnbetacdn.com'
- '.cnblogs.com'
- '.cnki.net'
- '.cnlang.org'
- '.cnmstl.net'
- '.coolapk.com'
- '.coolapkmarket.com'
- '.cootekservice.com'
- '.csdn.net'
- '.ctrip.com'
- '.culturedcode.com'
- '.dangdang.com'
- '.dct-cloud.com'
- '.dfcfw.com'
- '.dgtle.com'
- '.dianping.com'
- '.digicert.com'
- '.dn.angruo.com'
- '.docschina.org'
- '.douban.com'
- '.doubanio.com'
- '.douyin.com'
- '.dpfile.com'
- '.duoshuo.com'
- '.duowan.com'
- '.dxycdn.com'
- '.dytt8.net'
- '.easou.com'
- '.eastday.com'
- '.eastmoney.com'
- '.ecitic.com'
- '.ecitic.net'
- '.eclipse.org'
- '.eudic.net'
- '.ewqcxz.com'
- '.fang.com'
- '.fantasy.tv'
- '.feng.com'
- '.fengkongcloud.com'
- '.fir.im'
- '.firefox.com'
- '.frdic.com'
- '.fresh-ideas.cc'
- '.futu5.com'
- '.futunn.com'
- '.g-cores.com'
- '.gandi.net'
- '.ganji.com'
- '.ganjistatic1.com'
- '.geetest.com'
- '.geilicdn.com'
- '.getpricetag.com'
- '.ghpym.com'
- '.godic.net'
- '.goodread.com'
- '.google.cn'
- '.gravatar.com'
- '.guazi.com'
- '.gwdang.com'
- '.gzlzfm.com'
- '.haibian.com'
- '.haosou.com'
- '.hdcmct.org'
- '.hkserversolution.com'
- '.hollisterco.com'
- '.hongxiu.com'
- '.hostbuf.com'
- '.huajiao.com'
- '.hupu.com'
- '.huxiucdn.com'
- '.huya.com'
- '.hxcdn.net'
- '.icedropper.com'
- '.ifeng.com'
- '.ifengimg.com'
- '.images-amazon.com'
- '.img4me.com'
- '.infinitynewtab.com'
- '.infzm.com'
- '.it168.com'
- '.ithome.com'
- '.ixdzs.com'
- '.iyingdi.com'
- '.java.com'
- '.jianguoyun.com'
- '.jianshu.com'
- '.jianshu.io'
- '.jianshuapi.com'
- '.jiathis.com'
- '.jidian.im'
- '.jmstatic.com'
- '.jsboxbbs.com'
- '.jumei.com'
- '.kaiyanapp.com'
- '.kaola.com'
- '.kaspersky-labs.com'
- '.keepcdn.com'
- '.kkmh.com'
- '.knewone.com'
- '.koowo.com'
- '.ksyungslb.com'
- '.kuaidi100.com'
- '.kugou.com'
- '.lancdns.com'
- '.landiannews.com'
- '.lanzou.com'
- '.le.com'
- '.lecloud.com'
- '.lemicp.com'
- '.letitfly.me'
- '.letv.com'
- '.letvcloud.com'
- '.licdn.com'
- '.linkedin.com'
- '.lizhi.fm'
- '.lizhi.io'
- '.lizhifm.com'
- '.localizecdn.com'
- '.loli.net'
- '.lucifr.com'
- '.luojilab.com'
- '.luoo.net'
- '.lvmama.com'
- '.lxdns.com'
- '.mai.tn'
- '.maoyan.com'
- '.maoyun.tv'
- '.meilishuo.com'
- '.meituan.com'
- '.meituan.net'
- '.meizu.com'
- '.mi.com'
- '.migucloud.com'
- '.miguvideo.com'
- '.mob.com'
- '.mobike.com'
- '.mogu.com'
- '.mogucdn.com'
- '.mogujie.com'
- '.moji.com'
- '.moke.com'
- '.msstatic.com'
- '.mubu.com'
- '.myunlu.com'
- '.myzaker.com'
- '.nalytics.strava.com'
- '.nfoservers.com'
- '.ngabbs.com'
- '.nim-lang-cn.org'
- '.novipnoad.com'
- '.nruan.com'
- '.nssurge.com'
- '.nuomi.com'
- '.nvidia.com'
- '.office.com'
- '.onedns.net'
- '.onlinedown.net'
- '.oracle.com'
- '.oschina.net'
- '.overcast.fm'
- '.ownload.jetbrains.com'
- '.paypal.com'
- '.paypalobjects.com'
- '.pgyer.com'
- '.pniao.com'
- '.polyv.net'
- '.ppsimg.com'
- '.qbox.me'
- '.qcloud.com'
- '.qcloudcdn.com'
- '.qdaily.com'
- '.qdmm.com'
- '.qhimg.com'
- '.qianqian.com'
- '.qidian.com'
- '.qihucdn.com'
- '.qin.io'
- '.qingmang.me'
- '.qingmang.mobi'
- '.qiniu.com'
- '.qiniucdn.com'
- '.qiniudn.com'
- '.qiushibaike.com'
- '.qiyipic.com'
- '.quanmin.tv'
- '.qunar.com'
- '.qunarzz.com'
- '.qyer.com'
- '.qyerstatic.com'
- '.rarbg.to'
- '.raychase.net'
- '.repaik.com'
- '.ronghub.com'
- '.rrmj.tv'
- '.ruguoapp.com'
- '.runoob.com'
- '.s-reader.com'
- '.sankuai.com'
- '.scomper.me'
- '.seafile.com'
- '.segmentfault.com'
- '.sf-express.com'
- '.shumilou.net'
- '.simplecd.me'
- '.sinaimg.cn'
- '.sinaimg.com'
- '.sm.ms'
- '.smtp.*'
- '.smzdm.com'
- '.snapdrop.net'
- '.snwx.com'
- '.soufunimg.com'
- '.ssl-images-amazon.com'
- '.sspai.com'
- '.startssl.com'
- '.store.steampowered.com'
- '.suning.com'
- '.symcd.com'
- '.taihe.com'
- '.takungpao.com'
- '.tawk.link'
- '.tawk.to'
- '.teamviewer.com'
- '.th-sjy.com'
- '.tianqi.com'
- '.tianqistatic.com'
- '.tianyancha.com'
- '.tianyaui.com'
- '.tietuku.com'
- '.tiexue.net'
- '.tmiaoo.com'
- '.tmzvps.com'
- '.tophub.today'
- '.trello.com'
- '.trellocdn.com'
- '.trip.com'
- '.ttmeiju.com'
- '.tudou.com'
- '.tuniu.com'
- '.tuniucdn.com'
- '.udacity.com'
- '.umengcloud.com'
- '.umetrip.com'
- '.uning.com'
- '.unity3d.com'
- '.upyun.com'
- '.uxengine.net'
- '.veryzhun.com'
- '.videocc.net'
- '.vmware.com'
- '.wandoujia.com'
- '.weather.bjango.com'
- '.weather.com'
- '.webqxs.com'
- '.weidian.com'
- '.weiphone.com'
- '.weiphone.net'
- '.wenku8.net'
- '.werewolf.53site.com'
- '.windowsupdate.com'
- '.wkcdn.com'
- '.womai.com'
- '.workflowy.com'
- '.wscdns.com'
- '.xdrig.com'
- '.xhostfire.com'
- '.xhscdn.com'
- '.xiachufang.com'
- '.xiaohongshu.com'
- '.xiaojukeji.com'
- '.xinhuanet.com'
- '.xip.io'
- '.xitek.com'
- '.xiumi.us'
- '.xslb.net'
- '.xueqiu.com'
- '.yach.me'
- '.yangkeduo.com'
- '.yeepay.com'
- '.yhd.com'
- '.yihaodianimg.com'
- '.yinxiang.com'
- '.yinyuetai.com'
- '.yixia.com'
- '.ys168.com'
- '.yuewen.com'
- '.yy.com'
- '.yystatic.com'
- '.zealer.com'
- '.zgslb.net'
- '.zhangzishi.cc'
- '.zhanqi.tv'
- '.zhaopin.com'
- '.zhihu.com'
- '.zhimg.com'
- '.zhongsou.com'
- '.zhuihd.com'
- '.zoho.com'
- 'cdn.angruo.com'
- 'download.jetbrains.com'
- 'images-cn.ssl-images-amazon.com'

View File

@ -0,0 +1,25 @@
# 2020-05-20 03:00
payload:
# > Tencent
- '182.254.116.0/24'
- '203.205.252.0/23'
- '203.205.254.0/23'
# > TeamViewer
- '109.239.140.0/24'
- '139.220.243.27/32'
- '172.16.102.56/32'
- '185.188.32.1/28'
- '185.188.32.0/24'
- '185.188.33.0/24'
- '185.188.34.0/24'
- '185.188.35.0/24'
- '221.226.128.146/32'
# > aliyun
- '120.79.75.0/24'
- '120.79.75.225/24'
# > Other
- '185.188.32.0/24'
- '185.188.33.0/24'
- '185.188.34.0/24'
- '185.188.35.0/24'

View File

@ -0,0 +1,22 @@
# 2020-05-20 03:00
payload:
# > Steam
- '.fanatical.com'
- '.humblebundle.com'
- '.steamcommunity.com'
- '.steampowered.com'
- '.steamstatic.com'
# > xbox
- '.xbox.com'
- '.xboxlive.com'
# > Sony
- '.playstation.com'
- '.playstation.net'
- '.playstationnetwork.com'
- '.sonyentertainmentnetwork.com'
# > Blizzard
- '.blizzard.com'
- '.battle.net'
- '.battlenet.com'
- 'blzddist1-a.akamaihd.net'
- 'cdp.cloud.unity3d.com'

View File

@ -0,0 +1,179 @@
# 2020-05-20 03:00
payload:
# music
# > Deezer
- '.deezer.com'
- '.dzcdn.net'
# > KKBOX
- '.kkbox.com'
- '.kkbox.com.tw'
- '.kfs.io'
# > JOOX
- '.joox.com'
# > Pandora
- '.pandora.com'
# > SoundCloud
- '.p-cdn.us'
- '.sndcdn.com'
- '.soundcloud.com'
# > Spotify
- '.pscdn.co'
- '.scdn.co'
- '.spotify.com'
- '.spoti.fi'
- '.spotify.com'
- '.*spotify-com'
# > TIDAL
- '.tidal.com'
# video
# > All4
- '.c4assets.com'
- '.channel4.com'
# > ABC
- '.edgedatg.com'
- '.go.com'
# > AbemaTV
- '.abema.io'
- '.abema.tv'
- '.ameba.jp'
- '.akamaized.net'
- '.hayabusa.io'
- 'abematv.akamaized.net'
- 'ds-linear-abematv.akamaized.net'
- 'ds-vod-abematv.akamaized.net'
- 'linear-abematv.akamaized.net'
# > Amazon Prime Video
- '.avoddashs.'
- '.GlobalMedia.'
- '.aiv-cdn.net'
- '.aiv-delivery.net'
- '.amazonvideo.com'
- '.amazonaws.co.uk'
- '.amazonaws.com'
- '.primevideo.com'
- 'avodmp4s3ww-a.akamaihd.net'
- 'd25xi40x97liuc.cloudfront.net'
- 'dmqdd6hw24ucf.cloudfront.net'
- 'd22qjgkvxw22r6.cloudfront.net'
- 'd1v5ir2lpwr8os.cloudfront.net'
- '.llnwd.net'
# > BBCiPlayer
- '.bbcfmt.'
- '.GlobalTV.'
- '.uk-live.'
- 'aod-dash-uk-live.akamaized.net'
- 'aod-hls-uk-live.akamaized.net'
- 'vod-dash-uk-live.akamaized.net'
- 'vod-thumb-uk-live.akamaized.net'
# > DAZN
- '.voddazn.'
- 'd151l6v8er5bdm.cloudfront.net'
- '.dazn.com'
- '.dazn-api.com'
- '.dazndn.com'
- '.indazn.com'
- '.intercom.io'
# > DisneyPlus
- '.Disney*.'
- '.Disney+*.'
- 'cdn.cdn.unid.go.com'
- 'cdn.registerdisney.go.com'
- '.bamgrid.com'
- '.braze.com'
- '.conviva.com'
- '.disney-plus.net'
- '.disney.demdex.net'
- '.disneyplus.com'
- '.dssott.com'
- '.execute-api.us-east-1.amazonaws.com'
# > encoreTVB
- '.encoretvb.com'
- '.content.jwplatform.com'
- '.videos-f.jwpsrv.com'
- 'bcbolt446c5271-a.akamaihd.net'
- 'content.jwplatform.com'
- 'edge.api.brightcove.com'
- 'videos-f.jwpsrv.com'
# > FoxNow
- '.fox.com'
- '.foxdcg.com'
- '.theplatform.com'
- '.uplynk.com'
# > Fox+ HK
- '.akamaized.net'
- '.foxplus.com'
- '.theplatform.com'
# > Hulu
- 'hulu.com'
- 'huluim.com'
- 'hulustream.com'
- '.hulu.com'
- '.huluim.com'
- '.hulustream.com'
# > HuluJapan
- '.happyon.jp'
- '.hulu.jp'
# > ITV
- '.itv.com'
- '.itvstatic.com'
- 'itvpnpmobile-a.akamaihd.net'
# > JOOX
- '.joox.com'
# > Japonx
- '.japonx.'
- '.japronx.'
- '.japonx.com'
- '.japonx.tv'
- '.japonx.net'
- '.japonx.vip'
- '.japronx.com'
- '.japronx.tv'
- '.japronx.net'
- '.japronx.vip'
# > KKBOX
- '.kkbox.com'
- '.kkbox.com.tw'
- '.kfs.io'
# > KKTV
- 'kktv.com.tw'
- 'kktv-theater.kk.stream'
- '.kktv.me'
- '.kktv.com.tw'
- '.kktv-theater.kk.stream'
# > LiTV
- '.litv.tv'
- 'litvfreemobile-hichannel.cdn.hinet.net'
# > LineTV
- 'd3c7rimkq79yfu.cloudfront.net'
- '.linetv.tw'
# > My5
- '.channel5.com'
- '.my5.tv'
- 'd349g9zuie06uo.cloudfront.net'
# > PBS
- '.pbs.org'
# > ViuTV
- 'cognito-identity.us-east-1.amazonaws.com'
- 'mobileanalytics.us-east-1.amazonaws.com'
- 'viu.now.com'
- '.firebaseio.com'
- '.nowe.com'
- '.viu.com'
- '.viu.tv'
- '.viu.now.com'
# > niconico
- '.dmc.nico'
- '.nicovideo.jp'
- '.nimg.jp'
- '.socdm.com'
# > TikTok
- '.tiktokcdn.'
- '.muscdn.com'
- '.musical.ly'
- '.tiktokv.com'
- '.tiktokcdn.com'
# > feiliuTV
- '.neulion.com.'
- '.icntv.xyz.'
- '.flzbcdn.xyz.'

View File

@ -0,0 +1,22 @@
# 2020-05-20 03:00
payload:
# > Amazon Prime Video
- '13.32.0.0/15'
- '13.32.0.0/16'
- '13.33.0.0/16'
- '13.35.0.0/17'
- '18.184.0.0/15'
- '18.194.0.0/15'
- '18.208.0.0/13'
- '18.232.0.0/14'
- '52.200.0.0/13'
- '52.58.0.0/15'
- '52.74.0.0/16'
- '52.77.0.0/16'
- '52.84.0.0/15'
- '54.156.0.0/14'
- '54.226.0.0/15'
- '54.230.156.0/22'
- '54.93.0.0/16'
- '54.93.0.0/16'

View File

@ -0,0 +1,29 @@
# 2020-05-20 03:00
payload:
# > HBO NOW
- '.HBO%20NOW*.'
- '.hbo.com'
- '.hboasia.com'
- '.hbogo.com'
- '.hbonow.com'
- '.hbomax.com'
- 'execute-api.ap-southeast-1.amazonaws.com'
# > HBO GO HKG
- '.HBO%20GO%20PROD%20HKG*.'
- '.hbogoasia.com'
- '.hbogoasia.hk'
- 'bcbolthboa-a.akamaihd.net'
- 'players.brightcove.net'
- 's3-ap-southeast-1.amazonaws.com'
- 'dai3fd1oh325y.cloudfront.net'
- '44wilhpljf.execute-api.ap-southeast-1.amazonaws.com'
- 'hboasia1-i.akamaihd.net'
- 'hboasia2-i.akamaihd.net'
- 'hboasia3-i.akamaihd.net'
- 'hboasia4-i.akamaihd.net'
- 'hboasia5-i.akamaihd.net'
- 'cf-images.ap-southeast-1.prod.boltdns.net'
- 'hbolb.onwardsmg.com'
- 'api-hboprod.onwardsmg.com'
- 'hboprod.onwardsmg.com'

View File

@ -0,0 +1,31 @@
# 2020-05-20 03:00
payload:
# > bahamut
- '.bahamut.com'
- '.bahamut.com.tw'
- 'bahamut.com.tw'
- '.gamer.com.tw'
- 'gamer.com.tw'
- '.gamer.com'
- 'gamer-cds.cdn.hinet.net'
- 'gamer2-cds.cdn.hinet.net'
- '.hinet.net'
- '.ipify.org'
# > hwtv
- '.5itv.tv'
- '.ocnttv.com'
# > myTV SUPER
- '.mytv.'
- '.nowtv100.'
- '.rthklive.'
- '.mytvsuper.com'
- '.tvb.com'
# > twhao
- '.skyking.com.tw'
- 'hamifans.emome.net'
# > Twitch
- '.twitch.tv'
- '.twitchcdn.net'
- '.ttvnw.net'
- '.jtvnw.net'

View File

@ -0,0 +1,60 @@
#2020.5.23 14:05
payload:
# > Microsoft keyword
- '.onedrive.'
- '.skydrive.'
- '.1drv.'
- '.microsoft.'
# > Microsoft
- '.microsoft.com'
- '.s-microsoft.com'
- '.microsoftonline.com'
- '.microsoft-tst.com'
- '.azure.com'
- '.azureedge.net'
- '.fabric.io'
- '.files.1drv.com'
- '.hotmail.com'
- '.onenote.com'
- '.live.com'
- '.live.net'
- '.outlook.com'
- '.azure.com'
- '.edgesuite.net'
- '.msedge.net'
- '.windows.com'
- '.windows.net'
- '.bing.com'
- 'bing.com'
- '.bing.net'
- '.livefilestore.com'
- '.mesh.com'
- '.msn.com'
- '.office.com'
- '.office.net'
- '.office365.com'
- '.onedrive.com'
- '.sfx.ms'
- '.sharepoint.com'
- '.sharepointonline.com'
- '.skype.com'
- '.akamaihd.net'
- '.aspnetcdn.com'
- '.cloudapp.net'
- '.trafficmanager.net'
- '.visualstudio.com'
- 'dc.services.visualstudio.com'
- '.msecnd.net'

View File

@ -0,0 +1,19 @@
# 2020-05-20 03:00
payload:
- '.163yun.com'
- '.music.163.com'
- 'music.163.com'
- '.music.126.net'
- 'music.126.net'
- '.nosdn.127.net'
- 'nosdn.127.net'
- 'netease.com'
- '.netease.com'
- '.iplay.163.com'
- '.iplay.163.com'
- '.yjs2635.xyz'
- 'yjs2635.xyz'
- 'apm.music.163.com'
- 'apm3.music.163.com'
- 'interface.music.163.com'
- 'interface3.music.163.com'

View File

@ -0,0 +1,21 @@
# 2020-05-20 03:00
payload:
- '101.71.154.241/32'
- '103.126.92.132/32'
- '103.126.92.133/32'
- '112.13.119.17/32'
- '112.13.122.1/32'
- '115.236.118.33/32'
- '115.236.121.1/32'
- '118.24.63.156/32'
- '193.112.159.225/32'
- '223.252.199.66/32'
- '223.252.199.67/32'
- '39.105.63.80/32'
- '45.254.48.1/32'
- '47.100.127.239/32'
- '59.111.160.195/32'
- '59.111.160.197/32'
- '59.111.181.35/32'
- '59.111.181.38/32'
- '59.111.181.60/32'

View File

@ -0,0 +1,24 @@
# 2020-05-20 03:00
payload:
# > Netflix
- '.fast.com'
- '.netflix.'
- '.nflximg.'
- '.netflix.com'
- '.netflix.net'
- '.nflxext.com'
- '.nflximg.com'
- '.nflximg.net'
- '.nflxso.net'
- '.nflxvideo.net'
- '.netflixdnstest0.com'
- '.netflixdnstest1.com'
- '.netflixdnstest2.com'
- '.netflixdnstest3.com'
- '.netflixdnstest4.com'
- '.netflixdnstest5.com'
- '.netflixdnstest6.com'
- '.netflixdnstest7.com'
- '.netflixdnstest8.com'
- '.netflixdnstest9.com'

View File

@ -0,0 +1,925 @@
# 2020-05-20 03:00
payload:
# > Netflix
- '1.37.35.6/32'
- '101.100.179.242/32'
- '101.100.179.250/32'
- '105.187.240.196/32'
- '105.187.240.197/32'
- '105.187.243.5/32'
- '105.187.243.6/32'
- '112.198.26.2/32'
- '122.155.238.138/32'
- '122.155.238.142/32'
- '122.155.238.146/32'
- '122.155.238.150/32'
- '139.45.192.1/32'
- '139.45.206.1/32'
- '139.45.234.1/32'
- '14.136.135.180/32'
- '14.136.135.196/32'
- '14.136.137.68/32'
- '14.136.139.164/32'
- '140.197.247.84/32'
- '144.208.211.67/32'
- '145.253.34.129/32'
- '145.253.34.139/32'
- '145.253.34.141/32'
- '145.253.34.143/32'
- '145.253.34.145/32'
- '145.253.34.151/32'
- '145.253.34.153/32'
- '145.253.34.155/32'
- '145.253.34.157/32'
- '145.253.34.21/32'
- '145.253.34.55/32'
- '145.253.34.63/32'
- '146.115.2.226/32'
- '146.115.2.234/32'
- '146.115.2.238/32'
- '146.115.2.50/32'
- '146.115.2.62/32'
- '147.75.112.66/32'
- '147.75.112.67/32'
- '149.165.180.133/32'
- '149.165.180.134/32'
- '149.255.128.1/32'
- '151.5.17.19/32'
- '151.5.17.43/32'
- '161.0.157.195/32'
- '161.0.157.73/32'
- '162.212.12.52/32'
- '162.220.138.2/32'
- '162.223.18.131/32'
- '164.113.254.234/32'
- '167.142.14.130/32'
- '167.142.14.134/32'
- '167.142.14.138/32'
- '167.142.208.146/32'
- '170.238.0.198/32'
- '170.238.0.202/32'
- '170.238.0.206/32'
- '170.249.156.82/32'
- '170.249.179.114/32'
- '170.52.52.130/32'
- '172.56.128.126/32'
- '172.56.128.126/32'
- '172.56.132.126/32'
- '172.56.132.126/32'
- '172.56.133.126/32'
- '172.56.133.126/32'
- '172.56.138.126/32'
- '172.56.138.126/32'
- '172.56.139.126/32'
- '172.56.139.126/32'
- '172.56.140.126/32'
- '172.56.140.126/32'
- '172.56.141.126/32'
- '172.56.141.126/32'
- '172.56.143.126/32'
- '172.56.143.126/32'
- '172.56.145.66/32'
- '172.56.145.66/32'
- '173.219.132.226/32'
- '173.219.132.229/32'
- '173.219.194.149/32'
- '173.219.194.49/32'
- '173.219.222.237/32'
- '173.219.237.165/32'
- '173.219.75.17/32'
- '173.219.75.19/32'
- '173.235.1.133/32'
- '173.244.134.58/32'
- '181.188.0.162/32'
- '181.188.0.166/32'
- '181.36.10.194/32'
- '181.36.10.198/32'
- '181.36.10.202/32'
- '181.36.10.206/32'
- '181.36.10.210/32'
- '181.36.10.214/32'
- '181.36.10.234/32'
- '181.36.10.238/32'
- '181.36.10.242/32'
- '181.36.10.246/32'
- '181.36.10.38/32'
- '181.36.10.4/32'
- '181.36.10.42/32'
- '181.39.188.10/32'
- '181.39.188.13/32'
- '181.39.188.14/32'
- '181.39.188.18/32'
- '181.39.188.19/32'
- '181.39.188.20/32'
- '181.39.44.170/32'
- '181.39.44.174/32'
- '181.39.44.178/32'
- '181.39.44.179/32'
- '181.39.44.180/32'
- '181.39.44.181/32'
- '181.39.44.182/32'
- '181.39.44.183/32'
- '182.50.85.101/32'
- '182.50.85.102/32'
- '182.50.85.110/32'
- '182.50.85.117/32'
- '182.50.85.118/32'
- '182.50.85.126/32'
- '182.79.164.10/32'
- '182.79.164.136/32'
- '182.79.164.14/32'
- '182.79.164.140/32'
- '182.79.164.142/32'
- '182.79.164.144/32'
- '182.79.164.2/32'
- '182.79.164.6/32'
- '182.79.223.230/32'
- '182.79.223.234/32'
- '182.79.223.238/32'
- '182.79.223.242/32'
- '182.79.223.246/32'
- '182.79.223.250/32'
- '184.150.14.101/32'
- '184.150.14.103/32'
- '184.150.14.11/32'
- '184.150.14.129/32'
- '184.150.14.13/32'
- '184.150.14.131/32'
- '184.150.14.133/32'
- '184.150.14.135/32'
- '184.150.14.137/32'
- '184.150.14.139/32'
- '184.150.14.141/32'
- '184.150.14.143/32'
- '184.150.14.145/32'
- '184.150.14.147/32'
- '184.150.14.149/32'
- '184.150.14.15/32'
- '184.150.14.151/32'
- '184.150.14.153/32'
- '184.150.14.155/32'
- '184.150.14.157/32'
- '184.150.14.159/32'
- '184.150.14.161/32'
- '184.150.14.163/32'
- '184.150.14.165/32'
- '184.150.14.17/32'
- '184.150.14.19/32'
- '184.150.14.193/32'
- '184.150.14.195/32'
- '184.150.14.197/32'
- '184.150.14.199/32'
- '184.150.14.201/32'
- '184.150.14.203/32'
- '184.150.14.205/32'
- '184.150.14.207/32'
- '184.150.14.209/32'
- '184.150.14.21/32'
- '184.150.14.211/32'
- '184.150.14.213/32'
- '184.150.14.215/32'
- '184.150.14.217/32'
- '184.150.14.219/32'
- '184.150.14.221/32'
- '184.150.14.223/32'
- '184.150.14.225/32'
- '184.150.14.227/32'
- '184.150.14.229/32'
- '184.150.14.23/32'
- '184.150.14.25/32'
- '184.150.14.27/32'
- '184.150.14.29/32'
- '184.150.14.3/32'
- '184.150.14.31/32'
- '184.150.14.33/32'
- '184.150.14.35/32'
- '184.150.14.37/32'
- '184.150.14.39/32'
- '184.150.14.5/32'
- '184.150.14.65/32'
- '184.150.14.67/32'
- '184.150.14.69/32'
- '184.150.14.7/32'
- '184.150.14.71/32'
- '184.150.14.73/32'
- '184.150.14.75/32'
- '184.150.14.77/32'
- '184.150.14.79/32'
- '184.150.14.81/32'
- '184.150.14.83/32'
- '184.150.14.85/32'
- '184.150.14.87/32'
- '184.150.14.89/32'
- '184.150.14.9/32'
- '184.150.14.91/32'
- '184.150.14.93/32'
- '184.150.14.95/32'
- '184.150.14.97/32'
- '184.150.14.99/32'
- '184.150.15.1/32'
- '184.150.15.101/32'
- '184.150.15.11/32'
- '184.150.15.13/32'
- '184.150.15.15/32'
- '184.150.15.21/32'
- '184.150.15.23/32'
- '184.150.15.25/32'
- '184.150.15.27/32'
- '184.150.15.29/32'
- '184.150.15.3/32'
- '184.150.15.31/32'
- '184.150.15.33/32'
- '184.150.15.35/32'
- '184.150.15.37/32'
- '184.150.15.39/32'
- '184.150.15.5/32'
- '184.150.15.7/32'
- '184.150.15.85/32'
- '184.150.15.87/32'
- '184.150.15.89/32'
- '184.150.15.9/32'
- '184.150.15.91/32'
- '184.150.15.93/32'
- '184.150.15.95/32'
- '184.150.15.97/32'
- '184.150.15.99/32'
- '184.175.190.38/32'
- '185.43.181.232/32'
- '185.43.181.232/32'
- '185.43.181.234/32'
- '185.43.181.236/32'
- '185.43.181.238/32'
- '185.43.181.240/32'
- '185.43.181.240/32'
- '185.43.181.246/32'
- '185.97.110.36/32'
- '186.15.229.194/32'
- '186.15.234.18/32'
- '186.176.224.18/32'
- '186.177.100.2/32'
- '186.177.66.50/32'
- '186.179.71.154/32'
- '186.96.222.38/32'
- '188.47.194.235/32'
- '188.47.194.243/32'
- '188.47.194.244/32'
- '188.47.194.245/32'
- '188.47.194.252/32'
- '188.47.194.253/32'
- '188.47.196.228/32'
- '188.47.196.252/32'
- '188.47.196.253/32'
- '188.47.208.242/32'
- '188.47.208.242/32'
- '189.194.232.193/32'
- '189.194.232.194/32'
- '189.194.232.195/32'
- '189.194.232.196/32'
- '189.216.4.67/32'
- '189.216.4.69/32'
- '190.98.134.128/32'
- '190.98.134.130/32'
- '190.98.134.132/32'
- '190.98.134.134/32'
- '190.98.134.136/32'
- '190.98.134.138/32'
- '190.98.134.140/32'
- '190.98.134.144/32'
- '190.98.134.146/32'
- '190.98.156.141/32'
- '190.98.156.141/32'
- '190.98.156.149/32'
- '190.98.156.149/32'
- '190.98.156.183/32'
- '190.98.156.183/32'
- '192.148.237.10/32'
- '192.148.237.130/32'
- '192.148.237.138/32'
- '192.148.237.146/32'
- '192.148.237.18/32'
- '192.148.237.2/32'
- '193.109.100.131/32'
- '193.212.179.102/32'
- '193.212.179.106/32'
- '193.212.179.110/32'
- '193.212.179.114/32'
- '193.212.179.118/32'
- '193.212.179.122/32'
- '193.212.179.126/32'
- '193.212.179.130/32'
- '193.212.179.146/32'
- '193.212.179.82/32'
- '193.212.179.98/32'
- '193.247.193.100/32'
- '193.247.193.100/32'
- '193.247.193.38/32'
- '193.247.193.72/32'
- '193.247.193.74/32'
- '193.247.193.74/32'
- '193.247.193.99/32'
- '193.247.193.99/32'
- '194.228.248.66/32'
- '194.228.248.66/32'
- '195.121.126.132/32'
- '195.121.126.139/32'
- '195.121.126.144/32'
- '195.121.126.164/32'
- '195.121.126.175/32'
- '195.121.126.177/32'
- '195.121.126.197/32'
- '195.121.126.202/32'
- '195.121.126.228/32'
- '195.121.126.235/32'
- '195.202.131.98/32'
- '195.8.12.194/32'
- '195.8.12.202/32'
- '195.8.12.206/32'
- '195.8.12.225/32'
- '195.8.12.227/32'
- '197.149.149.194/32'
- '197.230.237.209/32'
- '197.230.37.209/32'
- '198.32.232.82/32'
- '198.7.237.134/32'
- '200.107.255.198/32'
- '200.107.255.202/32'
- '200.107.255.206/32'
- '200.114.32.130/32'
- '200.114.32.194/32'
- '200.114.32.2/32'
- '200.114.32.66/32'
- '200.114.33.130/32'
- '200.114.33.194/32'
- '200.114.33.66/32'
- '200.114.34.130/32'
- '200.114.34.194/32'
- '200.114.34.2/32'
- '200.114.34.66/32'
- '200.114.35.130/32'
- '200.114.35.194/32'
- '200.114.35.2/32'
- '200.114.35.66/32'
- '200.114.60.34/32'
- '201.148.100.94/32'
- '201.148.101.122/32'
- '201.148.101.126/32'
- '201.148.101.194/32'
- '201.148.101.198/32'
- '201.148.101.250/32'
- '201.148.101.42/32'
- '201.148.101.50/32'
- '201.148.101.54/32'
- '201.148.103.10/32'
- '201.148.103.14/32'
- '201.172.162.1/32'
- '201.172.162.7/32'
- '201.174.112.54/32'
- '201.174.146.142/32'
- '201.174.146.18/32'
- '201.174.249.18/32'
- '201.174.249.34/32'
- '201.174.48.130/32'
- '202.188.117.43/32'
- '202.188.117.45/32'
- '203.116.200.130/32'
- '203.116.200.131/32'
- '203.116.200.134/32'
- '203.116.200.134/32'
- '203.116.200.135/32'
- '203.116.200.136/32'
- '203.116.200.136/32'
- '203.116.200.137/32'
- '203.116.210.132/32'
- '203.116.210.133/32'
- '203.116.210.133/32'
- '203.116.210.134/32'
- '203.116.210.135/32'
- '203.116.210.136/32'
- '203.116.210.137/32'
- '203.116.210.196/32'
- '203.116.210.196/32'
- '203.116.210.197/32'
- '203.116.210.198/32'
- '203.116.210.198/32'
- '203.116.210.199/32'
- '203.116.210.199/32'
- '203.116.210.200/32'
- '203.116.210.200/32'
- '203.116.210.201/32'
- '203.177.54.2/32'
- '204.17.140.250/32'
- '205.185.100.38/32'
- '206.192.244.33/32'
- '206.196.177.135/32'
- '206.71.231.34/32'
- '206.71.231.38/32'
- '206.71.231.46/32'
- '206.71.231.50/32'
- '207.172.195.178/32'
- '207.172.195.182/32'
- '207.172.195.190/32'
- '207.172.195.50/32'
- '207.172.61.142/32'
- '207.172.61.146/32'
- '207.172.69.202/32'
- '207.172.69.206/32'
- '207.181.192.194/32'
- '207.181.192.198/32'
- '207.181.192.205/32'
- '207.181.192.210/32'
- '207.228.148.78/32'
- '207.237.69.34/32'
- '207.44.120.194/32'
- '207.44.120.198/32'
- '207.44.120.202/32'
- '207.44.120.210/32'
- '207.44.120.214/32'
- '207.44.123.18/32'
- '207.44.123.254/32'
- '207.44.123.42/32'
- '207.44.123.46/32'
- '207.44.123.50/32'
- '207.44.123.54/32'
- '207.44.123.58/32'
- '207.44.123.62/32'
- '207.44.124.234/32'
- '208.104.1.158/32'
- '208.104.243.122/32'
- '208.104.243.134/32'
- '208.180.184.241/32'
- '208.180.184.243/32'
- '208.180.185.13/32'
- '208.180.59.229/32'
- '208.54.16.65/32'
- '208.54.2.3/32'
- '208.54.2.3/32'
- '208.54.37.30/32'
- '208.54.37.30/32'
- '208.54.66.30/32'
- '208.54.67.30/32'
- '208.54.67.30/32'
- '208.54.70.30/32'
- '208.54.70.30/32'
- '208.54.80.30/32'
- '208.54.80.30/32'
- '208.54.85.30/32'
- '208.54.85.30/32'
- '208.76.186.5/32'
- '208.76.186.50/32'
- '208.76.186.58/32'
- '208.76.186.62/32'
- '208.76.186.7/32'
- '209.166.100.18/32'
- '209.166.100.22/32'
- '211.25.221.90/32'
- '211.25.221.94/32'
- '212.113.160.242/32'
- '212.230.122.34/32'
- '212.6.80.20/32'
- '212.6.80.4/32'
- '213.140.51.111/32'
- '213.158.201.180/32'
- '216.183.33.177/32'
- '216.239.1.102/32'
- '216.248.75.146/32'
- '216.248.75.150/32'
- '216.68.10.42/32'
- '216.68.10.46/32'
- '216.68.10.50/32'
- '216.68.10.54/32'
- '216.68.10.62/32'
- '216.68.248.166/32'
- '216.68.248.170/32'
- '216.68.248.174/32'
- '216.68.248.178/32'
- '216.68.248.182/32'
- '216.68.248.190/32'
- '216.70.1.54/32'
- '23.228.129.239/32'
- '23.228.129.247/32'
- '23.228.129.65/32'
- '23.228.129.67/32'
- '23.228.129.75/32'
- '23.228.129.77/32'
- '23.228.129.79/32'
- '23.228.129.81/32'
- '23.228.131.233/32'
- '23.228.131.235/32'
- '23.228.131.237/32'
- '23.228.131.239/32'
- '24.101.22.50/32'
- '24.101.22.54/32'
- '24.101.91.13/32'
- '24.101.91.15/32'
- '24.124.3.52/32'
- '24.124.7.106/32'
- '24.200.239.66/32'
- '24.200.239.70/32'
- '24.200.239.74/32'
- '24.200.239.78/32'
- '24.200.239.86/32'
- '24.215.101.170/32'
- '24.220.183.136/32'
- '24.220.183.137/32'
- '24.220.183.138/32'
- '24.220.183.139/32'
- '24.220.183.140/32'
- '24.220.183.141/32'
- '24.220.183.142/32'
- '24.220.183.152/32'
- '24.220.183.153/32'
- '24.220.183.154/32'
- '24.220.183.155/32'
- '24.220.183.156/32'
- '24.220.183.157/32'
- '24.220.183.158/32'
- '24.222.87.162/32'
- '37.143.80.10/32'
- '37.143.80.14/32'
- '37.143.80.6/32'
- '37.143.86.34/32'
- '37.143.86.50/32'
- '37.143.86.66/32'
- '37.143.86.82/32'
- '40.129.34.173/32'
- '40.129.34.175/32'
- '40.129.34.177/32'
- '40.133.138.47/32'
- '40.133.138.57/32'
- '43.245.105.1/32'
- '43.245.105.1/32'
- '43.245.105.11/32'
- '43.245.105.11/32'
- '43.245.105.129/32'
- '43.245.105.13/32'
- '43.245.105.9/32'
- '43.245.105.9/32'
- '45.121.219.34/32'
- '45.57.56.130/32'
- '49.231.114.6/32'
- '49.231.121.6/32'
- '50.125.239.30/32'
- '50.125.68.250/32'
- '50.27.152.107/32'
- '50.27.152.119/32'
- '50.46.97.70/32'
- '51.148.80.10/32'
- '51.148.80.18/32'
- '51.148.80.22/32'
- '51.148.80.6/32'
- '58.27.11.201/32'
- '58.27.11.201/32'
- '58.27.38.199/32'
- '62.127.102.10/32'
- '62.127.102.14/32'
- '62.127.102.18/32'
- '62.127.102.2/32'
- '62.127.102.22/32'
- '62.127.102.26/32'
- '62.127.102.30/32'
- '62.127.102.34/32'
- '62.127.102.38/32'
- '62.127.102.42/32'
- '62.127.102.46/32'
- '62.127.102.54/32'
- '62.127.102.58/32'
- '62.127.102.6/32'
- '62.127.102.62/32'
- '62.252.213.64/32'
- '62.252.213.68/32'
- '62.252.213.70/32'
- '62.252.213.72/32'
- '62.252.213.74/32'
- '62.252.213.76/32'
- '62.252.213.78/32'
- '62.252.213.80/32'
- '62.252.213.84/32'
- '62.252.213.86/32'
- '62.252.213.88/32'
- '62.253.139.0/32'
- '62.253.139.11/32'
- '62.253.139.129/32'
- '62.253.139.13/32'
- '62.253.139.131/32'
- '62.253.139.133/32'
- '62.253.139.135/32'
- '62.253.139.137/32'
- '62.253.139.139/32'
- '62.253.139.141/32'
- '62.253.139.3/32'
- '62.253.139.5/32'
- '62.253.139.7/32'
- '62.253.139.9/32'
- '62.254.47.0/32'
- '62.254.47.128/32'
- '62.254.47.130/32'
- '62.254.47.132/32'
- '62.254.47.2/32'
- '62.254.47.4/32'
- '62.255.44.0/32'
- '62.255.44.128/32'
- '62.255.44.130/32'
- '62.255.44.132/32'
- '62.255.44.2/32'
- '62.255.44.4/32'
- '62.4.253.129/32'
- '62.4.253.131/32'
- '62.4.253.133/32'
- '62.4.253.135/32'
- '62.4.253.137/32'
- '62.4.253.139/32'
- '62.4.253.143/32'
- '62.4.253.145/32'
- '62.4.253.147/32'
- '62.4.253.149/32'
- '62.4.253.151/32'
- '62.4.253.153/32'
- '62.4.253.155/32'
- '62.4.253.157/32'
- '62.4.253.159/32'
- '62.4.253.161/32'
- '62.4.253.163/32'
- '62.4.253.165/32'
- '62.4.253.167/32'
- '62.4.253.169/32'
- '62.4.253.171/32'
- '62.4.253.173/32'
- '62.4.253.175/32'
- '62.4.253.177/32'
- '62.4.253.179/32'
- '62.4.253.181/32'
- '62.4.253.183/32'
- '62.4.253.185/32'
- '62.4.253.187/32'
- '62.4.253.189/32'
- '62.4.253.191/32'
- '62.75.21.17/32'
- '62.75.21.18/32'
- '62.75.21.19/32'
- '62.75.21.20/32'
- '62.75.21.3/32'
- '62.75.21.33/32'
- '62.75.21.4/32'
- '64.126.2.110/32'
- '64.126.2.246/32'
- '64.136.255.34/32'
- '64.189.192.66/32'
- '64.30.98.210/32'
- '64.30.98.214/32'
- '64.33.157.254/32'
- '64.4.89.225/32'
- '64.4.89.227/32'
- '64.4.89.229/32'
- '64.4.89.231/32'
- '64.4.89.233/32'
- '64.4.89.235/32'
- '64.4.89.237/32'
- '64.4.89.239/32'
- '64.4.91.113/32'
- '64.4.91.115/32'
- '64.4.91.116/32'
- '64.4.91.118/32'
- '64.50.224.130/32'
- '64.50.228.250/32'
- '64.50.228.254/32'
- '64.53.14.5/32'
- '64.53.14.6/32'
- '64.53.14.7/32'
- '64.53.14.70/32'
- '64.53.14.71/32'
- '65.48.147.74/32'
- '65.75.64.210/32'
- '65.75.64.211/32'
- '66.18.33.62/32'
- '66.18.34.46/32'
- '66.18.34.50/32'
- '66.232.66.130/32'
- '66.232.66.134/32'
- '66.232.66.154/32'
- '66.35.4.54/32'
- '66.44.84.130/32'
- '66.44.84.134/32'
- '66.44.84.178/32'
- '66.44.84.182/32'
- '66.44.84.186/32'
- '66.60.128.139/32'
- '66.60.128.46/32'
- '66.76.204.81/32'
- '66.76.32.17/32'
- '66.76.32.19/32'
- '66.76.35.241/32'
- '66.90.138.0/32'
- '66.90.138.10/32'
- '66.90.138.12/32'
- '66.90.138.15/32'
- '66.90.138.17/32'
- '66.90.138.2/32'
- '66.90.138.82/32'
- '66.90.138.86/32'
- '66.90.138.88/32'
- '66.90.138.94/32'
- '66.90.139.90/32'
- '67.218.93.89/32'
- '67.218.93.91/32'
- '67.221.221.17/32'
- '67.221.221.29/32'
- '67.221.221.31/32'
- '68.65.44.186/32'
- '68.65.44.190/32'
- '69.147.194.190/32'
- '69.160.211.50/32'
- '70.33.57.75/32'
- '71.169.136.4/32'
- '71.169.136.5/32'
- '71.169.136.6/32'
- '71.169.136.7/32'
- '71.169.137.4/32'
- '71.169.137.6/32'
- '71.169.137.7/32'
- '71.33.48.107/32'
- '71.33.48.109/32'
- '71.33.48.113/32'
- '71.33.48.115/32'
- '71.33.48.121/32'
- '71.33.48.123/32'
- '71.33.48.37/32'
- '71.33.48.39/32'
- '71.33.48.43/32'
- '71.33.48.65/32'
- '71.33.48.67/32'
- '71.33.48.69/32'
- '71.33.48.7/32'
- '71.33.48.71/32'
- '71.33.48.73/32'
- '71.33.48.75/32'
- '71.33.48.77/32'
- '71.33.48.79/32'
- '71.33.48.89/32'
- '71.33.48.91/32'
- '71.33.48.93/32'
- '71.33.48.95/32'
- '71.33.48.97/32'
- '71.33.48.99/32'
- '71.33.49.1/32'
- '71.33.49.17/32'
- '71.33.49.21/32'
- '71.33.49.27/32'
- '71.33.49.29/32'
- '71.33.49.3/32'
- '71.33.49.31/32'
- '71.33.49.33/32'
- '71.33.49.35/32'
- '71.33.49.5/32'
- '71.33.49.7/32'
- '71.33.49.9/32'
- '71.33.50.129/32'
- '71.33.50.131/32'
- '71.33.50.133/32'
- '71.33.50.225/32'
- '71.33.50.241/32'
- '71.33.50.69/32'
- '71.33.50.71/32'
- '71.33.50.85/32'
- '71.33.50.87/32'
- '71.33.50.89/32'
- '72.22.30.34/32'
- '72.23.10.194/32'
- '72.23.10.198/32'
- '72.240.7.141/32'
- '72.252.113.189/32'
- '74.204.125.22/32'
- '74.81.99.178/32'
- '74.81.99.182/32'
- '74.81.99.186/32'
- '74.85.65.115/32'
- '76.165.16.66/32'
- '76.78.67.118/32'
- '78.146.119.11/32'
- '78.146.119.141/32'
- '78.146.119.143/32'
- '78.146.119.207/32'
- '78.146.119.39/32'
- '78.146.119.41/32'
- '78.146.119.47/32'
- '78.146.119.7/32'
- '80.64.176.144/32'
- '80.64.176.146/32'
- '80.64.176.148/32'
- '81.244.254.129/32'
- '81.244.254.131/32'
- '81.3.201.194/32'
- '81.3.201.202/32'
- '81.3.201.203/32'
- '81.45.152.0/32'
- '81.45.152.10/32'
- '81.45.152.12/32'
- '81.45.152.122/32'
- '81.45.152.124/32'
- '81.45.152.126/32'
- '81.45.152.14/32'
- '81.45.152.16/32'
- '81.45.152.18/32'
- '81.45.152.2/32'
- '81.45.152.20/32'
- '81.45.152.22/32'
- '81.45.152.4/32'
- '81.45.152.58/32'
- '81.45.152.6/32'
- '81.45.152.60/32'
- '81.45.152.62/32'
- '81.45.152.64/32'
- '81.45.152.66/32'
- '81.45.152.68/32'
- '81.45.152.70/32'
- '81.45.152.72/32'
- '81.45.152.74/32'
- '81.45.152.76/32'
- '81.45.152.78/32'
- '81.45.152.8/32'
- '81.45.152.80/32'
- '81.45.152.82/32'
- '81.45.152.84/32'
- '81.45.152.86/32'
- '81.91.205.193/32'
- '82.149.120.162/32'
- '87.79.22.170/32'
- '89.184.160.146/32'
- '89.184.160.147/32'
- '89.27.129.56/32'
- '89.27.129.68/32'
- '89.27.129.72/32'
- '89.27.129.90/32'
- '89.27.129.91/32'
- '89.27.129.92/32'
- '89.27.129.93/32'
- '89.27.129.94/32'
- '89.27.244.121/32'
- '89.27.244.123/32'
- '89.27.244.125/32'
- '89.27.244.127/32'
- '89.27.244.131/32'
- '89.27.244.133/32'
- '89.27.244.135/32'
- '89.96.194.106/32'
- '89.96.194.114/32'
- '89.96.194.118/32'
- '89.96.194.2/32'
- '89.96.194.6/32'
- '89.96.194.90/32'
- '89.96.194.94/32'
- '90.255.251.226/32'
- '90.255.251.230/32'
- '90.255.251.234/32'
- '90.255.254.130/32'
- '90.255.254.134/32'
- '90.255.254.138/32'
- '90.255.254.142/32'
- '90.255.254.146/32'
- '90.255.254.150/32'
- '90.255.254.194/32'
- '90.255.254.2/32'
- '90.255.254.202/32'
- '90.255.254.206/32'
- '90.255.254.210/32'
- '90.255.254.214/32'
- '90.255.254.6/32'
- '90.255.254.66/32'
- '90.255.254.70/32'
- '94.245.201.194/32'
- '94.245.201.202/32'
- '94.245.201.203/32'
- '94.245.201.218/32'
- '96.20.0.66/32'
- '96.20.0.70/32'
- '96.20.0.74/32'
- '96.20.0.78/32'
- '96.20.0.82/32'
- '96.21.0.66/32'
- '96.21.0.70/32'
- '96.21.0.74/32'
- '96.21.0.78/32'
- '96.22.15.66/32'
- '96.22.15.70/32'
- '96.22.15.74/32'
- '96.22.15.78/32'
- '96.23.20.66/32'
- '96.23.20.70/32'
- '96.23.20.74/32'
- '96.23.20.78/32'
- '96.4.63.99/32'
- '8.41.4.0/24'
- '23.246.0.0/18'
- '37.77.184.0/21'
- '45.57.0.0/17'
- '45.64.0.0/17'
- '64.120.128.0/17'
- '66.197.128.0/17'
- '69.53.224.0/19'
- '108.175.32.0/20'
- '185.2.220.0/22'
- '185.9.188.0/22'
- '192.173.64.0/18'
- '198.38.96.0/19'
- '198.45.48.0/20'
- '207.45.72.0/22'
- '208.75.76.0/22'

View File

@ -0,0 +1,8 @@
# 2020-05-20 03:00
payload:
- 'paypal.*'
- '.paypal.'
- 'paypal.com'
- 'paypalobjects.com'
- '.paypal.com'
- '.paypalobjects.com'

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
# 2020-05-20 03:00
payload:
# > Facebook
- '74.125.0.0/16'
- '74.119.76.0/22'
- '69.63.176.0/20'
- '69.171.224.0/19'
- '66.220.144.0/20'
- '45.64.40.0/22'
- '31.13.85.8/16'
- '31.13.64.0/18'
- '31.13.24.0/21'
- '204.15.20.0/22'
- '185.60.216.0/22'
- '179.60.192.0/22'
- '173.252.96.0/19'
- '173.252.64.0/19'
- '173.194.0.0/16'
- '157.240.0.0/17'
- '129.134.0.0/17'
- '103.4.96.0/22'
- '74.119.76.0/22'
- '69.63.176.0/20'
- '69.171.224.0/19'
- '66.220.144.0/20'
- '45.64.40.0/22'
- '31.13.64.0/18'
- '31.13.24.0/21'
- '204.15.20.0/22'
- '185.60.216.0/22'
- '179.60.192.0/22'
- '173.252.64.0/18'
- '157.240.0.0/17'
- '129.134.0.0/17'
- '103.4.96.0/22'
# > Potato Chat
- '13.251.24.157/24'
- '13.251.41.203/24'
- '17.252.156.147/24'
- '17.252.157.26/24'
# > SoftLayer
- '74.86.0.0/16'
- '75.126.0.0/16'
- '174.37.0.0/16'
- '208.43.0.0/16'
# > TeamViewer
- '109.239.140.0/24'
- '139.220.243.27/32'
- '172.16.102.56/32'
- '185.188.32.1/28'
- '221.226.128.146/32'
# > google
- '173.194.0.0/16'
- '74.125.0.0/16'
- '196.55.192.0/18'
- '104.16.0.0/12'

View File

@ -0,0 +1,11 @@
#2020.5.21 16:40
payload:
# > speedtest
- '.speedtest.'
- '.ooklaserver.net'
- '.speedtest.net'
- '.netspeedtestmaster.com'
- '.speedtestcustom.com'
- '.fdcservers.net'
- '.hgc.com'
- 'ookla-speedtest.hgconair.hgc.com.hk'

View File

@ -0,0 +1,53 @@
# 2020-05-20 03:00
payload:
# > Discord
- '.discord.gg'
- '.discord.media'
- '.discordapp.com'
- '.discordapp.net'
# > KaKaoTalk
- '.KakaoTalk*.'
- '.kakao.com'
- '.kakao.co.kr'
- '.kakaocdn.net'
# > LINE
- '.scdn.co'
- '.lin.ee'
- '.line.naver.jp'
- 'line.naver.jp'
- '.line.me'
- '.line-apps.com'
- '.line-cdn.net'
- '.line-scdn.net'
- '.line-apps.com'
- '.line-cdn.net'
- '.line-scdn.net'
- '.nhncorp.jp'
# > Pinterest
- '.Pinterest*.'
- '.pinimg.com'
- '.pinterest.com'
# > Pinterest
- '.Slack*.'
- '.slack-edge.com'
- '.slack.com'
- '.slack-msgs.com'
# > Whatsapp
- '.whatsapp.com'
- '.whatsapp.net'
# > Instagram
- '.cdninstagram.com'
- '.instagram.com'
- '.instagr.am'
- '.akamaihd.net'
# > Telegram
- 't.me'
- '.t.me'
- 'tdesktop.com'
- '.tdesktop.com'
- 'telegra.ph'
- '.telegra.ph'
- 'telegram.me'
- '.telegram.me'
- 'telegram.org'
- '.telegram.org'

View File

@ -0,0 +1,109 @@
# 2020-05-20 03:00
payload:
# > LINE
- '103.2.28.0/24'
- '103.2.30.0/23'
- '103.2.30.0/24'
- '103.2.31.0/24'
- '119.235.224.0/24'
- '119.235.232.0/24'
- '119.235.235.0/24'
- '119.235.236.0/23'
- '119.235.236.0/24'
- '119.235.237.0/24'
- '147.92.128.0/17'
- '147.92.128.0/24'
- '147.92.129.0/24'
- '147.92.130.0/24'
- '147.92.131.0/24'
- '147.92.132.0/24'
- '147.92.133.0/24'
- '147.92.134.0/24'
- '147.92.135.0/24'
- '147.92.248.0/21'
- '203.104.128.0/20'
- '203.104.128.0/24'
- '203.104.129.0/24'
- '203.104.130.0/24'
- '203.104.131.0/24'
- '203.104.132.0/24'
- '203.104.133.0/24'
- '203.104.134.0/24'
- '203.104.135.0/24'
- '203.104.136.0/24'
- '203.104.137.0/24'
- '203.104.138.0/24'
- '203.104.139.0/24'
- '203.104.140.0/24'
- '203.104.141.0/24'
- '203.104.142.0/24'
- '203.104.143.0/24'
- '203.104.144.0/21'
- '203.104.144.0/24'
- '203.104.145.0/24'
- '203.104.146.0/24'
- '203.104.147.0/24'
- '203.104.148.0/24'
- '203.104.149.0/24'
- '203.104.150.0/24'
- '203.104.151.0/24'
- '203.104.152.0/22'
- '203.104.152.0/24'
- '203.104.153.0/24'
- '203.104.154.0/24'
- '203.104.155.0/24'
- '203.104.156.0/23'
- '203.104.156.0/24'
- '203.104.157.0/24'
- '203.104.158.0/24'
# > Kakao Talk
- '1.201.0.0/24'
- '103.246.56.0/22'
- '103.27.148.0/22'
- '110.76.140.0/22'
- '113.61.104.0/22'
- '27.0.236.0/22'
- '18.194.0.0/15'
- '34.224.0.0/12'
- '50.22.198.204/30'
- '54.242.0.0/15'
- '69.171.235.0/16'
- '75.126.150.0/16'
- '108.168.174.0/16'
- '158.85.5.192/27'
- '158.85.46.128/27'
- '158.85.224.160/27'
- '173.192.222.160/27'
- '173.192.231.32/27'
- '174.37.243.0/16'
- '184.173.128.0/17'
- '208.43.122.128/27'
# > Whatsapp
- '18.194.0.0/15'
- '34.224.0.0/12'
- '50.22.198.204/30'
- '54.242.0.0/15'
- '69.171.235.0/16'
- '75.126.150.0/16'
- '108.168.174.0/16'
- '158.85.5.192/27'
- '158.85.46.128/27'
- '158.85.224.160/27'
- '173.192.222.160/27'
- '173.192.231.32/27'
- '174.37.243.0/16'
- '184.173.128.0/17'
- '208.43.122.128/27'
# > Telegram
- '91.108.4.0/22'
- '91.108.8.0/21'
- '91.108.12.0/22'
- '91.108.16.0/21'
- '91.108.56.0/22'
- '91.108.56.0/23'
- '95.161.64.0/20'
- '109.239.140.0/24'
- '149.154.160.0/22'
- '149.154.164.0/22'
- '149.154.168.0/22'
- '149.154.172.0/22'

View File

@ -0,0 +1,18 @@
# 2020-05-23 14:55
payload:
# > Youtube
- '.youtube.'
- 'youtu.be'
- '.youtu.be'
- '.youtube.com'
- 'youtubei.googleapis.com'
- '.youtube-nocookie.com'
- '.googlevideo.com'
- '.gvt2.com'
- 'l.google.com'
- '.l.google.com'
- '.arubanetworks.com'
- '.ytimg.com'
- '.ggpht.com'

View File

@ -0,0 +1,18 @@
# 2020-05-20 03:00
payload:
# > YouTubeMusic
- 'YouTubeMusic.com'
- '.YouTubeMusic.com'
- 'google.YouTubeMusic.com'
- '.google.YouTubeMusic.com'
- 'ios.google.YouTubeMusic.com'
- '.ios.google.YouTubeMusic.com'
- 'android.google.YouTubeMusic.com'
- '.android.google.YouTubeMusic.com'
- 'music.youtube.com'
- '.music.youtube.com'
# > YouTube kids
- 'youtubekids.com'
- '.youtubekids.com'

View File

@ -32,11 +32,354 @@ config clash 'config'
option ping_enable '1'
option dnscache '0'
config proxyprovider
option type 'http'
option name 'ABCD'
option provider_interval '3600'
option health_check 'true'
option health_check_url 'http://www.gstatic.com/generate_204'
option health_check_interval '300'
list groups 'Global'
option provider_url 'https://www.abcd.net/link/trFxWDLxIKtbQdsZ?list=clash'
config addtype
option type 'IP-CIDR'
option pgroup 'REJECT'
option ipaaddr '198.18.0.1/16'
option res '1'
config ruleprovider
option behavior 'domain'
option type 'http'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/AppleTV.list'
option interval '3600'
option name 'AppleTV'
config ruleprovider
option name 'Chinesemedia'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/Chinesemedia.list'
option interval '3600'
config ruleprovider
option name 'Chinesemediaip'
option type 'http'
option behavior 'ipcidr'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/Chinesemediaip.list'
option interval '3600'
config ruleprovider
option name 'Disney'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/Disney.list'
option interval '3600'
config ruleprovider
option behavior 'domain'
option name 'GlobalMedia'
option type 'http'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/GlobalMedia.list'
option interval '3600'
config ruleprovider
option behavior 'ipcidr'
option name 'GlobalMediaip'
option type 'http'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/GlobalMediaip.list'
option interval '3600'
config ruleprovider
option name 'HBO'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/HBO.list'
option interval '3600'
config ruleprovider
option name 'HMTmedia'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/HMTmedia.list'
option interval '3600'
config ruleprovider
option name 'Netflix'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/Netflix.list'
option interval '3600'
config ruleprovider
option name 'NetflixIP'
option type 'http'
option behavior 'ipcidr'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/NetflixIP.list'
option interval '3600'
config ruleprovider
option name 'YouTube'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/YouTube.list'
option interval '3600'
config ruleprovider
option name 'Youtube Music'
option type 'http'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/MEDIA/Youtube%20Music.list'
option interval '3600'
option behavior 'domain'
config ruleprovider
option name 'AppleAP'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/AppleAP.list'
option interval '3600'
config ruleprovider
option name 'AppleAPIP'
option type 'http'
option behavior 'ipcidr'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/AppleAPIP.list'
option interval '3600'
config ruleprovider
option name 'AppleCN'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/AppleCN.list'
option interval '3600'
config ruleprovider
option name 'Digital'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/Digital.list'
option interval '3600'
config ruleprovider
option name 'Microsoft'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/Microsoft.list'
option interval '3600'
config ruleprovider
option name 'Paypal'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/Paypal.list'
option interval '3600'
config ruleprovider
option name 'Speedtest'
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/Speedtest.list'
option interval '3600'
config ruleprovider
option name 'Telegram'
option type 'http'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/Telegram.list'
option interval '3600'
option behavior 'domain'
config ruleprovider
option name 'TelegramIP'
option type 'http'
option behavior 'ipcidr'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/TelegramIP.list'
option interval '3600'
config ruleprovider
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/gameline.list'
option interval '3600'
option name 'Game'
config ruleprovider
option type 'http'
option behavior 'ipcidr'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/wyy%20ip.list'
option interval '3600'
option name 'NeteaseIp'
config ruleprovider
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/SERVICES/wyy.list'
option interval '3600'
option name 'Netease'
config ruleprovider
option type 'http'
option behavior 'domain'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/ADS/AdBlock.list'
option interval '3600'
option name 'Adblock'
config ruleprovider
option type 'http'
option behavior 'ipcidr'
option url 'https://raw.githubusercontent.com/frainzy1477/clashruleset/master/ADS/AdBlockIP.list'
option interval '3600'
option name 'AdblockIP'
config rules
option type 'RULE-SET'
option rulegroups 'Global'
option rulename 'AppleTV'
config rules
option type 'RULE-SET'
option rulegroups 'Global'
option rulename 'Chinesemedia'
config rules
option type 'RULE-SET'
option rulegroups 'Global'
option rulename 'Chinesemediaip'
config rules
option type 'RULE-SET'
option rulegroups 'Global'
option rulename 'Disney'
config rules
option type 'RULE-SET'
option rulename 'GlobalMedia'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'GlobalMediaip'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'HBO'
option rulegroups 'Global'
config rules
option rulegroups 'Global'
option type 'RULE-SET'
option rulename 'HMTmedia'
config rules
option type 'RULE-SET'
option rulename 'Netflix'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'NetflixIP'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'YouTube'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Youtube Music'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'AppleAP'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'AppleAPIP'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'AppleCN'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Digital'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Microsoft'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Paypal'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Speedtest'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Telegram'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'TelegramIP'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Game'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'NeteaseIp'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Netease'
option rulegroups 'Global'
config rules
option type 'RULE-SET'
option rulename 'Adblock'
option rulegroups 'REJECT'
config rules
option type 'RULE-SET'
option rulename 'AdblockIP'
option rulegroups 'REJECT'
config rules
option type 'GEOIP'
option rulenamee 'CN'
option res '0'
option rulegroups 'DIRECT'
option rulename 'CN'
config rules
option type 'MATCH'
option rulegroups 'Others'
config pgroups
option type 'select'
option name 'Others'
option old_name_cfg 'Others'
option old_name 'Others'
list other_group 'Global'
list other_group 'DIRECT'
list other_group 'REJECT'
config pgroups
option type 'select'
option old_name_cfg 'Global'
option old_name 'Global'
option name 'Global'

View File

@ -37,12 +37,12 @@ config_type=$(uci get clash.config.config_type 2>/dev/null)
[ -z "$(grep -w "/usr/share/clash/kill_watchdog.sh" $CRON_FILE)" ] && echo "*/1 * * * * /usr/share/clash/kill_watchdog.sh" >> $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 "* */$(uci get clash.config.clear_time 2>/dev/null) * * * echo '' >/usr/share/clash/clash.txt" >> $CRON_FILE
[ -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 "* */$(uci get clash.config.auto_update_time 2>/dev/null) * * * bash /usr/share/clash/update_all.sh >/usr/share/clash/clash.txt 2>&1 &" >> $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) * * * bash /usr/share/clash/update_all.sh >/usr/share/clash/clash.txt 2>&1 &" >> $CRON_FILE
fi
auto_geoip=$(uci get clash.config.auto_update_geoip 2>/dev/null)
@ -217,111 +217,38 @@ rules(){
dns_port=$(grep listen: $CONFIG_YAML |awk -F ':' '{print $3}' |tr -cd "[0-9]")
redir_port=$(uci get clash.config.redir_port 2>/dev/null)
fake_ip_range=$(uci get clash.config.fake_ip_range 2>/dev/null)
#fake_ip_range=$(uci get clash.config.fake_ip_range 2>/dev/null)
ipv6=$(uci get clash.config.ipv6 2>/dev/null)
core=$(uci get clash.config.core 2>/dev/null)
tun_mode=$(uci get clash.config.tun_mode 2>/dev/null)
lan_ip=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)
#lan_ip=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)
wan=$(ifconfig | grep 'inet addr' | awk '{print $2}' | cut -d: -f2 2>/dev/null)
ip6=$(ifconfig | grep 'inet6 addr' | awk '{print $3}' 2>/dev/null)
enable_udp=$(uci get clash.config.enable_udp 2>/dev/null)
fake_ip=$(egrep '^ {0,}enhanced-mode' /etc/clash/config.yaml |grep enhanced-mode: |awk -F ': ' '{print $2}')
PROXY_FWMARK="0x162"
PROXY_ROUTE_TABLE="0x162"
PROXY_BYPASS_USER="root"
dnsforwader=$(uci get clash.config.dnsforwader 2>/dev/null)
if [ "${core}" -eq 1 ] || [ "${core}" -eq 2 ];then
iptables -t nat -N clash
iptables -t nat -A clash -d 0.0.0.0/8 -j RETURN
iptables -t nat -A clash -d 10.0.0.0/8 -j RETURN
iptables -t nat -A clash -d 127.0.0.0/8 -j RETURN
iptables -t nat -A clash -d 169.254.0.0/16 -j RETURN
iptables -t nat -A clash -d 172.16.0.0/12 -j RETURN
iptables -t nat -A clash -d 192.168.0.0/16 -j RETURN
iptables -t nat -A clash -d 224.0.0.0/4 -j RETURN
iptables -t nat -A clash -d 240.0.0.0/4 -j RETURN
iptables -t nat -A clash -d "${lan_ip}" -j RETURN
if [ ! -z "${wan}" ]; then
for wan_ip in $wan; do
iptables -t mangle -A clash -d "$wan_ip" -j RETURN 2>/dev/null
done
fi
iptables -t nat -A clash -p tcp -j REDIRECT --to-ports "${redir_port}"
iptables -t nat -A PREROUTING -p tcp -j clash
if [ "${enable_udp}" -eq 1 ]; then
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 789
ip route add local default dev lo table "$PROXY_ROUTE_TABLE"
iptables -t mangle -N clash
iptables -t mangle -A clash -d 0.0.0.0/8 -j RETURN
iptables -t mangle -A clash -d 10.0.0.0/8 -j RETURN
iptables -t mangle -A clash -d 127.0.0.0/8 -j RETURN
iptables -t mangle -A clash -d 169.254.0.0/16 -j RETURN
iptables -t mangle -A clash -d 172.16.0.0/12 -j RETURN
iptables -t mangle -A clash -d 192.168.0.0/16 -j RETURN
iptables -t mangle -A clash -d 224.0.0.0/4 -j RETURN
iptables -t mangle -A clash -d 240.0.0.0/4 -j RETURN
if [ ! -z "${wan}" ]; then
for wan_ip in $wan; do
iptables -t mangle -A clash -d "$wan_ip" -j RETURN 2>/dev/null
done
fi
iptables -t mangle -A clash -p udp -j TPROXY --on-port "${redir_port}" --tproxy-mark "$PROXY_FWMARK"
iptables -t mangle -A PREROUTING -p udp -j clash
fi
fake_ip_range=$(egrep '^ {0,}fake-ip-range' /etc/clash/config.yaml |grep fake-ip-range: |awk -F ': ' '{print $2}')
if [ ! -z "${fake_ip_range}" ];then
if [ "${enable_udp}" -eq 1 ]; then
iptables -t nat -A OUTPUT -p tcp -d $fake_ip_range -j REDIRECT --to-ports "${redir_port}"
iptables -t mangle -A OUTPUT -p udp -d $fake_ip_range -j MARK --set-mark "$PROXY_FWMARK"
fi
else
iptables -t nat -A OUTPUT -p tcp -d 198.18.0.1/16 -j REDIRECT --to-ports "${redir_port}"
if [ "${enable_udp}" -eq 1 ]; then
iptables -t mangle -A OUTPUT -p udp -d 198.18.0.1/16 -j MARK --set-mark "$PROXY_FWMARK"
fi
fi
redir_host=$(egrep '^ {0,}enhanced-mode' /etc/clash/config.yaml |grep enhanced-mode: |awk -F ': ' '{print $2}')
if [ "$redir_host" == "redir-host" ];then
if [ "$(uci get clash.config.access_control 2>/dev/null)" = "1" ] && [ -n "$(uci get clash.config.proxy_lan_ips 2>/dev/null)" ]; then
proxy_ips=$(uci get clash.config.proxy_lan_ips)
ipset -! -R <<-EOF
create proxy_lan hash:net
$(for ip in $proxy_ips; do echo "add proxy_lan $ip"; done)
EOF
elif [ "$(uci get clash.config.access_control 2>/dev/null)" = "2" ] && [ -n "$(uci get clash.config.reject_lan_ips 2>/dev/null)" ]; then
reject_ips=$(uci get clash.config.reject_lan_ips)
ipset -! -R <<-EOF
create reject_lan hash:net
$(for ip in $reject_ips; do echo "add reject_lan $ip"; done)
EOF
if [ -f /usr/sbin/ip6tables ] && [ "${ipv6}" -eq 1 ]; then
ip6tables -t nat -N clash_ipv6
ip6tables -t nat -A clash_ipv6 -p tcp -j REDIRECT --to-ports "${redir_port}"
ip6tables -t nat -A PREROUTING -p tcp -j clash_ipv6
if [ "${enable_udp}" -eq 1 ]; then
ip6tables -t mangle -N clash
if [ ! -z "${ip6}" ]; then
for lan_ip6 in $ip6; do
if [ "$enable_udp" -eq 1 ]; then
ip6tables -t mangle -A clash -d "$lan_ip6" -j RETURN 2>/dev/null
fi
done
fi
ip6tables -t mangle -A clash -p udp -j TPROXY --on-port "$proxy_port" --tproxy-mark "$PROXY_FWMARK"
ip6tables -t mangle -A PREROUTING -p udp -j clash
fi
fi
elif [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
TUN_DEVICE=$(egrep '^ {0,}device-url:' /etc/clash/config.yaml |grep device-url: |awk -F '//' '{print $2}')
if [ -z $TUN_DEVICE ];then
TUN_DEVICE_NAME="clash0"
else
TUN_DEVICE_NAME=$TUN_DEVICE
fi
fi
fi
ipset create localnetwork hash:net
ipset add localnetwork 127.0.0.0/8
@ -331,45 +258,147 @@ rules(){
ipset add localnetwork 224.0.0.0/4
ipset add localnetwork 240.0.0.0/4
ipset add localnetwork 172.16.0.0/12
ipset add localnetwork "${lan_ip}"
if [ ! -z "${wan}" ]; then
ipset add localnetwork "${wan}"
fi
if [ -n "$wan" ]; then
for wan_ip4s in $wan; do
ipset add localnetwork "$wan_ip4s" 2>/dev/null
done
fi
if [ "$(iptables -t nat -nL PREROUTING --line-number |grep "udp dpt:53" |grep "0.0.0.0/0 \{0,\}0.0.0.0/0" |wc -l)" -gt 1 ] && [ "$dnsforwader" -eq "1" ]; then
pre_lines=$(iptables -nvL PREROUTING -t nat |sed 1,2d |sed -n '/0.0.0.0\/0 \{0,\}0.0.0.0\/0 \{0,\}udp dpt:53/=' 2>/dev/null |sort -rn)
for pre_line in $pre_lines; do
iptables -t nat -D PREROUTING "$pre_line" >/dev/null 2>&1
done
iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53 >/dev/null 2>&1
sleep 2
fi
if [ -z "$(uci get firewall.clash 2>/dev/null)" ] || [ -z "$(uci get ucitrack.@clash[-1].init 2>/dev/null)" ]; then
uci delete ucitrack.@clash[-1] >/dev/null 2>&1
uci add ucitrack clash >/dev/null 2>&1
uci set ucitrack.@clash[-1].init=clash >/dev/null 2>&1
uci commit ucitrack >/dev/null 2>&1
uci delete firewall.clash >/dev/null 2>&1
uci set firewall.clash=include >/dev/null 2>&1
uci set firewall.clash.type=script >/dev/null 2>&1
uci set firewall.clash.path=/var/etc/clash.include >/dev/null 2>&1
uci set firewall.clash.reload=1 >/dev/null 2>&1
fi
if [ "$(uci get firewall.@defaults[0].forward)" != "ACCEPT" ]; then
uci set firewall.@defaults[0].forward=ACCEPT >/dev/null 2>&1
uci commit firewall >/dev/null 2>&1
/etc/init.d/firewall restart >/dev/null 2>&1
fi
mkdir -p /var/etc
cat > "/var/etc/clash.include" <<-EOF
/etc/init.d/clash reload >/dev/null 2>&1
EOF
if [ "${core}" -eq 1 ] || [ "${core}" -eq 2 ];then
iptables -t nat -N clash
iptables -t nat -F clash
iptables -t nat -A clash -m set --match-set localnetwork dst -j RETURN
iptables -t nat -A clash -m set --match-set reject_lan src -j RETURN
iptables -t nat -A clash -m set ! --match-set proxy_lan src -j RETURN
iptables -t nat -A clash -p tcp -j REDIRECT --to-ports "${redir_port}"
iptables -t nat -I PREROUTING -p tcp -d 8.8.8.8 -j REDIRECT --to-ports "${redir_port}"
iptables -t nat -I PREROUTING -p tcp -d 8.8.4.4 -j REDIRECT --to-ports "${redir_port}"
iptables -t nat -A PREROUTING -p tcp -j clash
if [ "${enable_udp}" -eq 1 ]; then
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE"
iptables -t mangle -N clash
iptables -t mangle -A clash -m set --match-set localnetwork dst -j RETURN
iptables -t mangle -A clash -m set --match-set reject_lan src -j RETURN
iptables -t mangle -A clash -m set ! --match-set proxy_lan src -j RETURN
iptables -t mangle -A clash -p udp -j TPROXY --on-port "${redir_port}" --tproxy-mark "$PROXY_FWMARK"
iptables -t mangle -A PREROUTING -p udp -j clash
fi
if [ "${fake_ip}" == "fake-ip" ];then
iptables -t nat -N clash_output
iptables -t nat -F clash_output
iptables -t nat -A clash_output -m set --match-set localnetwork dst -j RETURN
fake_ip_range=$(egrep '^ {0,}fake-ip-range' /etc/clash/config.yaml |grep fake-ip-range: |awk -F ': ' '{print $2}')
if [ ! -z "${fake_ip_range}" ];then
iptables -t nat -A clash_output -p tcp -d $fake_ip_range -j REDIRECT --to-ports "${redir_port}"
else
iptables -t nat -A clash_output -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "${redir_port}"
fi
iptables -t nat -A OUTPUT -p tcp -j clash_output
fi
if [ "${ipv6}" -eq 1 ]; then
ip6tables -t nat -N clash
if [ -n "${ip6}" ]; then
for lan_ip6s in $ip6; do
ip6tables -t nat -A clash -d "$lan_ip6s" -j RETURN 2>/dev/null
done
fi
ip6tables -t nat -A clash -p tcp -j REDIRECT --to-ports "$proxy_port"
ip6tables -t nat -A PREROUTING -p tcp -j clash
fi
elif [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
TUN_DEVICE=$(egrep '^ {0,}device-url:' /etc/clash/config.yaml |grep device-url: |awk -F '//' '{print $2}')
if [ -z $TUN_DEVICE ];then
TUN_DEVICE_NAME="clash0"
else
TUN_DEVICE_NAME=$TUN_DEVICE
fi
if [ "${core}" -eq 3 ];then
ip tuntap add user root mode tun $TUN_DEVICE_NAME
ip link set $TUN_DEVICE_NAME up
ip address replace 198.18.0.0/16 dev $TUN_DEVICE_NAME
ip route replace default dev $TUN_DEVICE_NAME table "$PROXY_ROUTE_TABLE"
nat=$(iptables -nvL PREROUTING -t nat | sed 1,2d | sed -n '/tcp dpt:53/=' | sort -r)
for natx in $nat; do
iptables -t nat -D PREROUTING $natx >/dev/null 2>&1
done
iptables -t nat -I PREROUTING -p tcp --dport 53 -j ACCEPT
ip tuntap add user root mode tun $TUN_DEVICE_NAME
ip link set $TUN_DEVICE_NAME up
ip route replace default dev $TUN_DEVICE_NAME table "$PROXY_ROUTE_TABLE"
elif [ "${core}" -eq 4 ];then
ip route replace default dev utun table "$PROXY_ROUTE_TABLE"
TUN_WAIT=0
while ( [ -n "$(pidof clash)" ] && [ -z "$(ip route list |grep utun)" ] && [ "$TUN_WAIT" -le 3 ] )
do
TUN_WAIT=$(expr "$TUN_WAIT" + 1)
sleep 2
done
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"
nat=$(iptables -nvL PREROUTING -t nat | sed 1,2d | sed -n '/tcp dpt:53/=' | sort -r)
for natx in $nat; do
iptables -t nat -D PREROUTING $natx >/dev/null 2>&1
done
iptables -t nat -I PREROUTING -p tcp --dport 53 -j ACCEPT
if [ -f /usr/sbin/ip6tables ] && [ "${ipv6}" -eq 1 ]; then
ip6tables -t mangle -I PREROUTING -j MARK --set-mark "$PROXY_FWMARK"
if [ "${fake_ip}" == "fake-ip" ];then
iptables -t mangle -A clash -d 198.18.0.0/16 -j MARK --set-mark "$PROXY_FWMARK"
fi
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 -I PREROUTING -m set --match-set reject_lan src -j RETURN >/dev/null 2>&1
iptables -t mangle -I PREROUTING -m set ! --match-set proxy_lan src -j RETURN >/dev/null 2>&1
iptables -t nat -I PREROUTING -p tcp --dport 53 -j ACCEPT
if [ "${fake_ip}" == "fake-ip" ];then
fake_ip_range=$(egrep '^ {0,}fake-ip-range' /etc/clash/config.yaml |grep fake-ip-range: |awk -F ': ' '{print $2}')
if [ ! -z "${fake_ip_range}" ];then
iptables -t nat -A OUTPUT -p tcp -d $fake_ip_range -j REDIRECT --to-ports "${redir_port}"
else
iptables -t nat -A OUTPUT -p tcp -d 198.18.0.1/16 -j REDIRECT --to-ports "${redir_port}"
fi
fi
fi
#===========================================================================================================================
}
@ -502,18 +531,32 @@ elif [ "${core}" -eq 3 ] && [ ! -f /etc/clash/clashtun/clash ]; then
echo "clash Tun core not found in /etc/clash/clashtun/clash" >> $REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo " $(date "+%Y-%m-%d %H:%M:%S") - 找不到/etc/clash/clashtun/clash, clash Tun内核" >> /usr/share/clash/clash.txt
echo "找不到/usr/bin/clash, clash Tun内核" >> $REAL_LOG
echo "找不到/etc/clash/clashtun/clash, clash Tun内核" >> $REAL_LOG
fi
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
exit 0
elif [ "${core}" -eq 4 ] && [ ! -f /etc/clash/dtun/clash ]; then
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo " $(date "+%Y-%m-%d %H:%M:%S") - clash Tun core not found in /etc/clash/dtun/clash " >> /usr/share/clash/clash.txt
echo "clash Tun core not found in /etc/clash/dtun/clash" >> $REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo " $(date "+%Y-%m-%d %H:%M:%S") - 找不到/usr/bin/clash clash Tun" >> /usr/share/clash/clash.txt
echo "找不到/etc/clash/dtun/clash,clash Tun" >> $REAL_LOG
fi
echo "Clash for OpenWRT" >$REAL_LOG
exit 0
else
if [ -f $CONFIG_YAML ] && [ "$(ls -l $CONFIG_YAML|awk '{print int($5)}')" -ne 0 ] ; then
check >/dev/null 2>&1
custom_list >/dev/null 2>&1
yml_change >/dev/null 2>&1
checktype=$(grep -c "type: ssr" /etc/clash/config.yaml 2>/dev/null)
if [ "${checktype}" -gt 0 ] && [ "${core}" -ne 2 ]; then
@ -522,6 +565,7 @@ if [ -f $CONFIG_YAML ] && [ "$(ls -l $CONFIG_YAML|awk '{print int($5)}')" -ne
elif [ "${lang}" == "zh_cn" ];then
echo "Clash内核不支持你的配置改用Clashr内核" >$REAL_LOG
fi
remove_mark >/dev/null 2>&1
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
exit 0
@ -555,17 +599,52 @@ if [ -f $CONFIG_YAML ] && [ "$(ls -l $CONFIG_YAML|awk '{print int($5)}')" -ne
elif [ "${lang}" == "zh_cn" ];then
echo "找不到config.yaml" >$REAL_LOG
fi
remove_mark >/dev/null 2>&1
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
exit 0
fi
yml_dns_change >/dev/null 2>&1
game_rules >/dev/null 2>&1
ip_rules >/dev/null 2>&1
if [ ! -z "$(egrep '^ {0,}rule-providers:' "/etc/clash/config.yaml")" ] && [ "${core}" -ne 4 ];then
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Your Current Config only support Clash Core(dtun)" >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "你在使用配置不支持Clash内核仅支持Clash(dtun)h内核" >$REAL_LOG
fi
remove_mark >/dev/null 2>&1
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
exit 0
fi
if [ ! -z "$(egrep '^ {0,}script:' "/etc/clash/config.yaml")" ] && [ "${core}" -ne 4 ];then
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Your Current Config only support Clash Core(dtun)" >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "你在使用配置不支持Clash内核仅支持Clash(dtun)h内核" >$REAL_LOG
fi
remove_mark >/dev/null 2>&1
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
exit 0
fi
if [ ! -z "$(egrep '^ {0,}script:' "/etc/clash/config.yaml")" ] && [ "$(uci get clash.config.p_mode 2>/dev/null)" != "Script" ];then
uci set clash.config.p_mode="Script"&& uci commit clash
elif [ "$(uci get clash.config.p_mode )" == "Script" ] && [ -z "$(egrep '^ {0,}script:' "/etc/clash/config.yaml")" ];then
uci set clash.config.p_mode="Rule" && uci commit clash
fi
if [ "${core}" -eq 1 ];then
nohup $CLASH -d "$CLASH_CONFIG" > /usr/share/clash/clash.txt 2>&1 &
@ -609,15 +688,8 @@ if [ -f $CONFIG_YAML ] && [ "$(ls -l $CONFIG_YAML|awk '{print int($5)}')" -ne
echo "设置 Clash iptables" >$REAL_LOG
fi
if [ "$(uci get firewall.@defaults[0].forward)" != "ACCEPT" ]; then
uci set firewall.@defaults[0].forward=ACCEPT >/dev/null 2>&1
uci commit firewall >/dev/null 2>&1
/etc/init.d/firewall restart >/dev/null 2>&1
fi
rules >/dev/null 2>&1
custom_list >/dev/null 2>&1
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Restarting Dnsmasq " >$REAL_LOG
@ -650,6 +722,12 @@ if [ -f $CONFIG_YAML ] && [ "$(ls -l $CONFIG_YAML|awk '{print int($5)}')" -ne
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
fi
if ! pidof clash >/dev/null; then
remove_mark 2>/dev/null
kill -9 `pidof clash|sed "s/$//g"` 2>/dev/null
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
fi
else
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo " $(date "+%Y-%m-%d %H:%M:%S") - problem with config.yaml, config.yaml is either empty or not found " >> /usr/share/clash/clash.txt
@ -682,7 +760,8 @@ fi
remove_mark(){
rm -rf /var/etc/clash.include 2>/dev/null
core=$(uci get clash.config.core 2>/dev/null)
ipv6=$(uci get clash.config.ipv6 2>/dev/null)
dns_port=$(grep "^ \{0,\}listen:" $CONFIG_YAML |awk -F ':' '{print $3}' 2>/dev/null)
@ -690,18 +769,9 @@ remove_mark(){
PROXY_ROUTE_TABLE="0x162" 2>/dev/null
if [ -f /usr/sbin/ip6tables ] && [ "${ipv6}" -eq 1 ]; then
ip6tables -t nat -F clash_ipv6 2>/dev/null1 && ip6tables -t nat -X clash_ipv6 2>/dev/null
mangle_indexs=$(ip6tables -nvL PREROUTING -t nat | sed 1,2d | sed -n '/clash_ipv6/=' | sort -r)
for mangle_index in $mangle_indexs; do
ip6tables -t nat -D PREROUTING $mangle_index 2>/dev/null
done
fi
ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
ip route del local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 789 >/dev/null 2>&1
ip route del local default dev lo table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
TUN_DEVICE=$(egrep '^ {0,}device-url:' /etc/clash/config.yaml |grep device-url: |awk -F '//' '{print $2}')
if [ -z $TUN_DEVICE ];then
@ -714,8 +784,9 @@ remove_mark(){
ip tuntap del $TUN_DEVICE_NAME mode tun 2>/dev/null
ip route del default dev $TUN_DEVICE_NAME table "$PROXY_ROUTE_TABLE" 2>/dev/null
fi
ip route del default dev utun table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
#ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" 2>/dev/null
ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" pref 789 >/dev/null 2>&1
ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
mangle=$(iptables -nvL OUTPUT -t mangle | sed 1,2d | sed -n '/clash/=' | sort -r)
@ -727,50 +798,65 @@ remove_mark(){
for prer in $pre; do
iptables -t mangle -D PREROUTING $prer 2>/dev/null
done
pre_lines=$(iptables -nvL PREROUTING -t nat |sed 1,2d |sed -n '/8\.8\./=' 2>/dev/null |sort -rn)
for pre_line in $pre_lines; do
iptables -t nat -D PREROUTING "$pre_line" >/dev/null 2>&1
done
iptables -t nat -D PREROUTING -p tcp --dport 53 -j ACCEPT >/dev/null 2>&1
iptables -t nat -D PREROUTING -p udp --dport 53 -j DNAT --to "127.0.0.1:$dns_port"
if [ -f /usr/sbin/ip6tables ] && [ "${ipv6}" -eq 1 ]; then
if [ "${ipv6}" -eq 1 ]; then
ip6tables -t mangle -D PREROUTING -j MARK --set-mark "$PROXY_FWMARK" 2>/dev/null
fi
iptables -t mangle -F clash 2>/dev/null
iptables -t mangle -X clash 2>/dev/null
iptables -t nat -F CLASH_DNS 2>/dev/null
iptables -t nat -X CLASH_DNS 2>/dev/null
iptables -t nat -F clash_output >/dev/null 2>&1
iptables -t nat -X clash_output >/dev/null 2>&1
ipset -! flush proxy_lan >/dev/null 2>&1
ipset -! flush reject_lan >/dev/null 2>&1
ipset destroy reject_lan >/dev/null 2>&1
ipset destroy proxy_lan >/dev/null 2>&1
proxy_lan=$(iptables -nvL PREROUTING -t mangle | sed 1,2d | sed -n '/! match-set proxy_lan src/=' | sort -r)
for natx in $proxy_lan; do
iptables -t mangle -D PREROUTING $natx >/dev/null 2>&1
done
reject_lan=$(iptables -nvL PREROUTING -t mangle | sed 1,2d | sed -n '/match-set reject_lan src/=' | sort -r)
for natx in $reject_lan; do
iptables -t mangle -D PREROUTING $natx >/dev/null 2>&1
done
proxy_lann=$(iptables -nvL clash -t nat | sed 1,2d | sed -n '/! match-set proxy_lan src/=' | sort -r)
for natx in $proxy_lann; do
iptables -t nat -D PREROUTING $natx >/dev/null 2>&1
done
reject_lann=$(iptables -nvL clash -t nat | sed 1,2d | sed -n '/match-set reject_lan src/=' | sort -r)
for natx in $reject_lann; do
iptables -t nat -D PREROUTING $natx >/dev/null 2>&1
done
proxy_lannn=$(iptables -nvL clash -t nat | sed 1,2d | sed -n '/! match-set proxy_lan src/=' | sort -r)
for natx in $proxy_lannn; do
iptables -t mangle -D PREROUTING $natx >/dev/null 2>&1
done
reject_lannn=$(iptables -nvL clash -t nat | sed 1,2d | sed -n '/match-set reject_lan src/=' | sort -r)
for natx in $reject_lannn; do
iptables -t mangle -D PREROUTING $natx >/dev/null 2>&1
done
iptables -t nat -D OUTPUT -p tcp -j clash_output >/dev/null 2>&1
ipset destroy localnetwork 2>/dev/null
/etc/init.d/dnsmasq restart >/dev/null 2>&1
}
stop(){
#===========================================================================================================================
delandns=$(uci get clash.config.delan 2>/dev/null)
landns=$(uci get clash.config.landns 2>/dev/null)
lang=$(uci get luci.main.lang 2>/dev/null)
tun_mode=$(uci get clash.config.tun_mode 2>/dev/null)
ipv6=$(uci get clash.config.ipv6 2>/dev/null)
core=$(uci get clash.config.core 2>/dev/null)
LIST="/usr/share/clash/server.list"
sed -i '/#START/,/#END/d' "$LIST" 2>/dev/null
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Stopping Client..." >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "正在停止客户端..." >$REAL_LOG
fi
sleep 1
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Removing clash iptables rules" >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "删除clash iptables规则" >$REAL_LOG
fi
remove_mark >/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
@ -821,17 +907,6 @@ stop(){
iptables -t nat -I PREROUTING -p tcp --dport 53 -j ACCEPT
bash /usr/share/clash/backup.sh >/dev/null 2>&1
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Clash Core Stoped Successfully " >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "Clash 停止进程守护程序" >$REAL_LOG
fi
kill -9 `pidof clash|sed "s/$//g"` 2>/dev/null
rm -rf /www/luci-static/yacd 2>/dev/null
if [ ! -z "${delandns}" ];then
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Removing Custom lan dns server " >$REAL_LOG
@ -840,6 +915,52 @@ stop(){
fi
uci delete network.lan.dns && uci commit network && /etc/init.d/network reload >/dev/null 2>&1
fi
revert_dns >/dev/null 2>&1
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Restarting Dnsmasq " >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "重启 Dnsmasq 程序" >$REAL_LOG
fi
}
stop(){
#===========================================================================================================================
delandns=$(uci get clash.config.delan 2>/dev/null)
landns=$(uci get clash.config.landns 2>/dev/null)
lang=$(uci get luci.main.lang 2>/dev/null)
tun_mode=$(uci get clash.config.tun_mode 2>/dev/null)
ipv6=$(uci get clash.config.ipv6 2>/dev/null)
core=$(uci get clash.config.core 2>/dev/null)
LIST="/usr/share/clash/server.list"
sed -i '/#START/,/#END/d' "$LIST" 2>/dev/null
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Stopping Client..." >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "正在停止客户端..." >$REAL_LOG
fi
sleep 1
remove_mark >/dev/null 2>&1
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Removing clash iptables rules" >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "删除clash iptables规则" >$REAL_LOG
fi
bash /usr/share/clash/backup.sh >/dev/null 2>&1
kill -9 `pidof clash|sed "s/$//g"` 2>/dev/null
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Clash Core Stoped Successfully " >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "Clash 停止进程守护程序" >$REAL_LOG
fi
rm -rf /www/luci-static/yacd 2>/dev/null
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Deleting Cron Job" >$REAL_LOG
@ -848,15 +969,8 @@ stop(){
fi
del_cron >/dev/null 2>&1
sleep 1
sleep 1
if [ "${lang}" == "en" ] || [ $lang == "auto" ];then
echo "Restarting Dnsmasq " >$REAL_LOG
elif [ "${lang}" == "zh_cn" ];then
echo "重启 Dnsmasq 程序" >$REAL_LOG
fi
revert_dns >/dev/null 2>&1
echo "" >/usr/share/clash/clash.txt >/dev/null 2>&1
@ -892,3 +1006,11 @@ restart(){
fi
#===========================================================================================================================
}
reload()
{
if pidof clash >/dev/null; then
remove_mark 2>/dev/null
rules 2>/dev/null
fi
}

View File

@ -1 +1 @@
<!doctype html><html lang="en" dir="ltr"><head><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.1560b07adc97ac0ac265.css" rel="stylesheet"></head><body><div id="root"></div><script src="js/1.bundle.1560b07adc97ac0ac265.min.js"></script><script src="js/bundle.1560b07adc97ac0ac265.min.js"></script></body></html>
<!doctype html><html lang="en" dir="ltr"><head><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</title><link href="main.772fa8c97df0c4f1549a.css" rel="stylesheet"></head><body><div id="root"></div><script src="js/1.bundle.772fa8c97df0c4f1549a.min.js"></script><script src="js/bundle.772fa8c97df0c4f1549a.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

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
.button{outline:0;padding:0 15px;height:32px;line-height:32px;border-radius:16px;font-size:14px;cursor:pointer;transition:all 150ms ease}.button-primary{color:#fff;border:none;background:linear-gradient(135deg, #57befc, #2c8af8);box-shadow:0 2px 8px rgba(44,138,248,.5)}.button-primary:hover{border:none}.button-primary:active{box-shadow:0 0 2px rgba(44,138,248,.5)}.button-normal{color:#909399;background:#fff;border:1px solid rgba(0,0,0,.1)}.button-normal:hover{border-color:#b7c5d6;color:#54759a}.button-normal:active{background:#fafafa;color:#54759a}.button-danger{color:#fff;border:none;background:linear-gradient(135deg, #f56c6c, #f23c3c);box-shadow:0 2px 8px rgba(242,60,60,.5)}.button-danger:hover{border:none}.button-danger:active{box-shadow:0 0 2px rgba(242,60,60,.5)}.button-success{color:#fff;border:none;background:linear-gradient(135deg, #67c23a, #5dae34);box-shadow:0 2px 8px rgba(93,174,52,.5)}.button-success:hover{border:none}.button-success:active{box-shadow:0 0 2px rgba(93,174,52,.5)}.button-warning{color:#fff;border:none;background:linear-gradient(135deg, #e6a23c, #e39725);box-shadow:0 2px 8px rgba(227,151,37,.5)}.button-warning:hover{border:none}.button-warning:active{box-shadow:0 0 2px rgba(227,151,37,.5)}
.message{position:fixed;top:20px;right:20px;border-radius:4px;opacity:0;background:#fff;display:flex;box-shadow:0 0 20px rgba(44,138,248,.2);transition:all 200ms ease;transform:translateX(100%)}.message .message-icon{width:36px;flex:1;border-radius:4px 0 0 4px;display:flex;justify-content:center;align-items:center}.message .message-icon>i{color:#fff}.message .message-content{padding:10px 15px;font-size:13px;color:#54759a}.message-info .message-icon{background:linear-gradient(135deg, #57befc, #2c8af8)}.message-success .message-icon{background:linear-gradient(135deg, #67c23a, #5dae34)}.message-warning .message-icon{background:linear-gradient(135deg, #e6a23c, #e39725)}.message-error .message-icon{background:linear-gradient(135deg, #f56c6c, #f23c3c)}.message-show{opacity:1;transition:all 200ms ease;transform:translateX(0)}
.checkbox{display:flex;position:relative;padding-left:26px;cursor:pointer;line-height:18px}.checkbox::before{content:"";display:inline-block;position:absolute;left:0;top:50%;width:18px;height:18px;border-radius:3px;transition:background-color .3s ease;transform:translateY(-9px);background-color:#fff;border:1px solid #e4eaef}.checkbox.checked::before{background-color:#57befc}.checkbox-icon{position:absolute;left:0;top:50%;color:#fff;line-height:18px;transform:translateY(-9px) scale(0.6);text-shadow:none;font-weight:bold}
.tag{display:flex;align-items:center;height:24px;font-size:12px;padding:0 12px;text-align:center;background-color:#fff;border:2px solid #2c8af8;color:#2c8af8;border-radius:12px}
.tag{display:flex;align-items:center;justify-content:center;height:24px;font-size:12px;padding:0 12px;text-align:center;background-color:#fff;border:2px solid #2c8af8;color:#2c8af8;border-radius:12px}
.spinner{position:relative;width:80px;height:80px;border-radius:100%;-webkit-animation:spinner 5s infinite linear;animation:spinner 5s infinite linear}.spinner-circle{position:absolute;width:100%;height:100%;transform-origin:48% 48%}.spinner-inner{width:100%;height:100%;border-radius:100%;border:5px solid rgba(44,138,248,.7);border-right:none;border-top:none;background-clip:padding-box;box-shadow:inset 0 0 10px rgba(44,138,248,.15)}@-webkit-keyframes spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.spinner-circle:nth-of-type(0){transform:rotate(0deg)}.spinner-circle:nth-of-type(0) .spinner-inner{-webkit-animation:spinner 2s infinite linear;animation:spinner 2s infinite linear}.spinner-circle:nth-of-type(1){transform:rotate(70deg)}.spinner-circle:nth-of-type(1) .spinner-inner{-webkit-animation:spinner 2s infinite linear;animation:spinner 2s infinite linear}.spinner-circle:nth-of-type(2){transform:rotate(140deg)}.spinner-circle:nth-of-type(2) .spinner-inner{-webkit-animation:spinner 2s infinite linear;animation:spinner 2s infinite linear}
.loading{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0;bottom:0;right:0;background-color:rgba(255,255,255,.9);box-shadow:inset 0 0 80px rgba(0,0,0,.1);z-index:1000}
.proxy-item{position:relative;width:100%;height:110px;padding:10px;border-radius:4px;background:#fff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;box-shadow:2px 5px 20px -3px rgba(44,138,248,.2);transition:all 300ms ease}.proxy-item .proxy-type{padding:2px 5px;font-size:10px;color:#fff;border-radius:2px}.proxy-item .proxy-name{display:-webkit-box;margin-top:10px;color:#54759a;font-size:10px;overflow:hidden;word-break:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical}.proxy-item .proxy-delay{position:absolute;left:10px;bottom:13px;font-size:10px;color:rgba(84,117,154,.8)}.proxy-item .proxy-editor{position:absolute;right:10px;bottom:10px;cursor:pointer;color:rgba(84,117,154,.8);opacity:0;pointer-events:none;transition:all 300ms ease}.proxy-item:hover{box-shadow:0 14px 20px -4px rgba(84,117,154,.4)}.proxy-item:hover .proxy-editor{opacity:1;pointer-events:visible}.proxy-error{opacity:.5}.proxy-error .proxy-type{background-color:#909399}@media(max-width: 768px){.proxy-item{height:70px}.proxy-item .proxy-delay{left:unset;bottom:unset;top:0;right:20px;height:70px;line-height:70px}}
@ -20,8 +20,9 @@
.proxy-provider{position:relative;display:flex;flex-direction:column;font-size:16px;padding:20px;color:#546b87}.proxy-provider-header{display:flex;align-items:center;justify-content:space-between}.proxy-provider-header-part{display:flex;align-items:center}.proxy-provider-name{margin-right:24px}.proxy-provider-proxies{list-style:none}.proxy-provider-item{box-shadow:0 0 24px 0 rgba(44,138,248,.2)}.proxy-provider-item:hover{box-shadow:0 0 24px 0 rgba(84,117,154,.4)}.proxy-provider-update{line-height:14px;font-size:14px}.proxy-provider-icon{margin-left:20px;cursor:pointer}.proxy-provider-icon.healthcheck{color:#f56c6c}@media(max-width: 768px){.proxy-provider-header{flex-direction:column;align-items:flex-start}.proxy-provider-header-part{margin:6px 0}}
.proxies-list{--item-width: calc(100% / (var(--columns) + 1));--gap: calc(var(--item-width) / var(--columns));display:flex;margin-right:calc(-1 * var(--gap));margin-top:20px;flex-wrap:wrap;align-content:flex-start;list-style:none}@media(min-width: 2001px){.proxies-list{--columns: 12}}@media(max-width: 2000px){.proxies-list{--columns: 10}}@media(max-width: 1600px){.proxies-list{--columns: 8}}@media(max-width: 1340px){.proxies-list{--columns: 7}}@media(max-width: 960px){.proxies-list{--columns: 6}}@media(max-width: 860px){.proxies-list{--columns: 5}}@media(max-width: 760px){.proxies-list{--columns: 3}}.proxies-list>li{display:inline-block;width:var(--item-width);margin-right:var(--gap);flex-shrink:0;margin-bottom:10px}.proxies-group-list{list-style:none}.proxies-group-card{margin:20px 0}.proxies-container .proxies-action-icon{margin-left:10px}.proxies-speed-test{line-height:32px;margin:0 2px 0 6px;color:#2c8af8;text-shadow:0 2px 6px rgba(44,138,248,.4);cursor:pointer}.proxies-providers-item{margin:20px 0}.proxies-providers-list{list-style:none}@media(max-width: 768px){.proxies-group-card{margin:12px 0}.proxies-list{margin-right:0;padding-bottom:20px;flex-wrap:unset;flex-direction:column}.proxies-list>li{width:100%;margin-right:0;margin-bottom:10px}}
.logs-card{display:flex;flex-direction:column;flex:1;margin-top:10px}.logs-panel{display:flex;flex-direction:column;flex-grow:1;flex-basis:0;list-style:none;padding:10px;border-radius:2px;background-color:#f3f6f9;font-size:12px;color:#73808f;overflow-y:auto;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace}.logs-panel li{line-height:20px;display:inline-block}.logs-panel-time{margin-right:10px;color:#adb7c3}
.rules-card{display:flex;flex-direction:column;flex:1;margin-top:10px;padding:0}.rules-card:focus{outline:none}.rules-card .rules{flex:1 0 auto}.rule-item{line-height:30px;padding:5px 0;height:50px;overflow:hidden;list-style:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(228,234,239,.5)}.rule-item .rule-item-row{padding:5px 0}.rule-item .drag-handler{cursor:row-resize;margin:0 10px;display:flex;justify-content:center}.rule-item .drag-handler>i{font-weight:bold;color:#b7c5d6}.rule-item .rule-type{font-size:14px;color:#54759a}.rule-item .rule-type>i{margin-left:5px;color:#54759a}.rule-item .payload{font-size:14px;color:#54759a;cursor:pointer}.rule-item .rule-proxy{font-size:14px;color:#54759a}.rule-item .delete-btn{opacity:0;transition:all 300ms ease}.rule-item .delete-btn span{font-size:14px;color:#f56c6c;cursor:pointer}.rule-item:last-child{border-bottom:none}.rule-item:hover .delete-btn{opacity:1}.rule-proxy-option{display:flex;align-items:center;overflow:hidden}.rule-proxy-option .label{margin-right:5px;height:20px;line-height:20px;padding:0 8px;font-size:10px;border-radius:10px;color:#fff;background:#b7c5d6}.rule-proxy-option .value{line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rule-provider{position:relative;display:flex;flex-direction:column;font-size:16px;padding:20px;color:#546b87}.rule-provider-header{display:flex;align-items:center;justify-content:space-between}.rule-provider-header-part{display:flex;align-items:center}.rule-provider-name{width:120px;margin-right:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rule-provider-behavior{width:80px;margin:0 20px 0 12px;background-color:#2c8af8;color:#fff}.rule-provider-spinner{transform:scale(0.4)}.rule-provider-proxies{list-style:none}.rule-provider-item{box-shadow:0 0 24px 0 rgba(44,138,248,.2)}.rule-provider-item:hover{box-shadow:0 0 24px 0 rgba(84,117,154,.4)}.rule-provider-update{line-height:14px;font-size:14px}.rule-provider-icon{display:block;margin-left:20px;cursor:pointer}.rule-provider-icon.rule-provider-loading::before{color:#909399;cursor:not-allowed;-webkit-animation:spinner 2s infinite linear;animation:spinner 2s infinite linear}@media(max-width: 768px){.rule-provider-header{flex-direction:column;align-items:flex-start}.rule-provider-header-part{margin:6px 0}}
.rules-card{display:flex;flex-direction:column;flex:1;min-height:700px;margin-top:10px;padding:0}.rules-card:focus{outline:none}.rules-card .rules{flex:1 0 auto}.rule-item{line-height:30px;padding:5px 0;height:50px;overflow:hidden;list-style:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(228,234,239,.5)}.rule-item .rule-item-row{padding:5px 0}.rule-item .drag-handler{cursor:row-resize;margin:0 10px;display:flex;justify-content:center}.rule-item .drag-handler>i{font-weight:bold;color:#b7c5d6}.rule-item .rule-type{font-size:14px;color:#54759a}.rule-item .rule-type>i{margin-left:5px;color:#54759a}.rule-item .payload{font-size:14px;color:#54759a;cursor:pointer}.rule-item .rule-proxy{font-size:14px;color:#54759a}.rule-item .delete-btn{opacity:0;transition:all 300ms ease}.rule-item .delete-btn span{font-size:14px;color:#f56c6c;cursor:pointer}.rule-item:last-child{border-bottom:none}.rule-item:hover .delete-btn{opacity:1}.rule-proxy-option{display:flex;align-items:center;overflow:hidden}.rule-proxy-option .label{margin-right:5px;height:20px;line-height:20px;padding:0 8px;font-size:10px;border-radius:10px;color:#fff;background:#b7c5d6}.rule-proxy-option .value{line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-card{margin-top:10px;padding:20px 0}.settings-card .column{font-weight:bold;align-items:center}.settings-card .value-column{justify-content:flex-end}.settings-card .label{font-size:14px;color:#54759a}.settings-card .external-controller{font-size:14px;color:#54759a;display:flex;justify-content:flex-end;font-weight:normal;line-height:17px}.settings-card .external-controller .modify-btn{color:#2c8af8;cursor:pointer}.clash-version{position:relative;margin-top:10px;padding:20px 45px;display:flex}.clash-version .check-icon{width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg, #57befc, #2c8af8);display:flex;justify-content:center;align-items:center}.clash-version .check-icon>i{transform:scale(0.5);color:#fff;font-weight:bold}.clash-version .version-info{margin-left:10px;font-size:14px;line-height:24px;color:#54759a}.clash-version .check-update-btn{position:absolute;right:45px;font-size:14px;line-height:24px;color:#b7c5d6;cursor:pointer;transition:all 150ms ease}.clash-version .check-update-btn:hover{color:#54759a}@media(max-width: 768px){.settings-card .row{flex-direction:column;padding-top:0;padding-bottom:0}.settings-card .row>.column{width:100%;margin:10px 0}}
.sidebar{position:fixed;top:0;left:0;display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:140px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sidebar-logo{margin-top:50px;width:60px;height:60px}.sidebar-menu{display:flex;flex-direction:column;margin-top:12px}.sidebar-menu .item{display:block;margin-top:18px}.sidebar-menu .item>a{display:block;width:120px;height:36px;line-height:36px;font-size:14px;border-radius:18px;text-align:center}.sidebar-menu .item>a,.sidebar-menu .item a:active,.sidebar-menu .item a:visited{color:#909399;text-decoration:none}.sidebar-menu .item>a.active{background:linear-gradient(135deg, #57befc, #2c8af8);color:#fff;box-shadow:0 2px 8px rgba(44,138,248,.5)}@media(max-width: 768px){.sidebar{width:100%;height:60px;flex-direction:row;background:#f4f5f6;z-index:10}.sidebar-logo{margin:0 15px;width:36px;height:36px}.sidebar-menu{flex:1;flex-direction:row;justify-content:center;margin-top:0;overflow-x:scroll;padding:10px}.sidebar-menu::-webkit-scrollbar{display:none}.sidebar-menu .item{margin:0 3px}.sidebar-menu .item>a{width:80px;height:32px;line-height:32px}.sidebar-menu .item.no-mobile{display:none}}
.sidebar{position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:140px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sidebar-logo{margin-top:50px;width:60px;height:60px}.sidebar-menu{display:flex;flex-direction:column;flex:1;margin-top:12px}.sidebar-menu .item{display:block;margin-top:18px}.sidebar-menu .item>a{display:block;width:120px;height:36px;line-height:36px;font-size:14px;border-radius:18px;text-align:center}.sidebar-menu .item>a,.sidebar-menu .item a:active,.sidebar-menu .item a:visited{color:#909399;text-decoration:none}.sidebar-menu .item>a.active{background:linear-gradient(135deg, #57befc, #2c8af8);color:#fff;box-shadow:0 2px 8px rgba(44,138,248,.5)}.sidebar-version{display:flex;flex-direction:column;align-items:center;padding-bottom:20px}.sidebar-version-label{font-size:14px;color:#2c8af8;text-shadow:0 2px 6px rgba(44,138,248,.4)}.sidebar-version-text{text-align:center;font-size:14px;margin:8px 0;color:#54759a}@media(max-width: 768px){.sidebar{width:100%;height:60px;flex-direction:row;background:#f4f5f6;z-index:10}.sidebar-logo{margin:0 15px;width:36px;height:36px}.sidebar-menu{flex:1;flex-direction:row;justify-content:center;margin-top:0;overflow-x:scroll;padding:10px}.sidebar-menu::-webkit-scrollbar{display:none}.sidebar-menu .item{margin:0 3px}.sidebar-menu .item>a{width:80px;height:32px;line-height:32px}.sidebar-menu .item.no-mobile{display:none}.sidebar-version{display:none}}
.connections-card{display:flex;flex-direction:column;flex:1;margin-top:10px;padding:0;overflow:hidden}.connections-card .connections{display:flex;flex-direction:column;width:100%;flex-grow:1;flex-basis:0;overflow:auto}.connections-card .connections-body{flex:1 0 auto}.connections-card .connections-th{position:relative;text-align:center;color:#909399;background:#f3f6f9;height:30px;line-height:30px;font-weight:500;font-size:14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.connections-card .connections-resizer{position:absolute;opacity:0;right:-10px;top:8px;bottom:8px;width:20px;transition:opacity .3s ease;z-index:10;font-size:14px;font-weight:300}.connections-card .connections-resizer::before{content:"";display:block;position:absolute;left:10px;transform:translateX(-2px);width:2px;height:100%;background-color:rgba(144,147,153,.6)}.connections-card .connections-header{position:-webkit-sticky;position:sticky;top:0;white-space:nowrap}.connections-card .connections-header:hover .connections-resizer{opacity:1}.connections-card .connetions-item{height:36px}.connections-card .connections-block{display:flex;align-items:center;font-size:14px;line-height:36px;padding:0 10px;color:#54759a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.connections-card .connections-block.center{text-align:center}.connections-card .connections-block.completed{background-color:#e9eef4;color:rgba(84,117,154,.5)}.connections-filter{color:#2c8af8;font-size:14px;line-height:20px;margin-left:15px;text-shadow:0 0 6px rgba(44,138,248,.4);cursor:pointer}.connections-filter.dangerous{color:#f56c6c;text-shadow:0 0 6px rgba(87,190,252,.2)}.connections-filter.total{flex:1;cursor:unset}
.external-controller .row{padding:0}.external-controller .alert{margin:10px 0}.external-controller .title,.external-controller .form{margin:15px 0}.external-controller .title{margin-top:15px;font-size:14px;font-weight:bold}@media(max-width: 768px){.external-controller .row{flex-direction:column;align-items:flex-start}.external-controller .title{margin:5px 0}.external-controller .form{margin:5px 0}.external-controller .column{width:100%}.external-controller .alert{display:none}}

View File

@ -3,11 +3,42 @@
GROUP_FILE="/tmp/yaml_group.yaml"
GAME_RULE_FILE="/tmp/yaml_game_rule_group.yaml"
CLASH_CONFIG="/etc/clash/config.yaml"
game_rules=$(uci get clash.config.g_rules 2>/dev/null)
CUSTOM_RULE_FILE="/tmp/ipadd.conf"
RULE="/tmp/rules_conf.yaml"
CLASH="/tmp/conf.yaml"
CONFIG_YAML="/etc/clash/config.yaml"
CLASH_CONFIG="/tmp/config.yaml"
if [ "${game_rules}" -eq 1 ];then
if [ -f $CLASH_CONFIG ];then
rm -rf $CLASH_CONFIG 2>/dev/null
fi
cp $CONFIG_YAML $CLASH_CONFIG 2>/dev/null
if [ ! -z "$(grep "^Rule:" "$CLASH_CONFIG")" ]; then
sed -i "/^Rule:/i\#RULESTART#" $CLASH_CONFIG 2>/dev/null
elif [ ! -z "$(grep "^rules:" "$CLASH_CONFIG")" ]; then
sed -i "/^rules:/i\#RULESTART#" $CLASH_CONFIG 2>/dev/null
fi
sed -i -e "\$a#RULEEND#" $CLASH_CONFIG 2>/dev/null
awk '/#RULESTART#/,/#RULEEND#/{print}' "$CLASH_CONFIG" 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\"//g' 2>/dev/null |sed 's/\t/ /g' 2>/dev/null |grep - |awk -F '- ' '{print "- "$2}' | sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null >$RULE 2>&1
sed -i '/#RULESTART#/,/#RULEEND#/d' "$CLASH_CONFIG" 2>/dev/null
sed -i -e "\$a " $CLASH_CONFIG 2>/dev/null
sed -i "1i\rules:" $RULE 2>/dev/null
cat $CLASH_CONFIG $RULE >$CLASH 2>/dev/null
mv $CLASH $CLASH_CONFIG 2>/dev/null
rm -rf $RULE 2>/dev/null
get_rule_file()
{
if [ -z "$1" ]; then
@ -49,22 +80,23 @@ config_foreach yml_game_rule_get "game"
if [ -f $GAME_RULE_FILE ];then
sed -i -e "\$a#*******GAME-RULE-END**********#" $GAME_RULE_FILE 2>/dev/null
sed -i '/#*******GAME-RULE-START**********#/,/#*******GAME-RULE-END**********#/d' "$CLASH_CONFIG" 2>/dev/null
sed -i -e "\$a#GAMERULEEND#" $GAME_RULE_FILE 2>/dev/null
sed -i '/#GAMERULESTART#/,/#GAMERULEEND#/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,/#*******GAME-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,/#*******GAME-RULE-START**********#\n&/}' "$CLASH_CONFIG" 2>/dev/null
if [ ! -z "$(grep "^ \{0,\}- GEOIP" "$CLASH_CONFIG")" ]; then
sed -i '1,/^ \{0,\}- GEOIP,/{/^ \{0,\}- GEOIP,/s/^ \{0,\}- GEOIP,/#GAMERULESTART#\n&/}' "$CLASH_CONFIG" 2>/dev/null
elif [ ! -z "$(grep "^ \{0,\}- MATCH," "$CLASH_CONFIG")" ]; then
sed -i '1,/^ \{0,\}- MATCH,/{/^ \{0,\}- MATCH,/s/^ \{0,\}- MATCH,/#GAMERULESTART#\n&/}' "$CLASH_CONFIG" 2>/dev/null
else
echo "#*******GAME RULE START**********#" >> "$CLASH_CONFIG" 2>/dev/null
echo "#GAMERULESTART#" >> "$CLASH_CONFIG" 2>/dev/null
fi
sed -i '/GAME-RULE-START/r/tmp/yaml_game_rule_group.yaml' "$CLASH_CONFIG" 2>/dev/null
sed -i '/GAMERULESTART/r/tmp/yaml_game_rule_group.yaml' "$CLASH_CONFIG" 2>/dev/null
mv $CLASH_CONFIG $CONFIG_YAML 2>/dev/null
fi
else
sed -i '/#*******GAME-RULE-START**********#/,/#*******GAME-RULE-END**********#/d' "$CLASH_CONFIG" 2>/dev/null
sed -i '/#GAMERULESTART#/,/#GAMERULEEND#/d' "$CONFIG_YAML" 2>/dev/null
fi

View File

@ -3,10 +3,39 @@
CUSTOM_RULE_FILE="/tmp/ipadd.conf"
CLASH_CONFIG="/etc/clash/config.yaml"
RULE="/tmp/rules_conf.yaml"
CLASH="/tmp/conf.yaml"
CONFIG_YAML="/etc/clash/config.yaml"
CLASH_CONFIG="/tmp/config.yaml"
append=$(uci get clash.config.append_rules 2>/dev/null)
if [ "${append}" -eq 1 ];then
if [ -f $CLASH_CONFIG ];then
rm -rf $CLASH_CONFIG 2>/dev/null
fi
cp $CONFIG_YAML $CLASH_CONFIG 2>/dev/null
if [ ! -z "$(grep "^Rule:" "$CLASH_CONFIG")" ]; then
sed -i "/^Rule:/i\#RULESTART#" $CLASH_CONFIG 2>/dev/null
elif [ ! -z "$(grep "^rules:" "$CLASH_CONFIG")" ]; then
sed -i "/^rules:/i\#RULESTART#" $CLASH_CONFIG 2>/dev/null
fi
sed -i -e "\$a#RULEEND#" $CLASH_CONFIG 2>/dev/null
awk '/#RULESTART#/,/#RULEEND#/{print}' "$CLASH_CONFIG" 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\"//g' 2>/dev/null |sed 's/\t/ /g' 2>/dev/null |grep - |awk -F '- ' '{print "- "$2}' | sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null >$RULE 2>&1
sed -i '/#RULESTART#/,/#RULEEND#/d' "$CLASH_CONFIG" 2>/dev/null
sed -i -e "\$a " $CLASH_CONFIG 2>/dev/null
sed -i "1i\rules:" $RULE 2>/dev/null
cat $CLASH_CONFIG $RULE >$CLASH 2>/dev/null
mv $CLASH $CLASH_CONFIG 2>/dev/null
rm -rf $RULE 2>/dev/null
if [ -f $CUSTOM_RULE_FILE ];then
rm -rf $CUSTOM_RULE_FILE 2>/dev/null
@ -22,7 +51,16 @@ ipadd()
config_get "ipaaddr" "$section" "ipaaddr" ""
config_get "type" "$section" "type" ""
config_get "res" "$section" "res" ""
if [ "${res}" -eq 1 ] || [ ! -z "${res}" ];then
if [ -z "$type" ]; then
return
fi
if [ -z "$pgroup" ]; then
return
fi
if [ "${res}" -eq 1 ];then
echo "- $type,$ipaaddr,$pgroup,no-resolve">>/tmp/ipadd.conf
else
echo "- $type,$ipaaddr,$pgroup">>/tmp/ipadd.conf
@ -36,20 +74,22 @@ ipadd()
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
sed -i -e "\$a#CUSTOMRULEEND#" $CUSTOM_RULE_FILE 2>/dev/null
sed -i '/#CUSTOMRULESTART#/,/#CUSTOMRULEEND#/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
if [ ! -z "$(grep "^ \{0,\}- GEOIP" "$CLASH_CONFIG")" ]; then
sed -i '1,/^ \{0,\}- GEOIP,/{/^ \{0,\}- GEOIP,/s/^ \{0,\}- GEOIP,/#CUSTOMRULESTART#\n&/}' "$CLASH_CONFIG" 2>/dev/null
elif [ ! -z "$(grep "^ \{0,\}- MATCH," "$CLASH_CONFIG")" ]; then
sed -i '1,/^ \{0,\}- MATCH,/{/^ \{0,\}- MATCH,/s/^ \{0,\}- MATCH,/#CUSTOMRULESTART#\n&/}' "$CLASH_CONFIG" 2>/dev/null
else
echo "#*******CUSTOM RULE START**********#" >> "$CLASH_CONFIG" 2>/dev/null
echo "#CUSTOMRULESTART#" >> "$CLASH_CONFIG" 2>/dev/null
fi
sed -i '/CUSTOM-RULE-START/r/tmp/ipadd.conf' "$CLASH_CONFIG" 2>/dev/null
sed -i '/CUSTOMRULESTART/r/tmp/ipadd.conf' "$CLASH_CONFIG" 2>/dev/null
mv $CLASH_CONFIG $CONFIG_YAML 2>/dev/null
fi
else
sed -i '/#*******CUSTOM-RULE-START**********#/,/#*******CUSTOM-RULE-END**********#/d' "$CLASH_CONFIG" 2>/dev/null
sed -i '/#CUSTOMRULESTART#/,/#CUSTOMRULEEND#/d' "$CONFIG_YAML" 2>/dev/null
fi

View File

@ -66,4 +66,33 @@ awk '!/^$/&&!/^#/{printf("server=/%s/'"$cutom_dns"'\n",$0)}' /usr/share/clash/se
ln -s /tmp/dnsmasq.clash/custom_list.conf /tmp/dnsmasq.d/custom_list.conf
fi
core=$(uci get clash.config.core 2>/dev/null)
if [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
fake_ip=$(egrep '^ {0,}enhanced-mode' /usr/share/clash/tundns.yaml |grep enhanced-mode: |awk -F ': ' '{print $2}')
elif [ "$core" -eq 1 ] || [ "$core" -eq 2 ];then
fake_ip=$(egrep '^ {0,}enhanced-mode' /usr/share/clash/dns.yaml |grep enhanced-mode: |awk -F ': ' '{print $2}')
fi
if [ "${fake_ip}" == "fake-ip" ];then
CUSTOM_FILE="/usr/share/clash/server.list"
FAKE_FILTER_FILE="/usr/share/clash/fake_filter.list"
num=$(grep -c '' /usr/share/clash/server.list 2>/dev/null)
rm -rf "$FAKE_FILTER_FILE" 2>/dev/null
if [ -s "$CUSTOM_FILE" ]; then
count_num=1
while [[ $count_num -le $num ]]
do
line=$(sed -n "$count_num"p /usr/share/clash/server.list)
echo " - '$line'" >> "$FAKE_FILTER_FILE"
count_num=$(( $count_num + 1))
done
fi
fi

View File

@ -23,6 +23,11 @@ fi
CFG_FILE="/etc/config/clash"
REAL_LOG="/usr/share/clash/clash_real.txt"
if [ ! -z "$(egrep '^ {0,}script:' "/etc/clash/config.yaml")" ] || [ ! -z "$(egrep '^ {0,}rule-providers:' "/etc/clash/config.yaml")" ];then
exit 0
fi
rm -rf /tmp/Proxy_Group /tmp/servers.yaml /tmp/yaml_proxy.yaml /tmp/group_*.yaml /tmp/yaml_group.yaml /tmp/match_servers.list /tmp/yaml_provider.yaml /tmp/provider.yaml /tmp/provider_gen.yaml /tmp/provider_che.yaml /tmp/match_provider.list 2>/dev/null

View File

@ -0,0 +1,46 @@
#!/bin/sh /etc/rc.common
. /lib/functions.sh
cfg_groups_set()
{
CFG_FILE="/etc/config/clash"
local section="$1"
config_get "name" "$section" "name" ""
config_get "old_name_cfg" "$section" "old_name_cfg" ""
config_get "old_name" "$section" "old_name" ""
if [ -z "$name" ]; then
return
fi
if [ -z "$old_name_cfg" ]; then
uci set clash."$section".old_name_cfg="$name"
uci commit clash
fi
if [ -z "$old_name" ]; then
uci set clash."$section".old_name="$name"
uci commit clash
fi
if [ "$name" != "$old_name_cfg" ] && [ ! -z "$old_name_cfg" ]; then
sed -i "s/old_name_cfg \'${old_name_cfg}\'/old_name_cfg \'${name}\'/g" $CFG_FILE 2>/dev/null
sed -i "s/groups \'${old_name_cfg}/groups \'${name}/g" $CFG_FILE 2>/dev/null
sed -i "s/other_group \'${old_name_cfg}/other_group \'${name}/g" $CFG_FILE 2>/dev/null
sed -i "s/new_servers_group \'${old_name_cfg}/new_servers_group \'${name}/g" $CFG_FILE 2>/dev/null
sed -i "s/relay_groups \'${old_name_cfg}/relay_groups \'${name}/g" $CFG_FILE 2>/dev/null
config_load "clash"
fi
}
start(){
status=$(ps|grep -c /usr/share/clash/provider/pgroups.sh)
[ "$status" -gt "3" ] && exit 0
config_load "clash"
config_foreach cfg_groups_set "pgroups"
}
start

View File

@ -0,0 +1,438 @@
#!/bin/bash /etc/rc.common
. /lib/functions.sh
RULE_PROVIDER="/tmp/rule_provider.yaml"
GROUP_FILE="/tmp/groups.yaml"
CLASH_CONFIG="/etc/clash/config.yaml"
CONFIG_YAML_PATH=$(uci get clash.config.use_config 2>/dev/null)
if [ -f $CONFIG_YAML_PATH ] && [ "$(ls -l $CONFIG_YAML_PATH|awk '{print int($5)}')" -ne 0 ];then
cp $CONFIG_YAML_PATH $CLASH_CONFIG 2>/dev/null
fi
SCRIPT="/usr/share/clash/provider/script.yaml"
rule_providers=$(uci get clash.config.rule_providers 2>/dev/null)
CFG_FILE="/etc/config/clash"
config_name=$(uci get clash.config.name_tag 2>/dev/null)
lang=$(uci get luci.main.lang 2>/dev/null)
CONFIG_YAML="/usr/share/clash/config/custom/${config_name}.yaml"
check_name=$(grep -F "${config_name}.yaml" "/usr/share/clashbackup/create_list.conf")
REAL_LOG="/usr/share/clash/clash_real.txt"
same_tag=$(uci get clash.config.same_tag 2>/dev/null)
rcount=$( grep -c "config ruleprovider" $CFG_FILE 2>/dev/null)
create=$(uci get clash.config.provider_config 2>/dev/null)
if [ "${create}" -eq 1 ];then
if [ $config_name == "" ] || [ -z $config_name ];then
if [ $lang == "en" ] || [ $lang == "auto" ];then
echo "Tag Your Config" >$REAL_LOG
elif [ $lang == "zh_cn" ];then
echo "标记您的配置" >$REAL_LOG
fi
sleep 5
echo "Clash for OpenWRT" >$REAL_LOG
exit 0
fi
if [ -f $RULE_PROVIDER ];then
rm -rf $RULE_PROVIDER 2>/dev/null
fi
rule_set()
{
local section="$1"
config_get "name" "$section" "name" ""
config_get "type" "$section" "type" ""
config_get "behavior" "$section" "behavior" ""
config_get "path" "$section" "path" ""
config_get "url" "$section" "url" ""
config_get "interval" "$section" "interval" ""
if [ "$path" != "./ruleprovider/$name.yaml" ] && [ "$type" = "http" ]; then
path="./ruleprovider/$name.yaml"
elif [ -z "$path" ]; then
return
fi
cat >> "$RULE_PROVIDER" <<-EOF
$name:
type: $type
behavior: $behavior
path: $path
EOF
if [ "$type" == "http" ]; then
cat >> "$RULE_PROVIDER" <<-EOF
url: $url
interval: $interval
EOF
fi
}
if [ $rcount -gt 0 ];then
config_load clash
config_foreach rule_set "ruleprovider"
fi
if [ -f $RULE_PROVIDER ];then
sed -i "1i\ " $RULE_PROVIDER 2>/dev/null
sed -i "2i\rule-providers:" $RULE_PROVIDER 2>/dev/null
fi
PROVIDER_FILE="/tmp/yaml_provider.yaml"
pcount=$( grep -c "config proxyprovider" $CFG_FILE 2>/dev/null)
if [ -f $PROVIDER_FILE ];then
rm -rf $PROVIDER_FILE 2>/dev/null
fi
yml_proxy_provider_set()
{
local section="$1"
config_get "type" "$section" "type" ""
config_get "name" "$section" "name" ""
config_get "path" "$section" "path" ""
config_get "provider_url" "$section" "provider_url" ""
config_get "provider_interval" "$section" "provider_interval" ""
config_get "health_check" "$section" "health_check" ""
config_get "health_check_url" "$section" "health_check_url" ""
config_get "health_check_interval" "$section" "health_check_interval" ""
if [ "$path" != "./proxyprovider/$name.yaml" ] && [ "$type" = "http" ]; then
path="./proxyprovider/$name.yaml"
elif [ -z "$path" ]; then
return
fi
if [ -z "$type" ]; then
return
fi
if [ -z "$name" ]; then
return
fi
if [ -z "$health_check" ]; then
return
fi
echo "$name" >> /tmp/Proxy_Provider
cat >> "$PROVIDER_FILE" <<-EOF
$name:
type: $type
path: $path
EOF
if [ ! -z "$provider_url" ]; then
cat >> "$PROVIDER_FILE" <<-EOF
url: $provider_url
interval: $provider_interval
EOF
fi
cat >> "$PROVIDER_FILE" <<-EOF
health-check:
enable: $health_check
url: $health_check_url
interval: $health_check_interval
EOF
}
if [ $pcount -gt 0 ];then
config_load "clash"
config_foreach yml_proxy_provider_set "proxyprovider"
fi
if [ -f $PROVIDER_FILE ];then
sed -i "1i\ " $PROVIDER_FILE 2>/dev/null
sed -i "2i\proxy-providers:" $PROVIDER_FILE 2>/dev/null
rm -rf /tmp/Proxy_Provider
fi
if [ -f $GROUP_FILE ];then
rm -rf $GROUP_FILE 2>/dev/null
fi
set_groups()
{
if [ -z "$1" ]; then
return
fi
if [ "$1" = "$3" ]; then
set_group=1
echo " - \"${2}\"" >>$GROUP_FILE
fi
}
set_other_groups()
{
set_group=1
if [ "${1}" = "DIRECT" ]||[ "${1}" = "REJECT" ];then
echo " - ${1}" >>$GROUP_FILE 2>/dev/null
else
echo " - \"${1}\"" >>$GROUP_FILE 2>/dev/null
fi
}
set_proxy_provider()
{
local section="$1"
config_get "name" "$section" "name" ""
config_list_foreach "$section" "pgroups" set_provider_groups "$name" "$2"
}
set_provider_groups()
{
if [ -z "$1" ]; then
return
fi
if [ "$1" = "$3" ]; then
set_proxy_provider=1
echo " - ${2}" >>$GROUP_FILE
fi
}
yml_groups_set()
{
local section="$1"
config_get "type" "$section" "type" ""
config_get "name" "$section" "name" ""
config_get "old_name" "$section" "old_name" ""
config_get "test_url" "$section" "test_url" ""
config_get "test_interval" "$section" "test_interval" ""
config_get "other_group" "$section" "other_group" ""
if [ -z "$type" ]; then
return
fi
if [ -z "$name" ]; then
return
fi
echo "- name: $name" >>$GROUP_FILE 2>/dev/null
echo " type: $type" >>$GROUP_FILE 2>/dev/null
group_name="$name"
echo " proxies: " >>$GROUP_FILE
set_group=0
set_proxy_provider=0
config_list_foreach "$section" "other_group" set_other_groups
if [ "$( grep -c "config proxyprovider" $CFG_FILE )" -gt 0 ];then
echo " use: $group_name" >>$GROUP_FILE
if [ "$type" != "relay" ]; then
config_foreach set_proxy_provider "proxyprovider" "$group_name"
fi
if [ "$set_proxy_provider" -eq 1 ]; then
sed -i "/^ \{0,\}use: ${group_name}/c\ use:" $GROUP_FILE
else
sed -i "/use: ${group_name}/d" $GROUP_FILE
fi
if [ "$set_group" -eq 1 ]; then
sed -i "/^ \{0,\}proxies: ${group_name}/c\ proxies:" $GROUP_FILE
else
sed -i "/proxies: ${group_name}/d" $GROUP_FILE
fi
fi
[ ! -z "$test_url" ] && {
echo " url: $test_url" >>$GROUP_FILE 2>/dev/null
}
[ ! -z "$test_interval" ] && {
echo " interval: \"$test_interval\"" >>$GROUP_FILE 2>/dev/null
}
}
gcount=$( grep -c "config pgroups" $CFG_FILE 2>/dev/null)
if [ $gcount -gt 0 ];then
config_load clash
config_foreach yml_groups_set "pgroups"
fi
if [ -f $GROUP_FILE ]; then
sed -i "1i\ " $GROUP_FILE 2>/dev/null
sed -i "2i\proxy-groups:" $GROUP_FILE 2>/dev/null
fi
RULE_FILE="/tmp/rules.yaml"
rucount=$( grep -c "config rules" $CFG_FILE 2>/dev/null)
if [ -f $RULE_FILE ];then
rm -rf $RULE_FILE 2>/dev/null
fi
add_rules()
{
local section="$1"
config_get "rulegroups" "$section" "rulegroups" ""
config_get "rulename" "$section" "rulename" ""
config_get "type" "$section" "type" ""
config_get "res" "$section" "res" ""
config_get "rulenamee" "$section" "rulenamee" ""
if [ ! -z $rulename ];then
rulename=$rulename
elif [ ! -z $rulenamee ];then
rulename=$rulenamee
fi
if [ "${res}" -eq 1 ];then
echo "- $type,$rulename,$rulegroups,no-resolve">>$RULE_FILE
elif [ "${type}" == "MATCH" ];then
echo "- $type,$rulegroups">>$RULE_FILE
else
echo "- $type,$rulename,$rulegroups">>$RULE_FILE
fi
}
if [ $rucount -gt 0 ];then
config_load clash
config_foreach add_rules "rules"
fi
if [ -f $RULE_FILE ];then
sed -i "1i\ " $RULE_FILE 2>/dev/null
sed -i "2i\rules:" $RULE_FILE 2>/dev/null
fi
mode=$(uci get clash.config.mode 2>/dev/null)
p_mode=$(uci get clash.config.p_mode 2>/dev/null)
da_password=$(uci get clash.config.dash_pass 2>/dev/null)
redir_port=$(uci get clash.config.redir_port 2>/dev/null)
http_port=$(uci get clash.config.http_port 2>/dev/null)
socks_port=$(uci get clash.config.socks_port 2>/dev/null)
dash_port=$(uci get clash.config.dash_port 2>/dev/null)
bind_addr=$(uci get clash.config.bind_addr 2>/dev/null)
allow_lan=$(uci get clash.config.allow_lan 2>/dev/null)
log_level=$(uci get clash.config.level 2>/dev/null)
subtype=$(uci get clash.config.subcri 2>/dev/null)
DNS_FILE="/usr/share/clash/dns.yaml"
TEMP_FILE="/tmp/dns_temp.yaml"
cat >> "$TEMP_FILE" <<-EOF
#config-start-here
EOF
sed -i "1i\port: ${http_port}" $TEMP_FILE 2>/dev/null
sed -i "/port: ${http_port}/a\socks-port: ${socks_port}" $TEMP_FILE 2>/dev/null
sed -i "/socks-port: ${socks_port}/a\redir-port: ${redir_port}" $TEMP_FILE 2>/dev/null
sed -i "/redir-port: ${redir_port}/a\allow-lan: ${allow_lan}" $TEMP_FILE 2>/dev/null
if [ $allow_lan == "true" ]; then
sed -i "/allow-lan: ${allow_lan}/a\bind-address: \"${bind_addr}\"" $TEMP_FILE 2>/dev/null
sed -i "/bind-address: \"${bind_addr}\"/a\mode: ${p_mode}" $TEMP_FILE 2>/dev/null
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null
sed -i "external-ui: \"/usr/share/clash/dashboard\"/a\ " $TEMP_FILE 2>/dev/null
sed -i " /a\ " $TEMP_FILE 2>/dev/null
else
sed -i "/allow-lan: ${allow_lan}/a\mode: ${p_mode}" $TEMP_FILE 2>/dev/null
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null
fi
sed -i '/#config-start-here/ d' $TEMP_FILE 2>/dev/null
cat $DNS_FILE >> $TEMP_FILE 2>/dev/null
script=$(uci get clash.config.script 2>/dev/null)
ruleprovider=$(uci get clash.config.rulprp 2>/dev/null)
ppro=$(uci get clash.config.ppro 2>/dev/null)
rul=$(uci get clash.config.rul 2>/dev/null)
if [ $ppro -eq 1 ];then
if [ -f $PROVIDER_FILE ];then
cat $PROVIDER_FILE >> $TEMP_FILE 2>/dev/null
fi
fi
if [ -f $GROUP_FILE ];then
cat $GROUP_FILE >> $TEMP_FILE 2>/dev/null
fi
if [ $ruleprovider -eq 1 ];then
if [ -f $RULE_PROVIDER ];then
cat $RULE_PROVIDER >> $TEMP_FILE 2>/dev/null
sed -i -e '$a\' $TEMP_FILE 2>/dev/null
fi
fi
if [ $script -eq 1 ];then
if [ -f $SCRIPT ];then
cat $SCRIPT >> $TEMP_FILE 2>/dev/null
sed -i -e '$a\' $TEMP_FILE 2>/dev/null
fi
fi
if [ $rul -eq 1 ];then
if [ -f $RULE_FILE ];then
cat $RULE_FILE >> $TEMP_FILE 2>/dev/null
fi
fi
mv $TEMP_FILE $CONFIG_YAML 2>/dev/null
if [ -z $check_name ] && [ "${same_tag}" -eq 1 ];then
echo "${config_name}.yaml" >>/usr/share/clashbackup/create_list.conf
elif [ -z $check_name ] && [ "${same_tag}" -eq 0 ];then
echo "${config_name}.yaml" >>/usr/share/clashbackup/create_list.conf
fi
rm -rf $RULE_PROVIDER $PROVIDER_FILE $GROUP_FILE $RULE_FILE
if [ $lang == "en" ] || [ $lang == "auto" ];then
echo "Completed Creating Custom Config.. " >$REAL_LOG
sleep 2
echo "Clash for OpenWRT" >$REAL_LOG
elif [ $lang == "zh_cn" ];then
echo "创建自定义配置完成..." >$REAL_LOG
sleep 2
echo "Clash for OpenWRT" >$REAL_LOG
fi
fi
fi

View File

@ -0,0 +1,30 @@
#!/bin/sh /etc/rc.common
. /lib/functions.sh
rules_set()
{
CFG_FILE="/etc/config/clash"
local section="$1"
config_get "type" "$section" "type" ""
config_get "rulename" "$section" "rulename" ""
config_get "rulenamee" "$section" "rulenamee" ""
if [ -z "$type" ]; then
return
fi
if [ -z "$rulename" ]; then
uci set clash."$section".rulename="$rulenamee"
uci commit clash
fi
}
start(){
config_load "clash"
config_foreach rules_set "rules"
}
start

View File

@ -0,0 +1,12 @@
script:
code: |
def main(ctx, metadata):
ip = metadata["dst_ip"] = ctx.resolve_ip(metadata["host"])
if ip == "":
return "DIRECT"
code = ctx.geoip(ip)
if code == "LAN" or code == "CN":
return "DIRECT"
return "Proxy" # default policy for requests which are not matched by any other script

View File

@ -98,18 +98,17 @@ yml_proxy_provider_set()
config_get "type" "$section" "type" ""
config_get "name" "$section" "name" ""
config_get "path" "$section" "path" ""
config_get "pathh" "$section" "pathh" ""
config_get "provider_url" "$section" "provider_url" ""
config_get "provider_interval" "$section" "provider_interval" ""
config_get "health_check" "$section" "health_check" ""
config_get "health_check_url" "$section" "health_check_url" ""
config_get "health_check_interval" "$section" "health_check_interval" ""
if [ "$type" == "http" ];then
ppath="path: $path"
elif [ "$type" == "file" ];then
ppath="path: $pathh"
fi
if [ "$path" != "./proxyprovider/$name.yaml" ] && [ "$type" = "http" ]; then
path="./proxyprovider/$name.yaml"
elif [ -z "$path" ]; then
return
fi
if [ -z "$type" ]; then
@ -131,7 +130,7 @@ yml_proxy_provider_set()
cat >> "$PROVIDER_FILE" <<-EOF
$name:
type: $type
$ppath
path: $path
EOF
if [ ! -z "$provider_url" ]; then
cat >> "$PROVIDER_FILE" <<-EOF
@ -635,20 +634,14 @@ yml_groups_set()
echo " type: $type" >>$GROUP_FILE 2>/dev/null
group_name="$name"
echo " proxies: " >>$GROUP_FILE
#if [ "$type" == "url-test" ] || [ "$type" == "load-balance" ] || [ "$type" == "fallback" ] ; then
# echo " proxies:" >>$GROUP_FILE 2>/dev/null
# cat $Proxy_Group >> $GROUP_FILE 2>/dev/null
#else
# echo " proxies:" >>$GROUP_FILE 2>/dev/null
#fi
if [ "$name" != "$old_name" ]; then
sed -i "s/,${old_name}$/,${name}#d/g" $load 2>/dev/null
sed -i "s/:${old_name}$/:${name}#d/g" $load 2>/dev/null
sed -i "s/\'${old_name}\'/\'${name}\'/g" $CFG_FILE 2>/dev/null
config_load "clash"
fi
#if [ "$name" != "$old_name" ]; then
# sed -i "s/,${old_name}$/,${name}#d/g" $load 2>/dev/null
# sed -i "s/:${old_name}$/:${name}#d/g" $load 2>/dev/null
# sed -i "s/\'${old_name}\'/\'${name}\'/g" $CFG_FILE 2>/dev/null
# config_load "clash"
#fi
set_group=0
set_proxy_provider=0
@ -707,6 +700,7 @@ fi
mode=$(uci get clash.config.mode 2>/dev/null)
p_mode=$(uci get clash.config.p_mode 2>/dev/null)
da_password=$(uci get clash.config.dash_pass 2>/dev/null)
redir_port=$(uci get clash.config.redir_port 2>/dev/null)
http_port=$(uci get clash.config.http_port 2>/dev/null)
@ -716,8 +710,9 @@ bind_addr=$(uci get clash.config.bind_addr 2>/dev/null)
allow_lan=$(uci get clash.config.allow_lan 2>/dev/null)
log_level=$(uci get clash.config.level 2>/dev/null)
subtype=$(uci get clash.config.subcri 2>/dev/null)
DNS_FILE="/usr/share/clash/dns.yaml"
TEMP_FILE="/tmp/dns_temp.yaml"
cat >> "$TEMP_FILE" <<-EOF
#config-start-here
EOF
@ -728,16 +723,16 @@ EOF
sed -i "/redir-port: ${redir_port}/a\allow-lan: ${allow_lan}" $TEMP_FILE 2>/dev/null
if [ $allow_lan == "true" ]; then
sed -i "/allow-lan: ${allow_lan}/a\bind-address: \"${bind_addr}\"" $TEMP_FILE 2>/dev/null
sed -i "/bind-address: \"${bind_addr}\"/a\mode: Rule" $TEMP_FILE 2>/dev/null
sed -i "/mode: Rule/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
sed -i "/bind-address: \"${bind_addr}\"/a\mode: ${p_mode}" $TEMP_FILE 2>/dev/null
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null
sed -i "external-ui: \"/usr/share/clash/dashboard\"/a\ " $TEMP_FILE 2>/dev/null
sed -i " /a\ " $TEMP_FILE 2>/dev/null
else
sed -i "/allow-lan: ${allow_lan}/a\mode: Rule" $TEMP_FILE 2>/dev/null
sed -i "/mode: Rule/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
sed -i "/allow-lan: ${allow_lan}/a\mode: ${p_mode}" $TEMP_FILE 2>/dev/null
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null

View File

@ -2,7 +2,7 @@
rule=$(uci get clash.config.rule_url 2>/dev/null)
RULE_YAML="/tmp/Rule"
curl -sL --connect-timeout 10 --retry 2 "$rule" -O 2>&1 >1 $RULE_YAML
wget -c4 --no-check-certificate --user-agent="Clash/OpenWRT" "$rule" -O 2>&1 >1 $RULE_YAML
if [ -f "$RULE_YAML" ]; then
status=$(egrep '^ {0,}Rule:' /tmp/Rule)

View File

@ -3,6 +3,10 @@ experimental:
# interface-name: eth0
tun:
enable: true
stack: system # or gvisor
# dns-hijack:
# - 8.8.8.8:53
# - tcp://8.8.8.8:53
device-url: dev://utun
dns-listen: 0.0.0.0:53

View File

@ -25,7 +25,7 @@ if [ $type == "clash" ] && [ ! -z $url ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" $url -O 2>&1 >1 $CONFIG_YAML
sleep 3
if [ "$?" -eq "0" ]; then
if [ $lang == "en" ] || [ $lang == "auto" ];then
echo "Updating Configuration Completed" >$REAL_LOG
@ -50,7 +50,7 @@ if [ $type == "ssr2clash" ] && [ ! -z $url ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://ssrsub2clashr.herokuapp.com/ssrsub2clash?sub=$url" -O 2>&1 >1 $CONFIG_YAML
sleep 3
if [ "$?" -eq "0" ]; then
CONFIG_YAMLL="/tmp/conf"
@ -114,7 +114,7 @@ if [ $type == "v2clash" ] && [ ! -z $url ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://tgbot.lbyczf.com/v2rayn2clash?url=$url" -O 2>&1 >1 $CONFIG_YAML
sleep 3
if [ "$?" -eq "0" ]; then
if [ $lang == "en" ] || [ $lang == "auto" ];then
echo "Updating Configuration Completed" >$REAL_LOG
@ -133,9 +133,13 @@ fi
count_nums=$(( $count_nums + 1))
done
sleep 2
if [ "$c_type" -eq 1 ];then
use=$(uci get clash.config.use_config 2>/dev/null)
if [ "$c_type" -eq 1 ] && [ "$(ls -l $use|awk '{print int($5)}')" -ne 0 ];then
if pidof clash >/dev/null; then
/etc/init.d/clash restart 2>/dev/null
fi

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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.
***************************************************************************** */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,12 +10,6 @@ object-assign
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
*
@ -29,18 +23,18 @@ object-assign
*/
/*! *****************************************************************************
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
Copyright (c) Microsoft Corporation.
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.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/** @license React v0.0.0-experimental-241c4467e

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!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.googleapis.com/css2?family=Merriweather+Sans:wght@400;700&family=Roboto+Mono&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"><script defer="defer" src="runtime.19a1a1c098f3d2fbd54e.js"></script><script defer="defer" src="core-js~app.b214178cdb71012cd622.js"></script><script defer="defer" src="react~app.e2d573992419eb24e61b.js"></script><script defer="defer" src="app.1de83e4934f843dc8d9b.js"></script><link href="app.6c8a97d4cbae5f4b8f38.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
<!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"><link rel="preload" href="/open-sans-latin-400.woff2" as="font"><link rel="preload" href="/open-sans-latin-700.woff2" as="font"><link rel="preload" href="/roboto-mono-latin-400.woff2" as="font"><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><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"><script defer="defer" src="runtime.c5c5cfdb187e3dcf245e.js"></script><script defer="defer" src="core-js~app.f925e7b0d7db8cb56360.js"></script><script defer="defer" src="react~app.11ff7e45a0d5e0bfa30d.js"></script><script defer="defer" src="app.1e9cc92a5b0a36bb97e9.js"></script><link href="app.2db3fc367e2e4ce88e80.css" rel="stylesheet"></head><body><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,11 @@
._37wt2_a2Gx{display:flex;align-items:center}._37wt2_a2Gx .L80zPM0Rx0{display:inline-flex;transform:rotate(0deg);transition:transform .3s}._37wt2_a2Gx .L80zPM0Rx0._36RO7_wtuv{transform:rotate(180deg)}._37wt2_a2Gx .L80zPM0Rx0:focus{outline:var(--color-focus-blue) solid 1px}._2XKN3NArpV{margin-left:5px}._1s98xvUoBx{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}
._2tHS8vcjWZ{border-radius:20px;color:#eee;font-size:.6em}@media screen and (min-width:30em){._2tHS8vcjWZ{font-size:1em}}
._1OypGPFF1I{position:relative;padding:5px;border-radius:8px;overflow:hidden;max-width:280px;background-color:var(--color-bg-proxy)}@media screen and (min-width:30em){._1OypGPFF1I{min-width:200px;border-radius:10px;padding:10px}}._1OypGPFF1I._25Vy0R3DBh{background-color:var(--color-focus-blue);color:#ddd}._1OypGPFF1I._20b8CxdJZg{opacity:.5}._3ILPKOrew2{font-family:var(--font-mono);font-size:.6em}@media screen and (min-width:30em){._3ILPKOrew2{font-size:1em}}._3DtTZsIYVP{display:flex;align-items:center;justify-content:space-between}._2dGvkUlaDx{width:100%;overflow:hidden;text-overflow:ellipsis;margin-bottom:5px;font-size:.85em}@media screen and (min-width:30em){._2dGvkUlaDx{font-size:1.1em}}._1fX-k2HS41{width:12px;height:12px;border-radius:8px}._1fX-k2HS41 ._25Vy0R3DBh{outline:1px solid pink}
._1Zy60rJawW{display:flex;flex-wrap:wrap;margin-top:8px}._34N6M4Zdr3{margin-right:5px;margin-bottom:5px;transition:transform .2s ease-in-out}@media screen and (min-width:30em){._34N6M4Zdr3{margin-right:10px;margin-bottom:10px}}._34N6M4Zdr3.QolCt3jugF{cursor:pointer}._34N6M4Zdr3.QolCt3jugF:hover{transform:translateY(-2px)}
.WqD74l0KeZ{margin-bottom:12px}._3u5R6urbB9{width:20px;height:20px;display:flex;align-items:center;justify-content:center}
._2OKIZuCJtW{background-color:rgba(0,0,0,.6)}._1y6NeshM4O{position:absolute;background-color:var(--bg-modal);color:var(--color-text);line-height:1.4;opacity:.6;transition:all .3s ease;transform:translate(-50%,-50%) scale(1.2);box-shadow:0 4px 4px rgba(0,0,0,.12),0 16px 32px rgba(0,0,0,.24)}._25KARE4UsT{opacity:1;transform:translate(-50%,-50%) scale(1)}
.t6lsDKNXTK{height:30px;width:100%;padding-left:8px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-background);color:var(--color-text);padding-right:20px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l3 4H1l3-4zM4 17l-3-4h6l-3 4z' fill='%23999'/%3E%3C/svg%3E");border-radius:4px;border-image:initial;border:1px solid var(--select-border-color);transition:all .1s ease 0s;background-position:calc(100% - 8px) 50%;background-repeat:no-repeat}.t6lsDKNXTK:focus,.t6lsDKNXTK:hover{border-color:#343434;outline:none!important;color:var(--color-text-highlight);background-image:var(--select-bg-hover)}.t6lsDKNXTK option{background-color:var(--color-background)}
._1h4Qixiwxj{max-width:85vw;width:400px;display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:13px 0}hr{height:1px;background-color:var(--color-separator);border:none;outline:none;margin:1rem 0}
.W_0q0BiEOR{display:flex;justify-content:center;align-items:center}
._2PJqMIeTLt{margin-bottom:12px}._2PJqMIeTLt small{color:#777}._2bdge0dkRf{padding:10px 15px}@media screen and (min-width:30em){._2bdge0dkRf{padding:10px 40px}}.Vp69gn8Y28{display:flex}.Vp69gn8Y28 button{margin:0 5px}.Vp69gn8Y28 button:first-child{margin-left:0}._32jty5m2Ss{display:flex;justify-content:center;align-items:center;cursor:pointer}
._1vpeUMroNJ{position:-webkit-sticky;position:sticky;top:0;z-index:1;background:var(--color-background);display:flex;justify-content:flex-end;padding:5px 5px 2px 0}._2gOPGelc7s{padding:10px 15px}@media screen and (min-width:30em){._2gOPGelc7s{padding:10px 40px}}._3BayoLOhA0{position:relative;border-radius:50%;background:linear-gradient(60deg,#e66465,#9198e5)}._3BayoLOhA0:before{content:"";position:absolute;top:0;bottom:0;left:0;right:0;border:2px solid transparent;border-top-color:initial;border-radius:50%;animation:NKvZlK5zKz 1s linear infinite}@keyframes NKvZlK5zKz{0%{transform:rotate(0)}to{transform:rotate(1turn)}}

View File

@ -1,9 +0,0 @@
._37wt2_a2Gx{display:flex;align-items:center}._37wt2_a2Gx .L80zPM0Rx0{display:inline-flex;-ms-transform:rotate(0deg);transform:rotate(0deg);transition:transform .3s}._37wt2_a2Gx .L80zPM0Rx0._36RO7_wtuv{-ms-transform:rotate(180deg);transform:rotate(180deg)}._37wt2_a2Gx .L80zPM0Rx0:focus{outline:var(--color-focus-blue) solid 1px}._2XKN3NArpV{margin-left:5px}._1s98xvUoBx{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}
._2V-RqIAl7n{border-radius:20px;color:#eee;font-size:.6em}@media screen and (min-width:30em){._2V-RqIAl7n{font-size:1em}}
.NpfXwxWAxo{position:relative;padding:5px;border-radius:8px;overflow:hidden;max-width:280px;background-color:var(--color-bg-proxy)}@media screen and (min-width:30em){.NpfXwxWAxo{min-width:200px;border-radius:10px;padding:10px}}.NpfXwxWAxo._2zD7drviYH{background-color:var(--color-focus-blue);color:#ddd}.NpfXwxWAxo._2bylJNYYdN{opacity:.5}._1rVl-Kdmss{font-family:var(--font-mono);font-size:.6em}@media screen and (min-width:30em){._1rVl-Kdmss{font-size:1em}}.aS2noEcBcP{display:flex;align-items:center;justify-content:space-between}._3kdi5nima5{width:100%;overflow:hidden;text-overflow:ellipsis;margin-bottom:5px;font-size:.85em}@media screen and (min-width:30em){._3kdi5nima5{font-size:1.1em}}._3NpxWygDxO{width:12px;height:12px;border-radius:8px}._3NpxWygDxO ._2zD7drviYH{outline:1px solid pink}
._3PCSxT0l14{margin-bottom:12px}._1yYRIyvlRd{display:flex;flex-wrap:wrap;margin-top:8px}._1OcDlvlM5R{margin-right:5px;margin-bottom:5px;transition:transform .2s ease-in-out}@media screen and (min-width:30em){._1OcDlvlM5R{margin-right:10px;margin-bottom:10px}}._1OcDlvlM5R._3oAxPKtZFv{cursor:pointer}._1OcDlvlM5R._3oAxPKtZFv:hover{-ms-transform:translateY(-2px);transform:translateY(-2px)}
._2OKIZuCJtW{background-color:rgba(0,0,0,.6)}._1y6NeshM4O{position:absolute;background-color:var(--bg-modal);color:var(--color-text);line-height:1.4;opacity:.6;transition:all .3s ease;-ms-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);box-shadow:0 4px 4px rgba(0,0,0,.12),0 16px 32px rgba(0,0,0,.24)}._25KARE4UsT{opacity:1;-ms-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}
.t6lsDKNXTK{height:30px;width:100%;padding-left:8px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-background);color:var(--color-text);padding-right:20px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l3 4H1l3-4zM4 17l-3-4h6l-3 4z' fill='%23999'/%3E%3C/svg%3E");border-radius:4px;border-image:initial;border:1px solid var(--select-border-color);transition:all .1s ease 0s;background-position:calc(100% - 8px) 50%;background-repeat:no-repeat}.t6lsDKNXTK:focus,.t6lsDKNXTK:hover{border-color:#343434;outline:none!important;color:var(--color-text-highlight);background-image:var(--select-bg-hover)}.t6lsDKNXTK option{background-color:var(--color-background)}
._1h4Qixiwxj{max-width:85vw;width:400px;display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:13px 0}hr{height:1px;background-color:var(--color-separator);border:none;outline:none;margin:1rem 0}
._3GVE9k27aM{margin-bottom:12px}._3GVE9k27aM small{color:#777}._1PV2l5z2zN{padding:10px 15px}@media screen and (min-width:30em){._1PV2l5z2zN{padding:10px 40px}}._1b5XrAhEUm{display:flex}._1b5XrAhEUm button{margin:0 5px}._1b5XrAhEUm button:first-child{margin-left:0}._2t6Q6BkZ73{display:flex;justify-content:center;align-items:center;cursor:pointer}
._39uWX_-wQq{position:-webkit-sticky;position:sticky;top:0;z-index:1;background:var(--color-background);display:flex;justify-content:flex-end;padding:5px 5px 2px 0}._1myfcMimT9{padding:10px 15px}@media screen and (min-width:30em){._1myfcMimT9{padding:10px 40px}}

File diff suppressed because one or more lines are too long

View File

@ -1 +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:"98cabc7dc53e642492d1",4:"5123c4f00bc3b0a54628",6:"fa4d4e9c5ca3297a0d20",7:"cd3f974bfcc521d59a74",8:"7958f6e20b89d91ec605"}[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:"f2fb2adff629251cabb9",4:"664f8b737878361937cb",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()}([]);
!function(e){function t(t){for(var n,o,i=t[0],l=t[1],s=t[2],d=t[3]||[],f=0,h=[];f<i.length;f++)o=i[f],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,d);h.length;)h.shift()();return c.push.apply(c,s||[]),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 s=r[o];0!==a[s]&&(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:"84e4f8e580c5aa1bb13f",4:"ed6685531f9d1b123c95",6:"236a69375b65655cd7e6",7:"a3e2ad41949ba3aa37c4",8:"e136e1eeabd9cd094865"}[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:"c8e01405a0b59638022d",4:"664f8b737878361937cb",6:"31d6cfe0d16ae931b73c",7:"31d6cfe0d16ae931b73c",8:"31d6cfe0d16ae931b73c"}[e]+".css",a=l.p+n,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var i=(d=c[u]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(i===n||i===a))return t()}var s=document.getElementsByTagName("style");for(u=0;u<s.length;u++){var d;if((i=(d=s[u]).getAttribute("data-href"))===n||i===a)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.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],f.parentNode.removeChild(f),r(c)},f.href=a,document.getElementsByTagName("head")[0].appendChild(f)})).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 s=new Error;c=function(t){u.onerror=u.onload=null,clearTimeout(d);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;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}a[e]=void 0}};var d=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 s=window.webpackJsonp=window.webpackJsonp||[],d=s.push.bind(s);s.push=t,s=s.slice();for(var f=0;f<s.length;f++)t(s[f]);var p=d;r()}([]);

View File

@ -82,22 +82,17 @@ if [ "$core" -eq 1 ] || [ "$core" -eq 2 ];then
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
sed -i "external-ui: \"/usr/share/clash/dashboard\"/a\ " $CONFIG_YAML 2>/dev/null
sed -i " /a\ " $CONFIG_YAML 2>/dev/null
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
else
sed -i "/allow-lan: ${allow_lan}/a\mode: Rule" $CONFIG_YAML 2>/dev/null
sed -i "/mode: Rule/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
fi
sed -i '/#=============/ d' $CONFIG_YAML 2>/dev/null
if [ ! -z "$(grep "^experimental:" "$CONFIG_YAML")" ]; then
sed -i "/experimental:/i\ " $CONFIG_YAML 2>/dev/null
else
sed -i "/dns:/i\ " $CONFIG_YAML 2>/dev/null
fi
sed -i '/#clash-openwrt/ d' $CONFIG_YAML 2>/dev/null
fi
elif [ "${tun_mode}" -eq 1 ]; then
@ -108,7 +103,7 @@ if [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
echo "设置端口,DNS和密码..." >$REAL_LOG
fi
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
if [ -z "$old_conf" ];then
if [ ! -z "$(grep "^proxies:" "$CONFIG_YAML")" ]; then
@ -125,13 +120,13 @@ if [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
fi
fi
sed -i "/#clash-openwrt/a\#=============" $CONFIG_YAML 2>/dev/null
sed -i "/#clash-openwrt/a\#=============" $CONFIG_YAML 2>/dev/null
sed -i "/#=============/a\ " $CONFIG_YAML 2>/dev/null
sed -i '1,/#clash-openwrt/d' $CONFIG_YAML 2>/dev/null
mv /etc/clash/config.yaml /etc/clash/dns.yaml
cat /usr/share/clash/tundns.yaml /etc/clash/dns.yaml > $CONFIG_YAML 2>/dev/null
rm -rf /etc/clash/dns.yaml
sed -i "1i\#****CLASH-CONFIG-START****#" $CONFIG_YAML 2>/dev/null
sed -i "2i\port: ${http_port}" $CONFIG_YAML 2>/dev/null
sed -i "/port: ${http_port}/a\socks-port: ${socks_port}" $CONFIG_YAML 2>/dev/null
@ -144,22 +139,16 @@ if [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
sed -i "external-ui: \"/usr/share/clash/dashboard\"/a\ " $CONFIG_YAML 2>/dev/null
sed -i " /a\ " $CONFIG_YAML 2>/dev/null
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
else
sed -i "/allow-lan: ${allow_lan}/a\mode: Rule" $CONFIG_YAML 2>/dev/null
sed -i "/mode: Rule/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
fi
sed -i '/#=============/ d' $CONFIG_YAML 2>/dev/null
if [ ! -z "$(grep "^experimental:" "$CONFIG_YAML")" ]; then
sed -i "/experimental:/i\ " $CONFIG_YAML 2>/dev/null
else
sed -i "/dns:/i\ " $CONFIG_YAML 2>/dev/null
fi
sed -i '/#clash-openwrt/ d' $CONFIG_YAML 2>/dev/null
fi
else
@ -169,7 +158,7 @@ else
echo "设置端口,DNS和密码..." >$REAL_LOG
fi
sleep 1
echo "Clash for OpenWRT" >$REAL_LOG
@ -204,23 +193,41 @@ else
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
else
sed -i "/allow-lan: ${allow_lan}/a\mode: Rule" $CONFIG_YAML 2>/dev/null
sed -i "/mode: Rule/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
fi
sed -i '/#=============/ d' $CONFIG_YAML 2>/dev/null
if [ ! -z "$(grep "^experimental:" $CONFIG_YAML)" ]; then
sed -i "/experimental:/i\ " $CONFIG_YAML 2>/dev/null
else
sed -i "/dns:/i\ " $CONFIG_YAML 2>/dev/null
fi
sed -i '/#clash-openwrt/ d' $CONFIG_YAML 2>/dev/null
fi
fake_ip=$(egrep '^ {0,}enhanced-mode' /etc/clash/config.yaml |grep enhanced-mode: |awk -F ': ' '{print $2}')
if [ "$fake_ip" == "fake-ip" ];then
if [ $lang == "en" ] || [ $lang == "auto" ];then
echo "Setting Up Fake-IP Filter" >$REAL_LOG
elif [ $lang == "zh_cn" ];then
echo "正在设置Fake-IP黑名单" >$REAL_LOG
fi
sleep 1
sed -i '/fake-ip-filter:/d' "/etc/clash/config.yaml" 2>/dev/null
if [ ! -z "$(egrep '^ {0,}fake-ip-range:' "/etc/clash/config.yaml")" ];then
sed -i '/fake-ip-range/a\ fake-ip-filter:' /etc/clash/config.yaml 2>/dev/null
sed -i '/fake-ip-filter:/r/usr/share/clash/fake_filter.list' "/etc/clash/config.yaml" 2>/dev/null
elif [ ! -z "$(egrep '^ {0,}enhanced-mode:' "/etc/clash/config.yaml")" ];then
sed -i '/^enhanced-mode:/a\ fake-ip-filter:' /etc/clash/config.yaml 2>/dev/null
sed -i '/fake-ip-filter:/r/usr/share/clash/fake_filter.list' "/etc/clash/config.yaml" 2>/dev/null
fi
fi
sleep 1
#===========================================================================================================================