From 86f0e96b2c2ee70662aff6ef82f9e0b7be727f77 Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Mon, 7 Dec 2020 11:08:10 +0800 Subject: [PATCH 01/12] luci-app-ssr-plus: fix startup failure caused by mux of xtls --- .../root/usr/share/shadowsocksr/genv2config.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua index 2852c75a25..0dd6e1c643 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua @@ -58,18 +58,18 @@ outbound = { streamSettings = { network = server.transport, security = (server.tls == '1') and ((server.xtls == '1') and "xtls" or "tls") or "none", - tlsSettings = (server.tls == '1') and {allowInsecure = (server.insecure ~= "0") and true or false,serverName=server.tls_host,} or nil, - xtlsSettings = (server.xtls == '1') and {allowInsecure = (server.insecure ~= "0") and true or false,serverName=server.tls_host,} or nil, - tcpSettings = (server.transport == "tcp") and { + tlsSettings = (server.tls == '1' and server.xtls == '0') and {allowInsecure = (server.insecure ~= "0") and true or nil,serverName=server.tls_host,} or nil, + xtlsSettings = (server.xtls == '1') and {allowInsecure = (server.insecure ~= "0") and true or nil,serverName=server.tls_host,} or nil, + tcpSettings = (server.transport == "tcp" and server.tcp_guise == "http") and { header = { type = server.tcp_guise, request = { - path = server.http_path or {"/"}, + path = server.http_path or "/", headers = { Host = server.http_host or {} } } or {} - } + } or nil } or nil, kcpSettings = (server.transport == "kcp") and { mtu = tonumber(server.mtu), @@ -105,7 +105,7 @@ outbound = { mux = (server.xtls ~= "1") and { enabled = (server.mux == "1") and true or false, concurrency = tonumber(server.concurrency) - } + } or nil } or nil, -- 额外传出连接 outboundDetour = { From 569d2fab113d0b093725504fbded77dc00fa0ff3 Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Mon, 7 Dec 2020 12:53:34 +0800 Subject: [PATCH 02/12] xray: bump to 1.1.2 --- package/lean/xray/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/xray/Makefile b/package/lean/xray/Makefile index 0d633ce9c0..6bdbabb998 100644 --- a/package/lean/xray/Makefile +++ b/package/lean/xray/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xray -PKG_VERSION:=1.1.1 +PKG_VERSION:=1.1.2 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/Xray-core-$(PKG_VERSION) PKG_SOURCE:=xray-core-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/XTLS/xray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=321efd6949a58615fb023b70677780d89914efe9e8f766e4df9051453b3ed5a3 +PKG_HASH:=6ec14856fe9966a118fc0854696ec54c08ce478cb937a75fae74072c945dcb42 PKG_LICENSE:=MPL PKG_LICENSE_FILES:=LICENSE From 87d9db309c3a6f98c8e05a13fc8eef53d44d4a54 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sat, 5 Dec 2020 20:45:29 +0100 Subject: [PATCH 03/12] odhcp6c: update to git HEAD faed29a dhcpv6: only refresh timers when reconfigure is valid 9c50975 dhcpv6: fix printing identity association id a7b2221 dhcpv6: avoid sending continuous renew/rebind messages d7afa2b dhcpv6: add extra syslog info traces f5728e4 odhcp6c_find_entry: exclude priority from the list of fields that must match Signed-off-by: Hans Dedecker --- package/network/ipv6/odhcp6c/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 15800b678b..1cf0950076 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=16 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git -PKG_SOURCE_DATE:=2020-03-28 -PKG_SOURCE_VERSION:=f575351cbb3defc0bf52680c9082912a6c264374 -PKG_MIRROR_HASH:=3a0df503be81d25da44a83ae36d5fbeaabae1b7c99f6eb8ffe6f62311e254d06 +PKG_SOURCE_DATE:=2020-12-03 +PKG_SOURCE_VERSION:=faed29aa733cd3e7c0269d5dc2fc6a8e1d35f1ce +PKG_MIRROR_HASH:=7b47aeacfc381e81e570a00733aeafd229e45f576134d5b8548eeb01d56f1073 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 From 652c0fb157dd35ec8af4bf68359704c766da51a6 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sat, 5 Dec 2020 20:52:27 +0100 Subject: [PATCH 04/12] glibc: update to latest 2.32 commit (BZ# 26224) 050022910b iconv: Accept redundant shift sequences in IBM1364 [BZ #26224] ac0a6929c5 sh: Add sh4 fpu Implies folder 3ea24955bf struct _Unwind_Exception alignment should not depend on compiler flags Signed-off-by: Hans Dedecker --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index fbaad9d3ac..faf749eea3 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=5c36293f067d2af16e4eb9f9465be36f346ea6d0 -PKG_MIRROR_HASH:=f01b467843af97fe29dd67d0dc52e8f2effc968258ae806af37be085239a3e4c +PKG_SOURCE_VERSION:=050022910be1d1f5c11cd5168f1685ad4f9580d2 +PKG_MIRROR_HASH:=b0a8c79acbb371badcc8477e840ab32bf796d5e7a0eab224bc8fd5aca6b1e631 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From 5c696f8af47313b348012fca4b4f46822b67f559 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 21 Sep 2020 12:43:43 -1000 Subject: [PATCH 05/12] build: reduce cleanup binary calls in rootfs.mk Both `find` and `rm` only need to be called once for folders and files. Signed-off-by: Paul Spooren --- include/rootfs.mk | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/include/rootfs.mk b/include/rootfs.mk index 18ada3cd43..f2ed648d2f 100644 --- a/include/rootfs.mk +++ b/include/rootfs.mk @@ -47,7 +47,7 @@ TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD) ifdef CONFIG_CLEAN_IPKG define clean_ipkg - -find $(1)/usr/lib/opkg/info -type f -and -not -name '*.control' | $(XARGS) rm -rf + -find $(1)/usr/lib/opkg/info -type f -and -not -name '*.control' -delete -sed -i -ne '/^Require-User: /p' $(1)/usr/lib/opkg/info/*.control awk ' \ BEGIN { conffiles = 0; print "Conffiles:" } \ @@ -56,7 +56,7 @@ ifdef CONFIG_CLEAN_IPKG conffiles == 1 { print } \ ' $(1)/usr/lib/opkg/status >$(1)/usr/lib/opkg/status.new mv $(1)/usr/lib/opkg/status.new $(1)/usr/lib/opkg/status - -find $(1)/usr/lib/opkg -empty | $(XARGS) rm -rf + -find $(1)/usr/lib/opkg -empty -delete endef endif @@ -88,15 +88,13 @@ define prepare_rootfs done || true \ ) $(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status) - @-find $(1) -name CVS | $(XARGS) rm -rf - @-find $(1) -name .svn | $(XARGS) rm -rf - @-find $(1) -name .git | $(XARGS) rm -rf - @-find $(1) -name '.#*' | $(XARGS) rm -f - rm -rf $(1)/tmp/* - rm -f $(1)/usr/lib/opkg/lists/* - rm -f $(1)/usr/lib/opkg/info/*.postinst* - rm -f $(1)/var/lock/*.lock - rm -rf $(1)/boot + @-find $(1) -name CVS -o -name .svn -o -name .git -o -name '.#*' | $(XARGS) rm -rf + rm -rf \ + $(1)/boot \ + $(1)/tmp/* \ + $(1)/usr/lib/opkg/info/*.postinst* \ + $(1)/usr/lib/opkg/lists/* \ + $(1)/var/lock/*.lock $(call clean_ipkg,$(1)) $(call mklibs,$(1)) $(if $(SOURCE_DATE_EPOCH),find $(1)/ -mindepth 1 -execdir touch -hcd "@$(SOURCE_DATE_EPOCH)" "{}" +) From fe59f3e741cd72974fe3bdafc4aed21a0fc73358 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Sat, 28 Nov 2020 18:06:33 -0300 Subject: [PATCH 06/12] openssl: use --cross-compile-prefix in Configure This sets the --cross-compile-prefix option when running Configure, so that that it will not use the host gcc to figure out, among other things, compiler defines. It avoids errors, if the host 'gcc' is handled by clang: mips-openwrt-linux-musl-gcc: error: unrecognized command-line option '-Qunused-arguments' Signed-off-by: Eneas U de Queiroz Tested-by: Rosen Penev --- package/libs/openssl/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index b0f4dd3ef2..a7438d9169 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=openssl PKG_BASE:=1.1.1 PKG_BUGFIX:=h PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 ENGINES_DIR=engines-1.1 @@ -334,6 +334,7 @@ define Build/Configure --prefix=/usr \ --libdir=lib \ --openssldir=/etc/ssl \ + --cross-compile-prefix="$(TARGET_CROSS)" \ $(TARGET_CPPFLAGS) \ $(TARGET_LDFLAGS) \ $(OPENSSL_OPTIONS) && \ @@ -346,14 +347,12 @@ TARGET_LDFLAGS += -Wl,--gc-sections define Build/Compile +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - CROSS_COMPILE="$(TARGET_CROSS)" \ CC="$(TARGET_CC)" \ SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \ $(OPENSSL_MAKEFLAGS) \ all $(MAKE) -C $(PKG_BUILD_DIR) \ - CROSS_COMPILE="$(TARGET_CROSS)" \ CC="$(TARGET_CC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ $(OPENSSL_MAKEFLAGS) \ From 351fa28e49977349afc5e1eae165f6d44b0afb16 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 6 Dec 2020 00:36:05 -0800 Subject: [PATCH 07/12] mtd-utils: remove lzo build dependency The build option `--withouth-lzo` is added in the Makefile which makes the existence of lzo obsolete. To remove the lzo package from openwrt.git entirely, remove the legacy dependency. Signed-off-by: Rosen Penev [improved commit message] Signed-off-by: Paul Spooren --- package/utils/mtd-utils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/utils/mtd-utils/Makefile b/package/utils/mtd-utils/Makefile index 6e5e72783f..5a4b03da96 100644 --- a/package/utils/mtd-utils/Makefile +++ b/package/utils/mtd-utils/Makefile @@ -20,7 +20,7 @@ PKG_FIXUP:=autoreconf PKG_FLAGS:=nonshared -PKG_BUILD_DEPENDS:=util-linux lzo zlib +PKG_BUILD_DEPENDS:=util-linux PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= From 72b33d8f306f08d88b9e24bf9295ac360190a1eb Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Fri, 4 Dec 2020 18:32:46 +0200 Subject: [PATCH 08/12] rules.mk: use -fPIC instead of -fpic on arm64 Some packages fail to build on arm64 when PKG_ASLR_PIE_ALL=y, due to machine-specific size restrictions on the global offset table. While the manual instructs to recompile with -fPIC if it fails with -fpic, by doing this per package, there is still a risk of random breakage due to version bumps or other changes, so let's use -fPIC on arm64 by default. While comparing the sizes of 141 packages built with -fpic vs -fPIC, most packages are either equal or smaller in size. Only 9 of the compared packages turned out slightly larger. Signed-off-by: Stijn Tintel --- rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.mk b/rules.mk index d899ca5c20..79db10a0ea 100644 --- a/rules.mk +++ b/rules.mk @@ -77,7 +77,7 @@ IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1) OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH)) -ifeq ($(ARCH),powerpc) +ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be powerpc )) FPIC:=-fPIC else FPIC:=-fpic From ff03f2a749ac509fdc7a9707b2bb933d7d668893 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Fri, 4 Dec 2020 19:16:26 +0200 Subject: [PATCH 09/12] build: require rsync It seems to be required to build toolchain/kernel-headers. Signed-off-by: Stijn Tintel --- include/prereq-build.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index e7314b253b..5045fabdfb 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -170,6 +170,9 @@ $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \ file --version 2>&1 | grep file)) +$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \ + rsync --version Date: Mon, 21 Sep 2020 13:34:17 +0100 Subject: [PATCH 10/12] build: find_md5 list with mod time and sorted It was observed that the MD5 would not change after source files had been modified, looking deeper into the build process it was discovered that find_md5 build function makes a list of the files being built and then passes the list to a summing utility on stdin. The resultant MD5 is of the file list, not the contents of the files. The MD5 would change if the ordering of the list changed, or items were removed or deleted. The proposed fix is to add the modification time after the filename and then sort the list to prevent find returning files in a different order falsely re-triggering a rebuild. The MD5 will now change when a file is modified or files are added/removed from the list. Using 'T@' to show time in epoch for timezone independent behaviour. Signed-off-by: John Beckett --- include/depends.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/depends.mk b/include/depends.mk index 3df51adae3..ace7139000 100644 --- a/include/depends.mk +++ b/include/depends.mk @@ -13,7 +13,7 @@ DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*" -find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | mkhash md5 +find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | mkhash md5 define rdep .PRECIOUS: $(2) From 1b2c199ba97be41cbb144f1cb90ceabc44eb356f Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Mon, 7 Dec 2020 15:20:37 +0800 Subject: [PATCH 11/12] luci-app-ssr-plus: fix v2ray tcp>http and http2 configuration errors --- .../usr/share/shadowsocksr/genv2config.lua | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua index 0dd6e1c643..777ec24366 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua @@ -46,15 +46,15 @@ outbound = { { id = server.vmess_id, alterId = (server.type == "v2ray") and tonumber(server.alter_id) or nil, + security = (server.type == "v2ray") and server.security or nil, + encryption = (server.type == "vless") and server.vless_encryption or nil, flow = (server.xtls == '1') and (server.vless_flow and server.vless_flow or "xtls-rprx-origin") or nil, - security = server.security, - encryption = server.vless_encryption } } } } }, - -- 底层传输配置 +-- 底层传输配置 streamSettings = { network = server.transport, security = (server.tls == '1') and ((server.xtls == '1') and "xtls" or "tls") or "none", @@ -64,12 +64,12 @@ outbound = { header = { type = server.tcp_guise, request = { - path = server.http_path or "/", + path = {server.http_path} or {"/"}, headers = { - Host = server.http_host or {} + Host = {server.http_host} or {} } - } or {} - } or nil + } + } } or nil, kcpSettings = (server.transport == "kcp") and { mtu = tonumber(server.mtu), @@ -91,8 +91,8 @@ outbound = { } or nil, } or nil, httpSettings = (server.transport == "h2") and { - path = server.h2_path, - host = server.h2_host, + path = server.h2_path or "", + host = {server.h2_host} or nil } or nil, quicSettings = (server.transport == "quic") and { security = server.quic_security, @@ -106,14 +106,6 @@ outbound = { enabled = (server.mux == "1") and true or false, concurrency = tonumber(server.concurrency) } or nil -} or nil, --- 额外传出连接 -outboundDetour = { - { - protocol = "freedom", - tag = "direct", - settings = { keep = "" } - } - } +} or nil } -print(json.stringify(Xray, 1)) +print(json.stringify(Xray,1)) \ No newline at end of file From 74da1b1048b9bc76f39dcfe4373b1acea30bc8f4 Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Tue, 8 Dec 2020 09:17:20 +0800 Subject: [PATCH 12/12] luci-app-ssr-plus: fix V2 TLS configuration servername issue --- .../root/usr/share/shadowsocksr/genv2config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua index 777ec24366..3393b90c2f 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua @@ -58,7 +58,7 @@ outbound = { streamSettings = { network = server.transport, security = (server.tls == '1') and ((server.xtls == '1') and "xtls" or "tls") or "none", - tlsSettings = (server.tls == '1' and server.xtls == '0') and {allowInsecure = (server.insecure ~= "0") and true or nil,serverName=server.tls_host,} or nil, + tlsSettings = (server.tls == '1' and server.xtls ~= '1') and {allowInsecure = (server.insecure ~= "0") and true or nil,serverName=server.tls_host,} or nil, xtlsSettings = (server.xtls == '1') and {allowInsecure = (server.insecure ~= "0") and true or nil,serverName=server.tls_host,} or nil, tcpSettings = (server.transport == "tcp" and server.tcp_guise == "http") and { header = {