From b1107b633d21cb0d20e84831a7b793f88d1776e9 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 11 Jan 2021 18:40:19 +0800 Subject: [PATCH 1/8] subconverter: fix init --- package/ctcgfw/subconverter/Makefile | 2 +- package/ctcgfw/subconverter/files/subconverter.init | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/ctcgfw/subconverter/Makefile b/package/ctcgfw/subconverter/Makefile index fe8a0db182..c3f24ec357 100644 --- a/package/ctcgfw/subconverter/Makefile +++ b/package/ctcgfw/subconverter/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=subconverter PKG_VERSION:=0.6.4 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/tindy2013/subconverter.git diff --git a/package/ctcgfw/subconverter/files/subconverter.init b/package/ctcgfw/subconverter/files/subconverter.init index 6c8bc5d3ce..ff0d8e902d 100755 --- a/package/ctcgfw/subconverter/files/subconverter.init +++ b/package/ctcgfw/subconverter/files/subconverter.init @@ -4,7 +4,7 @@ START=99 USE_PROCD=1 BIN="/usr/bin/subconverter" -CONF="/etc/subconverter/pref.ini" +CONF="/etc/subconverter/pref.example.ini" LOG_FILE="/tmp/subconverter.log" start_service() { @@ -28,5 +28,6 @@ stop_service() { reload_service() { logger -t Subconverter 'Restarting Subconverter service' stop + sleep 2s start } From 51f30d134ecf566603ed5b712c277dfe4f076e02 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 11 Jan 2021 18:43:59 +0800 Subject: [PATCH 2/8] sub-web: add new package Signed-off-by: CN_SZTL --- package/ctcgfw/sub-web/Makefile | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 package/ctcgfw/sub-web/Makefile diff --git a/package/ctcgfw/sub-web/Makefile b/package/ctcgfw/sub-web/Makefile new file mode 100644 index 0000000000..f0d99a6733 --- /dev/null +++ b/package/ctcgfw/sub-web/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2020 CTCGFW Project-OpenWrt +# (https://project-openwrt.eu.org) +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=sub-web +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git +PKG_SOURCE_DATE:=2021-01-07 +PKG_SOURCE_VERSION:=26d278800cc42025f8ceecff64b26f47b9fc2d14 +PKG_MIRROR_HASH:=3de3d95a04b0e4596e86581f2e066fa40d140c29709307ee97acd6893a0d5602 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=CN_SZTL + +PKG_BUILD_DEPENDS:=node/host node-yarn/host + +include $(INCLUDE_DIR)/package.mk + +define Package/sub-web + SECTION:=net + CATEGORY:=Network + URL:=https://github.com/CareyWang/sub-web + TITLE:=A WebUI for generating proxy subscription url + DEPENDS:=+subconverter +endef + +define Package/sub-web/description + Based on vue-cli and subconverter, for generating proxy subscription + url automatically. +endef + +define Build/Compile + ( \ + cd $(PKG_BUILD_DIR); \ + yarn install; \ + yarn build; \ + ) +endef + +define Package/sub-web/install + $(INSTALL_DIR) $(1)/www + $(CP) $(PKG_BUILD_DIR)/dist $(1)/www/sub-web +endef + +$(eval $(call BuildPackage,sub-web)) From c82870a6e6bd7a19a283a934ce687c03aafa59d3 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 11 Jan 2021 18:49:23 +0800 Subject: [PATCH 3/8] sub-web: marked as a general package for all arch --- package/ctcgfw/sub-web/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/ctcgfw/sub-web/Makefile b/package/ctcgfw/sub-web/Makefile index f0d99a6733..f502bae045 100644 --- a/package/ctcgfw/sub-web/Makefile +++ b/package/ctcgfw/sub-web/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sub-web PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git @@ -21,6 +21,7 @@ PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=CN_SZTL +PKG_ARCH:=all PKG_BUILD_DEPENDS:=node/host node-yarn/host include $(INCLUDE_DIR)/package.mk From 8f592ca694957af7f3873a3430135463be23e696 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 11 Jan 2021 19:33:21 +0800 Subject: [PATCH 4/8] sub-web: fix display issue when it is deployed at a sub-path Signed-off-by: CN_SZTL --- package/ctcgfw/sub-web/Makefile | 2 +- .../010-dist-support-run-in-curdir.patch | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 package/ctcgfw/sub-web/patches/010-dist-support-run-in-curdir.patch diff --git a/package/ctcgfw/sub-web/Makefile b/package/ctcgfw/sub-web/Makefile index f502bae045..199d8f1476 100644 --- a/package/ctcgfw/sub-web/Makefile +++ b/package/ctcgfw/sub-web/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sub-web PKG_VERSION:=1.0.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git diff --git a/package/ctcgfw/sub-web/patches/010-dist-support-run-in-curdir.patch b/package/ctcgfw/sub-web/patches/010-dist-support-run-in-curdir.patch new file mode 100644 index 0000000000..750d2ef3c5 --- /dev/null +++ b/package/ctcgfw/sub-web/patches/010-dist-support-run-in-curdir.patch @@ -0,0 +1,57 @@ +From 4359c358bd434d1d0b182a13a743881ee21e7d27 Mon Sep 17 00:00:00 2001 +From: CN_SZTL +Date: Mon, 11 Jan 2021 11:22:43 +0000 +Subject: [PATCH] dist: support run in curdir + +As https://cli.vuejs.org/config/#vue-config-js said: +``` +By default, Vue CLI assumes your app will be deployed at the root of +a domain, e.g. https://www.my-app.com/. If your app is deployed at a +sub-path, you will need to specify that sub-path using this option. +For example, if your app is deployed at https://www.foobar.com/my-app/, +set publicPath to '/my-app/'. + +The value can also be set to an empty string ('') or a relative path (./) +so that all assets are linked using relative paths. This allows the built +bundle to be deployed under any public path, or used in a file system based +environment like a Cordova hybrid app. +``` + +Reference: + - CareyWang/sub-web#38 + - CareyWang/sub-web#43 + +Signed-off-by: CN_SZTL +--- + src/router/index.js | 2 +- + vue.config.js | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/router/index.js b/src/router/index.js +index 643aa66..583fdd9 100644 +--- a/src/router/index.js ++++ b/src/router/index.js +@@ -5,7 +5,7 @@ Vue.use(VueRouter); + + const routes = [ + { +- path: "/", ++ path: "*", + name: "SubConverter", + component: () => import("../views/Subconverter.vue") + } +diff --git a/vue.config.js b/vue.config.js +index c4b040b..89b25db 100644 +--- a/vue.config.js ++++ b/vue.config.js +@@ -5,6 +5,7 @@ function resolve(dir) { + } + + module.exports = { ++ publicPath: '', + css: { + loaderOptions: { + less: { +-- +2.17.1 + From 34a40287a7e4d356bf8d6566810d0489a0c216d2 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 11 Jan 2021 19:58:44 +0800 Subject: [PATCH 5/8] sub-web: add examples from ACL4SSR and Subconverter Signed-off-by: CN_SZTL --- package/ctcgfw/sub-web/Makefile | 2 +- ...amples-from-ACL4SSR-and-Subconverter.patch | 128 ++++++++++++++++++ 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 package/ctcgfw/sub-web/patches/020-views-add-examples-from-ACL4SSR-and-Subconverter.patch diff --git a/package/ctcgfw/sub-web/Makefile b/package/ctcgfw/sub-web/Makefile index 199d8f1476..9d2c8af2f4 100644 --- a/package/ctcgfw/sub-web/Makefile +++ b/package/ctcgfw/sub-web/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sub-web PKG_VERSION:=1.0.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git diff --git a/package/ctcgfw/sub-web/patches/020-views-add-examples-from-ACL4SSR-and-Subconverter.patch b/package/ctcgfw/sub-web/patches/020-views-add-examples-from-ACL4SSR-and-Subconverter.patch new file mode 100644 index 0000000000..7e1e1a928f --- /dev/null +++ b/package/ctcgfw/sub-web/patches/020-views-add-examples-from-ACL4SSR-and-Subconverter.patch @@ -0,0 +1,128 @@ +From 0092ddca7faa480e07184c157e992badd4eef633 Mon Sep 17 00:00:00 2001 +From: CN_SZTL +Date: Mon, 11 Jan 2021 11:57:19 +0000 +Subject: [PATCH] views: add examples from ACL4SSR and Subconverter + +Signed-off-by: CN_SZTL +--- + src/views/Subconverter.vue | 104 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 104 insertions(+) + +diff --git a/src/views/Subconverter.vue b/src/views/Subconverter.vue +index 701006f..d058719 100644 +--- a/src/views/Subconverter.vue ++++ b/src/views/Subconverter.vue +@@ -257,6 +257,110 @@ export default { + }, + backendOptions: [{ value: "http://127.0.0.1:25500/sub?" }], + remoteConfig: [ ++ { ++ label: "默认", ++ options: [ ++ { ++ label: "不选,由接口提供方提供", ++ value: "" ++ } ++ ] ++ }, ++ { ++ label: "ACL4SSR", ++ options: [ ++ { ++ label: "ACL4SSR_Online 默认版 分组比较全 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_AdblockPlus 更多去广告 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_AdblockPlus.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_NoAuto 无自动测速 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_NoAuto.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_Mini 精简版 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_Mini_AdblockPlus.ini 精简版 更多去广告 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_AdblockPlus.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_Mini_NoAuto.ini 精简版 不带自动测速 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_NoAuto.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_Mini_Fallback.ini 精简版 带故障转移 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_Fallback.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_Mini_MultiMode.ini 精简版 自动测速、故障转移、负载均衡 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_MultiMode.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_Full 全分组 重度用户使用 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Full.ini" ++ }, ++ { ++ label: "ACL4SSR_Online_Full_AdblockPlus 全分组 重度用户使用 更多去广告 (与Github同步)", ++ value: ++ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Full_AdblockPlus.ini" ++ }, ++ { ++ label: "ACL4SSR 本地 默认版 分组比较全", ++ value: "config/ACL4SSR.ini" ++ }, ++ { ++ label: "ACL4SSR_Mini 本地 精简版", ++ value: "config/ACL4SSR_Mini.ini" ++ }, ++ { ++ label: "ACL4SSR_Mini_NoAuto.ini 本地 精简版+无自动测速", ++ value: "config/ACL4SSR_Mini_NoAuto.ini" ++ }, ++ { ++ label: "ACL4SSR_Mini_Fallback.ini 本地 精简版+fallback", ++ value: "config/ACL4SSR_Mini_Fallback.ini" ++ }, ++ { ++ label: "ACL4SSR_BackCN 本地 回国", ++ value: "config/ACL4SSR_BackCN.ini" ++ }, ++ { ++ label: "ACL4SSR_NoApple 本地 无苹果分流", ++ value: "config/ACL4SSR_NoApple.ini" ++ }, ++ { ++ label: "ACL4SSR_NoAuto 本地 无自动测速 ", ++ value: "config/ACL4SSR_NoAuto.ini" ++ }, ++ { ++ label: "ACL4SSR_NoAuto_NoApple 本地 无自动测速&无苹果分流", ++ value: "config/ACL4SSR_NoAuto_NoApple.ini" ++ }, ++ { ++ label: "ACL4SSR_NoMicrosoft 本地 无微软分流", ++ value: "config/ACL4SSR_NoMicrosoft.ini" ++ }, ++ { ++ label: "ACL4SSR_WithGFW 本地 GFW列表", ++ value: "config/ACL4SSR_WithGFW.ini" ++ } ++ ] ++ }, + { + label: "universal", + options: [ +-- +2.17.1 + From 548764d28283bce9293da157a8c06af06385c0e9 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 11 Jan 2021 20:18:09 +0800 Subject: [PATCH 6/8] treewide: replace wrong PKG_ARCH with PKGARCH Signed-off-by: CN_SZTL --- package/ctcgfw/sub-web/Makefile | 6 +++--- package/lean/automount/Makefile | 4 ++-- package/lean/autosamba/Makefile | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package/ctcgfw/sub-web/Makefile b/package/ctcgfw/sub-web/Makefile index 9d2c8af2f4..6e4c2a6de9 100644 --- a/package/ctcgfw/sub-web/Makefile +++ b/package/ctcgfw/sub-web/Makefile @@ -9,19 +9,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sub-web PKG_VERSION:=1.0.0 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git PKG_SOURCE_DATE:=2021-01-07 PKG_SOURCE_VERSION:=26d278800cc42025f8ceecff64b26f47b9fc2d14 -PKG_MIRROR_HASH:=3de3d95a04b0e4596e86581f2e066fa40d140c29709307ee97acd6893a0d5602 +PKG_MIRROR_HASH:=a83f49aeecfa086ad8da3503b1ff95f8505845588839ed569d22fb0ced417b9f PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=CN_SZTL -PKG_ARCH:=all PKG_BUILD_DEPENDS:=node/host node-yarn/host include $(INCLUDE_DIR)/package.mk @@ -32,6 +31,7 @@ define Package/sub-web URL:=https://github.com/CareyWang/sub-web TITLE:=A WebUI for generating proxy subscription url DEPENDS:=+subconverter + PKGARCH:=all endef define Package/sub-web/description diff --git a/package/lean/automount/Makefile b/package/lean/automount/Makefile index 642efdee3c..bf5d424d3e 100644 --- a/package/lean/automount/Makefile +++ b/package/lean/automount/Makefile @@ -9,8 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=automount PKG_VERSION:=1 -PKG_RELEASE:=32 -PKG_ARCH:=all +PKG_RELEASE:=33 include $(INCLUDE_DIR)/package.mk @@ -18,6 +17,7 @@ define Package/automount TITLE:=Mount autoconfig hotplug script. MAINTAINER:=Lean DEPENDS:=+block-mount +kmod-usb-storage +kmod-usb-storage-extras +!TARGET_ramips:kmod-usb-storage-uas +kmod-fs-vfat +kmod-fs-ext4 +kmod-fs-exfat +ntfs-3g + PKGARCH:=all endef define Package/automount/description diff --git a/package/lean/autosamba/Makefile b/package/lean/autosamba/Makefile index a03161d14e..1dc3aae2a2 100644 --- a/package/lean/autosamba/Makefile +++ b/package/lean/autosamba/Makefile @@ -9,8 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autosamba PKG_VERSION:=1 -PKG_RELEASE:=11 -PKG_ARCH:=all +PKG_RELEASE:=12 include $(INCLUDE_DIR)/package.mk @@ -18,6 +17,7 @@ define Package/autosamba TITLE:=Samba autoconfig hotplug script. MAINTAINER:=Lean DEPENDS:=+luci-app-samba +wsdd2 + PKGARCH:=all endef define Package/autosamba/description From 2376c863d60335e0859262b974139f0d1f137cd9 Mon Sep 17 00:00:00 2001 From: xiaorouji <60100640+xiaorouji@users.noreply.github.com> Date: Mon, 11 Jan 2021 18:21:35 +0800 Subject: [PATCH 7/8] luci-app-passwall: bug fixes Signed-off-by: CN_SZTL --- .../model/cbi/passwall/server/api/app.lua | 21 ++++++++++++++--- .../root/usr/share/passwall/app.sh | 23 ++++++++++++------- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua index a44744fbcf..dd9e62994c 100755 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua @@ -35,9 +35,13 @@ end local function gen_include() cmd(string.format("echo '#!/bin/sh' > /var/etc/%s.include", CONFIG)) - local function extract_rules(a) + local function extract_rules(n, a) + local _ipt = "iptables" + if n == "6" then + _ipt = "ip6tables" + end local result = "*" .. a - result = result .. "\n" .. sys.exec('iptables-save -t ' .. a .. ' | grep "PSW-SERVER" | sed -e "s/^-A \\(INPUT\\)/-I \\1 1/"') + result = result .. "\n" .. sys.exec(_ipt .. '-save -t ' .. a .. ' | grep "PSW-SERVER" | sed -e "s/^-A \\(INPUT\\)/-I \\1 1/"') result = result .. "COMMIT" return result end @@ -45,7 +49,11 @@ local function gen_include() if f and err == nil then f:write('iptables-save -c | grep -v "PSW-SERVER" | iptables-restore -c' .. "\n") f:write('iptables-restore -n <<-EOT' .. "\n") - f:write(extract_rules("filter") .. "\n") + f:write(extract_rules("4", "filter") .. "\n") + f:write("EOT" .. "\n") + f:write('ip6tables-save -c | grep -v "PSW-SERVER" | ip6tables-restore -c' .. "\n") + f:write('ip6tables-restore -n <<-EOT' .. "\n") + f:write(extract_rules("6", "filter") .. "\n") f:write("EOT" .. "\n") f:close() end @@ -60,6 +68,8 @@ local function start() cmd(string.format("touch %s", LOG_APP_FILE)) cmd("iptables -N PSW-SERVER") cmd("iptables -I INPUT -j PSW-SERVER") + cmd("ip6tables -N PSW-SERVER") + cmd("ip6tables -I INPUT -j PSW-SERVER") ucic:foreach(CONFIG, "user", function(user) local id = user[".name"] local enable = user.enable @@ -136,8 +146,10 @@ local function start() local bind_local = user.bind_local or 0 if bind_local and tonumber(bind_local) ~= 1 then cmd(string.format('iptables -A PSW-SERVER -p tcp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks)) + cmd(string.format('ip6tables -A PSW-SERVER -p tcp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks)) if udp_forward == 1 then cmd(string.format('iptables -A PSW-SERVER -p udp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks)) + cmd(string.format('ip6tables -A PSW-SERVER -p udp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks)) end end end @@ -150,6 +162,9 @@ local function stop() cmd("iptables -D INPUT -j PSW-SERVER 2>/dev/null") cmd("iptables -F PSW-SERVER 2>/dev/null") cmd("iptables -X PSW-SERVER 2>/dev/null") + cmd("ip6tables -D INPUT -j PSW-SERVER 2>/dev/null") + cmd("ip6tables -F PSW-SERVER 2>/dev/null") + cmd("ip6tables -X PSW-SERVER 2>/dev/null") cmd(string.format("rm -rf %s %s /var/etc/%s.include", CONFIG_PATH, LOG_APP_FILE, CONFIG)) end diff --git a/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh b/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh index 24c73b2b7a..3f7cf9b262 100755 --- a/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh @@ -926,14 +926,21 @@ add_dnsmasq() { } #分流规则 - fwd_dns="${TUN_DNS}" - #如果使用chnlist直接使用默认DNS - [ "${USE_CHNLIST}" = "1" ] && unset fwd_dns - local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') - for shunt_id in $shunt_ids; do - config_n_get $shunt_id domain_list | tr -s "\r\n" "\n" | gen_dnsmasq_items "shuntlist" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/shunt_host.conf" - echolog " - [$?]$shunt_id分流规则(shuntlist):${fwd_dns:-默认}" - done + [ "$(config_n_get $TCP_NODE protocol)" = "_shunt" ] && { + fwd_dns="${TUN_DNS}" + #如果使用chnlist直接使用默认DNS + [ "${USE_CHNLIST}" = "1" ] && unset fwd_dns + local default_node_id=$(config_n_get $TCP_NODE default_node nil) + local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') + for shunt_id in $shunt_ids; do + local shunt_node_id=$(config_n_get $TCP_NODE ${shunt_id} nil) + [ "$shunt_node_id" = "nil" ] && continue + local shunt_node=$(config_n_get $shunt_node_id address nil) + [ "$shunt_node" = "nil" ] && continue + config_n_get $shunt_id domain_list | tr -s "\r\n" "\n" | gen_dnsmasq_items "shuntlist" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/shunt_host.conf" + echolog " - [$?]$shunt_id分流规则(shuntlist):${fwd_dns:-默认}" + done + } #始终使用远程DNS解析代理(黑名单)列表 fwd_dns="${TUN_DNS}" From 06a274c76a84c29d0858644c9dcc528562393b82 Mon Sep 17 00:00:00 2001 From: Thomas Nixon Date: Sat, 9 Jan 2021 22:04:48 +0000 Subject: [PATCH 8/8] tools/ccache: find libzstd using rpath Previously, ccache would end up using the system libzstd, which is not supposed to be a build requirement. Signed-off-by: Thomas Nixon --- tools/ccache/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index e016e0beb3..ff0204ae19 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -21,7 +21,10 @@ include $(INCLUDE_DIR)/cmake.mk CMAKE_HOST_OPTIONS += \ -DCMAKE_C_COMPILER_LAUNCHER="" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="" + -DCMAKE_CXX_COMPILER_LAUNCHER="" \ + -DCMAKE_SKIP_RPATH=FALSE \ + -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \ + define Host/Install/ccache $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/