From 3de61c47150118fc9e60bec42100ed1c0fe8e61d Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 14 Feb 2020 16:28:21 +0800 Subject: [PATCH 01/10] srelay: reduce ipk size and enable thread --- package/lean/srelay/Makefile | 10 ++++------ package/lean/srelay/patches/001-compile.patch | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 package/lean/srelay/patches/001-compile.patch diff --git a/package/lean/srelay/Makefile b/package/lean/srelay/Makefile index f008a8dfc7..f09389cb40 100644 --- a/package/lean/srelay/Makefile +++ b/package/lean/srelay/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=srelay PKG_VERSION:=0.4.8p3 -PKG_RELEASE:=1 +PKG_RELEASE:=8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/socks-relay @@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/package.mk define Package/srelay SECTION:=net CATEGORY:=Network - DEPENDS:=+libwrap + DEPENDS:=+libpthread SUBMENU:=Web Servers/Proxies TITLE:=A socks 4/5 proxy server URL:=http://www.c-wind.com/srelay/ @@ -31,8 +31,8 @@ define Package/srelay/conffiles endef CONFIGURE_ARGS += \ - --disable-thread \ - --with-libwrap="$(STAGING_DIR)/usr" \ + --enable-thread \ + --with-libwrap=no \ CONFIGURE_VARS += \ CPPFLAGS="-DLINUX $$$$CPPFLAGS" \ @@ -40,8 +40,6 @@ CONFIGURE_VARS += \ define Package/srelay/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) files/$(PKG_NAME).conf $(1)/etc/ endef $(eval $(call BuildPackage,srelay)) diff --git a/package/lean/srelay/patches/001-compile.patch b/package/lean/srelay/patches/001-compile.patch new file mode 100644 index 0000000000..0cc2bc3431 --- /dev/null +++ b/package/lean/srelay/patches/001-compile.patch @@ -0,0 +1,19 @@ +--- a/configure ++++ b/configure +@@ -3999,11 +3999,11 @@ + LDFLAGS="$LDFLAGS -lpthread" + fi + if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } +-else ++# { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++#as_fn_error $? "cannot run test program while cross compiling ++#See \`config.log' for more details" "$LINENO" 5; } ++#else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + From b66b640bb486165babfbd1f8faba1b196e3720de Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 14 Feb 2020 16:31:38 +0800 Subject: [PATCH 02/10] luci-app-ssr-plus: enable socks server by default --- package/lean/luci-app-ssr-plus/Makefile | 4 ++-- package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 94e6840ecc..81fd4f90cc 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_RELEASE:=140 +PKG_RELEASE:=141 PKG_VERSION:=1 include $(INCLUDE_DIR)/package.mk @@ -37,7 +37,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks bool "Include Socks Sever" - default y if x86_64 + default y endef define Package/luci-app-ssr-plus diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 9aeecf2665..f321d7de44 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -477,10 +477,10 @@ start_local() { local local_server=$(uci_get_by_type socks5_proxy socks 0) [ "$local_server" = 0 ] && return 0 mkdir -p /var/run /var/etc + echo '0.0.0.0 any' > /var/etc/srelay.conf - /usr/bin/srelay -q -c /etc/srelay.conf \ - -i:$(uci_get_by_type socks5_proxy local_port 1080) \ - -p /var/run/ssr-local.pid >/dev/null 2>&1 + /usr/bin/srelay -q -c /var/etc/srelay.conf \ + -i:$(uci_get_by_type socks5_proxy local_port 1080) >/dev/null 2>&1 local_enable=1 } From 88277264a3b8d9acfdb347a3f2e1d1de57e5767e Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 14 Feb 2020 16:41:41 +0800 Subject: [PATCH 03/10] trojan: Port openssl sha224 to use EVP functions --- package/lean/trojan/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/trojan/Makefile b/package/lean/trojan/Makefile index 0377851a0e..4c6075a65e 100644 --- a/package/lean/trojan/Makefile +++ b/package/lean/trojan/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trojan PKG_VERSION:=1.14.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/trojan-gfw/trojan.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=7cfe059c664e06bc7663620024578d85d9e6008c +PKG_SOURCE_VERSION:=c3a17f2b37dc2397c34cd55832e4a612b9e089c1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz CMAKE_INSTALL:=1 From edd4009620ae3d3ce769ec875bae173fd966934b Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 14 Feb 2020 16:58:02 +0800 Subject: [PATCH 04/10] luci-app-ssr-plus: disable udp relay quic udp 443 for Chrome --- package/lean/luci-app-ssr-plus/Makefile | 2 +- package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 81fd4f90cc..7e0a03fb2f 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_RELEASE:=141 +PKG_RELEASE:=142 PKG_VERSION:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules index 6a97f8f139..df47d12ed8 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules @@ -188,6 +188,7 @@ tp_rule() { ip route add local 0.0.0.0/0 dev lo table 100 local ipt="iptables -t mangle" $ipt -N SS_SPEC_TPROXY + $ipt -A SS_SPEC_TPROXY -p udp --dport 443 -j DROP $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 From d7464a6a15cd2eee7a1717eae30e6f5ab9acc673 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 14 Feb 2020 17:21:10 +0800 Subject: [PATCH 05/10] antfs: move path --- package/{kernel => lean}/antfs/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename package/{kernel => lean}/antfs/Makefile (90%) diff --git a/package/kernel/antfs/Makefile b/package/lean/antfs/Makefile similarity index 90% rename from package/kernel/antfs/Makefile rename to package/lean/antfs/Makefile index 30143a395d..e10ba566da 100644 --- a/package/kernel/antfs/Makefile +++ b/package/lean/antfs/Makefile @@ -2,13 +2,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=antfs -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=https://github.com/klukonin/antfs.git PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2020-02-10 PKG_SOURCE_VERSION:=b41ba529f6b64b429527e09a06ce0326d5456c05 -PKG_MIRROR_HASH:=dae039c0fe5bf1a2c8c1cca4211d607a4d6f56fc41b38444e2234b40d710d9db PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=LICENSE From 8f6642da9ce52996ec5b0b35e5f3b27875249049 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 14 Feb 2020 17:24:56 +0800 Subject: [PATCH 06/10] uhttpd: enable ssl --- include/target.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/target.mk b/include/target.mk index eff9c7f6df..c9aa6c726e 100644 --- a/include/target.mk +++ b/include/target.mk @@ -14,12 +14,12 @@ DEVICE_TYPE?=router # Default packages - the really basic set DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd \ -block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget \ +block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget libustream-openssl ca-certificates \ default-settings luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \ luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus \ luci-app-pptp-server luci-app-arpbind luci-app-vlmcsd luci-app-wol luci-app-ramfree \ luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-accesscontrol \ -ddns-scripts_aliyun ddns-scripts_dnspod libustream-openssl +ddns-scripts_aliyun ddns-scripts_dnspod # For nas targets DEFAULT_PACKAGES.nas:=fdisk lsblk mdadm automount autosamba luci-app-usb-printer # For router targets From 94f029edb6c1f800e41499beb6ac2fc7780abba2 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Fri, 14 Feb 2020 17:25:58 +0800 Subject: [PATCH 07/10] luci-app-xlnetacc: delete po2lmo source code (#3080) --- package/lean/luci-app-xlnetacc/Makefile | 25 +- .../files/luci/i18n/xlnetacc.zh-cn.lmo | Bin 1188 -> 0 bytes .../luci => luasrc}/controller/xlnetacc.lua | 0 .../luci => luasrc}/model/cbi/xlnetacc.lua | 0 .../luci => luasrc}/view/xlnetacc/logview.htm | 0 .../luci => luasrc}/view/xlnetacc/status.htm | 0 .../zh-cn/xlnetacc.po} | 0 .../{files => }/root/etc/config/xlnetacc | 0 .../root/etc/hotplug.d/iface/95-xlnetacc | 0 .../{files => }/root/etc/init.d/xlnetacc | 0 .../root/etc/uci-defaults/luci-xlnetacc | 0 .../{files => }/root/usr/bin/xlnetacc.sh | 0 .../luci-app-xlnetacc/tools/po2lmo/Makefile | 12 - .../tools/po2lmo/src/po2lmo.c | 247 ------------- .../tools/po2lmo/src/template_lmo.c | 328 ------------------ .../tools/po2lmo/src/template_lmo.h | 92 ----- 16 files changed, 10 insertions(+), 694 deletions(-) delete mode 100644 package/lean/luci-app-xlnetacc/files/luci/i18n/xlnetacc.zh-cn.lmo rename package/lean/luci-app-xlnetacc/{files/luci => luasrc}/controller/xlnetacc.lua (100%) rename package/lean/luci-app-xlnetacc/{files/luci => luasrc}/model/cbi/xlnetacc.lua (100%) rename package/lean/luci-app-xlnetacc/{files/luci => luasrc}/view/xlnetacc/logview.htm (100%) rename package/lean/luci-app-xlnetacc/{files/luci => luasrc}/view/xlnetacc/status.htm (100%) rename package/lean/luci-app-xlnetacc/{files/luci/i18n/xlnetacc.zh-cn.po => po/zh-cn/xlnetacc.po} (100%) rename package/lean/luci-app-xlnetacc/{files => }/root/etc/config/xlnetacc (100%) rename package/lean/luci-app-xlnetacc/{files => }/root/etc/hotplug.d/iface/95-xlnetacc (100%) mode change 100644 => 100755 rename package/lean/luci-app-xlnetacc/{files => }/root/etc/init.d/xlnetacc (100%) mode change 100644 => 100755 rename package/lean/luci-app-xlnetacc/{files => }/root/etc/uci-defaults/luci-xlnetacc (100%) mode change 100644 => 100755 rename package/lean/luci-app-xlnetacc/{files => }/root/usr/bin/xlnetacc.sh (100%) mode change 100644 => 100755 delete mode 100644 package/lean/luci-app-xlnetacc/tools/po2lmo/Makefile delete mode 100644 package/lean/luci-app-xlnetacc/tools/po2lmo/src/po2lmo.c delete mode 100644 package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.c delete mode 100644 package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.h diff --git a/package/lean/luci-app-xlnetacc/Makefile b/package/lean/luci-app-xlnetacc/Makefile index f60c4e4868..e54b589f56 100644 --- a/package/lean/luci-app-xlnetacc/Makefile +++ b/package/lean/luci-app-xlnetacc/Makefile @@ -22,11 +22,6 @@ define Package/$(PKG_NAME)/description LuCI Support for XLNetAcc. endef -define Build/Prepare - $(foreach po,$(wildcard ${CURDIR}/files/luci/i18n/*.po), \ - po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));) -endef - define Build/Configure endef @@ -46,24 +41,24 @@ define Package/$(PKG_NAME)/conffiles endef define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n - $(INSTALL_DATA) $(PKG_BUILD_DIR)/xlnetacc.*.lmo $(1)/usr/lib/lua/luci/i18n/ $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller - $(INSTALL_DATA) ./files/luci/controller/*.lua $(1)/usr/lib/lua/luci/controller/ + $(INSTALL_DATA) ./luasrc/controller/*.lua $(1)/usr/lib/lua/luci/controller/ $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi - $(INSTALL_DATA) ./files/luci/model/cbi/*.lua $(1)/usr/lib/lua/luci/model/cbi/ + $(INSTALL_DATA) ./luasrc/model/cbi/*.lua $(1)/usr/lib/lua/luci/model/cbi/ $(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/xlnetacc - $(INSTALL_DATA) ./files/luci/view/xlnetacc/*.htm $(1)/usr/lib/lua/luci/view/xlnetacc/ + $(INSTALL_DATA) ./luasrc/view/xlnetacc/*.htm $(1)/usr/lib/lua/luci/view/xlnetacc/ $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/root/etc/config/xlnetacc $(1)/etc/config/xlnetacc + $(INSTALL_CONF) ./root/etc/config/xlnetacc $(1)/etc/config/xlnetacc $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/root/etc/init.d/xlnetacc $(1)/etc/init.d/xlnetacc + $(INSTALL_BIN) ./root/etc/init.d/xlnetacc $(1)/etc/init.d/xlnetacc $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/root/etc/hotplug.d/iface/95-xlnetacc $(1)/etc/hotplug.d/iface/95-xlnetacc + $(INSTALL_BIN) ./root/etc/hotplug.d/iface/95-xlnetacc $(1)/etc/hotplug.d/iface/95-xlnetacc $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_BIN) ./files/root/etc/uci-defaults/luci-xlnetacc $(1)/etc/uci-defaults/luci-xlnetacc + $(INSTALL_BIN) ./root/etc/uci-defaults/luci-xlnetacc $(1)/etc/uci-defaults/luci-xlnetacc $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/root/usr/bin/xlnetacc.sh $(1)/usr/bin/xlnetacc.sh + $(INSTALL_BIN) ./root/usr/bin/xlnetacc.sh $(1)/usr/bin/xlnetacc.sh + $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n + po2lmo ./po/zh-cn/xlnetacc.po $(1)/usr/lib/lua/luci/i18n/xlnetacc.zh-cn.lmo endef $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/lean/luci-app-xlnetacc/files/luci/i18n/xlnetacc.zh-cn.lmo b/package/lean/luci-app-xlnetacc/files/luci/i18n/xlnetacc.zh-cn.lmo deleted file mode 100644 index 3c0764141954a380428348ea22eea4117de48497..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1188 zcmZWnZD>_uHo!VT}TvJ>Ht3?qfXqlVRd(OS>w1px1V-9>yuBAZ(hdj^wJnz>z z*T}g?ThlamX;g_C1(>zSCN*3kD*C9TQl-PliH4YeSm%zQ1^&RjAfG@4;;m(5A2C}T~;vQEIlZd0+TZiwam=JbY? zqH5D*%#b_uKF{P{tiemAh}oC<6EqO#yH33kRYV#{e-M*Bdd$W5Yoy&Rv@Xe7{4DIH z`S3)x0lle^q@v&Ob^$QOtzXRGPI1NXAdcHN&DcA3oi$2@1vLL8 zVxj93S(iCCYfAB~?l^5rqN<^)Wo2cA$${c;iuKO3)R$)A6gm>3U+L5PqGr}aHuC;G zF)g0ij-zkxl_*MZM=6a_aN>p%As^b6eo*|p`F z+U$4{bSKvrl}~r|4z5}Wy%gMD@^9={wP;}l_zG}qsdZ%OkF~FA;jaX@uNOP26N|#1 zgNxvfomHv9mopzY;ODwycd&Y_V$wUe-TD2r-7Og&EKRQF_c_G<_l7+Sgs~@I z0YAoZ{PD$_Uy7IAEP;-liR0clY0h|1kJ${P({DxSm*C diff --git a/package/lean/luci-app-xlnetacc/files/luci/controller/xlnetacc.lua b/package/lean/luci-app-xlnetacc/luasrc/controller/xlnetacc.lua similarity index 100% rename from package/lean/luci-app-xlnetacc/files/luci/controller/xlnetacc.lua rename to package/lean/luci-app-xlnetacc/luasrc/controller/xlnetacc.lua diff --git a/package/lean/luci-app-xlnetacc/files/luci/model/cbi/xlnetacc.lua b/package/lean/luci-app-xlnetacc/luasrc/model/cbi/xlnetacc.lua similarity index 100% rename from package/lean/luci-app-xlnetacc/files/luci/model/cbi/xlnetacc.lua rename to package/lean/luci-app-xlnetacc/luasrc/model/cbi/xlnetacc.lua diff --git a/package/lean/luci-app-xlnetacc/files/luci/view/xlnetacc/logview.htm b/package/lean/luci-app-xlnetacc/luasrc/view/xlnetacc/logview.htm similarity index 100% rename from package/lean/luci-app-xlnetacc/files/luci/view/xlnetacc/logview.htm rename to package/lean/luci-app-xlnetacc/luasrc/view/xlnetacc/logview.htm diff --git a/package/lean/luci-app-xlnetacc/files/luci/view/xlnetacc/status.htm b/package/lean/luci-app-xlnetacc/luasrc/view/xlnetacc/status.htm similarity index 100% rename from package/lean/luci-app-xlnetacc/files/luci/view/xlnetacc/status.htm rename to package/lean/luci-app-xlnetacc/luasrc/view/xlnetacc/status.htm diff --git a/package/lean/luci-app-xlnetacc/files/luci/i18n/xlnetacc.zh-cn.po b/package/lean/luci-app-xlnetacc/po/zh-cn/xlnetacc.po similarity index 100% rename from package/lean/luci-app-xlnetacc/files/luci/i18n/xlnetacc.zh-cn.po rename to package/lean/luci-app-xlnetacc/po/zh-cn/xlnetacc.po diff --git a/package/lean/luci-app-xlnetacc/files/root/etc/config/xlnetacc b/package/lean/luci-app-xlnetacc/root/etc/config/xlnetacc similarity index 100% rename from package/lean/luci-app-xlnetacc/files/root/etc/config/xlnetacc rename to package/lean/luci-app-xlnetacc/root/etc/config/xlnetacc diff --git a/package/lean/luci-app-xlnetacc/files/root/etc/hotplug.d/iface/95-xlnetacc b/package/lean/luci-app-xlnetacc/root/etc/hotplug.d/iface/95-xlnetacc old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-xlnetacc/files/root/etc/hotplug.d/iface/95-xlnetacc rename to package/lean/luci-app-xlnetacc/root/etc/hotplug.d/iface/95-xlnetacc diff --git a/package/lean/luci-app-xlnetacc/files/root/etc/init.d/xlnetacc b/package/lean/luci-app-xlnetacc/root/etc/init.d/xlnetacc old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-xlnetacc/files/root/etc/init.d/xlnetacc rename to package/lean/luci-app-xlnetacc/root/etc/init.d/xlnetacc diff --git a/package/lean/luci-app-xlnetacc/files/root/etc/uci-defaults/luci-xlnetacc b/package/lean/luci-app-xlnetacc/root/etc/uci-defaults/luci-xlnetacc old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-xlnetacc/files/root/etc/uci-defaults/luci-xlnetacc rename to package/lean/luci-app-xlnetacc/root/etc/uci-defaults/luci-xlnetacc diff --git a/package/lean/luci-app-xlnetacc/files/root/usr/bin/xlnetacc.sh b/package/lean/luci-app-xlnetacc/root/usr/bin/xlnetacc.sh old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-xlnetacc/files/root/usr/bin/xlnetacc.sh rename to package/lean/luci-app-xlnetacc/root/usr/bin/xlnetacc.sh diff --git a/package/lean/luci-app-xlnetacc/tools/po2lmo/Makefile b/package/lean/luci-app-xlnetacc/tools/po2lmo/Makefile deleted file mode 100644 index ad2c133207..0000000000 --- a/package/lean/luci-app-xlnetacc/tools/po2lmo/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -INSTALL = install -PREFIX = /usr/bin - -po2lmo: src/po2lmo.o src/template_lmo.o - $(CC) $(LDFLAGS) -o src/po2lmo src/po2lmo.o src/template_lmo.o - -install: - $(INSTALL) -m 755 src/po2lmo $(PREFIX) - -clean: - $(RM) src/po2lmo src/*.o diff --git a/package/lean/luci-app-xlnetacc/tools/po2lmo/src/po2lmo.c b/package/lean/luci-app-xlnetacc/tools/po2lmo/src/po2lmo.c deleted file mode 100644 index 0da792b680..0000000000 --- a/package/lean/luci-app-xlnetacc/tools/po2lmo/src/po2lmo.c +++ /dev/null @@ -1,247 +0,0 @@ -/* - * lmo - Lua Machine Objects - PO to LMO conversion tool - * - * Copyright (C) 2009-2012 Jo-Philipp Wich - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "template_lmo.h" - -static void die(const char *msg) -{ - fprintf(stderr, "Error: %s\n", msg); - exit(1); -} - -static void usage(const char *name) -{ - fprintf(stderr, "Usage: %s input.po output.lmo\n", name); - exit(1); -} - -static void print(const void *ptr, size_t size, size_t nmemb, FILE *stream) -{ - if( fwrite(ptr, size, nmemb, stream) == 0 ) - die("Failed to write stdout"); -} - -static int extract_string(const char *src, char *dest, int len) -{ - int pos = 0; - int esc = 0; - int off = -1; - - for( pos = 0; (pos < strlen(src)) && (pos < len); pos++ ) - { - if( (off == -1) && (src[pos] == '"') ) - { - off = pos + 1; - } - else if( off >= 0 ) - { - if( esc == 1 ) - { - switch (src[pos]) - { - case '"': - case '\\': - off++; - break; - } - dest[pos-off] = src[pos]; - esc = 0; - } - else if( src[pos] == '\\' ) - { - dest[pos-off] = src[pos]; - esc = 1; - } - else if( src[pos] != '"' ) - { - dest[pos-off] = src[pos]; - } - else - { - dest[pos-off] = '\0'; - break; - } - } - } - - return (off > -1) ? strlen(dest) : -1; -} - -static int cmp_index(const void *a, const void *b) -{ - uint32_t x = ((const lmo_entry_t *)a)->key_id; - uint32_t y = ((const lmo_entry_t *)b)->key_id; - - if (x < y) - return -1; - else if (x > y) - return 1; - - return 0; -} - -static void print_uint32(uint32_t x, FILE *out) -{ - uint32_t y = htonl(x); - print(&y, sizeof(uint32_t), 1, out); -} - -static void print_index(void *array, int n, FILE *out) -{ - lmo_entry_t *e; - - qsort(array, n, sizeof(*e), cmp_index); - - for (e = array; n > 0; n--, e++) - { - print_uint32(e->key_id, out); - print_uint32(e->val_id, out); - print_uint32(e->offset, out); - print_uint32(e->length, out); - } -} - -int main(int argc, char *argv[]) -{ - char line[4096]; - char key[4096]; - char val[4096]; - char tmp[4096]; - int state = 0; - int offset = 0; - int length = 0; - int n_entries = 0; - void *array = NULL; - lmo_entry_t *entry = NULL; - uint32_t key_id, val_id; - - FILE *in; - FILE *out; - - if( (argc != 3) || ((in = fopen(argv[1], "r")) == NULL) || ((out = fopen(argv[2], "w")) == NULL) ) - usage(argv[0]); - - memset(line, 0, sizeof(key)); - memset(key, 0, sizeof(val)); - memset(val, 0, sizeof(val)); - - while( (NULL != fgets(line, sizeof(line), in)) || (state >= 2 && feof(in)) ) - { - if( state == 0 && strstr(line, "msgid \"") == line ) - { - switch(extract_string(line, key, sizeof(key))) - { - case -1: - die("Syntax error in msgid"); - case 0: - state = 1; - break; - default: - state = 2; - } - } - else if( state == 1 || state == 2 ) - { - if( strstr(line, "msgstr \"") == line || state == 2 ) - { - switch(extract_string(line, val, sizeof(val))) - { - case -1: - state = 4; - break; - default: - state = 3; - } - } - else - { - switch(extract_string(line, tmp, sizeof(tmp))) - { - case -1: - state = 2; - break; - default: - strcat(key, tmp); - } - } - } - else if( state == 3 ) - { - switch(extract_string(line, tmp, sizeof(tmp))) - { - case -1: - state = 4; - break; - default: - strcat(val, tmp); - } - } - - if( state == 4 ) - { - if( strlen(key) > 0 && strlen(val) > 0 ) - { - key_id = sfh_hash(key, strlen(key)); - val_id = sfh_hash(val, strlen(val)); - - if( key_id != val_id ) - { - n_entries++; - array = realloc(array, n_entries * sizeof(lmo_entry_t)); - entry = (lmo_entry_t *)array + n_entries - 1; - - if (!array) - die("Out of memory"); - - entry->key_id = key_id; - entry->val_id = val_id; - entry->offset = offset; - entry->length = strlen(val); - - length = strlen(val) + ((4 - (strlen(val) % 4)) % 4); - - print(val, length, 1, out); - offset += length; - } - } - - state = 0; - memset(key, 0, sizeof(key)); - memset(val, 0, sizeof(val)); - } - - memset(line, 0, sizeof(line)); - } - - print_index(array, n_entries, out); - - if( offset > 0 ) - { - print_uint32(offset, out); - fsync(fileno(out)); - fclose(out); - } - else - { - fclose(out); - unlink(argv[2]); - } - - fclose(in); - return(0); -} diff --git a/package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.c b/package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.c deleted file mode 100644 index 27205a7228..0000000000 --- a/package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - * lmo - Lua Machine Objects - Base functions - * - * Copyright (C) 2009-2010 Jo-Philipp Wich - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "template_lmo.h" - -/* - * Hash function from http://www.azillionmonkeys.com/qed/hash.html - * Copyright (C) 2004-2008 by Paul Hsieh - */ - -uint32_t sfh_hash(const char *data, int len) -{ - uint32_t hash = len, tmp; - int rem; - - if (len <= 0 || data == NULL) return 0; - - rem = len & 3; - len >>= 2; - - /* Main loop */ - for (;len > 0; len--) { - hash += sfh_get16(data); - tmp = (sfh_get16(data+2) << 11) ^ hash; - hash = (hash << 16) ^ tmp; - data += 2*sizeof(uint16_t); - hash += hash >> 11; - } - - /* Handle end cases */ - switch (rem) { - case 3: hash += sfh_get16(data); - hash ^= hash << 16; - hash ^= data[sizeof(uint16_t)] << 18; - hash += hash >> 11; - break; - case 2: hash += sfh_get16(data); - hash ^= hash << 11; - hash += hash >> 17; - break; - case 1: hash += *data; - hash ^= hash << 10; - hash += hash >> 1; - } - - /* Force "avalanching" of final 127 bits */ - hash ^= hash << 3; - hash += hash >> 5; - hash ^= hash << 4; - hash += hash >> 17; - hash ^= hash << 25; - hash += hash >> 6; - - return hash; -} - -uint32_t lmo_canon_hash(const char *str, int len) -{ - char res[4096]; - char *ptr, prev; - int off; - - if (!str || len >= sizeof(res)) - return 0; - - for (prev = ' ', ptr = res, off = 0; off < len; prev = *str, off++, str++) - { - if (isspace(*str)) - { - if (!isspace(prev)) - *ptr++ = ' '; - } - else - { - *ptr++ = *str; - } - } - - if ((ptr > res) && isspace(*(ptr-1))) - ptr--; - - return sfh_hash(res, ptr - res); -} - -lmo_archive_t * lmo_open(const char *file) -{ - int in = -1; - uint32_t idx_offset = 0; - struct stat s; - - lmo_archive_t *ar = NULL; - - if (stat(file, &s) == -1) - goto err; - - if ((in = open(file, O_RDONLY)) == -1) - goto err; - - if ((ar = (lmo_archive_t *)malloc(sizeof(*ar))) != NULL) - { - memset(ar, 0, sizeof(*ar)); - - ar->fd = in; - ar->size = s.st_size; - - fcntl(ar->fd, F_SETFD, fcntl(ar->fd, F_GETFD) | FD_CLOEXEC); - - if ((ar->mmap = mmap(NULL, ar->size, PROT_READ, MAP_SHARED, ar->fd, 0)) == MAP_FAILED) - goto err; - - idx_offset = ntohl(*((const uint32_t *) - (ar->mmap + ar->size - sizeof(uint32_t)))); - - if (idx_offset >= ar->size) - goto err; - - ar->index = (lmo_entry_t *)(ar->mmap + idx_offset); - ar->length = (ar->size - idx_offset - sizeof(uint32_t)) / sizeof(lmo_entry_t); - ar->end = ar->mmap + ar->size; - - return ar; - } - -err: - if (in > -1) - close(in); - - if (ar != NULL) - { - if ((ar->mmap != NULL) && (ar->mmap != MAP_FAILED)) - munmap(ar->mmap, ar->size); - - free(ar); - } - - return NULL; -} - -void lmo_close(lmo_archive_t *ar) -{ - if (ar != NULL) - { - if ((ar->mmap != NULL) && (ar->mmap != MAP_FAILED)) - munmap(ar->mmap, ar->size); - - close(ar->fd); - free(ar); - - ar = NULL; - } -} - - -lmo_catalog_t *_lmo_catalogs = NULL; -lmo_catalog_t *_lmo_active_catalog = NULL; - -int lmo_load_catalog(const char *lang, const char *dir) -{ - DIR *dh = NULL; - char pattern[16]; - char path[PATH_MAX]; - struct dirent *de = NULL; - - lmo_archive_t *ar = NULL; - lmo_catalog_t *cat = NULL; - - if (!lmo_change_catalog(lang)) - return 0; - - if (!dir || !(dh = opendir(dir))) - goto err; - - if (!(cat = malloc(sizeof(*cat)))) - goto err; - - memset(cat, 0, sizeof(*cat)); - - snprintf(cat->lang, sizeof(cat->lang), "%s", lang); - snprintf(pattern, sizeof(pattern), "*.%s.lmo", lang); - - while ((de = readdir(dh)) != NULL) - { - if (!fnmatch(pattern, de->d_name, 0)) - { - snprintf(path, sizeof(path), "%s/%s", dir, de->d_name); - ar = lmo_open(path); - - if (ar) - { - ar->next = cat->archives; - cat->archives = ar; - } - } - } - - closedir(dh); - - cat->next = _lmo_catalogs; - _lmo_catalogs = cat; - - if (!_lmo_active_catalog) - _lmo_active_catalog = cat; - - return 0; - -err: - if (dh) closedir(dh); - if (cat) free(cat); - - return -1; -} - -int lmo_change_catalog(const char *lang) -{ - lmo_catalog_t *cat; - - for (cat = _lmo_catalogs; cat; cat = cat->next) - { - if (!strncmp(cat->lang, lang, sizeof(cat->lang))) - { - _lmo_active_catalog = cat; - return 0; - } - } - - return -1; -} - -static lmo_entry_t * lmo_find_entry(lmo_archive_t *ar, uint32_t hash) -{ - unsigned int m, l, r; - uint32_t k; - - l = 0; - r = ar->length - 1; - - while (1) - { - m = l + ((r - l) / 2); - - if (r < l) - break; - - k = ntohl(ar->index[m].key_id); - - if (k == hash) - return &ar->index[m]; - - if (k > hash) - { - if (!m) - break; - - r = m - 1; - } - else - { - l = m + 1; - } - } - - return NULL; -} - -int lmo_translate(const char *key, int keylen, char **out, int *outlen) -{ - uint32_t hash; - lmo_entry_t *e; - lmo_archive_t *ar; - - if (!key || !_lmo_active_catalog) - return -2; - - hash = lmo_canon_hash(key, keylen); - - for (ar = _lmo_active_catalog->archives; ar; ar = ar->next) - { - if ((e = lmo_find_entry(ar, hash)) != NULL) - { - *out = ar->mmap + ntohl(e->offset); - *outlen = ntohl(e->length); - return 0; - } - } - - return -1; -} - -void lmo_close_catalog(const char *lang) -{ - lmo_archive_t *ar, *next; - lmo_catalog_t *cat, *prev; - - for (prev = NULL, cat = _lmo_catalogs; cat; prev = cat, cat = cat->next) - { - if (!strncmp(cat->lang, lang, sizeof(cat->lang))) - { - if (prev) - prev->next = cat->next; - else - _lmo_catalogs = cat->next; - - for (ar = cat->archives; ar; ar = next) - { - next = ar->next; - lmo_close(ar); - } - - free(cat); - break; - } - } -} diff --git a/package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.h b/package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.h deleted file mode 100644 index 57f59aa56b..0000000000 --- a/package/lean/luci-app-xlnetacc/tools/po2lmo/src/template_lmo.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * lmo - Lua Machine Objects - General header - * - * Copyright (C) 2009-2012 Jo-Philipp Wich - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _TEMPLATE_LMO_H_ -#define _TEMPLATE_LMO_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if (defined(__GNUC__) && defined(__i386__)) -#define sfh_get16(d) (*((const uint16_t *) (d))) -#else -#define sfh_get16(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\ - +(uint32_t)(((const uint8_t *)(d))[0]) ) -#endif - - -struct lmo_entry { - uint32_t key_id; - uint32_t val_id; - uint32_t offset; - uint32_t length; -} __attribute__((packed)); - -typedef struct lmo_entry lmo_entry_t; - - -struct lmo_archive { - int fd; - int length; - uint32_t size; - lmo_entry_t *index; - char *mmap; - char *end; - struct lmo_archive *next; -}; - -typedef struct lmo_archive lmo_archive_t; - - -struct lmo_catalog { - char lang[6]; - struct lmo_archive *archives; - struct lmo_catalog *next; -}; - -typedef struct lmo_catalog lmo_catalog_t; - - -uint32_t sfh_hash(const char *data, int len); -uint32_t lmo_canon_hash(const char *data, int len); - -lmo_archive_t * lmo_open(const char *file); -void lmo_close(lmo_archive_t *ar); - - -extern lmo_catalog_t *_lmo_catalogs; -extern lmo_catalog_t *_lmo_active_catalog; - -int lmo_load_catalog(const char *lang, const char *dir); -int lmo_change_catalog(const char *lang); -int lmo_translate(const char *key, int keylen, char **out, int *outlen); -void lmo_close_catalog(const char *lang); - -#endif From 55de4b993f9737bb5c0675e0d1080932ab7896b8 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Fri, 14 Feb 2020 17:26:25 +0800 Subject: [PATCH 08/10] Revert "add package luci-app-nfs (#2908)" (#3073) This reverts commit 9b593a88b07217315c239ca92d68d2754a3d062d. --- package/lean/luci-app-nfs/Makefile | 18 ---- .../luci-app-nfs/luasrc/controller/nfs.lua | 8 -- .../luci-app-nfs/luasrc/model/cbi/nfs.lua | 65 ------------- package/lean/luci-app-nfs/po/zh_Hans/nfs.po | 44 --------- .../luci-app-nfs/po/zh_Hans/nfs.zh-cn.lmo | Bin 288 -> 0 bytes package/lean/luci-app-nfs/root/etc/config/nfs | 6 -- package/lean/luci-app-nfs/root/etc/init.d/nfs | 86 ------------------ .../luci-app-nfs/root/etc/uci-defaults/nfs | 14 --- 8 files changed, 241 deletions(-) delete mode 100644 package/lean/luci-app-nfs/Makefile delete mode 100644 package/lean/luci-app-nfs/luasrc/controller/nfs.lua delete mode 100644 package/lean/luci-app-nfs/luasrc/model/cbi/nfs.lua delete mode 100644 package/lean/luci-app-nfs/po/zh_Hans/nfs.po delete mode 100644 package/lean/luci-app-nfs/po/zh_Hans/nfs.zh-cn.lmo delete mode 100644 package/lean/luci-app-nfs/root/etc/config/nfs delete mode 100644 package/lean/luci-app-nfs/root/etc/init.d/nfs delete mode 100644 package/lean/luci-app-nfs/root/etc/uci-defaults/nfs diff --git a/package/lean/luci-app-nfs/Makefile b/package/lean/luci-app-nfs/Makefile deleted file mode 100644 index f4b299e015..0000000000 --- a/package/lean/luci-app-nfs/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2016 Openwrt.org -# -# This is free software, licensed under the Apache License, Version 2.0 . -# - -include $(TOPDIR)/rules.mk - -LUCI_TITLE:=LuCI support for nfs -LUCI_DEPENDS:= -LUCI_PKGARCH:=all -PKG_NAME:=luci-app-nfs -PKG_VERSION:=1.0 -PKG_RELEASE:=1 - -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature - diff --git a/package/lean/luci-app-nfs/luasrc/controller/nfs.lua b/package/lean/luci-app-nfs/luasrc/controller/nfs.lua deleted file mode 100644 index 9807fb2130..0000000000 --- a/package/lean/luci-app-nfs/luasrc/controller/nfs.lua +++ /dev/null @@ -1,8 +0,0 @@ -module("luci.controller.nfs", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/nfs") then - return - end - entry({"admin", "nas", "nfs"}, cbi("nfs"), _("NFS Manage"), 5).dependent = true -end diff --git a/package/lean/luci-app-nfs/luasrc/model/cbi/nfs.lua b/package/lean/luci-app-nfs/luasrc/model/cbi/nfs.lua deleted file mode 100644 index 3c3267752f..0000000000 --- a/package/lean/luci-app-nfs/luasrc/model/cbi/nfs.lua +++ /dev/null @@ -1,65 +0,0 @@ -local fs = require "nixio.fs" - -m = Map("nfs", translate("NFS Manage")) - --- NFS Share -- -s = m:section(TypedSection, "share", translate("Shared Directories")) -s.anonymous = true -s.addremove = true -s.template = "cbi/tblsection" - -en = s:option(Flag, "enabled", translate("Enable")) -en.rmempty = false -en.default = "1" - -ph1 = s:option(Value, "path", translate("Path")) -ph1.placeholder = "/mnt" -ph1.rmempty = false -ph1.optional = false - -ct = s:option(Value, "clients", translate("Clients")) -ct.placeholder = "192.168.1.0/24" -ct.rmempty = false -ct.optional = false - -op = s:option(Value, "options", translate("options")) -op.placeholder = "rw,sync,root_squash,all_squash,insecure,no_subtree_check" -op.rmempty = false -op.optional = false - --- NFS Mount -- -c = m:section(TypedSection, "mount", translate("Mounted Points")) -c.anonymous = true -c.addremove = true -c.template = "cbi/tblsection" - -en = c:option(Flag, "enabled", translate("Enable")) -en.default = "1" -en.rmempty = false - -sr = c:option(Value, "source", translate("source")) -sr.placeholder = "192.168.1.1:/mnt/*" -sr.rmempty = false -sr.optional = false - -ph2 = c:option(Value, "target", translate("target")) -ph2.placeholder = "/mnt/nfs/*" -ph2.rmempty = false -ph2.optional = false - -op = c:option(Value, "options", translate("options")) -op.placeholder = "rw,nolock" -op.rmempty = false -op.optional = false - -de = c:option(Value, "delay", translate("delay")) -de.placeholder = "5" -de.rmempty = false -de.optional = false - -if nixio.fs.access("/etc/config/fstab") then - ph1.titleref = luci.dispatcher.build_url("admin", "system", "mounts") - ph2.titleref = luci.dispatcher.build_url("admin", "system", "mounts") -end - -return m diff --git a/package/lean/luci-app-nfs/po/zh_Hans/nfs.po b/package/lean/luci-app-nfs/po/zh_Hans/nfs.po deleted file mode 100644 index 1ae9fab84d..0000000000 --- a/package/lean/luci-app-nfs/po/zh_Hans/nfs.po +++ /dev/null @@ -1,44 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-1\n" -"PO-Revision-Date: 2016-03-1 21:36+0800\n" -"Last-Translator: leenchan\n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"Language-Team: \n" -"X-Generator: Poedit 1.8.1\n" - -msgid "NFS Manage" -msgstr "NFS 管理" - -msgid "Shared Directories" -msgstr "共享目录" - -msgid "Enable" -msgstr "启用" - -msgid "Path" -msgstr "路径" - -msgid "Clients" -msgstr "允许的客户端" - -msgid "Mounted Points" -msgstr "已挂载的目录" - -msgid "source" -msgstr "源目录" - -msgid "target" -msgstr "挂载到" - -msgid "options" -msgstr "选项" - -msgid "delay" -msgstr "延迟时间" diff --git a/package/lean/luci-app-nfs/po/zh_Hans/nfs.zh-cn.lmo b/package/lean/luci-app-nfs/po/zh_Hans/nfs.zh-cn.lmo deleted file mode 100644 index 76efe6406c1432a9f8e19c9d622df6a955f2c292..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 288 zcmeZs3s!i(ZsGF@Z43-gTQ@%0wfgz&bx-$BeL7+N^C>GB7+!2&|8!pqNUrh4x*gAF zwLD$7=vl}1=d0HP#kOyH*3B|Yvt1KlOa_SL(~b=c3=A(DI$ti_3DmQD z+l&44pH1KPa{3m{*WAlF<1YmPrFlSD=fza}_|J;@Kz0TYv*q(Hc4WP{xdg~o0P!mh z2}JK@SFr=KB|!YvnL(%aDfWZdAiy=p=3Jnz>C`$PI{=6|=jq*e68~#U0gw&CJd1rf s@1;Bb?gFxHfLLgwORvh~{Z9*lYz+|qXyb{!2O8Bu?uh|nP9UxU0Bsd?n*aa+ diff --git a/package/lean/luci-app-nfs/root/etc/config/nfs b/package/lean/luci-app-nfs/root/etc/config/nfs deleted file mode 100644 index 7395846563..0000000000 --- a/package/lean/luci-app-nfs/root/etc/config/nfs +++ /dev/null @@ -1,6 +0,0 @@ - -config share - option enabled '0' - option path '/mnt' - option clients '*' - option options 'rw,sync,root_squash,all_squash,insecure,no_subtree_check' diff --git a/package/lean/luci-app-nfs/root/etc/init.d/nfs b/package/lean/luci-app-nfs/root/etc/init.d/nfs deleted file mode 100644 index 8930bea33f..0000000000 --- a/package/lean/luci-app-nfs/root/etc/init.d/nfs +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh /etc/rc.common -START=45 -STOP=99 -NAME="nfs" - -nfs_share() { - local config="$1" - local enabled - local path - local clients - local options - - config_get_bool enabled "$config" enabled 0 - - for opt in path clients options - do - config_get "$opt" "$config" "$opt" - done - - if [ "$enabled" = 1 ]; then - grep -qs $path /etc/exports - if [ $? -ne 0 ]; then - echo -e "$path\t$clients($options)" >>/etc/exports - exportfs -r - fi - elif [ "$enabled" = 0 ]; then - exportfs -u | grep -qs $path - if [ $? -eq 0 ]; then - exportfs -u $clients:$path - fi - fi - exportfs -r -} - -nfs_share_stop() { - exportfs -au &>/dev/null -} - -nfs_mount() { - local config="$1" - local enabled - local target - local source - local options - local delay - - config_get_bool enabled "$config" enabled 0 - - for opt in target source options delay - do - config_get "$opt" "$config" "$opt" - done - - if [ "$enabled" = 1 ]; then - if [ "$delay" -a $delay -gt 0 ]; then - logger "NetMount: Sleep $delay seconds before mount" - sleep $delay - fi - grep -qs $target /proc/mounts - if [ $? -ne 0 ]; then - mkdir -p $target - logger "NetMount: Mounting $source in $target" - mount -t nfs -o $options $source $target - fi - elif [ "$enabled" = 0 ]; then - if grep -qs $target /proc/mounts; then - umount -fr $target - sleep $delay - fi - fi -} - -start() { - config_load "$NAME" - config_foreach nfs_share share - config_foreach nfs_mount mount -} - -stop() { - nfs_share_stop -} - -restart() { - echo > /etc/exports - start -} diff --git a/package/lean/luci-app-nfs/root/etc/uci-defaults/nfs b/package/lean/luci-app-nfs/root/etc/uci-defaults/nfs deleted file mode 100644 index f7aa1397be..0000000000 --- a/package/lean/luci-app-nfs/root/etc/uci-defaults/nfs +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@nfs[-1] - add ucitrack nfs - set ucitrack.@nfs[-1].init=nfs - commit ucitrack -EOF - -/etc/init.d/nfs enable && /etc/init.d/nfs restart - -rm -f /tmp/luci-indexcache - -exit 0 From e911cef2b2bf97ed154a6529d2cb5f768f3ecf5c Mon Sep 17 00:00:00 2001 From: Max Zhao Date: Fri, 14 Feb 2020 17:27:35 +0800 Subject: [PATCH 09/10] luci-app-ssr-plus: improve SIP003 plugin support (#3072) * luci-app-ssr-plus: improve SIP003 plugin support for subscribe * luci-app-ssr-plus: fix plugin(SIP003) can't stop when stop app --- .../root/etc/init.d/shadowsocksr | 2 ++ .../root/usr/share/shadowsocksr/subscribe.lua | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index f321d7de44..8e9f22ef43 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -561,6 +561,8 @@ stop() { fi killall -q -9 ssr-monitor killall -q -9 ss-redir + killall -q -9 obfs-local + killall -q -9 v2ray-plugin killall -q -9 ssr-redir killall -q -9 v2ray killall -q -9 trojan diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index effb5d5d16..30b35a2bf9 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -193,12 +193,21 @@ local function processData(szType, content) if host[2]:find("/\\?") then local query = split(host[2], "/\\?") result.server_port = query[1] - -- local params = {} - -- for _, v in pairs(split(query[2], '&')) do - -- local t = split(v, '=') - -- params[t[1]] = t[2] - -- end - -- 这里似乎没什么用 我看数据结构没有写插件的支持 先抛弃 + local params = {} + for _, v in pairs(split(query[2], '&')) do + local t = split(v, '=') + params[t[1]] = t[2] + end + if params.lugin then + local plugin_info = UrlDecode(params.lugin) + local idx_pn = plugin_info:find(";") + if idx_pn then + result.plugin = plugin_info:sub(1, idx_pn - 1) + result.plugin_opts = plugin_info:sub(idx_pn + 1, #plugin_info) + else + result.plugin = plugin_info + end + end else result.server_port = host[2] end @@ -365,3 +374,4 @@ if subscribe_url and #subscribe_url > 0 then end end) end + From f4b60f5cb2f980fd6dcc29334c43eea2d0f20562 Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Fri, 14 Feb 2020 17:27:56 +0800 Subject: [PATCH 10/10] shadowsocksr-libev:Fix ssr-server install (#2896) --- package/lean/shadowsocksr-libev/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/lean/shadowsocksr-libev/Makefile b/package/lean/shadowsocksr-libev/Makefile index 89a306cc9e..8856479912 100644 --- a/package/lean/shadowsocksr-libev/Makefile +++ b/package/lean/shadowsocksr-libev/Makefile @@ -25,6 +25,7 @@ include $(INCLUDE_DIR)/package.mk define Package/shadowsocksr-libev SECTION:=net CATEGORY:=Network + SUBMENU:=Web Servers/Proxies TITLE:=Lightweight Secured Socks5 Proxy URL:=https://github.com/shadowsocksrr/shadowsocksr-libev DEPENDS:=+libopenssl +libpthread +libpcre +zlib @@ -42,6 +43,7 @@ define Package/shadowsocksr-libev/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local $(LN) ssr-local $(1)/usr/bin/ssr-tunnel $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/ss-check $(1)/usr/bin/ssr-check + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/ss-server $(1)/usr/bin/ssr-server endef define Package/shadowsocksr-libev-alt/install