2
0
Эх сурвалжийг харах

hide netflix mode by default

coolsnowwolf 4 жил өмнө
parent
commit
a74999697f

+ 1 - 1
luci-app-ssr-plus/Makefile

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-ssr-plus
 PKG_VERSION:=184
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_CONFIG_DEPENDS:= \
 	CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \

+ 15 - 11
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua

@@ -44,17 +44,6 @@ o.datatype = "uinteger"
 o:depends("enable_switch", "1")
 o.default = 3
 
-o = s:option(Flag, "adblock", translate("Enable adblock"))
-o.rmempty = false
-
-o = s:option(Value, "adblock_url", translate("adblock_url"))
-o:value("https://ghproxy.com/https://raw.githubusercontent.com/neodevpro/neodevhost/master/lite_host_dnsmasq.conf", translate("NEO DEV HOST Lite"))
-o:value("https://ghproxy.com/https://raw.githubusercontent.com/neodevpro/neodevhost/master/host_dnsmasq.conf", translate("NEO DEV HOST Full"))
-o:value("https://ghproxy.com/https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/adblock-for-dnsmasq.conf", translate("anti-AD"))
-o.default = "https://ghproxy.com/https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/adblock-for-dnsmasq.conf"
-o:depends("adblock", "1")
-o.description = translate("Support AdGuardHome and DNSMASQ format list")
-
 o = s:option(Value, "gfwlist_url", translate("gfwlist Update url"))
 o:value("https://ghproxy.com/https://raw.githubusercontent.com/YW5vbnltb3Vz/domain-list-community/release/gfwlist.txt", translate("v2fly/domain-list-community"))
 o:value("https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt", translate("Loyalsoldier/v2ray-rules-dat"))
@@ -67,11 +56,26 @@ o:value("https://ispip.clang.cn/all_cn.txt", translate("Clang.CN"))
 o:value("https://ispip.clang.cn/all_cn_cidr.txt", translate("Clang.CN.CIDR"))
 o.default = "https://ispip.clang.cn/all_cn.txt"
 
+o = s:option(Flag, "netflix_enable", translate("Enable Netflix Mode"))
+o.rmempty = false
+
 o = s:option(Value, "nfip_url", translate("nfip_url"))
 o:value("https://ghproxy.com/https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt", translate("Netflix IP Only"))
 o:value("https://ghproxy.com/https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/getflix.txt", translate("Netflix and AWS"))
 o.default = "https://ghproxy.com/https://raw.githubusercontent.com/QiuSimons/Netflix_IP/master/NF_only.txt"
 o.description = translate("Customize Netflix IP Url")
+o:depends("netflix_enable", "1")
+
+o = s:option(Flag, "adblock", translate("Enable adblock"))
+o.rmempty = false
+
+o = s:option(Value, "adblock_url", translate("adblock_url"))
+o:value("https://ghproxy.com/https://raw.githubusercontent.com/neodevpro/neodevhost/master/lite_host_dnsmasq.conf", translate("NEO DEV HOST Lite"))
+o:value("https://ghproxy.com/https://raw.githubusercontent.com/neodevpro/neodevhost/master/host_dnsmasq.conf", translate("NEO DEV HOST Full"))
+o:value("https://ghproxy.com/https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/adblock-for-dnsmasq.conf", translate("anti-AD"))
+o.default = "https://ghproxy.com/https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/adblock-for-dnsmasq.conf"
+o:depends("adblock", "1")
+o.description = translate("Support AdGuardHome and DNSMASQ format list")
 
 o = s:option(Button, "reset", translate("Reset to defaults"))
 o.rawhtml = true

+ 3 - 1
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua

@@ -3,7 +3,7 @@
 -- Licensed to the public under the GNU General Public License v3.
 local m, s, sec, o, kcp_enable
 local uci = luci.model.uci.cursor()
-m = Map("shadowsocksr", translate("ShadowSocksR Plus+ Settings"), translate("<h3>Support SS/SSR/V2RAY/TROJAN/NAIVEPROXY/SOCKS5/TUN etc.</h3>"))
+m = Map("shadowsocksr", translate("ShadowSocksR Plus+ Settings"), translate("<h3>Support SS/SSR/V2RAY/XRAY/TROJAN/NAIVEPROXY/SOCKS5/TUN etc.</h3>"))
 
 m:section(SimpleSection).template = "shadowsocksr/status"
 
@@ -42,6 +42,7 @@ for _, key in pairs(key_table) do
 	o:value(key, server_table[key])
 end
 
+if uci:get_first("shadowsocksr", 'global', 'netflix_enable', '0') ~= '0' then
 o = s:option(ListValue, "netflix_server", translate("Netflix Node"))
 o:value("nil", translate("Disable"))
 o:value("same", translate("Same as Global Server"))
@@ -55,6 +56,7 @@ o = s:option(Flag, "netflix_proxy", translate("External Proxy Mode"))
 o.rmempty = false
 o.description = translate("Forward Netflix Proxy through Main Proxy")
 o.default = "0"
+end
 
 o = s:option(ListValue, "threads", translate("Multi Threads Option"))
 o:value("0", translate("Auto Threads"))

+ 2 - 0
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua

@@ -168,10 +168,12 @@ s.rawhtml = true
 s.template = "shadowsocksr/refresh"
 s.value = ip_count .. " " .. translate("Records")
 
+if uci:get_first("shadowsocksr", 'global', 'netflix_enable', '0') ~= '0' then
 s = m:field(DummyValue, "nfip_data", translate("Netflix IP Data"))
 s.rawhtml = true
 s.template = "shadowsocksr/refresh"
 s.value = nfip_count .. " " .. translate("Records")
+end
 
 if uci:get_first("shadowsocksr", 'global', 'adblock', '0') == '1' then
 	s = m:field(DummyValue, "ad_data", translate("Advertising Data"))

+ 6 - 3
luci-app-ssr-plus/po/zh-cn/ssr-plus.po

@@ -412,8 +412,8 @@ msgstr "GFW列表"
 msgid "ShadowSocksR Plus+ Settings"
 msgstr "ShadowSocksR Plus+ 设置"
 
-msgid "<h3>Support SS/SSR/V2RAY/TROJAN/NAIVEPROXY/SOCKS5/TUN etc.</h3>"
-msgstr "<h3>支持 SS/SSR/V2RAY/TROJAN/NAIVEPROXY/SOCKS5/TUN 等协议</h3>"
+msgid "<h3>Support SS/SSR/V2RAY/XRAY/TROJAN/NAIVEPROXY/SOCKS5/TUN etc.</h3>"
+msgstr "<h3>支持 SS/SSR/V2RAY/XRAY/TROJAN/NAIVEPROXY/SOCKS5/TUN 等协议</h3>"
 
 msgid "Main Server"
 msgstr "主服务器"
@@ -743,4 +743,7 @@ msgid "Finger Print"
 msgstr "指纹伪造"
 
 msgid "Reapply"
-msgstr "重新应用"
+msgstr "重新应用"
+
+msgid "Enable Netflix Mode"
+msgstr "启用 Netflix 分流模式"