From 4c6aeede97b36fdcfbb8d7be62cedf9d950655c9 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 9 Mar 2020 16:33:28 +0800 Subject: [PATCH 1/4] ipq40xx: improve ASUS RT-AC58U support (#3680) Using ath10k-ct-smallbuffers instead of ath10k, avoid memory explosion. Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> --- .../arm/boot/dts/qcom-ipq4018-rt-ac58u.dts | 38 ++----- .../arm/boot/dts/qcom-ipq4018-rt-ac58u.dts | 38 ++----- target/linux/ipq40xx/image/Makefile | 107 +++++++++++------- 3 files changed, 88 insertions(+), 95 deletions(-) diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts index ab728dcd53..cda8a5e3f9 100644 --- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts @@ -15,10 +15,10 @@ }; aliases { - led-boot = &power; - led-failsafe = &power; - led-running = &power; - led-upgrade = &power; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; }; chosen { @@ -58,20 +58,6 @@ qcom,wifi_noc_memtype_m0_m2 = ; }; - usb2@60f8800 { - status = "okay"; - - dwc3@6000000 { - #address-cells = <1>; - #size-cells = <0>; - - usb2_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - }; - }; - usb3@8af8800 { status = "okay"; @@ -137,7 +123,7 @@ leds { compatible = "gpio-leds"; - power: status { + led_power: status { label = "rt-ac58u:blue:status"; gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; }; @@ -150,17 +136,19 @@ wlan2G { label = "rt-ac58u:blue:wlan2G"; gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; }; - wan5G { + wlan5G { label = "rt-ac58u:blue:wlan5G"; gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1tpt"; }; usb { label = "rt-ac58u:blue:usb"; gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>; + trigger-sources = <&usb3_port1>, <&usb3_port2>; linux,default-trigger = "usbport"; }; @@ -224,7 +212,7 @@ compatible = "jedec,spi-nor"; reg = <0>; linux,modalias = "m25p80", "mx25l1606e", "n25q128a11"; - spi-max-frequency = <24000000>; + spi-max-frequency = <30000000>; partitions { compatible = "fixed-partitions"; @@ -280,7 +268,7 @@ #size-cells = <0>; compatible = "spinand,mt29f"; reg = <1>; - spi-max-frequency = <24000000>; + spi-max-frequency = <30000000>; /* * U-boot looks for "spinand,mt29f" node, @@ -314,7 +302,3 @@ &usb3_hs_phy { status = "okay"; }; - -&usb2_hs_phy { - status = "okay"; -}; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts index 26c086ed25..a0030f77ce 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts @@ -15,10 +15,10 @@ }; aliases { - led-boot = &power; - led-failsafe = &power; - led-running = &power; - led-upgrade = &power; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; }; chosen { @@ -62,20 +62,6 @@ qcom,wifi_noc_memtype_m0_m2 = ; }; - usb2@60f8800 { - status = "okay"; - - dwc3@6000000 { - #address-cells = <1>; - #size-cells = <0>; - - usb2_port1: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; - }; - }; - usb3@8af8800 { status = "okay"; @@ -131,7 +117,7 @@ leds { compatible = "gpio-leds"; - power: status { + led_power: status { label = "rt-ac58u:blue:status"; gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; }; @@ -144,17 +130,19 @@ wlan2G { label = "rt-ac58u:blue:wlan2G"; gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; }; - wan5G { + wlan5G { label = "rt-ac58u:blue:wlan5G"; gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1tpt"; }; usb { label = "rt-ac58u:blue:usb"; gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>; + trigger-sources = <&usb3_port1>, <&usb3_port2>; linux,default-trigger = "usbport"; }; @@ -216,7 +204,7 @@ compatible = "jedec,spi-nor"; reg = <0>; linux,modalias = "m25p80", "mx25l1606e", "n25q128a11"; - spi-max-frequency = <24000000>; + spi-max-frequency = <30000000>; partitions { compatible = "fixed-partitions"; @@ -270,7 +258,7 @@ spi-nand@1 { compatible = "spi-nand"; reg = <1>; - spi-max-frequency = <24000000>; + spi-max-frequency = <30000000>; /* * U-boot looks for "spinand,mt29f" node, @@ -310,10 +298,6 @@ status = "okay"; }; -&usb2_hs_phy { - status = "okay"; -}; - &wifi0 { status = "okay"; qcom,ath10k-calibration-variant = "RT-AC58U"; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 398f850ac2..de624f0255 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -51,33 +51,35 @@ define Device/DniImage endef DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID - define Device/8dev_jalapeno $(call Device/FitImage) $(call Device/UbiFit) + DEVICE_VENDOR := 8devices + DEVICE_MODEL := Jalapeno DEVICE_DTS := qcom-ipq4018-jalapeno BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_TITLE := 8devices Jalapeno endef TARGET_DEVICES += 8dev_jalapeno define Device/asus_map-ac2200 $(call Device/FitImageLzma) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := Lyra (MAP-AC2200) DEVICE_DTS := qcom-ipq4019-map-ac2200 - DEVICE_TITLE := ASUS Lyra MAP-AC2200 IMAGES := sysupgrade.bin - DEVICE_PACKAGES := ipq-wifi-asus_map-ac2200 ath10k-firmware-qca9888-ct kmod-ath3k + DEVICE_PACKAGES := ath10k-firmware-qca9888 kmod-ath3k endef TARGET_DEVICES += asus_map-ac2200 define Device/asus_rt-ac58u $(call Device/FitImageLzma) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := RT-AC58U / RT-AC1300UHP DEVICE_DTS := qcom-ipq4018-rt-ac58u BLOCKSIZE := 128k PAGESIZE := 2048 DTB_SIZE := 65536 - DEVICE_TITLE := Asus RT-AC58U / RT-AC1300UHP IMAGE_SIZE := 20439364 FILESYSTEMS := squashfs # Someone - in their infinite wisdom - decided to put the firmware @@ -89,17 +91,19 @@ define Device/asus_rt-ac58u KERNEL_INITRAMFS := $$(KERNEL) | uImage none KERNEL_INITRAMFS_SUFFIX := -factory.trx IMAGES := sysupgrade.bin - DEVICE_PACKAGES := kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := -kmod-ath10k -ath10k-firmware-qca4019 \ + kmod-ath10k-ct-smallbuffers ath10k-firmware-qca4019-ct kmod-usb-ledtrig-usbport endef TARGET_DEVICES += asus_rt-ac58u define Device/asus_rt-acrh17 $(call Device/FitImageLzma) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := RT-ACRH17 DEVICE_DTS := qcom-ipq4019-rt-acrh17 BLOCKSIZE := 128k PAGESIZE := 2048 DTB_SIZE := 65536 - DEVICE_TITLE := Asus RT-ACRH17 IMAGE_SIZE := 20439364 FILESYSTEMS := squashfs UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC82U') @@ -112,10 +116,11 @@ TARGET_DEVICES += asus_rt-acrh17 define Device/avm_fritzbox-4040 $(call Device/FitImageLzma) + DEVICE_VENDOR := AVM + DEVICE_MODEL := FRITZ!Box 4040 DEVICE_DTS := qcom-ipq4018-fritz4040 BOARD_NAME := fritz4040 - DEVICE_TITLE := AVM Fritz!Box 4040 - IMAGE_SIZE := 29753344 + IMAGE_SIZE := 29056k UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-fritz4040.bin UBOOT_PARTITION_SIZE := 524288 IMAGES = sysupgrade.bin @@ -127,10 +132,11 @@ TARGET_DEVICES += avm_fritzbox-4040 define Device/compex_wpj428 $(call Device/FitImage) + DEVICE_VENDOR := Compex + DEVICE_MODEL := WPJ428 DEVICE_DTS := qcom-ipq4028-wpj428 DEVICE_DTS_CONFIG := config@4 BLOCKSIZE := 64k - DEVICE_TITLE := Compex WPJ428 IMAGE_SIZE := 31232k KERNEL_SIZE := 4096k IMAGES = sysupgrade.bin @@ -141,23 +147,24 @@ TARGET_DEVICES += compex_wpj428 define Device/engenius_eap1300 $(call Device/FitImage) - DEVICE_TITLE := EnGenius EAP1300 + DEVICE_VENDOR := EnGenius + DEVICE_MODEL := EAP1300 + DEVICE_DTS := qcom-ipq4018-eap1300 DEVICE_DTS_CONFIG := config@4 BOARD_NAME := eap1300 - DEVICE_DTS := qcom-ipq4018-eap1300 KERNEL_SIZE := 5120k IMAGE_SIZE := 25344k IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata - DEVICE_PACKAGES := ipq-wifi-engenius_eap1300 endef TARGET_DEVICES += engenius_eap1300 define Device/glinet_gl-b1300 $(call Device/FitImage) - DEVICE_TITLE := GL.iNet GL-B1300 - BOARD_NAME := gl-b1300 + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-B1300 DEVICE_DTS := qcom-ipq4029-gl-b1300 + BOARD_NAME := gl-b1300 KERNEL_SIZE := 4096k IMAGE_SIZE := 26624k IMAGES := sysupgrade.bin @@ -167,7 +174,8 @@ TARGET_DEVICES += glinet_gl-b1300 define Device/hugo_ac1200 $(call Device/FitImage) - DEVICE_TITLE := Hugo AC1200 + DEVICE_VENDOR := Hugo + DEVICE_MODEL := AC1200 BOARD_NAME := hugo_ac1200 DEVICE_DTS := qcom-ipq4019-hugo-ac1200 KERNEL_SIZE := 4096k @@ -200,19 +208,33 @@ define Device/linksys_ea6350v3 # 4. The kernel command line from uboot is harcoded to boot with # rootfs either in mtd11 or mtd13. $(call Device/FitzImage) - DEVICE_TITLE := Linksys EA6350v3 + DEVICE_VENDOR := Linksys + DEVICE_MODEL := EA6350 + DEVICE_VARIANT := v3 DEVICE_DTS := qcom-ipq4018-ea6350v3 BLOCKSIZE := 128k PAGESIZE := 2048 - KERNEL_SIZE := 3145728 - IMAGE_SIZE := 38797312 + KERNEL_SIZE := 3072k + IMAGE_SIZE := 37888k UBINIZE_OPTS := -E 5 IMAGES := factory.bin sysupgrade.bin IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$${KERNEL_SIZE} | append-ubi | linksys-image type=EA6350v3 - DEVICE_PACKAGES := ipq-wifi-linksys_ea6350v3 uboot-envtools + DEVICE_PACKAGES := uboot-envtools endef TARGET_DEVICES += linksys_ea6350v3 +define Device/meraki_mr33 + $(call Device/FitImage) + DEVICE_VENDOR := Cisco Meraki + DEVICE_MODEL := MR33 + DEVICE_DTS := qcom-ipq4029-mr33 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGES = sysupgrade.bin + DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887 +endef +TARGET_DEVICES += meraki_mr33 + define Device/mobipromo_cm520-79f $(call Device/FitzImage) $(call Device/UbiFit) @@ -225,17 +247,6 @@ define Device/mobipromo_cm520-79f endef TARGET_DEVICES += mobipromo_cm520-79f -define Device/meraki_mr33 - $(call Device/FitImage) - DEVICE_DTS := qcom-ipq4029-mr33 - BLOCKSIZE := 131072 - PAGESIZE := 2048 - DEVICE_TITLE := Cisco Meraki MR33 - IMAGES = sysupgrade.bin - DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct -endef -TARGET_DEVICES += meraki_mr33 - define Device/netgear_ex61x0v2 $(call Device/DniImage) DEVICE_DTS_CONFIG := config@4 @@ -245,24 +256,29 @@ endef define Device/netgear_ex6100v2 $(call Device/netgear_ex61x0v2) + DEVICE_VENDOR := Netgear + DEVICE_MODEL := EX6100 + DEVICE_VARIANT := v2 DEVICE_DTS := qcom-ipq4018-ex6100v2 - DEVICE_TITLE := Netgear EX6100v2 endef TARGET_DEVICES += netgear_ex6100v2 define Device/netgear_ex6150v2 $(call Device/netgear_ex61x0v2) + DEVICE_VENDOR := Netgear + DEVICE_MODEL := EX6150 + DEVICE_VARIANT := v2 DEVICE_DTS := qcom-ipq4018-ex6150v2 - DEVICE_TITLE := Netgear EX6150v2 endef TARGET_DEVICES += netgear_ex6150v2 define Device/openmesh_a42 $(call Device/FitImageLzma) + DEVICE_VENDOR := OpenMesh + DEVICE_MODEL := A42 DEVICE_DTS := qcom-ipq4018-a42 DEVICE_DTS_CONFIG := config@om.a42 BLOCKSIZE := 64k - DEVICE_TITLE := OpenMesh A42 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE) IMAGE_SIZE := 15616k IMAGES = factory.bin sysupgrade.bin @@ -274,16 +290,17 @@ TARGET_DEVICES += openmesh_a42 define Device/openmesh_a62 $(call Device/FitImageLzma) + DEVICE_VENDOR := OpenMesh + DEVICE_MODEL := A62 DEVICE_DTS := qcom-ipq4019-a62 DEVICE_DTS_CONFIG := config@om.a62 BLOCKSIZE := 64k - DEVICE_TITLE := OpenMesh A62 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE) IMAGE_SIZE := 15552k IMAGES = factory.bin sysupgrade.bin IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata - DEVICE_PACKAGES := ath10k-firmware-qca9888-ct uboot-envtools + DEVICE_PACKAGES := ath10k-firmware-qca9888 uboot-envtools endef TARGET_DEVICES += openmesh_a62 @@ -317,7 +334,9 @@ endef TARGET_DEVICES += p2w_r619ac-128m define Device/qcom_ap-dk01.1-c1 - DEVICE_TITLE := QCA AP-DK01.1-C1 + DEVICE_VENDOR := Qualcomm Atheros + DEVICE_MODEL := AP-DK01.1 + DEVICE_VARIANT := C1 BOARD_NAME := ap-dk01.1-c1 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1 KERNEL_INSTALL := 1 @@ -332,20 +351,23 @@ TARGET_DEVICES += qcom_ap-dk01.1-c1 define Device/qcom_ap-dk04.1-c1 $(call Device/FitImage) $(call Device/UbiFit) + DEVICE_VENDOR := Qualcomm Atheros + DEVICE_MODEL := AP-DK04.1 + DEVICE_VARIANT := C1 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1 KERNEL_INSTALL := 1 KERNEL_SIZE := 4048k BLOCKSIZE := 128k PAGESIZE := 2048 BOARD_NAME := ap-dk04.1-c1 - DEVICE_TITLE := QCA AP-DK04.1-C1 endef TARGET_DEVICES += qcom_ap-dk04.1-c1 define Device/zyxel_nbg6617 $(call Device/FitImageLzma) + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := NBG6617 DEVICE_DTS := qcom-ipq4018-nbg6617 - DEVICE_TITLE := ZyXEL NBG6617 ROOTFS_SIZE := 24960k RAS_BOARD := NBG6617 RAS_ROOTFS_SIZE := 19840k @@ -364,11 +386,14 @@ TARGET_DEVICES += zyxel_nbg6617 define Device/zyxel_wre6606 $(call Device/FitImage) - DEVICE_TITLE := ZyXEL WRE6606 - DEVICE_DTS_CONFIG := config@4 + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := WRE6606 DEVICE_DTS := qcom-ipq4018-wre6606 + DEVICE_DTS_CONFIG := config@4 IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata + DEVICE_PACKAGES := -kmod-ath10k -ath10k-firmware-qca4019 \ + kmod-ath10k-ct-smallbuffers ath10k-firmware-qca4019-ct endef TARGET_DEVICES += zyxel_wre6606 From aaf410b642b3c2d0d65ffd03fa9de9622c390761 Mon Sep 17 00:00:00 2001 From: lunatickochiya <55731491+lunatickochiya@users.noreply.github.com> Date: Mon, 9 Mar 2020 16:35:07 +0800 Subject: [PATCH 2/4] Update luci-app-openvpn support IPv6 (#3681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复这里https://github.com/coolsnowwolf/lede/issues/3657 --- .../luasrc/model/cbi/openvpn-server/openvpn-server.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-openvpn-server/luasrc/model/cbi/openvpn-server/openvpn-server.lua b/package/lean/luci-app-openvpn-server/luasrc/model/cbi/openvpn-server/openvpn-server.lua index 183a85ae42..1ffb209889 100644 --- a/package/lean/luci-app-openvpn-server/luasrc/model/cbi/openvpn-server/openvpn-server.lua +++ b/package/lean/luci-app-openvpn-server/luasrc/model/cbi/openvpn-server/openvpn-server.lua @@ -14,8 +14,10 @@ s:tab("basic", translate("Base Setting")) o = s:taboption("basic", Flag, "enabled", translate("Enable")) proto = s:taboption("basic",Value,"proto", translate("Proto")) -proto:value("tcp", translate("TCP Server")) -proto:value("udp", translate("UDP Server")) +proto:value("tcp4", translate("TCP Server IPv4")) +proto:value("udp4", translate("UDP Server IPv4")) +proto:value("tcp6", translate("TCP Server IPv6")) +proto:value("udp6", translate("UDP Server IPv6")) port = s:taboption("basic", Value, "port", translate("Port")) port.datatype = "range(1,65535)" From 37550afc37ee57808ea9a8b2c9ff0b8619375aaa Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Mon, 9 Mar 2020 16:36:29 +0800 Subject: [PATCH 3/4] luci-app-ssr-plus: Fix update script Bug (#3678) --- .../luasrc/controller/shadowsocksr.lua | 10 ++++------ .../root/usr/share/shadowsocksr/update.lua | 16 +++++----------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua index 53020d7e0a..6d050bf430 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua @@ -83,7 +83,7 @@ if set == "gfw_data" then oldcount=luci.sys.exec("cat /etc/dnsmasq.ssr/gfw_list.conf | wc -l") if tonumber(icount) ~= tonumber(oldcount) then luci.sys.exec("cp -f /tmp/gfwnew.txt /etc/dnsmasq.ssr/gfw_list.conf") - luci.sys.exec("cp -f /etc/dnsmasq.ssr/gfw_list.conf /tmp/dnsmasq.ssr/gfw_list.conf") + luci.sys.exec("cp -f /tmp/gfwnew.txt /tmp/dnsmasq.ssr/gfw_list.conf") luci.sys.call("/etc/init.d/dnsmasq restart") retstring=tostring(math.ceil(tonumber(icount)/2)) else @@ -98,7 +98,7 @@ else end elseif set == "ip_data" then if (luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'chnroute', '0') == '1') then - refresh_cmd="wget-ssl --no-check-certificate -O - " .. luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'chnroute_url', 'https://pexcn.me/daily/chnroute/chnroute.txt') .. ' > /tmp/china_ssr.txt 2>/dev/null' + refresh_cmd="wget-ssl --no-check-certificate -O - " .. luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'chnroute_url', 'https://ispip.clang.cn/all_cn.txt') .. ' > /tmp/china_ssr.txt 2>/dev/null' else refresh_cmd="wget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' 2>/dev/null| awk -F\\| '/CN\\|ipv4/ { printf(\"%s/%d\\n\", $4, 32-log($5)/log(2)) }' > /tmp/china_ssr.txt" end @@ -132,11 +132,9 @@ if sret== 0 then end if tonumber(icount) ~= tonumber(oldcount) then luci.sys.exec("cp -f /tmp/ad.conf /etc/dnsmasq.ssr/ad.conf") + luci.sys.exec("cp -f /tmp/ad.conf /tmp/dnsmasq.ssr/ad.conf") + luci.sys.call("/etc/init.d/dnsmasq restart") retstring=tostring(math.ceil(tonumber(icount))) - if oldcount==0 then - luci.sys.exec("cp -f /etc/dnsmasq.ssr/ad.conf /tmp/dnsmasq.ssr/ad.conf") - luci.sys.call("/etc/init.d/dnsmasq restart") - end else retstring ="0" end diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua index 8ac39a2ec0..639417da98 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua @@ -15,11 +15,7 @@ local log = function(...) end log('正在更新【GFW列表】数据库') -if nixio.fs.access("/usr/bin/wget-ssl") then refresh_cmd="wget-ssl --no-check-certificate https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt -O /tmp/gfw.b64" - else - refresh_cmd="wget -O /tmp/gfw.b64 http://iytc.net/tools/list.b64" - end sret=luci.sys.call(refresh_cmd .. " 2>/dev/null") if sret== 0 then luci.sys.call("/usr/bin/ssr-gfw") @@ -28,7 +24,7 @@ if nixio.fs.access("/usr/bin/wget-ssl") then oldcount=luci.sys.exec("cat /etc/dnsmasq.ssr/gfw_list.conf | wc -l") if tonumber(icount) ~= tonumber(oldcount) then luci.sys.exec("cp -f /tmp/gfwnew.txt /etc/dnsmasq.ssr/gfw_list.conf") --- retstring=tostring(math.ceil(tonumber(icount)/2)) + luci.sys.exec("cp -f /tmp/gfwnew.txt /tmp/dnsmasq.ssr/gfw_list.conf") log('更新成功! 新的总纪录数:'.. icount) else log('你已经是最新数据,无需更新!') @@ -43,7 +39,7 @@ end log('正在更新【国内IP段】数据库') if (ucic:get_first('shadowsocksr', 'global', 'chnroute','0') == '1' ) then - refresh_cmd="wget-ssl --no-check-certificate -O - ".. ucic:get_first('shadowsocksr', 'global', 'chnroute_url','https://cdn.jsdelivr.net/gh/17mon/china_ip_list/china_ip_list.txt') .." > /tmp/china_ssr.txt 2>/dev/null" + refresh_cmd="wget-ssl --no-check-certificate -O - ".. ucic:get_first('shadowsocksr', 'global', 'chnroute_url','https://ispip.clang.cn/all_cn.txt') .." > /tmp/china_ssr.txt 2>/dev/null" else refresh_cmd="wget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' 2>/dev/null| awk -F\\| '/CN\\|ipv4/ { printf(\"%s/%d\\n\", $4, 32-log($5)/log(2)) }' > /tmp/china_ssr.txt" end @@ -55,7 +51,6 @@ if sret== 0 then oldcount=luci.sys.exec("cat /etc/china_ssr.txt | wc -l") if tonumber(icount) ~= tonumber(oldcount) then luci.sys.exec("cp -f /tmp/china_ssr.txt /etc/china_ssr.txt") --- retstring=tostring(math.ceil(tonumber(icount)/2)) log('更新成功! 新的总纪录数:'.. icount) else log('你已经是最新数据,无需更新!') @@ -85,10 +80,7 @@ if sret== 0 then end if tonumber(icount) ~= tonumber(oldcount) then luci.sys.exec("cp -f /tmp/ad.conf /etc/dnsmasq.ssr/ad.conf") --- retstring=tostring(math.ceil(tonumber(icount))) - if oldcount==0 then - luci.sys.call("/etc/init.d/dnsmasq restart") - end + luci.sys.exec("cp -f /tmp/ad.conf /tmp/dnsmasq.ssr/ad.conf") log('更新成功! 新的总纪录数:'.. icount) else log('你已经是最新数据,无需更新!') @@ -101,3 +93,5 @@ else log('更新失败!') end end + +luci.sys.call("/etc/init.d/dnsmasq restart") From dea3bba30602197321432c2faaabe1eeb1936c42 Mon Sep 17 00:00:00 2001 From: Dekun Zhang <30682790+R3pl4c3r@users.noreply.github.com> Date: Mon, 9 Mar 2020 16:36:48 +0800 Subject: [PATCH 4/4] luci-app-qbittorrent: switch WebUI use UPnP to false (#3679) --- package/lean/luci-app-qbittorrent/root/etc/init.d/qbittorrent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/luci-app-qbittorrent/root/etc/init.d/qbittorrent b/package/lean/luci-app-qbittorrent/root/etc/init.d/qbittorrent index 274aa45719..3e0f985003 100755 --- a/package/lean/luci-app-qbittorrent/root/etc/init.d/qbittorrent +++ b/package/lean/luci-app-qbittorrent/root/etc/init.d/qbittorrent @@ -72,7 +72,7 @@ validate_QBT () { 'Password:string' \ 'Port:port:8080' \ 'Username:string' \ - 'UseUPnP:or("true","false"):true' \ + 'UseUPnP:or("true","false"):false' \ 'AnonymousMode:or("true","false"):true' \ 'AnnounceToAllTrackers:or("true","false")' \ 'IgnoreLimitsLAN:or("true","false"):true' \