Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Mar 5, 2025
2 parents 39a3dbb + a7fb5a4 commit 1496179
Show file tree
Hide file tree
Showing 34 changed files with 509 additions and 220 deletions.
2 changes: 1 addition & 1 deletion luci-app-openclash/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-openclash
PKG_VERSION:=0.46.075
PKG_VERSION:=0.46.079
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function(s)
end)

o:value("DIRECT")
o:value("REJECT")
o:value("GLOBAL")
o:value("Disable", translate("Disable"))
o.default = "Disable"
o.rempty = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ o.rmempty = true
o.placeholder = "bgp|sg"

o = s:option(DynamicList, "other_group", translate("Other Group (Support Regex)"))
o.description = font_red..bold_on..translate("The Added Proxy Groups Must Exist Except 'DIRECT' & 'REJECT'")..bold_off..font_off
o.description = font_red..bold_on..translate("The Added Proxy Groups Must Exist Except 'DIRECT' & 'REJECT' & 'REJECT-DROP' & 'PASS' & 'GLOBAL'")..bold_off..font_off
o:value("all", translate("All Groups"))
uci:foreach("openclash", "groups",
function(s)
Expand All @@ -111,6 +111,9 @@ uci:foreach("openclash", "groups",
end)
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")
o.rmempty = true

local t = {
Expand Down
93 changes: 93 additions & 0 deletions luci-app-openclash/luasrc/model/cbi/openclash/other-rules-edit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "AsianTV", translate("AsianTV"))
o:depends("rule_name", "lhie1")
Expand All @@ -94,6 +97,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "MainlandTV", translate("CN Mainland TV"))
o:depends("rule_name", "lhie1")
Expand All @@ -105,6 +111,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Proxy", translate("Proxy"))
o:depends("rule_name", "lhie1")
Expand All @@ -116,6 +125,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Youtube", translate("Youtube"))
o:depends("rule_name", "lhie1")
Expand All @@ -127,6 +139,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Bilibili", translate("Bilibili"))
o:depends("rule_name", "lhie1")
Expand All @@ -138,6 +153,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Bahamut", translate("Bahamut"))
o:depends("rule_name", "lhie1")
Expand All @@ -149,6 +167,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "HBOMax", translate("HBO Max"))
o:depends("rule_name", "lhie1")
Expand All @@ -160,6 +181,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Pornhub", translate("Pornhub"))
o:depends("rule_name", "lhie1")
Expand All @@ -171,6 +195,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Apple", translate("Apple"))
o:depends("rule_name", "lhie1")
Expand All @@ -182,6 +209,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "AppleTV", translate("Apple TV"))
o:depends("rule_name", "lhie1")
Expand All @@ -193,6 +223,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "GoogleFCM", translate("Google FCM"))
o:depends("rule_name", "lhie1")
Expand All @@ -204,6 +237,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Scholar", translate("Scholar"))
o:depends("rule_name", "lhie1")
Expand All @@ -215,6 +251,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Microsoft", translate("Microsoft"))
o:depends("rule_name", "lhie1")
Expand All @@ -226,6 +265,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "AI_Suite", translate("AI Suite"))
o:depends("rule_name", "lhie1")
Expand All @@ -237,6 +279,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Netflix", translate("Netflix"))
o:depends("rule_name", "lhie1")
Expand All @@ -248,6 +293,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Disney", translate("Disney Plus"))
o:depends("rule_name", "lhie1")
Expand All @@ -259,6 +307,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Discovery", translate("Discovery Plus"))
o:depends("rule_name", "lhie1")
Expand All @@ -270,6 +321,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "DAZN", translate("DAZN"))
o:depends("rule_name", "lhie1")
Expand All @@ -281,6 +335,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Spotify", translate("Spotify"))
o:depends("rule_name", "lhie1")
Expand All @@ -292,6 +349,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Steam", translate("Steam"))
o:depends("rule_name", "lhie1")
Expand All @@ -303,6 +363,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "miHoYo", translate("miHoYo"))
o:depends("rule_name", "lhie1")
Expand All @@ -314,6 +377,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Speedtest", translate("Speedtest"))
o:depends("rule_name", "lhie1")
Expand All @@ -325,6 +391,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Telegram", translate("Telegram"))
o:depends("rule_name", "lhie1")
Expand All @@ -336,6 +405,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Crypto", translate("Crypto"))
o:depends("rule_name", "lhie1")
Expand All @@ -347,6 +419,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Discord", translate("Discord"))
o:depends("rule_name", "lhie1")
Expand All @@ -358,6 +433,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "PayPal", translate("PayPal"))
o:depends("rule_name", "lhie1")
Expand All @@ -369,6 +447,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "AdBlock", translate("AdBlock"))
o:depends("rule_name", "lhie1")
Expand All @@ -380,6 +461,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "HTTPDNS", translate("HTTPDNS"))
o:depends("rule_name", "lhie1")
Expand All @@ -391,6 +475,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Domestic", translate("Domestic"))
o:depends("rule_name", "lhie1")
Expand All @@ -402,6 +489,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

o = s:option(ListValue, "Others", translate("Others"))
o:depends("rule_name", "lhie1")
Expand All @@ -414,6 +504,9 @@ for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
end
o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ o:value("0", translate("Priority Match"))
o:value("1", translate("Extended Match"))

o = s:option(ListValue, "group", translate("Set Proxy Group"))
o.description = font_red..bold_on..translate("The Added Proxy Groups Must Exist Except 'DIRECT' & 'REJECT'")..bold_off..font_off
o.description = font_red..bold_on..translate("The Added Proxy Groups Must Exist Except 'DIRECT' & 'REJECT' & 'REJECT-DROP' & 'PASS' & 'GLOBAL'")..bold_off..font_off
o.rmempty = true
local groupnames,filename
filename = m.uci:get(openclash, "config", "config_path")
Expand All @@ -138,6 +138,9 @@ m.uci:foreach("openclash", "groups",

o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")

-- [[ other-setting ]]--
o = s:option(Value, "other_parameters", translate("Other Parameters"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ uci:foreach("openclash", "groups",

o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")
o.rmempty = true

-- [[ Edit Other Rule Provider ]] --
Expand Down Expand Up @@ -191,6 +194,9 @@ uci:foreach("openclash", "groups",

o:value("DIRECT")
o:value("REJECT")
o:value("REJECT-DROP")
o:value("PASS")
o:value("GLOBAL")
o.rmempty = true

o = s:option(Value, "interval", translate("Rule Providers Interval(s)"))
Expand Down
Loading

0 comments on commit 1496179

Please sign in to comment.