diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 3c26b58db6..319e00a209 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus -PKG_VERSION:=158 +PKG_VERSION:=159 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 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 d882b2ed2e..6242512c88 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua @@ -136,6 +136,7 @@ if sret== 0 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.exec("cp -f /etc/dnsmasq.ssr/ad.conf /tmp/dnsmasq.ssr/ad.conf") luci.sys.call("/etc/init.d/dnsmasq restart") end else diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad index 0846065c05..2c7ffef057 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad @@ -1,5 +1,9 @@ #!/bin/sh -e if [ -f /tmp/adnew.conf ]; then - cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /tmp/ad.conf + if (grep -wq "address=" /tmp/adnew.conf) ; then + cp /tmp/adnew.conf /tmp/ad.conf + else + cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /tmp/ad.conf + fi fi rm -f /tmp/adnew.conf diff --git a/package/lean/npc/Makefile b/package/lean/npc/Makefile index a93ca0b258..e3b3527868 100644 --- a/package/lean/npc/Makefile +++ b/package/lean/npc/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=npc PKG_VERSION:=0.26.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 ifeq ($(ARCH),mipsel) NPC_ARCH:=mipsle @@ -37,10 +37,9 @@ endif PKG_LICENSE:=Apache-2.0 -PKG_SOURCE_URL:=https://github.com/cnlh/nps/releases/download/v$(PKG_VERSION) -PKG_SOURCE:=linux_$(NPC_ARCH)_client.tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/nps-$(PKG_VERSION) -PKG_HASH:=skip +PKG_BUILD_DIR:=$(BUILD_DIR)/npc-$(PKG_VERSION) +PKG_URL:=https://github.com/ehang-io/nps/releases/download/v$(PKG_VERSION)/linux_$(NPC_ARCH)_client.tar.gz +PKG_FILE:=nps_linux_$(NPC_ARCH)_client-$(PKG_VERSION).tar.gz include $(INCLUDE_DIR)/package.mk @@ -49,17 +48,22 @@ define Package/$(PKG_NAME) CATEGORY:=Network TITLE:=NPC Client DEPENDS:= - URL:=https://github.com/cnlh/nps/releases + URL:=https://github.com/ehang-io/nps/releases endef - - define Package/$(PKG_NAME)/description npc is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet endef +define Build/Download + if [ ! -f $(DL_DIR)/$(PKG_FILE) ] ; then \ + wget -c -t 5 -O $(DL_DIR)/$(PKG_FILE) $(PKG_URL); \ + fi +endef + define Build/Prepare - tar -zxf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) + $(Build/Download) + tar -zxvf $(DL_DIR)/$(PKG_FILE) -C $(PKG_BUILD_DIR) endef define Build/Configure