From 84d465cedb92969431d640fa40cf49652a6867d7 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 23 Aug 2020 02:47:49 +0800 Subject: [PATCH 1/4] brook: update PKG_SOURCE --- package/lienol/brook/Makefile | 47 +++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/package/lienol/brook/Makefile b/package/lienol/brook/Makefile index debe9bac36..ea6823ee82 100644 --- a/package/lienol/brook/Makefile +++ b/package/lienol/brook/Makefile @@ -5,40 +5,45 @@ # include $(TOPDIR)/rules.mk - -ifeq ($(ARCH),x86_64) - PKG_ARCH_BROOK:= -endif -ifeq ($(ARCH),mipsel) - PKG_ARCH_BROOK:=_linux_mipsle -endif -ifeq ($(ARCH),mips) - PKG_ARCH_BROOK:=_linux_mips -endif ifeq ($(ARCH),i386) - PKG_ARCH_BROOK:=_linux_386 + PKG_ARCH_BROOK:=386 +endif +ifeq ($(ARCH),x86_64) + PKG_ARCH_BROOK:=amd64 endif ifeq ($(ARCH),arm) - PKG_ARCH_BROOK:=_linux_arm7 + PKG_ARCH_BROOK:=arm7 endif ifeq ($(BOARD),bcm53xx) - PKG_ARCH_BROOK:=_linux_arm6 + PKG_ARCH_BROOK:=arm6 ifeq ($(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))),) - PKG_ARCH_BROOK:=_linux_arm5 + PKG_ARCH_BROOK:=arm5 endif endif ifeq ($(BOARD),kirkwood) - PKG_ARCH_BROOK:=_linux_arm5 + PKG_ARCH_BROOK:=arm5 endif ifeq ($(ARCH),aarch64) - PKG_ARCH_BROOK:=_linux_arm64 + PKG_ARCH_BROOK:=arm64 +endif +ifeq ($(ARCH),mips) + PKG_ARCH_BROOK:=mips_softfloat +endif +ifeq ($(ARCH),mipsel) + PKG_ARCH_BROOK:=mipsle_softfloat +endif +ifeq ($(ARCH),mips64) + PKG_ARCH_BROOK:=mips64 +endif +ifeq ($(ARCH),mips64el) + PKG_ARCH_BROOK:=mips64le endif PKG_NAME:=brook PKG_VERSION:=20200901 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=brook$(PKG_ARCH_BROOK) +PKG_SOURCE:=brook_linux_$(PKG_ARCH_BROOK) PKG_SOURCE_URL:=https://github.com/txthinking/brook/releases/download/v$(PKG_VERSION) PKG_HASH:=skip @@ -48,7 +53,7 @@ define Package/$(PKG_NAME) SECTION:=net CATEGORY:=Network TITLE:=Brook is a cross-platform proxy software - DEPENDS:= + DEPENDS:=@!(arc||armeb||powerpc) URL:=https://github.com/txthinking/brook endef @@ -57,7 +62,7 @@ define Package/$(PKG_NAME)/description endef define Build/Prepare - cp $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR) + $(CP) $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/ endef define Build/Configure @@ -68,7 +73,7 @@ endef define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/brook$(PKG_ARCH_BROOK) $(1)/usr/bin/brook + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_SOURCE) $(1)/usr/bin/brook endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME))) \ No newline at end of file From dfae9bb1ce8b8a907023a5272e1dd1ca3f956916 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 23 Aug 2020 03:17:11 +0800 Subject: [PATCH 2/4] luci-app-vssr: bump to 1.12 --- package/ctcgfw/luci-app-vssr/Makefile | 6 +- .../luci-app-vssr/luasrc/controller/vssr.lua | 47 +----------- .../luasrc/model/cbi/vssr/client.lua | 5 ++ .../luasrc/model/cbi/vssr/servers.lua | 4 +- package/ctcgfw/luci-app-vssr/po/zh-cn/vssr.po | 3 + .../luci-app-vssr/root/etc/config/black.list | 23 +++++- .../luci-app-vssr/root/usr/bin/vssr-rules | 34 ++++----- .../root/usr/share/vssr/genconfig_v2ray.lua | 74 +++++++++++++++++-- .../root/usr/share/vssr/gfw2ipset.sh | 34 +++++++++ 9 files changed, 157 insertions(+), 73 deletions(-) diff --git a/package/ctcgfw/luci-app-vssr/Makefile b/package/ctcgfw/luci-app-vssr/Makefile index 3b202a9139..c3caff47d6 100644 --- a/package/ctcgfw/luci-app-vssr/Makefile +++ b/package/ctcgfw/luci-app-vssr/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-vssr -PKG_VERSION:=1.11 -PKG_RELEASE:=20200719 +PKG_VERSION:=1.12 +PKG_RELEASE:=20200822 PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server \ @@ -35,7 +35,7 @@ define Package/luci-app-vssr SUBMENU:=3. Applications TITLE:=A New SS/SSR/V2Ray/Trojan LuCI interface PKGARCH:=all - DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget +luasocket +jshn +lua-cjson +coreutils-nohup +lua-maxminddb \ + DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget +luasocket +coreutils-nohup +lua-maxminddb \ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray \ +PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:trojan \ +PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:ipt2socks \ diff --git a/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua b/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua index effb95cb94..8fa383f0ab 100644 --- a/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua +++ b/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua @@ -57,7 +57,7 @@ end -- 执行订阅 function get_subscribe() - local cjson = require "cjson" + local cjson = require "luci.jsonc" local e = {} local uci = luci.model.uci.cursor() local auto_update = luci.http.formvalue("auto_update") @@ -74,7 +74,7 @@ function get_subscribe() luci.sys.call(cmd1) luci.sys.call(cmd2) luci.sys.call(cmd3) - for k, v in ipairs(cjson.decode(subscribe_url)) do + for k, v in ipairs(cjson.parse(subscribe_url)) do luci.sys.call( 'uci add_list vssr.@server_subscribe[0].subscribe_url="' .. v .. '"') @@ -292,46 +292,6 @@ function check_port() end -function JudgeIPString(ipStr) - if type(ipStr) ~= "string" then return false end - - -- 判断长度 - local len = string.len(ipStr) - if len < 7 or len > 15 then -- 长度不对 - return false - end - - -- 判断出现的非数字字符 - local point = string.find(ipStr, "%p", 1) -- 字符"."出现的位置 - local pointNum = 0 -- 字符"."出现的次数 正常ip有3个"." - while point ~= nil do - if string.sub(ipStr, point, point) ~= "." then -- 得到非数字符号不是字符"." - return false - end - pointNum = pointNum + 1 - point = string.find(ipStr, "%p", point + 1) - if pointNum > 3 then return false end - end - if pointNum ~= 3 then -- 不是正确的ip格式 - return false - end - - -- 判断数字对不对 - local num = {} - for w in string.gmatch(ipStr, "%d+") do - num[#num + 1] = w - local kk = tonumber(w) - if kk == nil or kk > 255 then -- 不是数字或超过ip正常取值范围了 - return false - end - end - - if #num ~= 4 then -- 不是4段数字 - return false - end - - return ipStr -end -- 检测 当前节点ip 和 网站访问情况 function check_ip() @@ -341,7 +301,8 @@ function check_ip() local d = {} local mm = require 'maxminddb' local db = mm.open('/usr/share/vssr/GeoLite2-Country.mmdb') - local ip = string.gsub(luci.sys.exec("content=`wget --no-check-certificate -q -O - https://api.ip.sb/ip`;echo $content"), "\n", "") + local http = require "luci.sys" + local ip = string.gsub(http.httpget("https://api.ip.sb/ip"), "\n", "") local res = db:lookup(ip) d.flag = string.lower(res:get("country", "iso_code")) d.country = res:get("country", "names", "zh-CN") diff --git a/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua b/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua index 66f7bc7511..29cfe7586b 100644 --- a/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua +++ b/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua @@ -102,6 +102,11 @@ for _,key in pairs(key_table_v2) do o:value(key,v2ray_table[key]) end o:depends("v2ray_flow", "1") o.default = "nil" +o = s:option(ListValue, "tvb_server", translate("TVB Video Proxy")) +o:value("nil", translate("Same as Global Server")) +for _,key in pairs(key_table_v2) do o:value(key,v2ray_table[key]) end +o:depends("v2ray_flow", "1") +o.default = "nil" o = s:option(ListValue, "threads", translate("Multi Threads Option")) o:value("0", translate("Auto Threads")) diff --git a/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/servers.lua b/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/servers.lua index 183ee0876c..87185f16ca 100644 --- a/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/servers.lua +++ b/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/servers.lua @@ -1,7 +1,7 @@ -- Licensed to the public under the GNU General Public License v3. local m, s, o local vssr = "vssr" -local cjson = require("cjson") +local json = require "luci.jsonc" local uci = luci.model.uci.cursor() local server_count = 0 @@ -27,7 +27,7 @@ s.sortable = false s.des = server_count s.current = uci:get("vssr", name, "global_server") -s.servers = cjson.encode(server_table) +s.servers = json.stringify(server_table) s.template = "vssr/tblsection" s.extedit = luci.dispatcher.build_url("admin/services/vssr/servers/%s") function s.create(...) diff --git a/package/ctcgfw/luci-app-vssr/po/zh-cn/vssr.po b/package/ctcgfw/luci-app-vssr/po/zh-cn/vssr.po index 774e887cf3..954638665c 100644 --- a/package/ctcgfw/luci-app-vssr/po/zh-cn/vssr.po +++ b/package/ctcgfw/luci-app-vssr/po/zh-cn/vssr.po @@ -636,6 +636,9 @@ msgstr "Diseny+ 代理" msgid "Prime Video Proxy" msgstr "Prime Video 代理" +msgid "TVB Video Proxy" +msgstr "TVB 视频代理" + msgid "adblock settings" msgstr "广告屏蔽设置" diff --git a/package/ctcgfw/luci-app-vssr/root/etc/config/black.list b/package/ctcgfw/luci-app-vssr/root/etc/config/black.list index 567e94388f..66cd4b9f23 100644 --- a/package/ctcgfw/luci-app-vssr/root/etc/config/black.list +++ b/package/ctcgfw/luci-app-vssr/root/etc/config/black.list @@ -1 +1,22 @@ -api.ip.sb \ No newline at end of file +api.ip.sb +fast.com +netflix.ca +netflix.com +netflix.net +netflixinvestor.com +netflixtechblog.com +nflxext.com +nflximg.com +nflximg.net +nflxsearch.net +nflxso.net +nflxvideo.net +amazonprimevideos.com +amazonvideo.cc +amazonvideo.com +prime-video.com +primevideo.cc +primevideo.com +primevideo.info +primevideo.org +primevideo.tv \ No newline at end of file diff --git a/package/ctcgfw/luci-app-vssr/root/usr/bin/vssr-rules b/package/ctcgfw/luci-app-vssr/root/usr/bin/vssr-rules index dcdd80c48e..e0c9cb5168 100755 --- a/package/ctcgfw/luci-app-vssr/root/usr/bin/vssr-rules +++ b/package/ctcgfw/luci-app-vssr/root/usr/bin/vssr-rules @@ -128,14 +128,14 @@ EOF fw_rule() { $IPT -N SS_SPEC_WAN_FW - $IPT -A SS_SPEC_WAN_FW -d 0.0.0.0/8 -j RETURN - $IPT -A SS_SPEC_WAN_FW -d 10.0.0.0/8 -j RETURN - $IPT -A SS_SPEC_WAN_FW -d 127.0.0.0/8 -j RETURN - $IPT -A SS_SPEC_WAN_FW -d 169.254.0.0/16 -j RETURN - $IPT -A SS_SPEC_WAN_FW -d 172.16.0.0/12 -j RETURN - $IPT -A SS_SPEC_WAN_FW -d 192.168.0.0/16 -j RETURN - $IPT -A SS_SPEC_WAN_FW -d 224.0.0.0/4 -j RETURN - $IPT -A SS_SPEC_WAN_FW -d 240.0.0.0/4 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 0.0.0.0/8 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 10.0.0.0/8 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 127.0.0.0/8 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 169.254.0.0/16 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 172.16.0.0/12 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 192.168.0.0/16 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 224.0.0.0/4 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 240.0.0.0/4 -j RETURN $IPT -A SS_SPEC_WAN_FW -p tcp $PROXY_PORTS \ -j REDIRECT --to-ports $local_port 2>/dev/null || { loger 3 "Can't redirect, please check the iptables." @@ -189,15 +189,15 @@ tp_rule() { local ipt="iptables -t mangle" $ipt -N SS_SPEC_TPROXY $ipt -A SS_SPEC_TPROXY -p udp --dport 53 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 0.0.0.0/8 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 10.0.0.0/8 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 127.0.0.0/8 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 169.254.0.0/16 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 172.16.0.0/12 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 192.168.0.0/16 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 224.0.0.0/4 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d 240.0.0.0/4 -j RETURN - $ipt -A SS_SPEC_TPROXY -p udp -d $SERVER -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 0.0.0.0/8 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 10.0.0.0/8 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 127.0.0.0/8 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 169.254.0.0/16 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 172.16.0.0/12 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 192.168.0.0/16 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 224.0.0.0/4 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d 240.0.0.0/4 -j RETURN + $ipt -A SS_SPEC_TPROXY -p udp -d $SERVER -j RETURN $ipt -A SS_SPEC_TPROXY -p udp $PROXY_PORTS -m set --match-set fplan src \ -j TPROXY --on-port "$LOCAL_PORT" --tproxy-mark 0x01/0x01 diff --git a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/genconfig_v2ray.lua b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/genconfig_v2ray.lua index 694240a86a..4aac35978d 100755 --- a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/genconfig_v2ray.lua +++ b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/genconfig_v2ray.lua @@ -12,6 +12,7 @@ local tw_video_server = ucursor:get_first(name, 'global', 'tw_video_server') local netflix_server = ucursor:get_first(name, 'global', 'netflix_server') local disney_server = ucursor:get_first(name, 'global', 'disney_server') local prime_server = ucursor:get_first(name, 'global', 'prime_server') +local tvb_server = ucursor:get_first(name, 'global', 'tvb_server') function gen_outbound(server_node, tags) local bound = {} @@ -87,21 +88,44 @@ if v2ray_flow == "1" then table.insert(outbounds_table, gen_outbound(netflix_server, "netflix")) table.insert(outbounds_table, gen_outbound(disney_server, "disney")) table.insert(outbounds_table, gen_outbound(prime_server, "prime")) + table.insert(outbounds_table, gen_outbound(tvb_server, "tvb")) end -- rules gen local youtube_rule = { type = "field", - domain = {"youtube", "googlevideo.com", "gvt2.com", "youtu.be"}, + domain = { + "youtube", + "ggpht.com", + "googlevideo.com", + "withyoutube.com", + "youtu.be", + "youtube-nocookie.com", + "youtube.com", + "youtubeeducation.com", + "youtubegaming.com", + "youtubei.googleapis.com", + "youtubekids.com", + "youtubemobilesupport.com", + "yt.be", + "ytimg.com" + }, outboundTag = "youtube" } local tw_video_rule = { type = "field", domain = { - "vidol.tv", "hinet.net", "books.com", "litv.tv", "pstatic.net", - "app-measurement.com", "kktv.com.tw", "gamer.com.tw","wetv.vip" + "vidol.tv", + "hinet.net", + "books.com", + "litv.tv", + "pstatic.net", + "app-measurement.com", + "kktv.com.tw", + "gamer.com.tw", + "wetv.vip" }, outboundTag = "twvideo" } @@ -109,8 +133,18 @@ local tw_video_rule = { local netflix_rule = { type = "field", domain = { - "netflix", "nflxso.net", "nflxext.com", - "nflximg.com", "nflximg.net", "nflxvideo.net" + "fast.com", + "netflix.ca", + "netflix.com", + "netflix.net", + "netflixinvestor.com", + "netflixtechblog.com", + "nflxext.com", + "nflximg.com", + "nflximg.net", + "nflxsearch.net", + "nflxso.net", + "nflxvideo.net" }, outboundTag = "netflix" @@ -127,10 +161,32 @@ local disney_rule = { local prime_rule = { type = "field", - domain = {"aiv-cdn.net", "amazonaws.com", "amazonvideo.com", "llnwd.net"}, + domain = { + "aiv-cdn.net", + "amazonaws.com", + "amazonvideo.com", + "llnwd.net", + "amazonprimevideos.com", + "amazonvideo.cc", + "prime-video.com", + "primevideo.cc", + "primevideo.com", + "primevideo.info", + "primevideo.org", + "rimevideo.tv" + }, outboundTag = "prime" } +local tvb_rule = { + type = "field", + domain = { + "tvsuper.com", + "tvb.com" + }, + outboundTag = "tvb" +} + local rules_table = {} if (youtube_server ~= "nil" and v2ray_flow == "1") then @@ -153,6 +209,10 @@ if (prime_server ~= "nil" and v2ray_flow == "1") then table.insert(rules_table, prime_rule) end +if (tvb_server ~= "nil" and v2ray_flow == "1") then + table.insert(rules_table, tvb_rule) +end + local v2ray = { log = { -- error = "/var/ssrplus.log", @@ -171,6 +231,6 @@ local v2ray = { }, -- 传出连接 outbounds = outbounds_table, - routing = {domainStrategy = "IPIfNonMatch", rules = rules_table} + routing = {domainStrategy = "AsIs", rules = rules_table} } print(json.stringify(v2ray, 1)) diff --git a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/gfw2ipset.sh b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/gfw2ipset.sh index 70ca116af3..7edc30e584 100755 --- a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/gfw2ipset.sh +++ b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/gfw2ipset.sh @@ -1,4 +1,5 @@ #!/bin/sh +. /lib/functions.sh mkdir -p /tmp/dnsmasq.ssr @@ -9,3 +10,36 @@ awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"blacklist"'\n",$0)}' /etc/config/black.li awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/black.list >> /tmp/dnsmasq.ssr/blacklist_forward.conf awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"whitelist"'\n",$0)}' /etc/config/white.list > /tmp/dnsmasq.ssr/whitelist_forward.conf + + +function valid_ip() +{ + ip=$1 + read_ip=$(echo $ip|awk -F. '$1<=255&&$2<=255&&$3<=255&&$4<=255{print "yes"}') + if echo $ip|grep -E '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' >/dev/null + then + if [ $read_ip == "yes" ] + then + return 0 + else + return 1 + fi + else + return 1 + fi +} + +config_load vssr + +function addWhiteList() { + local iface="$1" + local host + config_get host "$iface" server + if valid_ip $host; then + ipset -! add whitelist $host + else + [ ! -z "$host" ] && echo "ipset=/.$host/whitelist" >> /tmp/dnsmasq.ssr/whitelist_forward.conf + fi +} + +config_foreach addWhiteList \ No newline at end of file From ad1657d2c7fee57163570268595e871c805b8107 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 23 Aug 2020 03:20:20 +0800 Subject: [PATCH 3/4] luci-app-passwall: bump to 3.9-42 --- package/lienol/luci-app-passwall/Makefile | 4 +- .../luasrc/model/cbi/passwall/api/brook.lua | 1 - .../luasrc/model/cbi/passwall/client/rule.lua | 6 + .../view/passwall/rule/rule_version.htm | 14 + .../luci-app-passwall/po/zh-cn/passwall.po | 6 + .../root/etc/config/passwall | 3 + .../root/usr/share/passwall/app.sh | 1 + .../root/usr/share/passwall/iptables.sh | 9 + .../root/usr/share/passwall/rule_update.lua | 38 +- .../root/usr/share/passwall/rules/chnroute6 | 1884 +++++++++++++++++ 10 files changed, 1961 insertions(+), 5 deletions(-) create mode 100644 package/lienol/luci-app-passwall/root/usr/share/passwall/rules/chnroute6 diff --git a/package/lienol/luci-app-passwall/Makefile b/package/lienol/luci-app-passwall/Makefile index 77d2b0e823..a75c6b4c2f 100644 --- a/package/lienol/luci-app-passwall/Makefile +++ b/package/lienol/luci-app-passwall/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=3.9 -PKG_RELEASE:=41 -PKG_DATE:=20200820 +PKG_RELEASE:=42 +PKG_DATE:=20200822 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/brook.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/brook.lua index 05f716470b..3051858f9c 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/brook.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/brook.lua @@ -21,7 +21,6 @@ function to_check(arch) end file_tree = "_linux_" .. file_tree - if file_tree == "_linux_amd64" then file_tree = "" end local json = api.get_api_json(brook_api) diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua index 48c20cd890..d5fd1aa290 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/rule.lua @@ -33,6 +33,12 @@ o:value("https://ispip.clang.cn/all_cn_cidr.txt", translate("Clang.CN.CIDR")) o.default = "https://ispip.clang.cn/all_cn.txt" --o:depends("enable_custom_url", 1) +----chnroute6 URL +o = s:option(Value, "chnroute6_url", translate("China IPv6s(chnroute6) Update URL")) +o:value("https://ispip.clang.cn/all_cn_ipv6.txt", translate("Clang.CN.IPv6")) +o.default = "https://ispip.clang.cn/all_cn_ipv6.txt" +--o:depends("enable_custom_url", 1) + ---- Auto Update o = s:option(Flag, "auto_update", translate("Enable auto update rules")) o.default = 0 diff --git a/package/lienol/luci-app-passwall/luasrc/view/passwall/rule/rule_version.htm b/package/lienol/luci-app-passwall/luasrc/view/passwall/rule/rule_version.htm index eed99be396..ef59177e2a 100644 --- a/package/lienol/luci-app-passwall/luasrc/view/passwall/rule/rule_version.htm +++ b/package/lienol/luci-app-passwall/luasrc/view/passwall/rule/rule_version.htm @@ -3,10 +3,12 @@ local api = require "luci.model.cbi.passwall.api.api" local gfwlist_version = api.uci_get_type("global_rules", "gfwlist_version") local chnroute_version = api.uci_get_type("global_rules", "chnroute_version") +local chnroute6_version = api.uci_get_type("global_rules", "chnroute6_version") local chnlist_version = api.uci_get_type("global_rules", "chnlist_version") local gfwlist_update = api.uci_get_type("global_rules", "gfwlist_update", "1") == "1" and "checked='checked'" or "" local chnroute_update = api.uci_get_type("global_rules", "chnroute_update", "1") == "1" and "checked='checked'" or "" +local chnroute6_update = api.uci_get_type("global_rules", "chnroute6_update", "1") == "1" and "checked='checked'" or "" local chnlist_update = api.uci_get_type("global_rules", "chnlist_update", "1") == "1" and "checked='checked'" or "" -%> @@ -66,6 +68,18 @@ local chnlist_update = api.uci_get_type("global_rules", "chnlist_update", "1") = + +
+ +
+
+ 【 <%=chnroute6_version%> 】 + /> +
+
+