diff --git a/admin/bottom/Makefile b/admin/bottom/Makefile index bdd049a29..556b11b23 100644 --- a/admin/bottom/Makefile +++ b/admin/bottom/Makefile @@ -17,6 +17,7 @@ PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/rust/rust-package.mk diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile index 9612566fa..829142fbe 100644 --- a/admin/syslog-ng/Makefile +++ b/admin/syslog-ng/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=syslog-ng -PKG_VERSION:=4.3.1 +PKG_VERSION:=4.4.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Josef Schlehofer @@ -11,7 +11,7 @@ PKG_CPE_ID:=cpe:/a:balabit:syslog-ng PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/syslog-ng/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ -PKG_HASH:=999dbab62982c3cffba02c0be22c596ee1ce81d6954689dc9b3a6afeb513cce3 +PKG_HASH:=583b147f3ec17fbc2dbbf31aafb1e3966237d7541313de5b41ea885dc16d932e PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 diff --git a/admin/syslog-ng/files/syslog-ng.conf b/admin/syslog-ng/files/syslog-ng.conf index d4ce83b54..92574be61 100644 --- a/admin/syslog-ng/files/syslog-ng.conf +++ b/admin/syslog-ng/files/syslog-ng.conf @@ -4,7 +4,7 @@ # More details about these settings can be found here: # https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition -@version: 4.3 +@version: 4.4 @include "scl.conf" options { diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index e91f34654..094dea2b1 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk GO_VERSION_MAJOR_MINOR:=1.21 -GO_VERSION_PATCH:=1 +GO_VERSION_PATCH:=3 PKG_NAME:=golang PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH)) @@ -20,7 +20,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \ PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz PKG_SOURCE_URL:=$(GO_SOURCE_URLS) -PKG_HASH:=bfa36bf75e9a1e9cbbdb9abcf9d1707e479bd3a07880a8ae3564caee5711cb99 +PKG_HASH:=186f2b6f8c8b704e696821b09ab2041a5c1ee13dcbc3156a13adcf75931ee488 PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=BSD-3-Clause diff --git a/lang/lua-eco/Makefile b/lang/lua-eco/Makefile index 4649474af..95b9fd38f 100644 --- a/lang/lua-eco/Makefile +++ b/lang/lua-eco/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-eco -PKG_VERSION:=3.0.0 +PKG_VERSION:=3.0.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL=https://github.com/zhaojh329/lua-eco/releases/download/v$(PKG_VERSION) -PKG_HASH:=530b179af2283b7a1983643794f3b6de936317fe3c23a9dca4f7828dec6f7e46 +PKG_HASH:=96f008932e319739df2fe99dc1cba7e9a1a389015a4b96ad0f63d95bb6422b09 PKG_MAINTAINER:=Jianhui Zhao PKG_LICENSE:=MIT diff --git a/lang/luajit2/Makefile b/lang/luajit2/Makefile index 86dc28018..756381374 100644 --- a/lang/luajit2/Makefile +++ b/lang/luajit2/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luajit2 -PKG_VERSION:=2.1-20230410 +PKG_VERSION:=2.1-20231006 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/openresty/luajit2/archive/refs/tags/v$(PKG_VERSION).tar.gz? -PKG_HASH:=77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff +PKG_HASH:=41530b3f00d3f284e771cfd09add2a0c672f1214f8780644ca9261da9e4d9310 PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=MIT diff --git a/lang/luajit2/patches/010-lua-path.patch b/lang/luajit2/patches/010-lua-path.patch index f752002d2..dccdee214 100644 --- a/lang/luajit2/patches/010-lua-path.patch +++ b/lang/luajit2/patches/010-lua-path.patch @@ -8,6 +8,6 @@ -#define LUA_LUADIR "/lua/5.1/" +#define LUA_LROOT "/usr" +#define LUA_LUADIR "/lua/" - #define LUA_LJDIR "/luajit-2.1.0-beta3/" + #define LUA_LJDIR "/luajit-2.1/" #ifdef LUA_ROOT diff --git a/lang/node/Makefile b/lang/node/Makefile index a58b3286d..e93590b5d 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=node -PKG_VERSION:=v18.18.0 +PKG_VERSION:=v18.18.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION) -PKG_HASH:=e4d4dbac3634d99f892f00db47da78f98493c339582e8a95fb2dd59f5cfe0f90 +PKG_HASH:=7249e2f0af943ec38599504f4b2a2bd31fb938787291b6ccca6c8badf01e3b56 PKG_MAINTAINER:=Hirokazu MORIKAWA , Adrian Panella PKG_LICENSE:=MIT diff --git a/lang/perl-text-csv_xs/Makefile b/lang/perl-text-csv_xs/Makefile index 1ada02fdd..eac0257f6 100644 --- a/lang/perl-text-csv_xs/Makefile +++ b/lang/perl-text-csv_xs/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-text-csv_xs -PKG_VERSION:=1.51 +PKG_VERSION:=1.52 PKG_RELEASE:=1 PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/H/HM/HMBRAND -PKG_HASH:=b1831d4d5f90ec6ad7f111a2e4bc5ca6dce7d17d7e57f17ace42b0f3ca140372 +PKG_HASH:=e415aa705badf84b359dc4c0f0c982f1bf708481daa14756f3136e7c89c0e41d PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Text-CSV_XS-$(PKG_VERSION) PKG_MAINTAINER:=Philip Prindeville diff --git a/lang/php8/Makefile b/lang/php8/Makefile index f1977ee48..56e77c7ca 100644 --- a/lang/php8/Makefile +++ b/lang/php8/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=8.2.10 +PKG_VERSION:=8.2.11 PKG_RELEASE:=1 PKG_MAINTAINER:=Michael Heimpold @@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_HASH:=561dc4acd5386e47f25be76f2c8df6ae854756469159248313bcf276e282fbb3 +PKG_HASH:=29af82e4f7509831490552918aad502697453f0869a579ee1b80b08f9112c5b8 PKG_BUILD_PARALLEL:=1 PKG_BUILD_FLAGS:=no-mips16 diff --git a/lang/php8/patches/0025-php-5.4.9-fixheader.patch b/lang/php8/patches/0025-php-5.4.9-fixheader.patch index 2929c2222..0268f3718 100644 --- a/lang/php8/patches/0025-php-5.4.9-fixheader.patch +++ b/lang/php8/patches/0025-php-5.4.9-fixheader.patch @@ -9,7 +9,7 @@ Make generated php_config.h constant across rebuilds. --- a/configure.ac +++ b/configure.ac -@@ -1455,7 +1455,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS) +@@ -1451,7 +1451,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS) EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" diff --git a/lang/php8/patches/1004-disable-phar-command.patch b/lang/php8/patches/1004-disable-phar-command.patch index f6b3a10e3..2f24f968d 100644 --- a/lang/php8/patches/1004-disable-phar-command.patch +++ b/lang/php8/patches/1004-disable-phar-command.patch @@ -11,7 +11,7 @@ --- a/configure.ac +++ b/configure.ac -@@ -1638,13 +1638,13 @@ CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)" +@@ -1634,13 +1634,13 @@ CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)" CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag" CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)" diff --git a/lang/python/pymysql/Config.in b/lang/python/pymysql/Config.in deleted file mode 100644 index 0dfa265b0..000000000 --- a/lang/python/pymysql/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -menu "Configuration" - depends on PACKAGE_python3-pymysql - -config PYTHON3_PYMYSQL_SHA_PASSWORD_SUPPORT - bool "Enable support for SHA password authentication" - help - To use “sha256_password” or “caching_sha2_password” for authentication - this symbol needs to be enabled, to also install python3-cryptography. - default n - -endmenu diff --git a/lang/python/pymysql/Makefile b/lang/python/pymysql/Makefile index d5187bd57..025a97adc 100644 --- a/lang/python/pymysql/Makefile +++ b/lang/python/pymysql/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pymysql PKG_VERSION:=1.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=PyMySQL PKG_HASH:=4f13a7df8bf36a51e81dd9f3605fede45a4878fe02f9236349fd82a3f0612f96 @@ -24,23 +24,40 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -define Package/python3-pymysql +define Package/python3-pymysql/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Pure Python MySQL Client URL:=https://pymysql.readthedocs.io/ - DEPENDS:=+python3 +PYTHON3_PYMYSQL_SHA_PASSWORD_SUPPORT:python3-cryptography endef -define Package/python3-pymysql/config - source "$(SOURCE)/Config.in" +define Package/python3-pymysql +$(call Package/python3-pymysql/Default) + DEPENDS:=+python3 endef define Package/python3-pymysql/description This package contains a pure-Python MySQL client library, based on PEP 249. endef +define Package/python3-pymysql-sha-pwd +$(call Package/python3-pymysql/Default) + TITLE+=w/ SHA256 password auth + DEPENDS:=+python3-pymysql $(RUST_ARCH_DEPENDS) +PACKAGE_python3-pymysql-sha-pwd:python3-cryptography +endef + +define Package/python3-pymysql-sha-pwd/description + This is a meta-package installing python3-pymysql and python3-cryptography + packages to be able to use pymysql with “sha256_password” or + “caching_sha2_password” for authentication. +endef + +define Package/python3-pymysql-sha-pwd/install + true +endef + $(eval $(call Py3Package,python3-pymysql)) $(eval $(call BuildPackage,python3-pymysql)) $(eval $(call BuildPackage,python3-pymysql-src)) +$(eval $(call BuildPackage,python3-pymysql-sha-pwd)) diff --git a/lang/maturin/Makefile b/lang/python/python-maturin/Makefile similarity index 51% rename from lang/maturin/Makefile rename to lang/python/python-maturin/Makefile index e1c7ca50f..67bb1e0ab 100644 --- a/lang/maturin/Makefile +++ b/lang/python/python-maturin/Makefile @@ -4,39 +4,48 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=maturin -PKG_VERSION:=0.14.15 +PKG_NAME:=python-maturin +PKG_VERSION:=1.3.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/PyO3/maturin/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=60cbf8ff73a36333c3f5483ca679a52169839db381f06683d8e61a6c00c28cf7 +PYPI_NAME:=maturin +PKG_HASH:=f6c69bc7ae147a5effd55587447b35cab1ceb726ba244d08698bc7518b8688ac PKG_MAINTAINER:=Luca Barbato PKG_LICENSE:=Apache-2.0 MIT PKG_LICENSE_FILES:=license-apache license-mit -HOST_BUILD_DEPENDS:=rust/host +HOST_BUILD_DEPENDS:= \ + python3/host \ + python-build/host \ + python-installer/host \ + python-wheel/host \ + python-setuptools-rust/host +HOST_BUILD_PARALLEL:=1 PKG_HOST_ONLY:=1 +include ../pypi.mk include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk -include ../rust/rust-host-build.mk +include ../python3-package.mk +include ../python3-host-build.mk -define Package/maturin +define Package/python3-maturin SECTION:=lang CATEGORY:=Languages - SUBMENU:=Rust + SUBMENU:=Python TITLE:=Build and publish crates as python packages DEPENDS:=$(RUST_ARCH_DEPENDS) URL:=https://maturin.rs + BUILDONLY:=1 endef -define Package/maturin/description +define Package/python3-maturin/description Build and publish crates with pyo3, rust-cpython, cffi and uniffi bindings as well as rust binaries as python packages. endef -$(eval $(call RustBinHostBuild)) $(eval $(call HostBuild)) -$(eval $(call BuildPackage,maturin)) +$(eval $(call Py3Package,python3-maturin)) +$(eval $(call BuildPackage,python3-maturin)) +$(eval $(call BuildPackage,python3-maturin-src)) diff --git a/lang/python/python-pycares/Makefile b/lang/python/python-pycares/Makefile index c3516f73f..f16e2b1e3 100644 --- a/lang/python/python-pycares/Makefile +++ b/lang/python/python-pycares/Makefile @@ -2,11 +2,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pycares -PKG_VERSION:=4.3.0 -PKG_RELEASE:=2 +PKG_VERSION:=4.4.0 +PKG_RELEASE:=1 PYPI_NAME:=pycares -PKG_HASH:=c542696f6dac978e9d99192384745a65f80a7d9450501151e4a7563e06010d45 +PKG_HASH:=f47579d508f2f56eddd16ce72045782ad3b1b3b678098699e2b6a1b30733e1c2 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/lang/python/python-setuptools-rust/Makefile b/lang/python/python-setuptools-rust/Makefile index 19325c1fd..00a243bee 100644 --- a/lang/python/python-setuptools-rust/Makefile +++ b/lang/python/python-setuptools-rust/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-setuptools-rust PKG_VERSION:=1.7.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=setuptools-rust PKG_HASH:=c7100999948235a38ae7e555fe199aa66c253dc384b125f5d85473bf81eae3a3 diff --git a/lang/python/python-setuptools-rust/patches/0001-Allow-profile-to-be-set-by-SETUPTOOLS_RUST_CARGO_PROFILE-env-variable.patch b/lang/python/python-setuptools-rust/patches/0001-Allow-profile-to-be-set-by-SETUPTOOLS_RUST_CARGO_PROFILE-env-variable.patch new file mode 100644 index 000000000..842bc4019 --- /dev/null +++ b/lang/python/python-setuptools-rust/patches/0001-Allow-profile-to-be-set-by-SETUPTOOLS_RUST_CARGO_PROFILE-env-variable.patch @@ -0,0 +1,48 @@ +From b10cab4efeb80abb5a236d651c9ff9355e470527 Mon Sep 17 00:00:00 2001 +From: Jeffery To +Date: Mon, 2 Oct 2023 16:13:51 +0800 +Subject: [PATCH] Allow profile to be set by SETUPTOOLS_RUST_CARGO_PROFILE env + variable + +This allows the profile to be set dynamically, without having to edit +pyproject.toml/setup.py. +--- + setuptools_rust/build.py | 20 ++++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +--- a/setuptools_rust/build.py ++++ b/setuptools_rust/build.py +@@ -528,10 +528,10 @@ class build_rust(RustCommand): + if target_triple is not None: + args.extend(["--target", target_triple]) + +- if release: +- profile = ext.get_cargo_profile() +- if not profile: +- args.append("--release") ++ ext_profile = ext.get_cargo_profile() ++ env_profile = os.getenv("SETUPTOOLS_RUST_CARGO_PROFILE") ++ if release and not ext_profile and not env_profile: ++ args.append("--release") + + if quiet: + args.append("-q") +@@ -552,6 +552,18 @@ class build_rust(RustCommand): + if ext.args is not None: + args.extend(ext.args) + ++ if env_profile: ++ if ext_profile: ++ args = [p for p in args if not p.startswith("--profile=")] ++ while True: ++ try: ++ index = args.index("--profile") ++ del args[index:index + 2] ++ except ValueError: ++ break ++ ++ args.extend(["--profile", env_profile]) ++ + if ext.cargo_manifest_args is not None: + args.extend(ext.cargo_manifest_args) + diff --git a/lang/python/python-texttable/Makefile b/lang/python/python-texttable/Makefile index 98f6ec98e..20fec724c 100644 --- a/lang/python/python-texttable/Makefile +++ b/lang/python/python-texttable/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-texttable -PKG_VERSION:=1.6.7 +PKG_VERSION:=1.7.0 PKG_RELEASE:=1 PYPI_NAME:=texttable -PKG_HASH:=290348fb67f7746931bcdfd55ac7584ecd4e5b0846ab164333f0794b121760f2 +PKG_HASH:=2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638 PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=MIT diff --git a/lang/python/python-twisted/Makefile b/lang/python/python-twisted/Makefile index 1b54cb0c4..5befac2b3 100644 --- a/lang/python/python-twisted/Makefile +++ b/lang/python/python-twisted/Makefile @@ -9,11 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-twisted -PKG_VERSION:=22.10.0 +PKG_VERSION:=23.8.0 PKG_RELEASE:=1 PYPI_NAME:=Twisted -PKG_HASH:=32acbd40a94f5f46e7b42c109bfae2b302250945561783a8b7a059048f2d4d31 +PYPI_SOURCE_NAME:=twisted +PKG_HASH:=3c73360add17336a622c0d811c2a2ce29866b6e59b1125fd6509b17252098a24 PKG_BUILD_DEPENDS:=libtirpc @@ -22,7 +23,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted -PKG_BUILD_DEPENDS:=python-incremental/host +PKG_BUILD_DEPENDS:=python-hatchling/host python-hatch-fancy-pypi-readme/host python-incremental/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk @@ -45,8 +46,6 @@ define Package/python3-twisted +python3-hyperlink \ +python3-idna \ +python3-incremental \ - +python3-pkg-resources \ - +python3-pyasn1 \ +python3-pyopenssl \ +python3-service-identity \ +python3-typing-extensions \ @@ -55,12 +54,8 @@ endef define Package/python3-twisted/description Twisted is a networking engine written in Python, supporting numerous -protocols. It contains a web server, numerous chat clients, chat servers, -mail servers, and more. -endef - -define Build/Configure - $(SED) 's/^version = attr: twisted.__version__$$$$/version = $(PKG_VERSION)/' $(PKG_BUILD_DIR)/setup.cfg +protocols. It contains a web server, numerous chat clients, chat +servers, mail servers, and more. endef define Py3Package/python3-twisted/filespec diff --git a/lang/python/python-twisted/patches/001-omit-tkconch.patch b/lang/python/python-twisted/patches/001-omit-tkconch.patch index a1a37771b..bf8873f41 100644 --- a/lang/python/python-twisted/patches/001-omit-tkconch.patch +++ b/lang/python/python-twisted/patches/001-omit-tkconch.patch @@ -1,13 +1,13 @@ ---- a/setup.cfg -+++ b/setup.cfg -@@ -115,7 +115,6 @@ console_scripts = - conch = twisted.conch.scripts.conch:run - mailmail = twisted.mail.scripts.mailmail:run - pyhtmlizer = twisted.scripts.htmlizer:run -- tkconch = twisted.conch.scripts.tkconch:run - trial = twisted.scripts.trial:run - twist = twisted.application.twist._twist:Twist.main - twistd = twisted.scripts.twistd:run +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -150,7 +150,6 @@ ckeygen = "twisted.conch.scripts.ckeygen + conch = "twisted.conch.scripts.conch:run" + mailmail = "twisted.mail.scripts.mailmail:run" + pyhtmlizer = "twisted.scripts.htmlizer:run" +-tkconch = "twisted.conch.scripts.tkconch:run" + trial = "twisted.scripts.trial:run" + twist = "twisted.application.twist._twist:Twist.main" + twistd = "twisted.scripts.twistd:run" --- a/src/twisted/python/twisted-completion.zsh +++ b/src/twisted/python/twisted-completion.zsh @@ -1,4 +1,4 @@ diff --git a/lang/python/python-twisted/patches/002-omit-tests.patch b/lang/python/python-twisted/patches/002-omit-tests.patch index 3ec59fd48..841b5e09e 100644 --- a/lang/python/python-twisted/patches/002-omit-tests.patch +++ b/lang/python/python-twisted/patches/002-omit-tests.patch @@ -1,20 +1,10 @@ ---- a/setup.cfg -+++ b/setup.cfg -@@ -107,6 +107,9 @@ mypy = +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -194,6 +194,7 @@ exclude = [ + "*.pxi", + "*.pyx", + "build.bat", ++ "test", + ] - [options.packages.find] - where = src -+exclude = -+ *.test -+ *.test.* - - [options.entry_points] - console_scripts = -@@ -126,6 +129,7 @@ console_scripts = - *.pxi - *.pyx - build.bat -+ test/* - - [flake8] - disable-noqa = True + [tool.hatch.build.targets.sdist] diff --git a/lang/python/python-twisted/test.sh b/lang/python/python-twisted/test.sh new file mode 100644 index 000000000..3b9310791 --- /dev/null +++ b/lang/python/python-twisted/test.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ "$1" = python3-twisted ] || exit 0 + +python3 -c 'from twisted.internet import reactor' diff --git a/lang/python/python-websocket-client/Makefile b/lang/python/python-websocket-client/Makefile index 3044b2eb5..c3173ce1e 100644 --- a/lang/python/python-websocket-client/Makefile +++ b/lang/python/python-websocket-client/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-websocket-client -PKG_VERSION:=1.6.2 +PKG_VERSION:=1.6.4 PKG_RELEASE:=1 PYPI_NAME:=websocket-client -PKG_HASH:=53e95c826bf800c4c465f50093a8c4ff091c7327023b10bfaff40cf1ef170eaa +PKG_HASH:=b3324019b3c28572086c4a319f91d1dcd44e6e11cd340232978c684a7650d0df PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=Apache-2.0 diff --git a/lang/python/python-zope-interface/Makefile b/lang/python/python-zope-interface/Makefile index d1fb831d0..81eac63f9 100644 --- a/lang/python/python-zope-interface/Makefile +++ b/lang/python/python-zope-interface/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-zope-interface -PKG_VERSION:=6.0 +PKG_VERSION:=6.1 PKG_RELEASE:=1 PYPI_NAME:=zope.interface -PKG_HASH:=aab584725afd10c710b8f1e6e208dbee2d0ad009f57d674cb9d1b3964037275d +PKG_HASH:=2fdc7ccbd6eb6b7df5353012fbed6c3c5d04ceaca0038f75e601060e95345309 PKG_LICENSE:=ZPL-2.1 PKG_LICENSE_FILES:=LICENSE.txt @@ -29,7 +29,7 @@ define Package/python3-zope-interface SUBMENU:=Python TITLE:=Interfaces for Python URL:=https://github.com/zopefoundation/zope.interface - DEPENDS:=+python3-light + DEPENDS:=+python3-light +python3-logging endef define Package/python3-zope-interface/description diff --git a/lang/python/python-zope-interface/patches/001-omit-tests.patch b/lang/python/python-zope-interface/patches/001-omit-tests.patch index 364ae216f..40aed6e2b 100644 --- a/lang/python/python-zope-interface/patches/001-omit-tests.patch +++ b/lang/python/python-zope-interface/patches/001-omit-tests.patch @@ -1,6 +1,6 @@ --- a/setup.py +++ b/setup.py -@@ -124,7 +124,7 @@ setup(name='zope.interface', +@@ -125,7 +125,7 @@ setup(name='zope.interface', "Framework :: Zope :: 3", "Topic :: Software Development :: Libraries :: Python Modules", ], @@ -9,7 +9,7 @@ package_dir={'': 'src'}, namespace_packages=["zope"], cmdclass={ -@@ -132,6 +132,7 @@ setup(name='zope.interface', +@@ -133,6 +133,7 @@ setup(name='zope.interface', }, test_suite='zope.interface.tests', include_package_data=True, diff --git a/lang/python/python-zope-interface/test.sh b/lang/python/python-zope-interface/test.sh new file mode 100644 index 000000000..48123771c --- /dev/null +++ b/lang/python/python-zope-interface/test.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ "$1" = python3-zope-interface ] || exit 0 + +python3 -c 'import zope.interface' diff --git a/lang/python/python3-host.mk b/lang/python/python3-host.mk index ca5cb64ba..3cc20c2ce 100644 --- a/lang/python/python3-host.mk +++ b/lang/python/python3-host.mk @@ -78,8 +78,8 @@ HOST_PYTHON3_VARS = \ CFLAGS="$(HOST_CFLAGS)" \ CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \ LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib" \ - CARGO_HOME="$(CARGO_HOME)" \ - PATH="$(CARGO_HOME)/bin:$(PATH)" + $(CARGO_HOST_CONFIG_VARS) \ + SETUPTOOLS_RUST_CARGO_PROFILE="$(CARGO_HOST_PROFILE)" # $(1) => directory of python script # $(2) => python script and its arguments diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk index 0693d21ee..3300f1bea 100644 --- a/lang/python/python3-package.mk +++ b/lang/python/python3-package.mk @@ -45,11 +45,9 @@ PYTHON3_VARS = \ _python_sysroot="$(STAGING_DIR)" \ _python_prefix="/usr" \ _python_exec_prefix="/usr" \ - CARGO_BUILD_TARGET="$(RUSTC_TARGET_ARCH)" \ - CARGO_HOME="$(CARGO_HOME)" \ - PATH="$(CARGO_HOME)/bin:$(PATH)" \ + $(CARGO_PKG_CONFIG_VARS) \ PYO3_CROSS_LIB_DIR="$(PYTHON3_LIB_DIR)" \ - RUSTFLAGS="$(CARGO_RUSTFLAGS)" + SETUPTOOLS_RUST_CARGO_PROFILE="$(CARGO_PKG_PROFILE)" # $(1) => directory of python script # $(2) => python script and its arguments diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index 4e503fb6e..5712e0f1d 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,7 +8,7 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=11 -PYTHON3_VERSION_MICRO:=5 +PYTHON3_VERSION_MICRO:=6 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index a54d02704..c55570576 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -16,7 +16,7 @@ PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=85cd12e9cf1d6d5a45f17f7afe1cebe7ee628d3282281c492e86adf636defa3f +PKG_HASH:=0fab78fa7f133f4f38210c6260d90d7c0d5c7198446419ce057ec7ac2e6f5f38 PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=Python-2.0.1 0BSD @@ -358,12 +358,6 @@ endef $(eval $(call HostBuild)) -$(foreach package, $(PYTHON3_PACKAGES), \ - $(eval $(call Py3Package,$(package))) \ - $(eval $(call BuildPackage,$(package))) \ - $(eval $(call BuildPackage,$(package)-src)) \ -) - $(eval $(call BuildPackage,libpython3)) $(eval $(call BuildPackage,python3)) @@ -375,3 +369,9 @@ $(eval $(call BuildPackage,python3-light)) $(eval $(call BuildPackage,python3-base-src)) $(eval $(call BuildPackage,python3-light-src)) + +$(foreach package, $(PYTHON3_PACKAGES), \ + $(eval $(call Py3Package,$(package))) \ + $(eval $(call BuildPackage,$(package))) \ + $(eval $(call BuildPackage,$(package)-src)) \ +) diff --git a/lang/python/python3/patches/003-do-not-run-compileall.patch b/lang/python/python3/patches/003-do-not-run-compileall.patch index 9bb10fac7..ed79314f0 100644 --- a/lang/python/python3/patches/003-do-not-run-compileall.patch +++ b/lang/python/python3/patches/003-do-not-run-compileall.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2123,6 +2123,7 @@ libinstall: all $(srcdir)/Modules/xxmodu +@@ -2128,6 +2128,7 @@ libinstall: all $(srcdir)/Modules/xxmodu $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi @@ -8,7 +8,7 @@ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST) -f \ -@@ -2150,6 +2151,7 @@ libinstall: all $(srcdir)/Modules/xxmodu +@@ -2155,6 +2156,7 @@ libinstall: all $(srcdir)/Modules/xxmodu $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ -j0 -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages diff --git a/lang/python/python3/patches/025-choose-python-config-version.patch b/lang/python/python3/patches/025-choose-python-config-version.patch index aa56d8942..ca484f97b 100644 --- a/lang/python/python3/patches/025-choose-python-config-version.patch +++ b/lang/python/python3/patches/025-choose-python-config-version.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2168,7 +2168,7 @@ python-config: $(srcdir)/Misc/python-con +@@ -2173,7 +2173,7 @@ python-config: $(srcdir)/Misc/python-con @ # On Darwin, always use the python version of the script, the shell @ # version doesn't use the compiler customizations that are provided @ # in python (_osx_support.py). diff --git a/lang/rust/Config.in b/lang/rust/Config.in new file mode 100644 index 000000000..62051af13 --- /dev/null +++ b/lang/rust/Config.in @@ -0,0 +1,15 @@ +menu "Configuration options (for developers)" + +config RUST_SCCACHE + bool "Use sccache" + help + Shared compilation cache; see https://github.com/mozilla/sccache + +config RUST_SCCACHE_DIR + string "Set sccache directory" if RUST_SCCACHE + default "" + help + Store sccache in this directory. + If not set, uses './.sccache' + +endmenu diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 096b225c3..f3189b5bf 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -5,19 +5,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rust -PKG_VERSION:=1.72.0 -PKG_RELEASE:=2 +PKG_VERSION:=1.73.0 +PKG_RELEASE:=1 PKG_SOURCE:=rustc-$(PKG_VERSION)-src.tar.gz PKG_SOURCE_URL:=https://static.rust-lang.org/dist/ -PKG_HASH:=ea9d61bbb51d76b6ea681156f69f0e0596b59722f04414b01c6e100b4b5be3a1 +PKG_HASH:=96d62e6d1f2d21df7ac8acb3b9882411f9e7c7036173f7f2ede9e1f1f6b1bb3a HOST_BUILD_DIR:=$(BUILD_DIR)/host/rustc-$(PKG_VERSION)-src PKG_MAINTAINER:=Luca Barbato PKG_LICENSE:=Apache-2.0 MIT PKG_LICENSE_FILES:=LICENSE-APACHE LICENSE-MIT -HOST_BUILD_DEPENDS:=python3/host PKG_HOST_ONLY:=1 include $(INCLUDE_DIR)/host-build.mk @@ -31,7 +30,6 @@ define Package/rust TITLE:=Rust Programming Language Compiler URL:=https://www.rust-lang.org/ DEPENDS:=$(RUST_ARCH_DEPENDS) - BUILDONLY:=1 endef define Package/rust/description @@ -40,8 +38,12 @@ define Package/rust/description guarantee memory safety by using a borrow checker to validate references. endef +define Package/rust/config + source "$(SOURCE)/Config.in" +endef + # Rust-lang has an uninstall script -RUST_UNINSTALL:=$(CARGO_HOME)/lib/rustlib/uninstall.sh +RUST_UNINSTALL:=$(STAGING_DIR)/host/lib/rustlib/uninstall.sh # Target Flags TARGET_CONFIGURE_ARGS = \ @@ -50,23 +52,24 @@ TARGET_CONFIGURE_ARGS = \ --set=target.$(RUSTC_TARGET_ARCH).cxx=$(TARGET_CXX_NOCACHE) \ --set=target.$(RUSTC_TARGET_ARCH).linker=$(TARGET_CC_NOCACHE) \ --set=target.$(RUSTC_TARGET_ARCH).ranlib=$(TARGET_RANLIB) \ + --set=target.$(RUSTC_TARGET_ARCH).crt-static=false \ $(if $(CONFIG_USE_MUSL),--set=target.$(RUSTC_TARGET_ARCH).musl-root=$(TOOLCHAIN_DIR)) # CARGO_HOME is an environmental -HOST_CONFIGURE_OPTS += CARGO_HOME="$(CARGO_HOME)" +HOST_CONFIGURE_VARS += CARGO_HOME="$(CARGO_HOME)" # Rust Configuration Arguments HOST_CONFIGURE_ARGS = \ --build=$(RUSTC_HOST_ARCH) \ --target=$(RUSTC_TARGET_ARCH),$(RUSTC_HOST_ARCH) \ --host=$(RUSTC_HOST_ARCH) \ - --prefix=$(CARGO_HOME) \ - --bindir=$(CARGO_HOME)/bin \ - --libdir=$(CARGO_HOME)/lib \ - --sysconfdir=$(CARGO_HOME)/etc \ - --datadir=$(CARGO_HOME)/share \ - --mandir=$(CARGO_HOME)/man \ - --dist-compression-formats=xz \ + --prefix=$(STAGING_DIR)/host \ + --bindir=$(STAGING_DIR)/host/bin \ + --libdir=$(STAGING_DIR)/host/lib \ + --sysconfdir=$(STAGING_DIR)/host/etc \ + --datadir=$(STAGING_DIR)/host/share \ + --mandir=$(STAGING_DIR)/host/man \ + --dist-compression-formats=gz \ --enable-missing-tools \ --disable-sanitizers \ --release-channel=stable \ @@ -81,22 +84,23 @@ define Host/Uninstall endef define Host/Compile - ( \ - cd $(HOST_BUILD_DIR) ; \ - $(PYTHON) x.py --config ./config.toml dist build-manifest cargo llvm-tools \ - rustc rust-std rust-src ; \ - ) + $(RUST_SCCACHE_VARS) \ + CARGO_HOME=$(CARGO_HOME) \ + OPENWRT_RUSTC_BOOTSTRAP_CACHE=$(DL_DIR)/rustc \ + $(PYTHON) $(HOST_BUILD_DIR)/x.py \ + --build-dir $(HOST_BUILD_DIR)/build \ + --config $(HOST_BUILD_DIR)/config.toml \ + dist build-manifest cargo llvm-tools rustc rust-std rust-src endef define Host/Install ( \ cd $(HOST_BUILD_DIR)/build/dist ; \ - find -iname "*.xz" -exec tar -xJf {} \; ; \ - find ./* -type f -name install.sh -execdir sh {} --prefix=$(CARGO_HOME) --disable-ldconfig \; ; \ - \ - sed -e 's|@RUSTC_TARGET_ARCH@|$(RUSTC_TARGET_ARCH)|g' \ - -e 's|@TARGET_CC_NOCACHE@|$(TARGET_CC_NOCACHE)|g' \ - $(CURDIR)/files/cargo-config > $(CARGO_HOME)/config.toml ; \ + for targz in *.tar.gz; do \ + $(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc "$$$$targz" | tar -xf - ; \ + done ; \ + find . -mindepth 2 -maxdepth 2 -type f -name install.sh \ + -execdir bash '{}' --prefix=$(STAGING_DIR)/host --disable-ldconfig \; ; \ ) endef diff --git a/lang/rust/files/cargo-config b/lang/rust/files/cargo-config deleted file mode 100644 index 2f490dc58..000000000 --- a/lang/rust/files/cargo-config +++ /dev/null @@ -1,7 +0,0 @@ -[target.@RUSTC_TARGET_ARCH@] -linker = "@TARGET_CC_NOCACHE@" - -[profile.stripped] -inherits = "release" -opt-level = "s" -strip = true diff --git a/lang/rust/patches/0001-Update-xz2-and-use-it-static.patch b/lang/rust/patches/0001-Update-xz2-and-use-it-static.patch index c5266669d..f2a40f76b 100644 --- a/lang/rust/patches/0001-Update-xz2-and-use-it-static.patch +++ b/lang/rust/patches/0001-Update-xz2-and-use-it-static.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Update xz2 and use it static --- a/src/bootstrap/Cargo.lock +++ b/src/bootstrap/Cargo.lock -@@ -430,9 +430,9 @@ dependencies = [ +@@ -434,9 +434,9 @@ dependencies = [ [[package]] name = "lzma-sys" @@ -23,7 +23,7 @@ Subject: [PATCH] Update xz2 and use it static dependencies = [ "cc", "libc", -@@ -899,9 +899,9 @@ dependencies = [ +@@ -903,9 +903,9 @@ dependencies = [ [[package]] name = "xz2" diff --git a/lang/rust/patches/0002-rustc-bootstrap-cache.patch b/lang/rust/patches/0002-rustc-bootstrap-cache.patch new file mode 100644 index 000000000..9f434fc8d --- /dev/null +++ b/lang/rust/patches/0002-rustc-bootstrap-cache.patch @@ -0,0 +1,37 @@ +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -546,7 +546,7 @@ class RustBuild(object): + shutil.rmtree(bin_root) + + key = self.stage0_compiler.date +- cache_dst = os.path.join(self.build_dir, "cache") ++ cache_dst = os.getenv('OPENWRT_RUSTC_BOOTSTRAP_CACHE', os.path.join(self.build_dir, "cache")) + rustc_cache = os.path.join(cache_dst, key) + if not os.path.exists(rustc_cache): + os.makedirs(rustc_cache) +--- a/src/bootstrap/download.rs ++++ b/src/bootstrap/download.rs +@@ -520,7 +520,10 @@ impl Config { + key: &str, + destination: &str, + ) { +- let cache_dst = self.out.join("cache"); ++ let cache_dst = match env::var_os("OPENWRT_RUSTC_BOOTSTRAP_CACHE") { ++ Some(v) => PathBuf::from(v), ++ None => self.out.join("cache"), ++ }; + let cache_dir = cache_dst.join(key); + if !cache_dir.exists() { + t!(fs::create_dir_all(&cache_dir)); +@@ -647,7 +650,10 @@ download-rustc = false + let llvm_assertions = self.llvm_assertions; + + let cache_prefix = format!("llvm-{llvm_sha}-{llvm_assertions}"); +- let cache_dst = self.out.join("cache"); ++ let cache_dst = match env::var_os("OPENWRT_RUSTC_BOOTSTRAP_CACHE") { ++ Some(v) => PathBuf::from(v), ++ None => self.out.join("cache"), ++ }; + let rustc_cache = cache_dst.join(cache_prefix); + if !rustc_cache.exists() { + t!(fs::create_dir_all(&rustc_cache)); diff --git a/lang/rust/patches/0003-bump-libc-deps-to-0.2.146.patch b/lang/rust/patches/0003-bump-libc-deps-to-0.2.146.patch new file mode 100644 index 000000000..bd1c4b589 --- /dev/null +++ b/lang/rust/patches/0003-bump-libc-deps-to-0.2.146.patch @@ -0,0 +1,156 @@ +This patch bumps all libc dependencies and checksums to 0.2.146, which includes the fix for musl 1.2.4. + +--- a/vendor/addr2line-0.20.0/Cargo.lock ++++ b/vendor/addr2line-0.20.0/Cargo.lock +@@ -246,9 +246,9 @@ checksum = "e2abad23fbc42b3700f2f279844d + + [[package]] + name = "libc" +-version = "0.2.141" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "libtest-mimic" +--- a/vendor/backtrace-0.3.67/Cargo.lock ++++ b/vendor/backtrace-0.3.67/Cargo.lock +@@ -64,9 +64,9 @@ checksum = "dec7af912d60cdbd3677c1af9352 + + [[package]] + name = "libc" +-version = "0.2.138" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "libloading" +--- a/vendor/bstr/Cargo.lock ++++ b/vendor/bstr/Cargo.lock +@@ -34,9 +34,9 @@ dependencies = [ + + [[package]] + name = "libc" +-version = "0.2.138" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "memchr" +--- a/vendor/cranelift-jit/Cargo.lock ++++ b/vendor/cranelift-jit/Cargo.lock +@@ -224,9 +224,9 @@ dependencies = [ + + [[package]] + name = "libc" +-version = "0.2.141" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "log" +--- a/vendor/crossbeam-channel/Cargo.lock ++++ b/vendor/crossbeam-channel/Cargo.lock +@@ -50,9 +50,9 @@ dependencies = [ + + [[package]] + name = "libc" +-version = "0.2.141" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "num_cpus" +--- a/vendor/elasticlunr-rs/Cargo.lock ++++ b/vendor/elasticlunr-rs/Cargo.lock +@@ -555,9 +555,9 @@ checksum = "e2abad23fbc42b3700f2f279844d + + [[package]] + name = "libc" +-version = "0.2.140" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "lindera" +--- a/vendor/handlebars/Cargo.lock ++++ b/vendor/handlebars/Cargo.lock +@@ -550,9 +550,9 @@ checksum = "e2abad23fbc42b3700f2f279844d + + [[package]] + name = "libc" +-version = "0.2.140" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "lock_api" +--- a/vendor/icu_locid/Cargo.lock ++++ b/vendor/icu_locid/Cargo.lock +@@ -318,9 +318,9 @@ checksum = "e2abad23fbc42b3700f2f279844d + + [[package]] + name = "libc" +-version = "0.2.141" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "litemap" +--- a/vendor/libffi/Cargo.lock ++++ b/vendor/libffi/Cargo.lock +@@ -10,9 +10,9 @@ checksum = "50d30906286121d95be3d479533b + + [[package]] + name = "libc" +-version = "0.2.140" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "libffi" +--- a/vendor/terminal_size/Cargo.lock ++++ b/vendor/terminal_size/Cargo.lock +@@ -47,9 +47,9 @@ dependencies = [ + + [[package]] + name = "libc" +-version = "0.2.140" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "linux-raw-sys" +--- a/vendor/tracing-tree/Cargo.lock ++++ b/vendor/tracing-tree/Cargo.lock +@@ -100,9 +100,9 @@ checksum = "e2abad23fbc42b3700f2f279844d + + [[package]] + name = "libc" +-version = "0.2.141" ++version = "0.2.146" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" ++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + + [[package]] + name = "log" diff --git a/lang/rust/rust-host-build.mk b/lang/rust/rust-host-build.mk index 39cf1f23c..e56292937 100644 --- a/lang/rust/rust-host-build.mk +++ b/lang/rust/rust-host-build.mk @@ -2,36 +2,42 @@ # # Copyright (C) 2023 Luca Barbato and Donald Hoskins +# Variables (all optional) to be set in package Makefiles: +# +# RUST_HOST_FEATURES - list of options, default empty +# +# Space or comma separated list of features to activate +# +# e.g. RUST_HOST_FEATURES:=enable-foo,with-bar + ifeq ($(origin RUST_INCLUDE_DIR),undefined) RUST_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) endif include $(RUST_INCLUDE_DIR)/rust-values.mk +CARGO_HOST_VARS= \ + $(CARGO_HOST_CONFIG_VARS) \ + CC=$(HOSTCC_NOCACHE) \ + MAKEFLAGS="$(HOST_JOBS)" + # $(1) path to the package (optional) # $(2) additional arguments to cargo (optional) define Host/Compile/Cargo - ( \ - cd $(HOST_BUILD_DIR) ; \ - export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \ - CARGO_HOME=$(CARGO_HOME) \ - CC=$(HOSTCC_NOCACHE) \ - cargo install -v \ - --profile stripped \ - $(if $(RUST_PKG_FEATURES),--features "$(RUST_PKG_FEATURES)") \ - --root $(HOST_INSTALL_DIR) \ - --path "$(if $(strip $(1)),$(strip $(1)),.)" $(2) ; \ - ) + +$(CARGO_HOST_VARS) \ + cargo install -v \ + --profile $(CARGO_HOST_PROFILE) \ + $(if $(RUST_HOST_FEATURES),--features "$(RUST_HOST_FEATURES)") \ + --root $(HOST_INSTALL_DIR) \ + --path "$(HOST_BUILD_DIR)/$(if $(strip $(1)),$(strip $(1)))" \ + $(if $(filter --jobserver%,$(HOST_JOBS)),,-j1) \ + $(2) endef define Host/Uninstall/Cargo - ( \ - cd $(HOST_BUILD_DIR) ; \ - export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \ - CARGO_HOME=$(CARGO_HOME) \ - CC=$(HOSTCC_NOCACHE) \ - cargo uninstall -v \ - --root $(HOST_INSTALL_DIR) || true ; \ - ) + +$(CARGO_HOST_VARS) \ + cargo uninstall -v \ + --root $(HOST_INSTALL_DIR) \ + || true endef define RustBinHostBuild diff --git a/lang/rust/rust-package.mk b/lang/rust/rust-package.mk index 8d30ee86c..24341d706 100644 --- a/lang/rust/rust-package.mk +++ b/lang/rust/rust-package.mk @@ -15,26 +15,22 @@ ifeq ($(origin RUST_INCLUDE_DIR),undefined) endif include $(RUST_INCLUDE_DIR)/rust-values.mk +CARGO_PKG_VARS= \ + $(CARGO_PKG_CONFIG_VARS) \ + CC=$(HOSTCC_NOCACHE) \ + MAKEFLAGS="$(PKG_JOBS)" + # $(1) path to the package (optional) # $(2) additional arguments to cargo (optional) define Build/Compile/Cargo - ( \ - cd $(PKG_BUILD_DIR) ; \ - export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \ - CARGO_HOME=$(CARGO_HOME) \ - TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUSTC_CFLAGS)" \ - TARGET_CC=$(TARGET_CC_NOCACHE) \ - CC=$(HOSTCC_NOCACHE) \ - RUSTFLAGS="$(CARGO_RUSTFLAGS)" \ - $(CARGO_VARS) \ - cargo install -v \ - --profile stripped \ - --target $(RUSTC_TARGET_ARCH) \ - $(if $(strip $(RUST_PKG_FEATURES)),--features "$(strip $(RUST_PKG_FEATURES))") \ - --root $(PKG_INSTALL_DIR) \ - --path "$(if $(strip $(1)),$(strip $(1)),.)" \ - $(2) ; \ - ) + +$(CARGO_PKG_VARS) \ + cargo install -v \ + --profile $(CARGO_PKG_PROFILE) \ + $(if $(strip $(RUST_PKG_FEATURES)),--features "$(strip $(RUST_PKG_FEATURES))") \ + --root $(PKG_INSTALL_DIR) \ + --path "$(PKG_BUILD_DIR)/$(if $(strip $(1)),$(strip $(1)))" \ + $(if $(filter --jobserver%,$(PKG_JOBS)),,-j1) \ + $(2) endef define RustBinPackage diff --git a/lang/rust/rust-values.mk b/lang/rust/rust-values.mk index dfd417340..7a4d1fcf8 100644 --- a/lang/rust/rust-values.mk +++ b/lang/rust/rust-values.mk @@ -5,8 +5,7 @@ # Rust Environmental Vars RUSTC_HOST_SUFFIX:=$(word 4, $(subst -, ,$(GNU_HOST_NAME))) RUSTC_HOST_ARCH:=$(HOST_ARCH)-unknown-linux-$(RUSTC_HOST_SUFFIX) -CARGO_HOME:=$(STAGING_DIR)/host/cargo -CARGO_VARS?= +CARGO_HOME:=$(DL_DIR)/cargo ifeq ($(CONFIG_USE_MUSL),y) # Force linking of the SSP library for musl @@ -53,6 +52,7 @@ ifeq ($(ARCH),arm) ifeq ($(CONFIG_HAS_FPU),y) RUSTC_TARGET_ARCH:=$(subst musleabi,musleabihf,$(RUSTC_TARGET_ARCH)) + RUSTC_TARGET_ARCH:=$(subst gnueabi,gnueabihf,$(RUSTC_TARGET_ARCH)) endif endif @@ -62,3 +62,37 @@ endif # Support only a subset for now. RUST_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||mips64||mips64el||mipsel||powerpc64||riscv64||x86_64) + +ifneq ($(CONFIG_RUST_SCCACHE),) + RUST_SCCACHE_DIR:=$(if $(call qstrip,$(CONFIG_RUST_SCCACHE_DIR)),$(call qstrip,$(CONFIG_RUST_SCCACHE_DIR)),$(TOPDIR)/.sccache) + + RUST_SCCACHE_VARS:= \ + CARGO_INCREMENTAL=0 \ + RUSTC_WRAPPER=sccache \ + SCCACHE_DIR=$(RUST_SCCACHE_DIR) +endif + +CARGO_HOST_CONFIG_VARS= \ + $(RUST_SCCACHE_VARS) \ + CARGO_HOME=$(CARGO_HOME) + +CARGO_HOST_PROFILE:=release + +CARGO_PKG_CONFIG_VARS= \ + $(RUST_SCCACHE_VARS) \ + CARGO_BUILD_TARGET=$(RUSTC_TARGET_ARCH) \ + CARGO_HOME=$(CARGO_HOME) \ + CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 \ + CARGO_PROFILE_RELEASE_DEBUG=false \ + CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=false \ + CARGO_PROFILE_RELEASE_LTO=true \ + CARGO_PROFILE_RELEASE_OPT_LEVEL=z \ + CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS=true \ + CARGO_PROFILE_RELEASE_PANIC=unwind \ + CARGO_PROFILE_RELEASE_RPATH=false \ + CARGO_TARGET_$(subst -,_,$(call toupper,$(RUSTC_TARGET_ARCH)))_LINKER=$(TARGET_CC_NOCACHE) \ + RUSTFLAGS="$(CARGO_RUSTFLAGS)" \ + TARGET_CC=$(TARGET_CC_NOCACHE) \ + TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUSTC_CFLAGS)" + +CARGO_PKG_PROFILE:=$(if $(CONFIG_DEBUG),dev,release) diff --git a/libs/h2o/Makefile b/libs/h2o/Makefile index 30241356f..9ff131de3 100644 --- a/libs/h2o/Makefile +++ b/libs/h2o/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=h2o PKG_VERSION:=2.2.6 -PKG_RELEASE:=14 +PKG_RELEASE:=15 PKG_SOURCE_URL:=https://codeload.github.com/h2o/h2o/tar.gz/v${PKG_VERSION}? PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/libs/h2o/patches/900-cve-2023-44487.patch b/libs/h2o/patches/900-cve-2023-44487.patch new file mode 100644 index 000000000..d5489d5a6 --- /dev/null +++ b/libs/h2o/patches/900-cve-2023-44487.patch @@ -0,0 +1,203 @@ +commit d07b601a5549798f8e500582336756e04dfd25c5 +Author: Remi Gacogne +Date: Tue Oct 10 15:47:57 2023 +0200 + + [http2] delay processing requests upon observing suspicious behavior + + Backport of 94fbc54b6c9309912fe3d53e7b63408bbe9a1b0d to v2.2.x + +--- a/include/h2o.h ++++ b/include/h2o.h +@@ -378,6 +378,10 @@ struct st_h2o_globalconf_t { + * list of callbacks + */ + h2o_protocol_callbacks_t callbacks; ++ /** ++ * milliseconds to delay processing requests when suspicious behavior is detected ++ */ ++ uint64_t dos_delay; + } http2; + + struct { +@@ -590,6 +594,10 @@ struct st_h2o_context_t { + * timeout entry used for graceful shutdown + */ + h2o_timeout_entry_t _graceful_shutdown_timeout; ++ /* ++ * dos timeout ++ */ ++ h2o_timeout_t dos_delay_timeout; + struct { + /** + * counter for http2 errors internally emitted by h2o +--- a/include/h2o/http2_internal.h ++++ b/include/h2o/http2_internal.h +@@ -179,6 +179,7 @@ struct st_h2o_http2_stream_t { + h2o_linklist_t link; + h2o_http2_scheduler_openref_t scheduler; + } _refs; ++ unsigned reset_by_peer : 1; + h2o_send_state_t send_state; /* state of the ostream, only used in push mode */ + /* placed at last since it is large and has it's own ctor */ + h2o_req_t req; +@@ -232,6 +233,13 @@ struct st_h2o_http2_conn_t { + } _write; + h2o_cache_t *push_memo; + h2o_http2_casper_t *casper; ++ /** ++ * DoS mitigation; the idea here is to delay processing requests when observing suspicious behavior ++ */ ++ struct { ++ h2o_timeout_entry_t process_delay; ++ size_t reset_budget; /* RST_STREAM frames are considered suspicious when this value goes down to zero */ ++ } dos_mitigation; + }; + + int h2o_http2_update_peer_settings(h2o_http2_settings_t *settings, const uint8_t *src, size_t len, const char **err_desc); +--- a/lib/core/config.c ++++ b/lib/core/config.c +@@ -196,6 +196,7 @@ void h2o_config_init(h2o_globalconf_t *c + config->http2.latency_optimization.min_rtt = 50; // milliseconds + config->http2.latency_optimization.max_additional_delay = 10; + config->http2.latency_optimization.max_cwnd = 65535; ++ config->http2.dos_delay = 100; /* 100ms processing delay when observing suspicious behavior */ + config->http2.callbacks = H2O_HTTP2_CALLBACKS; + // config->mimemap = h2o_mimemap_create(); + +--- a/lib/core/configurator.c ++++ b/lib/core/configurator.c +@@ -531,6 +531,12 @@ static int on_config_http2_casper(h2o_co + return 0; + } + ++ ++static int on_config_http2_dos_delay(h2o_configurator_command_t *cmd, h2o_configurator_context_t *ctx, yoml_t *node) ++{ ++ return config_timeout(cmd, node, &ctx->globalconf->http2.dos_delay); ++} ++ + static int assert_is_mimetype(h2o_configurator_command_t *cmd, yoml_t *node) + { + if (node->type != YOML_TYPE_SCALAR) { +@@ -910,6 +916,9 @@ void h2o_configurator__init_core(h2o_glo + on_config_http2_push_preload); + h2o_configurator_define_command(&c->super, "http2-casper", H2O_CONFIGURATOR_FLAG_GLOBAL | H2O_CONFIGURATOR_FLAG_HOST, + on_config_http2_casper); ++ h2o_configurator_define_command(&c->super, "http2-dos-delay", ++ H2O_CONFIGURATOR_FLAG_GLOBAL | H2O_CONFIGURATOR_FLAG_EXPECT_SCALAR, ++ on_config_http2_dos_delay); + h2o_configurator_define_command(&c->super, "file.mime.settypes", + (H2O_CONFIGURATOR_FLAG_ALL_LEVELS & ~H2O_CONFIGURATOR_FLAG_EXTENSION) | + H2O_CONFIGURATOR_FLAG_EXPECT_MAPPING, +--- a/lib/core/context.c ++++ b/lib/core/context.c +@@ -101,6 +101,7 @@ void h2o_context_init(h2o_context_t *ctx + h2o_linklist_init_anchor(&ctx->http1._conns); + h2o_timeout_init(ctx->loop, &ctx->http2.idle_timeout, config->http2.idle_timeout); + h2o_timeout_init(ctx->loop, &ctx->http2.graceful_shutdown_timeout, config->http2.graceful_shutdown_timeout); ++ h2o_timeout_init(ctx->loop, &ctx->http2.dos_delay_timeout, config->http2.dos_delay); + h2o_linklist_init_anchor(&ctx->http2._conns); + ctx->proxy.client_ctx.loop = loop; + h2o_timeout_init(ctx->loop, &ctx->proxy.io_timeout, config->proxy.io_timeout); +@@ -146,6 +147,7 @@ void h2o_context_dispose(h2o_context_t * + h2o_timeout_dispose(ctx->loop, &ctx->http1.req_timeout); + h2o_timeout_dispose(ctx->loop, &ctx->http2.idle_timeout); + h2o_timeout_dispose(ctx->loop, &ctx->http2.graceful_shutdown_timeout); ++ h2o_timeout_dispose(ctx->loop, &ctx->http2.dos_delay_timeout); + h2o_timeout_dispose(ctx->loop, &ctx->proxy.io_timeout); + /* what should we do here? assert(!h2o_linklist_is_empty(&ctx->http2._conns); */ + +--- a/lib/http2/connection.c ++++ b/lib/http2/connection.c +@@ -161,7 +161,6 @@ static void update_idle_timeout(h2o_http + h2o_timeout_unlink(&conn->_timeout_entry); + + if (conn->num_streams.pull.half_closed + conn->num_streams.push.half_closed == 0) { +- assert(h2o_linklist_is_empty(&conn->_pending_reqs)); + conn->_timeout_entry.cb = on_idle_timeout; + h2o_timeout_link(conn->super.ctx->loop, &conn->super.ctx->http2.idle_timeout, &conn->_timeout_entry); + } +@@ -175,6 +174,9 @@ static int can_run_requests(h2o_http2_co + + static void run_pending_requests(h2o_http2_conn_t *conn) + { ++ if (h2o_timeout_is_linked(&conn->dos_mitigation.process_delay)) ++ return; ++ + while (!h2o_linklist_is_empty(&conn->_pending_reqs) && can_run_requests(conn)) { + /* fetch and detach a pending stream */ + h2o_http2_stream_t *stream = H2O_STRUCT_FROM_MEMBER(h2o_http2_stream_t, _refs.link, conn->_pending_reqs.next); +@@ -226,6 +228,16 @@ void h2o_http2_conn_unregister_stream(h2 + assert(h2o_http2_scheduler_is_open(&stream->_refs.scheduler)); + h2o_http2_scheduler_close(&stream->_refs.scheduler); + ++ /* Decrement reset_budget if the stream was reset by peer, otherwise increment. By doing so, we penalize connections that ++ * generate resets for >50% of requests. */ ++ if (stream->reset_by_peer) { ++ if (conn->dos_mitigation.reset_budget > 0) ++ --conn->dos_mitigation.reset_budget; ++ } else { ++ if (conn->dos_mitigation.reset_budget < conn->super.ctx->globalconf->http2.max_concurrent_requests_per_connection) ++ ++conn->dos_mitigation.reset_budget; ++ } ++ + switch (stream->state) { + case H2O_HTTP2_STREAM_STATE_IDLE: + case H2O_HTTP2_STREAM_STATE_RECV_HEADERS: +@@ -272,6 +284,8 @@ void close_connection_now(h2o_http2_conn + h2o_hpack_dispose_header_table(&conn->_output_header_table); + assert(h2o_linklist_is_empty(&conn->_pending_reqs)); + h2o_timeout_unlink(&conn->_timeout_entry); ++ if (h2o_timeout_is_linked(&conn->dos_mitigation.process_delay)) ++ h2o_timeout_unlink(&conn->dos_mitigation.process_delay); + h2o_buffer_dispose(&conn->_write.buf); + if (conn->_write.buf_in_flight != NULL) + h2o_buffer_dispose(&conn->_write.buf_in_flight); +@@ -797,11 +811,19 @@ static int handle_rst_stream_frame(h2o_h + return H2O_HTTP2_ERROR_PROTOCOL; + } + +- stream = h2o_http2_conn_get_stream(conn, frame->stream_id); +- if (stream != NULL) { ++ if ((stream = h2o_http2_conn_get_stream(conn, frame->stream_id)) == NULL) ++ return 0; ++ + /* reset the stream */ ++ stream->reset_by_peer = 1; + h2o_http2_stream_reset(conn, stream); +- } ++ ++ /* setup process delay if we've just ran out of reset budget */ ++ if (conn->dos_mitigation.reset_budget == 0 && conn->super.ctx->globalconf->http2.dos_delay != 0 && ++ !h2o_timeout_is_linked(&conn->dos_mitigation.process_delay)) ++ h2o_timeout_link(conn->super.ctx->loop, &conn->super.ctx->http2.dos_delay_timeout, ++ &conn->dos_mitigation.process_delay); ++ + /* TODO log */ + + return 0; +@@ -1204,6 +1226,14 @@ static h2o_iovec_t log_priority_actual_w + return h2o_iovec_init(s, len); + } + ++static void on_dos_process_delay(h2o_timeout_entry_t *timer) ++{ ++ h2o_http2_conn_t *conn = H2O_STRUCT_FROM_MEMBER(h2o_http2_conn_t, dos_mitigation.process_delay, timer); ++ ++ assert(!h2o_timeout_is_linked(&conn->dos_mitigation.process_delay)); ++ run_pending_requests(conn); ++} ++ + static h2o_http2_conn_t *create_conn(h2o_context_t *ctx, h2o_hostconf_t **hosts, h2o_socket_t *sock, struct timeval connected_at) + { + static const h2o_conn_callbacks_t callbacks = { +@@ -1240,6 +1270,9 @@ static h2o_http2_conn_t *create_conn(h2o + conn->_write.timeout_entry.cb = emit_writereq; + h2o_http2_window_init(&conn->_write.window, &conn->peer_settings); + ++ conn->dos_mitigation.process_delay.cb = on_dos_process_delay; ++ conn->dos_mitigation.reset_budget = conn->super.ctx->globalconf->http2.max_concurrent_requests_per_connection; ++ + return conn; + } + diff --git a/libs/h2o/patches/901-bump-soname.patch b/libs/h2o/patches/901-bump-soname.patch new file mode 100644 index 000000000..6ae3c225b --- /dev/null +++ b/libs/h2o/patches/901-bump-soname.patch @@ -0,0 +1,35 @@ +commit e47cd15ff1fec9211088c809cb92593800dd4da2 +Author: Peter van Dijk +Date: Wed Oct 11 11:39:48 2023 +0200 + + bump soname + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,9 +29,9 @@ SET(VERSION_MINOR "2") + SET(VERSION_PATCH "6") + SET(VERSION_PRERELEASE "") + SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_PRERELEASE}") +-SET(LIBRARY_VERSION_MAJOR "0") +-SET(LIBRARY_VERSION_MINOR "13") +-SET(LIBRARY_VERSION_PATCH "6") ++SET(LIBRARY_VERSION_MAJOR "1") ++SET(LIBRARY_VERSION_MINOR "0") ++SET(LIBRARY_VERSION_PATCH "0") + SET(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}${VERSION_PRERELEASE}") + SET(LIBRARY_SOVERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}") + +--- a/include/h2o/version.h ++++ b/include/h2o/version.h +@@ -28,8 +28,8 @@ + #define H2O_VERSION_MINOR 2 + #define H2O_VERSION_PATCH 6 + +-#define H2O_LIBRARY_VERSION_MAJOR 0 +-#define H2O_LIBRARY_VERSION_MINOR 13 +-#define H2O_LIBRARY_VERSION_PATCH 6 ++#define H2O_LIBRARY_VERSION_MAJOR 1 ++#define H2O_LIBRARY_VERSION_MINOR 0 ++#define H2O_LIBRARY_VERSION_PATCH 0 + + #endif diff --git a/libs/libmbim/Makefile b/libs/libmbim/Makefile index 0d74b542e..85024008e 100644 --- a/libs/libmbim/Makefile +++ b/libs/libmbim/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmbim -PKG_SOURCE_VERSION:=1.28.4 +PKG_SOURCE_VERSION:=1.30.0 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libmbim.git -PKG_MIRROR_HASH:=7ecc6d1e565392817311254045337907bbad015b46ec88542ea63594f47778be +PKG_MIRROR_HASH:=8fc4e2d78d6a1003bf89303d3ce779283b176d74e84a241ba8efb0d468605268 PKG_BUILD_FLAGS:=gc-sections diff --git a/libs/libqmi/Makefile b/libs/libqmi/Makefile index 21a7af1fc..5652332fe 100644 --- a/libs/libqmi/Makefile +++ b/libs/libqmi/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libqmi -PKG_SOURCE_VERSION:=1.32.4 +PKG_SOURCE_VERSION:=1.34.0 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libqmi.git -PKG_MIRROR_HASH:=674f5848c56c11cdc2fbc82c52e5bc2a3a0fddb56315dc4220544688a7b0e17a +PKG_MIRROR_HASH:=af3dc760d0c40ef8af1f8b424435daa12bff698ed45b1cc9a9e38ea62ed047f0 PKG_BUILD_FLAGS:=gc-sections diff --git a/libs/libvpx/Makefile b/libs/libvpx/Makefile index 830f2d7fa..5c5073ac6 100644 --- a/libs/libvpx/Makefile +++ b/libs/libvpx/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libvpx -PKG_VERSION:=1.12.0 +PKG_VERSION:=1.13.1 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx -PKG_MIRROR_HASH:=19d9bd55198f063875cc72bdfa5eb9fa7cc1ae8af33979f807d2c82b66349933 +PKG_MIRROR_HASH:=55d6880564e354b2d310047773ac211790421e0f3ea70a9280213f7e27fa5f3a PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_MAINTAINER:=Luiz Angelo Daros de Luca diff --git a/libs/nghttp2/Makefile b/libs/nghttp2/Makefile index 7135194ea..a3848fb3c 100644 --- a/libs/nghttp2/Makefile +++ b/libs/nghttp2/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nghttp2 -PKG_VERSION:=1.51.0 +PKG_VERSION:=1.57.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/nghttp2/nghttp2/releases/download/v$(PKG_VERSION) -PKG_HASH:=66aa76d97c143f42295405a31413e5e7d157968dad9f957bb4b015b598882e6b +PKG_HASH:=9210b0113109f43be526ac5835d58a701411821a4d39e155c40d67c40f47a958 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=MIT diff --git a/libs/openblas/Makefile b/libs/openblas/Makefile index 389478858..0b403f21b 100644 --- a/libs/openblas/Makefile +++ b/libs/openblas/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=OpenBLAS -PKG_VERSION:=0.3.23 +PKG_VERSION:=0.3.24 PKG_RELEASE:=1 PKG_SOURCE:=OpenBLAS-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/xianyi/OpenBLAS/releases/download/v$(PKG_VERSION)/ -PKG_HASH:=5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114 +PKG_HASH:=ceadc5065da97bd92404cac7254da66cc6eb192679cf1002098688978d4d5132 PKG_LICENSE:=BSD 3-Clause PKG_MAINTAINER:=Alexandru Ardelean diff --git a/mail/exim/Makefile b/mail/exim/Makefile index 22a6a18df..69d200bf1 100644 --- a/mail/exim/Makefile +++ b/mail/exim/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=exim -PKG_VERSION:=4.96 -PKG_RELEASE:=2 +PKG_VERSION:=4.96.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://ftp.exim.org/pub/exim/exim4/ -PKG_HASH:=299a56927b2eb3477daafd3c5bda02bc67e5c4e5898a7aeaf2740875278cf1a3 +PKG_HASH:=93ac0755c317e1fdbbea8ccb70a868876bdf3148692891c72ad0fe816767033d PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=GPL-2.0-or-later diff --git a/mail/exim/patches/000-preliminary-fixes-for-ZDI-vulns.patch b/mail/exim/patches/000-preliminary-fixes-for-ZDI-vulns.patch deleted file mode 100644 index fee68a241..000000000 --- a/mail/exim/patches/000-preliminary-fixes-for-ZDI-vulns.patch +++ /dev/null @@ -1,185 +0,0 @@ -From florz@florz.de Sun Oct 1 10:33:31 2023 -Received: from [10.0.0.9] (helo=cumin.exim.org) - by mailman with esmtp (Exim 4.94.2) - (envelope-from ) - id 1qmspP-003gpc-28 - for exim-dev@lists.exim.org; Sun, 01 Oct 2023 09:33:31 +0000 -Authentication-Results: exim.org; - iprev=pass (rain.florz.de) smtp.remote-ip=2a07:12c0:1c00:40::1; - dmarc=none header.from=florz.de; - arc=none -Received: from rain.florz.de ([2a07:12c0:1c00:40::1]:36467) - by cumin.exim.org with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 - (Exim 4.94.2-31-503e55a2c) - (envelope-from ) - id 1qmspN-00EIpR-5w - for exim-dev@lists.exim.org; Sun, 01 Oct 2023 09:33:30 +0000 -Received: from [2a07:12c0:1c00:43::121] (port=60772 helo=florz.florz.de) - by rain.florz.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) - (Exim 4.92) - (envelope-from ) - id 1qmspL-0007Zj-F8 - for exim-dev@lists.exim.org; Sun, 01 Oct 2023 11:33:27 +0200 -Received: from florz by florz.florz.de with local (Exim 4.92) - (envelope-from ) - id 1qmspK-0001ZU-Sl - for exim-dev@lists.exim.org; Sun, 01 Oct 2023 11:33:26 +0200 -Date: Sun, 1 Oct 2023 11:33:26 +0200 -From: Florian Zumbiehl -To: exim-dev@lists.exim.org -Message-ID: <20231001093326.GS3837@florz.florz.de> -MIME-Version: 1.0 -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline -User-Agent: Mutt/1.10.1 (2018-07-13) -X-Spam-Score: 0.0 (/) -Message-ID-Hash: D3TCMSGJTLM76H6APEQXZEYOLYJKKCNZ -X-Message-ID-Hash: D3TCMSGJTLM76H6APEQXZEYOLYJKKCNZ -X-MailFrom: florz@florz.de -X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-exim-dev.lists.exim.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header -X-Mailman-Version: 3.3.3 -Precedence: list -Subject: [exim-dev] Hotfix for some of the ZDI vulnerabilities -List-Id: Exim MTA development list -List-Help: -List-Owner: -List-Post: -List-Subscribe: -List-Unsubscribe: -Message: 1 -Status: RO -Content-Length: 5347 - -Hi, - -below you find a patch that fixes some (probably three?) of what I guess are -the vulnerabilities reported by ZDI. - -Please note that the patch is only mildly tested, it is developed based on -the git master branch, but can be applied to older versions with minor -massaging. If you go back far enough, proxy.c was part of smtp_in.c, but if -you adjust for that, the patch can be made to apply there, too. - -Obviously, I have no idea whether this actually addresses what ZDI has -reported, but if not, these probably should be fixed, too, and if so, given -the fact that I managed to rather easily find these vulnerabilities based -on the information that's publicly available, I don't think there is much -point to trying to keep this secret any longer--if anything, it's -counterproductive. - -Also mind you that this is a hot fix, it's neither elegant, nor does it do -any useful error reporting, the goal was simply to prevent out of bounds -accesses. - -Florian - ---- - ---- a/src/auths/external.c -+++ b/src/auths/external.c -@@ -100,6 +100,9 @@ if (expand_nmax == 0) /* skip if rxd da - if ((rc = auth_prompt(CUS"")) != OK) - return rc; - -+if (expand_nmax != 1) -+ return FAIL; -+ - if (ob->server_param2) - { - uschar * s = expand_string(ob->server_param2); ---- a/src/auths/spa.c -+++ b/src/auths/spa.c -@@ -165,12 +165,18 @@ if (auth_get_no64_data(&data, msgbuf) != - return FAIL; - - /* dump client response */ --if (spa_base64_to_bits(CS &response, sizeof(response), CCS data) < 0) -+int l = spa_base64_to_bits(CS &response, sizeof(response), CCS data); -+if (l < 0) - { - DEBUG(D_auth) debug_printf("auth_spa_server(): bad base64 data in " - "response: %s\n", data); - return FAIL; - } -+if(l < (char *)&response.buffer - (char *)&response)return FAIL; -+unsigned long o = IVAL(&response.uUser.offset, 0); -+if((l < o) || (l - o < SVAL(&response.uUser.len, 0)))return FAIL; -+o = IVAL(&response.ntResponse.offset, 0); -+if((l < o) || (l - o < 24))return FAIL; - - /*************************************************************** - PH 07-Aug-2003: The original code here was this: -@@ -345,7 +351,10 @@ if (!smtp_read_response(sx, US buffer, b - - /* convert the challenge into the challenge struct */ - DSPA("\n\n%s authenticator: challenge (%s)\n\n", ablock->name, buffer + 4); --spa_base64_to_bits(CS (&challenge), sizeof(challenge), CCS (buffer + 4)); -+int l = spa_base64_to_bits(CS (&challenge), sizeof(challenge), CCS (buffer + 4)); -+if((l < 0) || (l < (char *)&challenge.buffer - (char *)&challenge))return FAIL; -+unsigned long o = IVAL(&challenge.uDomain.offset, 0); -+if((l < o) || (l - o < SVAL(&challenge.uDomain.len, 0)))return FAIL; - - spa_build_auth_response(&challenge, &response, CS username, CS password); - spa_bits_to_base64(US msgbuf, US &response, spa_request_length(&response)); ---- a/src/smtp_in.c -+++ b/src/smtp_in.c -@@ -1172,6 +1172,8 @@ while (capacity > 0) - do { ret = read(fd, to, 1); } while (ret == -1 && errno == EINTR && !had_command_timeout); - if (ret == -1) - return -1; -+ if (!ret) -+ break; - have++; - if (last) - return have; -@@ -1320,6 +1322,8 @@ if ((ret == PROXY_INITIAL_READ) && (memc - goto proxyfail; - } - -+ if (ret < 16) -+ goto proxyfail; - /* The v2 header will always be 16 bytes per the spec. */ - size = 16 + ntohs(hdr.v2.len); - DEBUG(D_receive) debug_printf("Detected PROXYv2 header, size %d (limit %d)\n", -@@ -1340,7 +1344,7 @@ if ((ret == PROXY_INITIAL_READ) && (memc - { - retmore = read(fd, (uschar*)&hdr + ret, size-ret); - } while (retmore == -1 && errno == EINTR && !had_command_timeout); -- if (retmore == -1) -+ if (retmore < 1) - goto proxyfail; - ret += retmore; - DEBUG(D_receive) debug_printf("PROXYv2: have %d/%d required octets\n", ret, size); -@@ -1362,6 +1366,8 @@ if (ret >= 16 && memcmp(&hdr.v2, v2sig, - switch (hdr.v2.fam) - { - case 0x11: /* TCPv4 address type */ -+ if (ret < 28) -+ goto proxyfail; - iptype = US"IPv4"; - tmpaddr.sin_addr.s_addr = hdr.v2.addr.ip4.src_addr; - inet_ntop(AF_INET, &tmpaddr.sin_addr, CS &tmpip, sizeof(tmpip)); -@@ -1388,6 +1394,8 @@ if (ret >= 16 && memcmp(&hdr.v2, v2sig, - proxy_external_port = tmpport; - goto done; - case 0x21: /* TCPv6 address type */ -+ if (ret < 52) -+ goto proxyfail; - iptype = US"IPv6"; - memmove(tmpaddr6.sin6_addr.s6_addr, hdr.v2.addr.ip6.src_addr, 16); - inet_ntop(AF_INET6, &tmpaddr6.sin6_addr, CS &tmpip6, sizeof(tmpip6)); -@@ -1446,10 +1454,13 @@ else if (ret >= 8 && memcmp(hdr.v1.line, - goto proxyfail; - ret += r2; - -+ if(ret > 107) -+ goto proxyfail; -+ hdr.v1.line[ret] = 0; - p = string_copy(hdr.v1.line); - end = memchr(p, '\r', ret - 1); - -- if (!end || (end == (uschar*)&hdr + ret) || end[1] != '\n') -+ if (!end || end[1] != '\n') - { - DEBUG(D_receive) debug_printf("Partial or invalid PROXY header\n"); - goto proxyfail; diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index cd0d383f2..f54db0310 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ffmpeg PKG_VERSION:=5.1.3 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://ffmpeg.org/releases/ @@ -534,6 +534,12 @@ ifeq ($(BUILD_VARIANT),custom) --disable-swresample endif + ifneq ($(CONFIG_PACKAGE_ffmpeg-custom),n) + FFMPEG_CONFIGURE+= \ + --enable-avfilter \ + --enable-ffmpeg + endif + FFMPEG_CONFIGURE+= \ --disable-swscale \ --disable-everything \ @@ -648,6 +654,11 @@ define Build/InstallDev/custom $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.{a,so*} $(1)/usr/lib/ ifeq ($(CONFIG_FFMPEG_CUSTOM_PROGRAMS),y) $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avfilter,swresample}.{a,so*} $(1)/usr/lib/ +endif +ifeq ($(BUILD_VARIANT),custom) + ifneq ($(CONFIG_PACKAGE_ffmpeg-custom),n) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavfilter.{a,so*} $(1)/usr/lib/ + endif endif $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/ @@ -731,6 +742,11 @@ endif ifeq ($(CONFIG_FFMPEG_CUSTOM_PROGRAMS),y) $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avfilter,swresample}.so.* $(1)/usr/lib/ endif +ifeq ($(BUILD_VARIANT),custom) + ifneq ($(CONFIG_PACKAGE_ffmpeg-custom),n) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavfilter.so.* $(1)/usr/lib/ + endif +endif endef # Only ffmpeg with libx264 is GPL (yes libpostproc); all other builds are lgpl (no libpostproc) diff --git a/net/aardvark-dns/Makefile b/net/aardvark-dns/Makefile index 6131a4a07..b7ea0e5d9 100644 --- a/net/aardvark-dns/Makefile +++ b/net/aardvark-dns/Makefile @@ -13,6 +13,7 @@ PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/rust/rust-package.mk diff --git a/net/adblock-fast/Makefile b/net/adblock-fast/Makefile index bd7ad9845..f923a27b4 100644 --- a/net/adblock-fast/Makefile +++ b/net/adblock-fast/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock-fast PKG_VERSION:=1.0.0 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_MAINTAINER:=Stan Grishin PKG_LICENSE:=GPL-3.0-or-later diff --git a/net/adblock-fast/files/etc/init.d/adblock-fast b/net/adblock-fast/files/etc/init.d/adblock-fast index f885bd105..8229f0845 100755 --- a/net/adblock-fast/files/etc/init.d/adblock-fast +++ b/net/adblock-fast/files/etc/init.d/adblock-fast @@ -282,7 +282,7 @@ append_url() { echo 'dnsmasq2' elif grep -q '^address=' "$file"; then echo 'dnsmasq3' - elif grep -q '^0.0.0.0' "$file" || grep -q '^127.0.0.1' "$file"; then + elif grep -q '^0\.0\.0\.0' "$file" || grep -q '^127\.0\.0\.1' "$file"; then echo 'hosts' elif [ -n "$(sed "$domainsFilter" "$file" | head -1)" ]; then echo 'domains' @@ -1536,6 +1536,7 @@ adb_start() { json_close_array procd_close_data procd_close_instance + return 0 } adb_status() { @@ -1568,12 +1569,13 @@ adb_status() { n=$((n+1)) done fi + return 0 } # shellcheck disable=SC2120 adb_stop() { local validation_result="$3" - load_environment "$validation_result" 'quiet' || return 1 + load_environment "$validation_result" 'quiet' || return 0 if [ -s "$outputFile" ]; then output "Stopping $serviceName... " cache 'create' @@ -1593,6 +1595,7 @@ adb_stop() { output "${_ERROR_}: $(get_text 'errorStopping')!\\n" fi fi + return 0 } adb_pause() { diff --git a/net/cloudreve/Makefile b/net/cloudreve/Makefile index 245f595c3..d99277344 100644 --- a/net/cloudreve/Makefile +++ b/net/cloudreve/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cloudreve -PKG_VERSION:=3.8.1 +PKG_VERSION:=3.8.3 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/cloudreve/Cloudreve.git PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_MIRROR_HASH:=463e8580131c8a021b95ef7014f66556c7fdedad2c1b71627f9efaa86a758f03 +PKG_MIRROR_HASH:=b7945292c73993d47f251135c8dd06c8ecd8d22902594391213f446123d9fced PKG_LICENSE:=GPL-3.0-only PKG_LICENSE_FILES:=LICENSE diff --git a/net/cni-protocol/Makefile b/net/cni-protocol/Makefile index dbe149875..3711452b7 100644 --- a/net/cni-protocol/Makefile +++ b/net/cni-protocol/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cni-protocol -PKG_VERSION:=20230217 +PKG_VERSION:=20231008 PKG_RELEASE:=1 PKG_MAINTAINER:=Oskari Rauta @@ -16,25 +16,44 @@ define Package/cni-protocol endef define Package/cni-protocol/description - protocol support for cni networks for netifd - makes defining network for podman and other similar - systems using cni networking much easier and simpler. + protocol support for netavark/cni networks for netifd + makes defining networks for podman and other similar + systems easier and simple. - with cni protocol support, on a network, where firewall - and portmapper management is disabled, you may control - firewalling with openwrt's default firewall configuration. + with protocol, a network where firewall and portmapper + management is disabled, control of firewalling, whether + it was exposing ports, and forwarding to them from wan, + or limiting/accepting access to other networks such + as lan can made through openwrt's own firewalling + configuration. - for example, create a container that hosts web content on - port 80 with static ip on your cni network, if your - network is 10.88.0.0/16, use for eg. 10.88.0.101 as - your containers static ip address. Create a zone, cni - to your firewall and add your interface to it. + example configuration could be as following: + - lan network: 10.0.0.0/16 (255.255.0.0) + - container network: 10.129.0.1/24 (255.255.255.0) - Now you can easily set up redirectiong to 10.88.0.101:80 - to expose it's port 80 to wan for serving your website. + Add a network configuration for your container network + using cni protocol. Then create firewall zone for it. - Protocol has one setting: device, on podman this often - is cni-podman0. + You could create a new container/pod with static ip + address 10.129.0.2 (as 10.129.0.1 as container network's + gateway). + + Easily define permissions so that local networks can + connect to cni network, but not the other way around. + Also you want to allow forwarding from/to wan. + + Now, as cni cannot access local dns, make a rule for + your firewall to accept connections from cni network + to port 53 (dns). + + Now all you have to do, is make redirects to your firewall + and point them to 10.129.0.2 and connections from wan are + redirectered to containers/pods. + + Protocol has 2 settings: device and delay. Sometimes polling + interfaces takes some time, and in that case you might want + to add few seconds to delay. Otherwise, it can be excluded + from configuration. endef define Build/Configure diff --git a/net/cni-protocol/files/cni.sh b/net/cni-protocol/files/cni.sh index c0cbc3b72..73a37112d 100755 --- a/net/cni-protocol/files/cni.sh +++ b/net/cni-protocol/files/cni.sh @@ -9,33 +9,50 @@ proto_cni_init_config() { no_device=0 available=0 - no_proto_task=1 - teardown_on_l3_link_down=1 proto_config_add_string "device:device" + proto_config_add_int "delay" } proto_cni_setup() { - local cfg="$1" - local device ipaddr netmask broadcast route routemask routesrc + local iface="$2" + local device delay - json_get_var device device + json_get_vars device delay - ipaddr=$(ip -4 -o a show "$device" | awk '{ print $4 }' | cut -d '/' -f1) - netmask=$(ip -4 -o a show "$device" | awk '{ print $4 }' | cut -d '/' -f2) - broadcast=$(ip -4 -o a show "$device" | awk '{ print $6 }') - route=$(ip -4 -o r show dev "$device" | awk '{ print $1 }' | cut -d '/' -f1) - routemask=$(ip -4 -o r show dev "$device" | awk '{ print $1 }' | cut -d '/' -f2) - routesrc=$(ip -4 -o r show dev "$device" | awk '{ print $7 }') + [ -n "$device" ] || { + echo "No cni interface specified" + proto_notify_error "$cfg" NO_DEVICE + proto_set_available "$cfg" 0 + return 1 + } + + [ -n "$delay" ] && sleep "$delay" + + [ -L "/sys/class/net/${iface}" ] || { + echo "The specified interface $iface is not present" + proto_notify_error "$cfg" NO_DEVICE + proto_set_available "$cfg" 0 + return 1 + } + + local ipaddr netmask broadcast route routemask routesrc + + ipaddr=$(ip -4 -o a show "$iface" | awk '{ print $4 }' | cut -d '/' -f1) + netmask=$(ip -4 -o a show "$iface" | awk '{ print $4 }' | cut -d '/' -f2) + broadcast=$(ip -4 -o a show "$iface" | awk '{ print $6 }') + route=$(ip -4 -o r show dev "$iface" | awk '{ print $1 }' | cut -d '/' -f1) + routemask=$(ip -4 -o r show dev "$iface" | awk '{ print $1 }' | cut -d '/' -f2) + routesrc=$(ip -4 -o r show dev "$iface" | awk '{ print $7 }') [ -z "$ipaddr" ] && { - echo "cni network $cfg does not have ip address" + echo "interface $iface does not have ip address" proto_notify_error "$cfg" NO_IPADDRESS return 1 } - proto_init_update "$device" 1 + proto_init_update "$iface" 1 [ -n "$ipaddr" ] && proto_add_ipv4_address "$ipaddr" "$netmask" "$broadcast" "" [ -n "$route" ] && proto_add_ipv4_route "$route" "$routemask" "" "$routesrc" "" proto_send_update "$cfg" @@ -43,7 +60,6 @@ proto_cni_setup() { proto_cni_teardown() { local cfg="$1" - #proto_set_available "$cfg" 0 return 0 } diff --git a/net/crowdsec-firewall-bouncer/Makefile b/net/crowdsec-firewall-bouncer/Makefile index 82eb69974..ee8c73223 100644 --- a/net/crowdsec-firewall-bouncer/Makefile +++ b/net/crowdsec-firewall-bouncer/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=crowdsec-firewall-bouncer -PKG_VERSION:=0.0.27 +PKG_VERSION:=0.0.28 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/crowdsecurity/cs-firewall-bouncer/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=2516e700c88e46e6aa58100ff6f343257cc1befdb555d6ab9e124f217ec46ca0 +PKG_HASH:=1e0f4d3cd8bc73da21eafc9b965fda0c1c1b0a27a2acc038004602797e4fccf0 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/net/curl/Makefile b/net/curl/Makefile index b1d69930a..16fe84601 100644 --- a/net/curl/Makefile +++ b/net/curl/Makefile @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/nls.mk PKG_NAME:=curl -PKG_VERSION:=8.3.0 +PKG_VERSION:=8.4.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/curl/curl/releases/download/curl-$(subst .,_,$(PKG_VERSION))/ \ https://dl.uxnr.de/mirror/curl/ \ https://curl.askapache.com/download/ \ https://curl.se/download/ -PKG_HASH:=376d627767d6c4f05105ab6d497b0d9aba7111770dd9d995225478209c37ea63 +PKG_HASH:=e5250581a9c032b1b6ed3cf2f9c114c811fc41881069e9892d115cc73f9e88c6 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index a4c79b06b..61ceef863 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-scripts PKG_VERSION:=2.8.2 -PKG_RELEASE:=39 +PKG_RELEASE:=41 PKG_LICENSE:=GPL-2.0 @@ -57,6 +57,16 @@ define Package/ddns-scripts-services/description Dynamic DNS Client definitions for supported services endef +define Package/ddns-scripts-utils + $(call Package/ddns-scripts/Default) + TITLE:=Utility scripts for ddns configs + DEPENDS:=ddns-scripts +endef + +define Package/ddns-scripts-utils/description + Dynamic DNS Client utility scripts for config files +endef + define Package/ddns-scripts-luadns $(call Package/ddns-scripts/Default) @@ -362,6 +372,15 @@ define Package/ddns-scripts-services/install endef +define Package/ddns-scripts-utils/install + $(INSTALL_DIR) $(1)/usr/lib/ddns + $(INSTALL_BIN) ./samples/slaac_sample.sh \ + $(1)/usr/lib/ddns/slaac.sh + $(INSTALL_BIN) ./samples/getlocalip_sample.sh \ + $(1)/usr/lib/ddns/getlocalip.sh +endef + + define Package/ddns-scripts-luadns/install $(INSTALL_DIR) $(1)/usr/lib/ddns $(INSTALL_BIN) ./files/usr/lib/ddns/update_luadns_v1.sh \ @@ -668,6 +687,7 @@ endef $(eval $(call BuildPackage,ddns-scripts)) $(eval $(call BuildPackage,ddns-scripts-services)) +$(eval $(call BuildPackage,ddns-scripts-utils)) $(eval $(call BuildPackage,ddns-scripts-luadns)) $(eval $(call BuildPackage,ddns-scripts-cloudflare)) $(eval $(call BuildPackage,ddns-scripts-gcp)) diff --git a/net/ddns-scripts/files/usr/share/ddns/default/ipnodns.ru.json b/net/ddns-scripts/files/usr/share/ddns/default/ipnodns.ru.json new file mode 100644 index 000000000..026caa19c --- /dev/null +++ b/net/ddns-scripts/files/usr/share/ddns/default/ipnodns.ru.json @@ -0,0 +1,7 @@ +{ + "name": "ipnodns.ru", + "ipv4": { + "url": "https://ipnodns.ru/cgi-bin/dyndns.cgi?login=[USERNAME]&secret=[PASSWORD]", + "answer": "ok" + } +} diff --git a/net/ddns-scripts/files/usr/share/ddns/list b/net/ddns-scripts/files/usr/share/ddns/list index 86902313a..88d369c9c 100644 --- a/net/ddns-scripts/files/usr/share/ddns/list +++ b/net/ddns-scripts/files/usr/share/ddns/list @@ -34,6 +34,7 @@ google.com he.net hosting.de infomaniak.com +ipnodns.ru inwx.de joker.com loopia.se diff --git a/net/dnsdist/Makefile b/net/dnsdist/Makefile index 50b0cfacb..34b12e12e 100644 --- a/net/dnsdist/Makefile +++ b/net/dnsdist/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsdist -PKG_VERSION:=1.8.1 +PKG_VERSION:=1.8.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/ -PKG_HASH:=05f356fcce29c4ece03c2d8df046adff3aaab0b036d6801c1a311c6d5bb3c07f +PKG_HASH:=6688f09b2c52f9bf935f0769f4ee28dd0760e5622dade7b3f4e6fa3776f07ab8 PKG_MAINTAINER:=Peter van Dijk PKG_LICENSE:=GPL-2.0-only diff --git a/net/dnsproxy/Makefile b/net/dnsproxy/Makefile index f8b4735f0..61dfe4cbb 100644 --- a/net/dnsproxy/Makefile +++ b/net/dnsproxy/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsproxy -PKG_VERSION:=0.55.0 +PKG_VERSION:=0.56.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=fecda5ee48a2f43edce47fe3e384ab931c36abd24aa09198014f8fd90f6a4664 +PKG_HASH:=09aca2248e36c8e50e0a5e68034e34526aaccd6f849bd4de708f2ea4a5b3a52f PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=Apache-2.0 diff --git a/net/esp2net/Makefile b/net/esp2net/Makefile new file mode 100644 index 000000000..8e0dcbeac --- /dev/null +++ b/net/esp2net/Makefile @@ -0,0 +1,48 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=esp2net +PKG_RELEASE:=1 + +PKG_LICENSE:=GPL-2.0-only +PKG_MAINTAINER:=Nuno Gonçalves + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/nunojpg/esp2net.git +PKG_SOURCE_DATE:=2023-06-20 +PKG_SOURCE_VERSION:=be514c7a50bd8f3aac146ba267856d66cad1abd9 +PKG_MIRROR_HASH:=bb2d180887c14ee3e6bec51ccaae195274a09e4be108a7e69e2126df5245c0b7 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/esp2net + SECTION:=net + CATEGORY:=Network + TITLE:=Espressif ESP chip network monitor and flash proxy + DEPENDS:=+libstdcpp +endef + +define Package/esp2net/description + Allows to flash a Espressif chip connected to this device. + The functionality is identical to "esp_rfc2217_server.py" but without Python. + Typically you want also to install one or more USB serial drivers: + * kmod-usb-serial-cp210x + * kmod-usb-serial-ftdi + * kmod-usb-serial-ch341 + * kmod-usb-acm +endef + +define Package/esp2net/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/esp2net $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/esp2net.init $(1)/etc/init.d/esp2net + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/esp2net.config $(1)/etc/config/esp2net +endef + +define Package/esp2net/conffiles +/etc/config/esp2net +endef + +$(eval $(call BuildPackage,esp2net)) diff --git a/net/esp2net/files/esp2net.config b/net/esp2net/files/esp2net.config new file mode 100644 index 000000000..1059f2bb1 --- /dev/null +++ b/net/esp2net/files/esp2net.config @@ -0,0 +1,4 @@ +config esp2net + option uart '/dev/ttyUSB0' + option port '5001' + option disabled 1 diff --git a/net/esp2net/files/esp2net.init b/net/esp2net/files/esp2net.init new file mode 100755 index 000000000..437923f85 --- /dev/null +++ b/net/esp2net/files/esp2net.init @@ -0,0 +1,32 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 + +START=95 +STOP=01 + +CONFIGURATION=esp2net +SECTION=esp2net + +parse_esp2net() +{ + local uart + local port + local disabled + config_get uart "${1}" uart + config_get port "${1}" port + config_get_bool disabled "${1}" disabled 0 + [ "$disabled" -eq 1 ] && return; + procd_open_instance + procd_set_param respawn 3600 5 5 + procd_set_param command /usr/sbin/esp2net "$uart" "$port" + procd_set_param file /etc/config/esp2net + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance +} + +start_service() { + config_load "${CONFIGURATION}" + config_foreach parse_esp2net "${SECTION}" +} diff --git a/net/https-dns-proxy/Makefile b/net/https-dns-proxy/Makefile index 88b757749..5c6912e2e 100644 --- a/net/https-dns-proxy/Makefile +++ b/net/https-dns-proxy/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=https-dns-proxy PKG_VERSION:=2023-05-25 -PKG_RELEASE:=5 +PKG_RELEASE:=7 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/ @@ -24,6 +24,8 @@ define Package/https-dns-proxy TITLE:=DNS Over HTTPS Proxy URL:=https://docs.openwrt.melmac.net/https-dns-proxy/ DEPENDS:=+libcares +libcurl +libev +ca-bundle +jsonfilter + DEPENDS+=+!BUSYBOX_DEFAULT_GREP:grep + DEPENDS+=+!BUSYBOX_DEFAULT_SED:sed CONFLICTS:=https_dns_proxy endef @@ -45,8 +47,6 @@ define Package/https-dns-proxy/install $(SED) "s|^\(readonly PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/etc/init.d/https-dns-proxy $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/etc/config/https-dns-proxy $(1)/etc/config/https-dns-proxy - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_DATA) ./files/etc/hotplug.d/iface/90-https-dns-proxy $(1)/etc/hotplug.d/iface/90-https-dns-proxy $(INSTALL_DIR) $(1)/etc/uci-defaults/ $(INSTALL_BIN) ./files/etc/uci-defaults/50-https-dns-proxy-migrate-options.sh $(1)/etc/uci-defaults/50-https-dns-proxy-migrate-options.sh endef diff --git a/net/https-dns-proxy/files/etc/init.d/https-dns-proxy b/net/https-dns-proxy/files/etc/init.d/https-dns-proxy index 6529bf3e3..58fd647c1 100755 --- a/net/https-dns-proxy/files/etc/init.d/https-dns-proxy +++ b/net/https-dns-proxy/files/etc/init.d/https-dns-proxy @@ -5,6 +5,8 @@ # shellcheck disable=SC2034 START=90 # shellcheck disable=SC2034 +STOP=15 +# shellcheck disable=SC2034 USE_PROCD=1 if type extra_command 1>/dev/null 2>&1; then @@ -250,20 +252,21 @@ start_service() { output "Updating dnsmasq config " if uci_commit 'dhcp'; then output_okn - else - output_failn - fi - param='dnsmasq_restart' - fi - if [ "$param" = 'on_hotplug' ] || [ "$param" = 'on_boot' ] || \ - [ "$param" = 'dnsmasq_restart' ] ; then - output "Restarting dnsmasq " - if dnsmasq_restart; then - output_okn + param='on_config_update' else output_failn fi fi + case "$param" in + on_boot|on_config_update|on_hotplug) + output "Restarting dnsmasq ${param:+$param }" + if dnsmasq_restart; then + output_okn + else + output_failn + fi + ;; + esac } stop_service() { @@ -291,29 +294,13 @@ stop_service() { [ "$s" = '0' ] && output_okn || output_failn } -# shellcheck disable=SC1091 service_triggers() { - local wan wan6 i - local procd_trigger_wan6 - config_load "$packageName" - config_get_bool procd_trigger_wan6 'config' 'procd_trigger_wan6' '0' - . /lib/functions/network.sh - network_flush_cache - network_find_wan wan - wan="${wan:-wan}" - if [ "$procd_trigger_wan6" -ne 0 ]; then - network_find_wan6 wan6 - wan6="${wan6:-wan6}" - fi - for i in "$wan" "$wan6"; do - [ -n "$i" ] && procd_add_interface_trigger "interface.*" "$i" "/etc/init.d/${packageName}" restart - done - procd_add_config_trigger "config.change" "$packageName" "/etc/init.d/${packageName}" reload + procd_add_raw_trigger "interface.*.up" 3000 "/etc/init.d/${packageName}" restart 'on_interface_up' + procd_add_config_trigger "config.change" "$packageName" "/etc/init.d/${packageName}" reload 'on_config_change' } - service_started() { procd_set_config_changed firewall; } service_stopped() { procd_set_config_changed firewall; } -restart() { procd_send_signal "$packageName"; rc_procd start_service; } +restart() { procd_send_signal "$packageName"; rc_procd start_service "$*"; } dnsmasq_doh_server() { local cfg="$1" param="$2" address="${3:-127.0.0.1}" port="$4" i diff --git a/net/https-dns-proxy/patches/030-src-logging.c-fix-crash.patch b/net/https-dns-proxy/patches/030-src-logging.c-fix-crash.patch new file mode 100644 index 000000000..2cf750b98 --- /dev/null +++ b/net/https-dns-proxy/patches/030-src-logging.c-fix-crash.patch @@ -0,0 +1,11 @@ +--- a/src/logging.c ++++ b/src/logging.c +@@ -78,7 +78,7 @@ void _log(const char *file, int line, in + + struct timeval tv; + gettimeofday(&tv, NULL); +- fprintf(logf, "%s %8lu.%06lu %s:%d ", SeverityStr[severity], ++ fprintf(logf, "%s %8llu.%06llu %s:%d ", SeverityStr[severity], + (uint64_t)tv.tv_sec, + (uint64_t)tv.tv_usec, file, line); + diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile index d7c4a1566..81fd97681 100644 --- a/net/isc-dhcp/Makefile +++ b/net/isc-dhcp/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=isc-dhcp UPSTREAM_NAME:=dhcp PKG_VERSION:=4.4.3-P1 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index 967ba83da..927924dbc 100755 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -4,6 +4,7 @@ START=25 USE_PROCD=1 PROG=/usr/sbin/dhcpd +WS=$'[\t ]' TTL=3600 PREFIX="update add" @@ -46,23 +47,35 @@ time2seconds() { echo $(( number * multiplier )) } -trim() { - local arg="$1" +explode() { + echo "${1//\./ }" +} - echo "$arg" | sed -e 's/^ *//' -e 's/ *$//' +trim() { + local str="$1" prev + + while true; do + prev="$str" + str="${str%%$WS}" + [ "$str" = "$prev" ] && break + done + while true; do + prev="$str" + str="${str##$WS}" + [ "$str" = "$prev" ] && break + done + echo "$str" } rfc1918_prefix() { - local octets="$(echo "${1%%/*}" | cut -d. -f1)" + local subnet="${1%/*}" + set -- $(explode "$subnet") - [ "$octets" = "10" ] && { echo "$octets"; return; } - - octets="$(echo "${1%%/*}" | cut -d. -f1-2)" - - case "$octets" in + case "$1.$2" in + 10.*) + echo "$1" ;; 172.1[6789]|172.2[0-9]|172.3[01]|192.168) - echo "$octets" - ;; + echo "$1.$2" ;; esac } @@ -110,12 +123,6 @@ update() { echo -e "$PREFIX" "$lhs $family $type $@\nsend" >> $dyn_file } -explode() { - local arg="$1" - - echo "$arg" | sed -e 's/\./, /g' -} - rev_str() { local str="$1" delim="$2" local frag result="" IFS="$delim" @@ -138,20 +145,35 @@ create_empty_zone() { } append_routes() { - local tuple tuple="$(trim "$1")" - local network prefix router save octets compacted + local tuple="$(trim "$1")" + local network prefix router subnet compacted octet - save="${tuple% *}" - router="$(trim "${tuple#${save} }")" + subnet="${tuple%%$WS*}" - network="$(trim "${save%/[0-9]*}")" + network="${subnet%/[0-9]*}" - prefix="$(trim "${save##${network}/}")" + prefix="${subnet#*/}" - octets=$((($prefix + 7) / 8)) - compacted="$(echo "$network" | cut -d. -f1-$octets)" + set -- $(explode "$network") - routes="$routes${routes:+, }$(explode "$prefix${compacted:+.$compacted}.$router")" + case $((($prefix + 7) / 8)) in + 0) + compacted= ;; + 1) + compacted="$1" ;; + 2) + compacted="$1 $2" ;; + 3) + compacted="$1 $2 $3" ;; + 4) + compacted="$1 $2 $3 $4" ;; + esac + + router="${tuple#${subnet}$WS}" + + for octet in $prefix $compacted $(explode "$router"); do + append routes "$octet" ", " + done } append_dhcp_options() { @@ -174,7 +196,7 @@ append_dhcp_options() { value="\"$value\"" ;; esac - formatted="$formatted${formatted:+, }$value" + append formatted "$value" ", " done echo " option $tag $formatted;" } @@ -280,7 +302,7 @@ static_host_add() { config_get leasetime "$cfg" "leasetime" if [ -n "$leasetime" ] ; then leasetime="$(time2seconds "$leasetime")" - [ "$?" -ne 0 ] && return 1 + [ $? -ne 0 ] && return 1 fi config_get hostid "$cfg" "hostid" @@ -290,26 +312,24 @@ static_host_add() { config_get force_send "$cfg" "force_send" extra_options= - local _IFS="$IFS" IFS=',' - for option in $force_send; do + for option in ${force_send//,/ }; do case "$option" in hostname) - extra_options="$extra_options${extra_options:+,}0c" ;; + append extra_options "0c" "," ;; domain-name) - extra_options="$extra_options${extra_options:+,}0f" ;; + append extra_options "0f" "," ;; renewal-time) - extra_options="$extra_options${extra_options:+,}3a" ;; + append extra_options "3a" "," ;; rebinding-time) - extra_options="$extra_options${extra_options:+,}3b" ;; + append extra_options "3b" "," ;; fqdn) - extra_options="$extra_options${extra_options:+,}51" ;; + append extra_options "51" "," ;; routes) - extra_options="$extra_options${extra_options:+,}79" ;; + append extra_options "79" "," ;; *) echo "unknown option: $option" >&2 ;; esac done - IFS="$_IFS" macn=0 for mac in $macs; do @@ -325,7 +345,7 @@ static_host_add() { echo " hardware ethernet $mac;" echo " fixed-address $ip;" echo " option host-name \"$name\";" - if [ "$broadcast" -eq 1 ] ; then + if [ $broadcast -eq 1 ] ; then echo " always-broadcast true;" fi if [ -n "$leasetime" ] ; then @@ -374,11 +394,13 @@ gen_dhcp_subnet() { echo " range $START $END;" fi echo " option subnet-mask $netmask;" - if [ "$BROADCAST" != "0.0.0.0" ] ; then + # check for 0.0.0.0 until all active releases of ipcalc.sh omit it + # for small networks: + if [ -n "$BROADCAST" ] && [ "$BROADCAST" != "0.0.0.0" ] ; then echo " option broadcast-address $BROADCAST;" fi - if [ "$dynamicdhcp" -eq 0 ] ; then - if [ "$authoritative" -eq 1 ] ; then + if [ $dynamicdhcp -eq 0 ] ; then + if [ $authoritative -eq 1 ] ; then echo " deny unknown-clients;" else echo " ignore unknown-clients;" @@ -388,7 +410,7 @@ gen_dhcp_subnet() { echo " default-lease-time $leasetime;" echo " max-lease-time $leasetime;" fi - if [ "$defaultroute" -eq 1 ] ; then + if [ $defaultroute -eq 1 ] ; then echo " option routers $gateway;" fi echo " option domain-name-servers $DNS;" @@ -411,7 +433,7 @@ dhcpd_add() { local IP NETMASK BROADCAST NETWORK PREFIX DNS START END config_get_bool ignore "$cfg" "ignore" 0 - [ "$ignore" = "0" ] || return 0 + [ $ignore -eq 1 ] && return 0 config_get net "$cfg" "interface" [ -n "$net" ] || return 0 @@ -429,27 +451,30 @@ dhcpd_add() { network_get_device ifname "$net" || return 0 network_get_protocol proto "$net" || return 0 - [ static = "$proto" ] || return 0 + [ "$proto" != "static" ] && return 0 local octets="$(rfc1918_prefix "$subnet")" - [ -n "$octets" ] && rfc1918_nets="$rfc1918_nets${rfc1918_nets:+ }$octets" + [ -n "$octets" ] && append rfc1918_nets "$octets" - [ $synthesize -eq 0 ] && return + [ $synthesize -eq 0 ] && return 0 config_get_bool dynamicdhcp "$cfg" "dynamicdhcp" 1 config_get_bool defaultroute "$cfg" "default_route" 1 - dhcp_ifs="$dhcp_ifs $ifname" + append dhcp_ifs "$ifname" - eval "$(ipcalc.sh $subnet $start $limit)" + if ! ipcalc "$subnet" "$start" "$limit"; then + echo "invalid range params: $subnet start: $start limit $limit" >&2 + return 1 + fi config_get netmask "$cfg" "netmask" "$NETMASK" config_get leasetime "$cfg" "leasetime" if [ -n "$leasetime" ] ; then leasetime="$(time2seconds "$leasetime")" - [ "$?" -ne 0 ] && return 1 + [ $? -ne 0 ] && return 1 fi if network_get_dnsserver dnsserver "$net" ; then @@ -488,9 +513,9 @@ general_config() { [ $boot_unknown_clients -eq 0 ] && echo "boot-unknown-clients false;" default_lease_time="$(time2seconds "$default_lease_time")" - [ "$?" -ne 0 ] && return 1 + [ $? -ne 0 ] && return 1 max_lease_time="$(time2seconds "$max_lease_time")" - [ "$?" -ne 0 ] && return 1 + [ $? -ne 0 ] && return 1 if [ $dynamicdns -eq 1 ]; then create_empty_zone "$domain" @@ -615,6 +640,7 @@ start_service() { local rfc1918_nets="" # alas we have to make 2 passes... + dhcp_ifs= config_foreach dhcpd_add dhcp 0 rfc1918_nets="$(echo "$rfc1918_nets" | tr ' ' $'\n' | sort | uniq | tr $'\n' ' ')" @@ -632,6 +658,7 @@ EOF rfc1918_nets= + dhcp_ifs= config_foreach dhcpd_add dhcp 1 >> $config_file static_hosts >> $config_file diff --git a/net/kea/Makefile b/net/kea/Makefile index 1febb3046..c44c088e8 100644 --- a/net/kea/Makefile +++ b/net/kea/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kea -PKG_VERSION:=2.2.0 +PKG_VERSION:=2.4.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION) -PKG_HASH:=da7d90ca62a772602dac6e77e507319038422895ad68eeb142f1487d67d531d2 +PKG_HASH:=3a33cd08dc3319ff544e6bbf2c0429042106f4051ebe115dc1bb2625c95003f7 PKG_MAINTAINER:=BangLang Huang , Rosy Song PKG_LICENSE:=MPL-2.0 diff --git a/net/kea/patches/003-no-test-compile.patch b/net/kea/patches/003-no-test-compile.patch index 709e534c6..d22badf04 100644 --- a/net/kea/patches/003-no-test-compile.patch +++ b/net/kea/patches/003-no-test-compile.patch @@ -76,8 +76,8 @@ -SUBDIRS = . tests +SUBDIRS = . - PYTHON_PREFIX=@prefix@ - PYTHON_EXEC_PREFIX=@prefix@ + pkgpython_PYTHON = kea_conn.py kea_connector3.py + --- a/src/hooks/dhcp/high_availability/Makefile.am +++ b/src/hooks/dhcp/high_availability/Makefile.am @@ -1,4 +1,4 @@ @@ -89,16 +89,16 @@ --- a/src/hooks/dhcp/lease_cmds/Makefile.am +++ b/src/hooks/dhcp/lease_cmds/Makefile.am @@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . +-SUBDIRS = . tests libloadtests ++SUBDIRS = . libloadtests AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib AM_CPPFLAGS += $(BOOST_INCLUDES) --- a/src/hooks/dhcp/stat_cmds/Makefile.am +++ b/src/hooks/dhcp/stat_cmds/Makefile.am @@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . +-SUBDIRS = . tests libloadtests ++SUBDIRS = . libloadtests AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib AM_CPPFLAGS += $(BOOST_INCLUDES) @@ -134,14 +134,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/cfgrpt/Makefile.am -+++ b/src/lib/cfgrpt/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CXXFLAGS = $(KEA_CXXFLAGS) --- a/src/lib/config/Makefile.am +++ b/src/lib/config/Makefile.am @@ -1,4 +1,4 @@ @@ -277,8 +269,8 @@ --- a/src/lib/process/Makefile.am +++ b/src/lib/process/Makefile.am @@ -1,4 +1,4 @@ --SUBDIRS = . testutils tests -+SUBDIRS = . +-SUBDIRS = cfgrpt . testutils tests ++SUBDIRS = cfgrpt . testutils # DATA_DIR is the directory where to put PID files. dhcp_data_dir = @runstatedir@/@PACKAGE@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib @@ -308,3 +300,67 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/hooks/dhcp/bootp/Makefile.am ++++ b/src/hooks/dhcp/bootp/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests libloadtests ++SUBDIRS = . libloadtests + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/hooks/dhcp/flex_option/Makefile.am ++++ b/src/hooks/dhcp/flex_option/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . libloadtests tests ++SUBDIRS = . libloadtests + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/hooks/dhcp/mysql_cb/Makefile.am ++++ b/src/hooks/dhcp/mysql_cb/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests libloadtests ++SUBDIRS = . libloadtests + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS) +--- a/src/hooks/dhcp/pgsql_cb/Makefile.am ++++ b/src/hooks/dhcp/pgsql_cb/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests libloadtests ++SUBDIRS = . libloadtests + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(PGSQL_CPPFLAGS) +--- a/src/hooks/dhcp/run_script/Makefile.am ++++ b/src/hooks/dhcp/run_script/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . libloadtests tests ++SUBDIRS = . libloadtests + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/d2srv/Makefile.am ++++ b/src/lib/d2srv/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils tests ++SUBDIRS = . testutils + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/process/cfgrpt/Makefile.am ++++ b/src/lib/process/cfgrpt/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CXXFLAGS = $(KEA_CXXFLAGS) +--- a/src/lib/tcp/Makefile.am ++++ b/src/lib/tcp/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index 217b12c13..62f4373f7 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived -PKG_VERSION:=2.2.7 -PKG_RELEASE:=10 +PKG_VERSION:=2.2.8 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software -PKG_HASH:=c61940d874154a560a54627ecf7ef47adebdf832164368d10bf242a4d9b7d49d +PKG_HASH:=85882eb62974f395d4c631be990a41a839594a7e62fbfebcb5649a937a7a1bb6 PKG_CPE_ID:=cpe:/a:keepalived:keepalived PKG_LICENSE:=GPL-2.0-or-later diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index b13f10c40..63beb2983 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -88,8 +88,11 @@ print_notify() { shift local name="$1" shift + local indent="$1" + shift + for notify in "$@"; do - printf '%b%s' "${INDENT_1}" "$notify">> "$KEEPALIVED_CONF" + printf '%b%s' "${indent}" "$notify">> "$KEEPALIVED_CONF" notify="$(echo "$notify" | tr 'a-z' 'A-Z')" printf ' "/bin/busybox env -i ACTION=%s TYPE=%s NAME=%s /sbin/hotplug-call keepalived"\n' "$notify" "$type" "$name" >> "$KEEPALIVED_CONF" done @@ -320,7 +323,7 @@ vrrp_sync_group() { print_elems_indent "$1" "$INDENT_1" no_val_smtp_alert no_val_global_tracking - print_notify "GROUP" "$name" notify_backup notify_master \ + print_notify "GROUP" "$name" "$INDENT_1" notify_backup notify_master \ notify_fault notify config_section_close @@ -352,7 +355,7 @@ vrrp_instance() { no_val_dont_track_primary no_val_smtp_alert no_val_nopreempt \ no_val_use_vmac - print_notify "INSTANCE" "$name" notify_backup notify_master \ + print_notify "INSTANCE" "$name" "$INDENT_1" notify_backup notify_master \ notify_fault notify_stop # Handle virtual_ipaddress & virtual_ipaddress_excluded lists @@ -501,7 +504,12 @@ real_server() { [ -n "$ipaddr" ] && [ -n "$port" ] && { printf '%breal_server %s %d {\n' "${INDENT_1}" "$ipaddr" "$port" >> "$KEEPALIVED_CONF" printf '%bweight %d\n' "${INDENT_2}" "$weight" >> "$KEEPALIVED_CONF" + print_notify "REAL_SERVER" "$name" "$INDENT_2" notify_up notify_down case "$check" in + PING_CHECK) + printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF" + printf '%b}\n' "${INDENT_2}" >> "$KEEPALIVED_CONF" + ;; TCP_CHECK) printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF" print_elems_indent "$1" "$INDENT_3" connect_timeout \ diff --git a/net/librespeed-go/Makefile b/net/librespeed-go/Makefile index ddef5b563..984370e64 100644 --- a/net/librespeed-go/Makefile +++ b/net/librespeed-go/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=librespeed-go PKG_VERSION:=1.1.5 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/librespeed/speedtest-go/tar.gz/v$(PKG_VERSION)? diff --git a/net/librespeed-go/files/librespeed-go.init b/net/librespeed-go/files/librespeed-go.init index 13c333c1a..7ff2c7668 100644 --- a/net/librespeed-go/files/librespeed-go.init +++ b/net/librespeed-go/files/librespeed-go.init @@ -12,6 +12,7 @@ mount_jail_file() { local cfg="$1" local isdir="${2:-0}" local rw="${3:-0}" + local reload="${4:-0}" local value config_get value "config" "$cfg" @@ -31,6 +32,8 @@ mount_jail_file() { else procd_add_jail_mount "$value" fi + + [ "$reload" = "0" ] || procd_append_param file "$value" } start_service() { @@ -74,8 +77,8 @@ start_service() { mount_jail_file "assets_path" "1" mount_jail_file "database_file" "0" "1" - mount_jail_file "tls_cert_file" - mount_jail_file "tls_key_file" + mount_jail_file "tls_cert_file" "0" "0" "1" + mount_jail_file "tls_key_file" "0" "0" "1" procd_close_instance } diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile index cd1950cea..e04350b7f 100644 --- a/net/lighttpd/Makefile +++ b/net/lighttpd/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lighttpd -PKG_VERSION:=1.4.71 +PKG_VERSION:=1.4.72 PKG_RELEASE:=1 # release candidate ~rcX testing; remove for release #PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x -PKG_HASH:=b8b6915da20396fdc354df3324d5e440169b2e5ea7859e3a775213841325afac +PKG_HASH:=f7cade4d69b754a0748c01463c33cd8b456ca9cc03bb09e85a71bcbcd54e55ec PKG_MAINTAINER:=W. Michael Petullo PKG_LICENSE:=BSD-3-Clause diff --git a/net/lighttpd/patches/020-meson-mod_webdav_min.patch b/net/lighttpd/patches/020-meson-mod_webdav_min.patch index 774eb60e4..d16561874 100644 --- a/net/lighttpd/patches/020-meson-mod_webdav_min.patch +++ b/net/lighttpd/patches/020-meson-mod_webdav_min.patch @@ -9,7 +9,7 @@ Subject: [PATCH] [meson] mod_webdav_min w/o deps: xml2 sqlite3 uuid --- a/src/meson.build +++ b/src/meson.build -@@ -876,6 +876,16 @@ if libsasl.found() +@@ -877,6 +877,16 @@ if libsasl.found() ] endif diff --git a/net/modemmanager/Makefile b/net/modemmanager/Makefile index 864127a3d..fa6f1ea60 100644 --- a/net/modemmanager/Makefile +++ b/net/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_SOURCE_VERSION:=1.20.6 -PKG_RELEASE:=14 +PKG_SOURCE_VERSION:=1.22.0 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git -PKG_MIRROR_HASH:=e90103e2e42bb826bbbac83937a9a69f50348cd6ce0d8da655a12b65494ce7c9 +PKG_MIRROR_HASH:=98daa1a15075c88afb3ed0de20dc83fe51d2ba3c66318ce3f731da4616a2e192 PKG_MAINTAINER:=Nicholas Smith PKG_LICENSE:=GPL-2.0-or-later @@ -64,6 +64,7 @@ MESON_ARGS += \ -Dintrospection=false \ -Dman=false \ -Dbash_completion=false \ + -Dbuiltin_plugins=true \ -Db_lto=true \ -Dmbim=$(if $(CONFIG_MODEMMANAGER_WITH_MBIM),true,false) \ -Dqmi=$(if $(CONFIG_MODEMMANAGER_WITH_QMI),true,false) \ @@ -98,10 +99,6 @@ define Package/modemmanager/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so.* $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/lib/ModemManager - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-shared-*.so* $(1)/usr/lib/ModemManager - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-plugin-*.so* $(1)/usr/lib/ModemManager - $(INSTALL_DIR) $(1)/usr/lib/ModemManager/connection.d $(INSTALL_BIN) ./files/10-report-down $(1)/usr/lib/ModemManager/connection.d diff --git a/net/modemmanager/patches/100-ublox-remove-ID_MM_PROCESS-tags.patch b/net/modemmanager/patches/100-ublox-remove-ID_MM_PROCESS-tags.patch new file mode 100644 index 000000000..d1f67537b --- /dev/null +++ b/net/modemmanager/patches/100-ublox-remove-ID_MM_PROCESS-tags.patch @@ -0,0 +1,13 @@ +--- a/src/plugins/ublox/77-mm-ublox-port-types.rules ++++ b/src/plugins/ublox/77-mm-ublox-port-types.rules +@@ -88,8 +88,8 @@ SUBSYSTEMS=="usb", ATTRS{bInterfaceNumbe + # ttyUSB2 (if #2): secondary + # ttyUSB3 (if #3): unused (ignore) + ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_IGNORE}="1" +-ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1", ENV{ID_MM_DEVICE_PROCESS}="1" +-ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1", ENV{ID_MM_DEVICE_PROCESS}="1" ++ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" ++ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" + ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="908b", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_PORT_IGNORE}="1" + + LABEL="mm_ublox_port_types_end" diff --git a/net/netavark/Makefile b/net/netavark/Makefile index d6d976fc2..da04a5e9d 100644 --- a/net/netavark/Makefile +++ b/net/netavark/Makefile @@ -15,6 +15,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:= \ rust/host \ protobuf/host +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/rust/rust-package.mk @@ -36,7 +37,7 @@ define Package/netavark/conffiles /etc/config/netavark endef -CARGO_VARS += \ +CARGO_PKG_VARS += \ PROTOC=$(STAGING_DIR_HOSTPKG)/bin/protoc define Package/netavark/install diff --git a/net/netbird/Makefile b/net/netbird/Makefile index 637df8ded..729564d42 100644 --- a/net/netbird/Makefile +++ b/net/netbird/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netbird -PKG_VERSION:=0.23.6 +PKG_VERSION:=0.23.9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=cb29e237652634f3a2a5774fdc239f615d46cf9339811c707744d1e03797126d +PKG_HASH:=1b037f35d3e426d8cbeba17e4d89d12265cd7e6fbd7c975ce552293e468db35a PKG_MAINTAINER:=Oskari Rauta PKG_LICENSE:=BSD-3-Clause diff --git a/net/nextdns/Makefile b/net/nextdns/Makefile index 7061d39e9..c2caa7d2b 100644 --- a/net/nextdns/Makefile +++ b/net/nextdns/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nextdns -PKG_VERSION:=1.40.1 +PKG_VERSION:=1.41.0 PKG_RELEASE:=1 PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_SOURCE_URL:=https://codeload.github.com/nextdns/nextdns/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=5fec5ed5373d94dcaf8b17ddd78d05ccdfd0faa8b4695d9e926d8e71278ea08e +PKG_HASH:=f13439f3c797769add028bff68974d88452add8b026b6da55fa056020ffbe479 PKG_MAINTAINER:=Olivier Poitrey PKG_LICENSE:=MIT diff --git a/net/nginx/patches/nginx-mod-lua/101-bugfix-don-t-include-pcre.h-with-PCRE2-used.patch b/net/nginx/patches/nginx-mod-lua/101-bugfix-don-t-include-pcre.h-with-PCRE2-used.patch new file mode 100644 index 000000000..da3c4607d --- /dev/null +++ b/net/nginx/patches/nginx-mod-lua/101-bugfix-don-t-include-pcre.h-with-PCRE2-used.patch @@ -0,0 +1,27 @@ +From f968d74c3af8259f325090d282aeb64854cdddf9 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Fri, 13 Oct 2023 20:23:51 +0200 +Subject: [PATCH] bugfix: don't include pcre.h with PCRE2 used + +pcre.h is a PCRE header and is not exposed by PCRE2 library causing +compilation error as the header is not found. + +Don't include pcre.h if nginx is compiled with PCRE2 support enabled. + +Fixes: cb83e33e2657 ("feature: support pcre2") +Signed-off-by: Christian Marangi +--- + nginx-mod-lua/src/ngx_http_lua_common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/nginx-mod-lua/src/ngx_http_lua_common.h ++++ b/nginx-mod-lua/src/ngx_http_lua_common.h +@@ -54,7 +54,7 @@ typedef struct { + #endif + + +-#if (NGX_PCRE) ++#if defined(NGX_PCRE) && !(NGX_PCRE2) + #include + # if (PCRE_MAJOR > 8) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21) + # define LUA_HAVE_PCRE_JIT 1 diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile index e4c776726..1ec7d70d2 100644 --- a/net/openconnect/Makefile +++ b/net/openconnect/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openconnect PKG_VERSION:=9.01 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/ diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index 25fb7d542..d318b97e0 100755 --- a/net/openconnect/files/openconnect.sh +++ b/net/openconnect/files/openconnect.sh @@ -20,6 +20,7 @@ proto_openconnect_init_config() { proto_config_add_int "juniper" proto_config_add_int "reconnect_timeout" proto_config_add_string "vpn_protocol" + proto_config_add_boolean "pfs" proto_config_add_boolean "no_dtls" proto_config_add_string "interface" proto_config_add_string "username" @@ -58,6 +59,7 @@ proto_openconnect_setup() { os \ password \ password2 \ + pfs \ port \ proxy \ reconnect_timeout \ @@ -84,6 +86,7 @@ proto_openconnect_setup() { [ -n "$port" ] && port=":$port" append_args "$server$port" -i "$ifname" --non-inter --syslog --script /lib/netifd/vpnc-script + [ "$pfs" = 1 ] && append_args --pfs [ "$no_dtls" = 1 ] && append_args --no-dtls [ -n "$mtu" ] && append_args --mtu "$mtu" diff --git a/net/openssh/Makefile b/net/openssh/Makefile index c5d969989..ca9380f0b 100644 --- a/net/openssh/Makefile +++ b/net/openssh/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssh -PKG_VERSION:=9.4p1 +PKG_VERSION:=9.5p1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ -PKG_HASH:=3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85 +PKG_HASH:=f026e7b79ba7fb540f75182af96dc8a8f1db395f922bbc9f6ca603672686086b PKG_LICENSE:=BSD ISC PKG_LICENSE_FILES:=LICENCE diff --git a/net/pppossh/Makefile b/net/pppossh/Makefile index 4567ac50b..7cc739ddb 100644 --- a/net/pppossh/Makefile +++ b/net/pppossh/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pppossh -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Yousong Zhou PKG_LICENSE:=GPLv2 @@ -18,7 +18,7 @@ define Package/pppossh SECTION:=net CATEGORY:=Network TITLE:=PPPoSSH (Point-to-Point Protocol over SSH) - DEPENDS:=+ppp +resolveip @(PACKAGE_dropbear||PACKAGE_openssh-client) + DEPENDS:=+ppp +resolveip @(DROPBEAR_DBCLIENT||PACKAGE_openssh-client) PKGARCH:=all endef diff --git a/net/samba4/Makefile b/net/samba4/Makefile index f0840cebb..4afa87463 100644 --- a/net/samba4/Makefile +++ b/net/samba4/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba -PKG_VERSION:=4.18.6 +PKG_VERSION:=4.18.8 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -13,7 +13,7 @@ PKG_SOURCE_URL:= \ http://www.nic.funet.fi/index/samba/pub/samba/stable/ \ http://samba.mirror.bit.nl/samba/ftp/stable/ \ https://download.samba.org/pub/samba/stable/ -PKG_HASH:=284c8a994ce989c87cd6808c390fcb9d00c36b21a0dc1a8a75474b67c9e715e7 +PKG_HASH:=4fb87bceaeb01d832a59046c197a044b7e8e8000581548b5d577a6cda03344d1 PKG_BUILD_FLAGS:=gc-sections diff --git a/net/sing-box/Makefile b/net/sing-box/Makefile index dd3b3b026..20a7c6dd0 100644 --- a/net/sing-box/Makefile +++ b/net/sing-box/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sing-box -PKG_VERSION:=1.4.3 +PKG_VERSION:=1.5.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=baf7c87f2e5005bf268975b1a2511f30927210b1607f20451fec2de0044edfa8 +PKG_HASH:=ad344a5fe0a515e3e5d0ab8102482b4a3d38932cf754756e1d48db17d36a5609 PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=LICENSE @@ -54,6 +54,7 @@ define Package/sing-box/config config SINGBOX_WITH_ECH bool "Build with TLS ECH extension support for TLS outbound" + default y config SINGBOX_WITH_EMBEDDED_TOR bool "Build with embedded Tor support" @@ -78,6 +79,8 @@ define Package/sing-box/config config SINGBOX_WITH_SHADOWSOCKSR bool "Build with ShadowsocksR support" + help + It will be marked deprecated in 1.5.0 and removed entirely in 1.6.0. config SINGBOX_WITH_UTLS bool "Build with uTLS support for TLS outbound" diff --git a/net/snowflake/Makefile b/net/snowflake/Makefile index a7f3e61bc..73b36d78b 100644 --- a/net/snowflake/Makefile +++ b/net/snowflake/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=snowflake -PKG_VERSION:=2.6.0 +PKG_VERSION:=2.6.1 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_MIRROR_HASH:=a982f792c0184158e1842d8d191a7786f46030725bf3da1410c0d70b274cbd62 +PKG_MIRROR_HASH:=c6a7ef515bae874c42220ab52dd597c08df4569e7d97f700e5c80c8946e205bd PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/net/snowflake/patches/0001-Bump-minimum-required-version-of-go.patch b/net/snowflake/patches/0001-Bump-minimum-required-version-of-go.patch deleted file mode 100644 index b5d503aeb..000000000 --- a/net/snowflake/patches/0001-Bump-minimum-required-version-of-go.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 08d1c6d6551464d526d4bbe608384b8e7dec32ee Mon Sep 17 00:00:00 2001 -From: Cecylia Bocovich -Date: Tue, 20 Jun 2023 14:49:36 -0400 -Subject: [PATCH] Bump minimum required version of go - -The version of x/sys we're using requires go1.17 or later ---- - go.mod | 41 ++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 40 insertions(+), 1 deletion(-) - ---- a/go.mod -+++ b/go.mod -@@ -1,6 +1,6 @@ - module gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2 - --go 1.15 -+go 1.17 - - require ( - github.com/clarkduvall/hyperloglog v0.0.0-20171127014514-a0107a5d8004 -@@ -23,3 +23,42 @@ require ( - golang.org/x/sys v0.5.0 - google.golang.org/protobuf v1.26.0 - ) -+ -+require ( -+ github.com/beorn7/perks v1.0.1 // indirect -+ github.com/cespare/xxhash/v2 v2.1.1 // indirect -+ github.com/davecgh/go-spew v1.1.1 // indirect -+ github.com/golang/protobuf v1.5.2 // indirect -+ github.com/google/uuid v1.3.0 // indirect -+ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect -+ github.com/jtolds/gls v4.20.0+incompatible // indirect -+ github.com/klauspost/cpuid v1.3.1 // indirect -+ github.com/klauspost/reedsolomon v1.9.9 // indirect -+ github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect -+ github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104 // indirect -+ github.com/pion/datachannel v1.5.5 // indirect -+ github.com/pion/dtls/v2 v2.2.6 // indirect -+ github.com/pion/interceptor v0.1.12 // indirect -+ github.com/pion/logging v0.2.2 // indirect -+ github.com/pion/mdns v0.0.7 // indirect -+ github.com/pion/randutil v0.1.0 // indirect -+ github.com/pion/rtcp v1.2.10 // indirect -+ github.com/pion/rtp v1.7.13 // indirect -+ github.com/pion/sctp v1.8.6 // indirect -+ github.com/pion/srtp/v2 v2.0.12 // indirect -+ github.com/pion/transport/v2 v2.0.2 // indirect -+ github.com/pion/turn/v2 v2.1.0 // indirect -+ github.com/pion/udp/v2 v2.0.1 // indirect -+ github.com/pkg/errors v0.9.1 // indirect -+ github.com/pmezard/go-difflib v1.0.0 // indirect -+ github.com/prometheus/common v0.18.0 // indirect -+ github.com/prometheus/procfs v0.6.0 // indirect -+ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect -+ github.com/templexxx/cpu v0.0.7 // indirect -+ github.com/templexxx/xorsimd v0.4.1 // indirect -+ github.com/tjfoc/gmsm v1.3.2 // indirect -+ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect -+ golang.org/x/text v0.7.0 // indirect -+ golang.org/x/tools v0.1.12 // indirect -+ gopkg.in/yaml.v3 v3.0.1 // indirect -+) diff --git a/net/snowflake/patches/0002-Update-dependencies.patch b/net/snowflake/patches/0002-Update-dependencies.patch deleted file mode 100644 index b82a01f07..000000000 --- a/net/snowflake/patches/0002-Update-dependencies.patch +++ /dev/null @@ -1,792 +0,0 @@ -From aaeab3f4157d90fdc2db4ab6e0ba0547351f10c1 Mon Sep 17 00:00:00 2001 -From: meskio -Date: Mon, 3 Jul 2023 19:52:57 +0200 -Subject: [PATCH] Update dependencies - -So renovate doesn't create tons of merge requests. ---- - go.mod | 68 ++++---- - go.sum | 481 +++++++++++++-------------------------------------------- - 2 files changed, 143 insertions(+), 406 deletions(-) - ---- a/go.mod -+++ b/go.mod -@@ -5,60 +5,60 @@ go 1.17 - require ( - github.com/clarkduvall/hyperloglog v0.0.0-20171127014514-a0107a5d8004 - github.com/gorilla/websocket v1.5.0 -- github.com/pion/ice/v2 v2.3.1 -+ github.com/pion/ice/v2 v2.3.8 - github.com/pion/sdp/v3 v3.0.6 -- github.com/pion/stun v0.4.0 -- github.com/pion/webrtc/v3 v3.1.57 -- github.com/prometheus/client_golang v1.10.0 -- github.com/prometheus/client_model v0.2.0 -- github.com/refraction-networking/utls v1.0.0 -+ github.com/pion/stun v0.6.1 -+ github.com/pion/webrtc/v3 v3.2.11 -+ github.com/prometheus/client_golang v1.16.0 -+ github.com/prometheus/client_model v0.4.0 -+ github.com/refraction-networking/utls v1.3.2 - github.com/smartystreets/goconvey v1.6.4 -- github.com/stretchr/testify v1.8.1 -- github.com/xtaci/kcp-go/v5 v5.6.1 -- github.com/xtaci/smux v1.5.15 -+ github.com/stretchr/testify v1.8.4 -+ github.com/xtaci/kcp-go/v5 v5.6.2 -+ github.com/xtaci/smux v1.5.24 - gitlab.torproject.org/tpo/anti-censorship/geoip v0.0.0-20210928150955-7ce4b3d98d01 - gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib v1.4.0 -- golang.org/x/crypto v0.6.0 -- golang.org/x/net v0.7.0 -- golang.org/x/sys v0.5.0 -- google.golang.org/protobuf v1.26.0 -+ golang.org/x/crypto v0.10.0 -+ golang.org/x/net v0.11.0 -+ golang.org/x/sys v0.9.0 -+ google.golang.org/protobuf v1.31.0 - ) - - require ( -+ github.com/andybalholm/brotli v1.0.5 // indirect - github.com/beorn7/perks v1.0.1 // indirect -- github.com/cespare/xxhash/v2 v2.1.1 // indirect -+ github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect -- github.com/golang/protobuf v1.5.2 // indirect -+ github.com/gaukas/godicttls v0.0.4 // indirect -+ github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect - github.com/jtolds/gls v4.20.0+incompatible // indirect -- github.com/klauspost/cpuid v1.3.1 // indirect -- github.com/klauspost/reedsolomon v1.9.9 // indirect -- github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect -- github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104 // indirect -+ github.com/klauspost/compress v1.16.7 // indirect -+ github.com/klauspost/cpuid/v2 v2.2.5 // indirect -+ github.com/klauspost/reedsolomon v1.11.8 // indirect -+ github.com/kr/text v0.2.0 // indirect -+ github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/pion/datachannel v1.5.5 // indirect -- github.com/pion/dtls/v2 v2.2.6 // indirect -- github.com/pion/interceptor v0.1.12 // indirect -+ github.com/pion/dtls/v2 v2.2.7 // indirect -+ github.com/pion/interceptor v0.1.17 // indirect - github.com/pion/logging v0.2.2 // indirect - github.com/pion/mdns v0.0.7 // indirect - github.com/pion/randutil v0.1.0 // indirect - github.com/pion/rtcp v1.2.10 // indirect - github.com/pion/rtp v1.7.13 // indirect -- github.com/pion/sctp v1.8.6 // indirect -- github.com/pion/srtp/v2 v2.0.12 // indirect -- github.com/pion/transport/v2 v2.0.2 // indirect -- github.com/pion/turn/v2 v2.1.0 // indirect -- github.com/pion/udp/v2 v2.0.1 // indirect -+ github.com/pion/sctp v1.8.7 // indirect -+ github.com/pion/srtp/v2 v2.0.15 // indirect -+ github.com/pion/transport/v2 v2.2.1 // indirect -+ github.com/pion/turn/v2 v2.1.2 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect -- github.com/prometheus/common v0.18.0 // indirect -- github.com/prometheus/procfs v0.6.0 // indirect -+ github.com/prometheus/common v0.44.0 // indirect -+ github.com/prometheus/procfs v0.11.0 // indirect - github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect -- github.com/templexxx/cpu v0.0.7 // indirect -- github.com/templexxx/xorsimd v0.4.1 // indirect -- github.com/tjfoc/gmsm v1.3.2 // indirect -- golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect -- golang.org/x/text v0.7.0 // indirect -- golang.org/x/tools v0.1.12 // indirect -+ github.com/templexxx/cpu v0.1.0 // indirect -+ github.com/templexxx/xorsimd v0.4.2 // indirect -+ github.com/tjfoc/gmsm v1.4.1 // indirect -+ golang.org/x/text v0.10.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - ) ---- a/go.sum -+++ b/go.sum -@@ -1,239 +1,91 @@ - cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= --cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= - github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= --github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= --github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= --github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= --github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= --github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= --github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= --github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= --github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= --github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= --github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= --github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= --github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= --github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= --github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= --github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= --github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= --github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= --github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= --github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= --github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= --github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -+github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -+github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= - github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= - github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= --github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= --github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= --github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= - github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= --github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= --github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -+github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= - github.com/clarkduvall/hyperloglog v0.0.0-20171127014514-a0107a5d8004 h1:mK6JroY6bLiPS3s6QCYOSjRyErFc2iHNkhhmRfF0nHo= - github.com/clarkduvall/hyperloglog v0.0.0-20171127014514-a0107a5d8004/go.mod h1:drodPoQNro6QBO6TJ/MpMZbz8Bn2eSDtRN6jpG4VGw8= --github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= - github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= --github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= --github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= --github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= --github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= --github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= --github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= --github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= - github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= - github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= - github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= --github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= --github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= --github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= --github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= --github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= --github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= --github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= --github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= - github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= --github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= --github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= --github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= - github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= - github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= --github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= --github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= --github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= --github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= --github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= --github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= --github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= --github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= --github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -+github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk= -+github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= - github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= --github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= --github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= --github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= --github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= --github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= --github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= - github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= - github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= --github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= - github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= - github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= - github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= - github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= - github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= - github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= - github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= --github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= - github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= --github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= - github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= --github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= --github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= --github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -+github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -+github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= - github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= - github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= - github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= - github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= --github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= --github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= - github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= --github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= --github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= --github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= - github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= - github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= - github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= - github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= --github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= --github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= --github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= --github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= - github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= - github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= --github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= --github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= --github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= --github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= --github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= --github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= --github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= --github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= --github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= --github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= --github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= --github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= --github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= --github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= --github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= --github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= --github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= --github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= --github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= --github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= --github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= --github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= --github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= - github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= --github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= --github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= --github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= --github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= --github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= --github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= --github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= --github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= --github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= --github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= - github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= - github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= --github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= --github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= --github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= --github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= --github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= --github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= --github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= --github.com/klauspost/reedsolomon v1.9.9 h1:qCL7LZlv17xMixl55nq2/Oa1Y86nfO8EqDfv2GHND54= --github.com/klauspost/reedsolomon v1.9.9/go.mod h1:O7yFFHiQwDR6b2t63KPUpccPtNdp5ADgh1gg4fd12wo= --github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= --github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= --github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= --github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -+github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -+github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -+github.com/klauspost/cpuid/v2 v2.0.14/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -+github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -+github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -+github.com/klauspost/reedsolomon v1.10.0/go.mod h1:qHMIzMkuZUWqIh8mS/GruPdo3u0qwX2jk/LH440ON7Y= -+github.com/klauspost/reedsolomon v1.11.8 h1:s8RpUW5TK4hjr+djiOpbZJB4ksx+TdYbRH7vHQpwPOY= -+github.com/klauspost/reedsolomon v1.11.8/go.mod h1:4bXRN+cVzMdml6ti7qLouuYi32KHJ5MGv0Qd8a47h6A= - github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= - github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= --github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= - github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= --github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= --github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= --github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= --github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= --github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= --github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= --github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= --github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= --github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= --github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= --github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= --github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= --github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= --github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= --github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= --github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= --github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= --github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104 h1:ULR/QWMgcgRiZLUjSSJMU+fW+RDMstRdmnDWj9Q+AsA= --github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104/go.mod h1:wqKykBG2QzQDJEzvRkcS8x6MiSJkF52hXZsXcjaB3ls= --github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= --github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= --github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= --github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= --github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= --github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= --github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= --github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= --github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= --github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= --github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= --github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= --github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -+github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -+github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= - github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= - github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= --github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= --github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= --github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= - github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= --github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= - github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= - github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= - github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= --github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= - github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= - github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= - github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= --github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= --github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= --github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= --github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= --github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= --github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= --github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= --github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= --github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= --github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= --github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= --github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= --github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= --github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= --github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= - github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8= - github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0= --github.com/pion/dtls/v2 v2.2.6 h1:yXMxKr0Skd+Ub6A8UqXTRLSywskx93ooMRHsQUtd+Z4= --github.com/pion/dtls/v2 v2.2.6/go.mod h1:t8fWJCIquY5rlQZwA2yWxUS1+OCrAdXrhVKXB5oD/wY= --github.com/pion/ice/v2 v2.3.1 h1:FQCmUfZe2Jpe7LYStVBOP6z1DiSzbIateih3TztgTjc= --github.com/pion/ice/v2 v2.3.1/go.mod h1:aq2kc6MtYNcn4XmMhobAv6hTNJiHzvD0yXRz80+bnP8= --github.com/pion/interceptor v0.1.12 h1:CslaNriCFUItiXS5o+hh5lpL0t0ytQkFnUcbbCs2Zq8= --github.com/pion/interceptor v0.1.12/go.mod h1:bDtgAD9dRkBZpWHGKaoKb42FhDHTG2rX8Ii9LRALLVA= -+github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= -+github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= -+github.com/pion/ice/v2 v2.3.8 h1:/4vM7uFPJez3PhNhlqUcJhboYaDNWo+R8oAuMj2cKsA= -+github.com/pion/ice/v2 v2.3.8/go.mod h1:DoMA9FvsfNTBVnjyRf2t4EhUkSp9tNrH77fMtPFYygQ= -+github.com/pion/interceptor v0.1.17 h1:prJtgwFh/gB8zMqGZoOgJPHivOwVAp61i2aG61Du/1w= -+github.com/pion/interceptor v0.1.17/go.mod h1:SY8kpmfVBvrbUzvj2bsXz7OJt5JvmVNZ+4Kjq7FcwrI= - github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= - github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= - github.com/pion/mdns v0.0.7 h1:P0UB4Sr6xDWEox0kTVxF0LmQihtCbSAdW0H2nEgkA3U= -@@ -245,297 +97,196 @@ github.com/pion/rtcp v1.2.10/go.mod h1:z - github.com/pion/rtp v1.7.13 h1:qcHwlmtiI50t1XivvoawdCGTP4Uiypzfrsap+bijcoA= - github.com/pion/rtp v1.7.13/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko= - github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= --github.com/pion/sctp v1.8.6 h1:CUex11Vkt9YS++VhLf8b55O3VqKrWL6W3SDwX4jAqsI= --github.com/pion/sctp v1.8.6/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= -+github.com/pion/sctp v1.8.7 h1:JnABvFakZueGAn4KU/4PSKg+GWbF6QWbKTWZOSGJjXw= -+github.com/pion/sctp v1.8.7/go.mod h1:g1Ul+ARqZq5JEmoFy87Q/4CePtKnTJ1QCL9dBBdN6AU= - github.com/pion/sdp/v3 v3.0.6 h1:WuDLhtuFUUVpTfus9ILC4HRyHsW6TdugjEX/QY9OiUw= - github.com/pion/sdp/v3 v3.0.6/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw= --github.com/pion/srtp/v2 v2.0.12 h1:WrmiVCubGMOAObBU1vwWjG0H3VSyQHawKeer2PVA5rY= --github.com/pion/srtp/v2 v2.0.12/go.mod h1:C3Ep44hlOo2qEYaq4ddsmK5dL63eLehXFbHaZ9F5V9Y= --github.com/pion/stun v0.4.0 h1:vgRrbBE2htWHy7l3Zsxckk7rkjnjOsSM7PHZnBwo8rk= -+github.com/pion/srtp/v2 v2.0.15 h1:+tqRtXGsGwHC0G0IUIAzRmdkHvriF79IHVfZGfHrQoA= -+github.com/pion/srtp/v2 v2.0.15/go.mod h1:b/pQOlDrbB0HEH5EUAQXzSYxikFbNcNuKmF8tM0hCtw= - github.com/pion/stun v0.4.0/go.mod h1:QPsh1/SbXASntw3zkkrIk3ZJVKz4saBY2G7S10P3wCw= -+github.com/pion/stun v0.6.0/go.mod h1:HPqcfoeqQn9cuaet7AOmB5e5xkObu9DwBdurwLKO9oA= -+github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= -+github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= - github.com/pion/transport v0.14.1 h1:XSM6olwW+o8J4SCmOBb/BpwZypkHeyM0PGFCxNQBr40= - github.com/pion/transport v0.14.1/go.mod h1:4tGmbk00NeYA3rUa9+n+dzCCoKkcy3YlYb99Jn2fNnI= - github.com/pion/transport/v2 v2.0.0/go.mod h1:HS2MEBJTwD+1ZI2eSXSvHJx/HnzQqRy2/LXxt6eVMHc= --github.com/pion/transport/v2 v2.0.2 h1:St+8o+1PEzPT51O9bv+tH/KYYLMNR5Vwm5Z3Qkjsywg= --github.com/pion/transport/v2 v2.0.2/go.mod h1:vrz6bUbFr/cjdwbnxq8OdDDzHf7JJfGsIRkxfpZoTA0= --github.com/pion/turn/v2 v2.1.0 h1:5wGHSgGhJhP/RpabkUb/T9PdsAjkGLS6toYz5HNzoSI= -+github.com/pion/transport/v2 v2.1.0/go.mod h1:AdSw4YBZVDkZm8fpoz+fclXyQwANWmZAlDuQdctTThQ= -+github.com/pion/transport/v2 v2.2.0/go.mod h1:AdSw4YBZVDkZm8fpoz+fclXyQwANWmZAlDuQdctTThQ= -+github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= -+github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= - github.com/pion/turn/v2 v2.1.0/go.mod h1:yrT5XbXSGX1VFSF31A3c1kCNB5bBZgk/uu5LET162qs= --github.com/pion/udp/v2 v2.0.1 h1:xP0z6WNux1zWEjhC7onRA3EwwSliXqu1ElUZAQhUP54= --github.com/pion/udp/v2 v2.0.1/go.mod h1:B7uvTMP00lzWdyMr/1PVZXtV3wpPIxBRd4Wl6AksXn8= --github.com/pion/webrtc/v3 v3.1.57 h1:dv0xnlAEwXKsoHkWcH1kVBodMTxSNCT9L/t8TAhFaQ0= --github.com/pion/webrtc/v3 v3.1.57/go.mod h1:7VhbA6ihqJlz6R/INHjyh1b8HpiV9Ct4UQvE1OB/xoM= --github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= --github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -+github.com/pion/turn/v2 v2.1.2 h1:wj0cAoGKltaZ790XEGW9HwoUewqjliwmhtxCuB2ApyM= -+github.com/pion/turn/v2 v2.1.2/go.mod h1:1kjnPkBcex3dhCU2Am+AAmxDcGhLX3WnMfmkNpvSTQU= -+github.com/pion/webrtc/v3 v3.2.11 h1:lfGKYZcG7ghCTQWn+zsD+icIIWL3qIfclEjBGk537+s= -+github.com/pion/webrtc/v3 v3.2.11/go.mod h1:fejQio1v8tKG4ntq4u8H4uDHsCNX6eX7bT093t4H+0E= - github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= - github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= --github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= - github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= - github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= --github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= --github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= --github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= --github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= --github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= --github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= --github.com/prometheus/client_golang v1.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg= --github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= --github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= --github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= --github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -+github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -+github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= - github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= --github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= --github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= --github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= --github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= --github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= --github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= --github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= --github.com/prometheus/common v0.18.0 h1:WCVKW7aL6LEe1uryfI9dnEc2ZqNB1Fn0ok930v0iL1Y= --github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= --github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= --github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= --github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= --github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= --github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= --github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= --github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= --github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= --github.com/refraction-networking/utls v1.0.0 h1:6XQHSjDmeBCF9sPq8p2zMVGq7Ud3rTD2q88Fw8Tz1tA= --github.com/refraction-networking/utls v1.0.0/go.mod h1:tz9gX959MEFfFN5whTIocCLUG57WiILqtdVxI8c6Wj0= --github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= --github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= --github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= --github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= --github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -+github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -+github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -+github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -+github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -+github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -+github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -+github.com/refraction-networking/utls v1.3.2 h1:o+AkWB57mkcoW36ET7uJ002CpBWHu0KPxi6vzxvPnv8= -+github.com/refraction-networking/utls v1.3.2/go.mod h1:fmoaOww2bxzzEpIKOebIsnBvjQpqP7L2vcm/9KUfm/E= -+github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= - github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= --github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= --github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= --github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= --github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= --github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= - github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= - github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= - github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= - github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= --github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= --github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= --github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= --github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= --github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= --github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= --github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= - github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= --github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= - github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= - github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= --github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= --github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= --github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= - github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= - github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= - github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= - github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= --github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= - github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -+github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -+github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= - github.com/templexxx/cpu v0.0.1/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk= --github.com/templexxx/cpu v0.0.7 h1:pUEZn8JBy/w5yzdYWgx+0m0xL9uk6j4K91C5kOViAzo= --github.com/templexxx/cpu v0.0.7/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk= --github.com/templexxx/xorsimd v0.4.1 h1:iUZcywbOYDRAZUasAs2eSCUW8eobuZDy0I9FJiORkVg= -+github.com/templexxx/cpu v0.0.9/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk= -+github.com/templexxx/cpu v0.1.0 h1:wVM+WIJP2nYaxVxqgHPD4wGA2aJ9rvrQRV8CvFzNb40= -+github.com/templexxx/cpu v0.1.0/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk= - github.com/templexxx/xorsimd v0.4.1/go.mod h1:W+ffZz8jJMH2SXwuKu9WhygqBMbFnp14G2fqEr8qaNo= --github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= --github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= --github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= --github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= --github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= --github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= --github.com/xtaci/kcp-go/v5 v5.6.1 h1:Pwn0aoeNSPF9dTS7IgiPXn0HEtaIlVb6y5UKWPsx8bI= --github.com/xtaci/kcp-go/v5 v5.6.1/go.mod h1:W3kVPyNYwZ06p79dNwFWQOVFrdcBpDBsdyvK8moQrYo= -+github.com/templexxx/xorsimd v0.4.2 h1:ocZZ+Nvu65LGHmCLZ7OoCtg8Fx8jnHKK37SjvngUoVI= -+github.com/templexxx/xorsimd v0.4.2/go.mod h1:HgwaPoDREdi6OnULpSfxhzaiiSUY4Fi3JPn1wpt28NI= -+github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho= -+github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= -+github.com/xtaci/kcp-go/v5 v5.6.2 h1:pSXMa5MOsb+EIZKe4sDBqlTExu2A/2Z+DFhoX2qtt2A= -+github.com/xtaci/kcp-go/v5 v5.6.2/go.mod h1:LsinWoru+lWWJHb+EM9HeuqYxV6bb9rNcK12v67jYzQ= - github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM= - github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= --github.com/xtaci/smux v1.5.15 h1:6hMiXswcleXj5oNfcJc+DXS8Vj36XX2LaX98udog6Kc= --github.com/xtaci/smux v1.5.15/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY= --github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= --github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -+github.com/xtaci/smux v1.5.24 h1:77emW9dtnOxxOQ5ltR+8BbsX1kzcOxQ5gB+aaV9hXOY= -+github.com/xtaci/smux v1.5.24/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY= - github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= - github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= - gitlab.torproject.org/tpo/anti-censorship/geoip v0.0.0-20210928150955-7ce4b3d98d01 h1:4949mHh9Vj2/okk48yG8nhP6TosFWOUfSfSr502sKGE= - gitlab.torproject.org/tpo/anti-censorship/geoip v0.0.0-20210928150955-7ce4b3d98d01/go.mod h1:K3LOI4H8fa6j+7E10ViHeGEQV10304FG4j94ypmKLjY= - gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib v1.4.0 h1:Y7fHDMy11yyjM+YlHfcM3svaujdL+m5DqS444wbj8o4= - gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib v1.4.0/go.mod h1:70bhd4JKW/+1HLfm+TMrgHJsUHG4coelMWwiVEJ2gAg= --go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= --go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= --go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= --go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= --go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= --go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= --go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= --go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= --go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= --go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= --go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= --go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= --golang.org/x/arch v0.0.0-20190909030613-46d78d1859ac/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= --golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= --golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= --golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= --golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= - golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= --golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= --golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -+golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= --golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= --golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= --golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -+golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -+golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= -+golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -+golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -+golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= - golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= - golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= - golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= --golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= - golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= --golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= --golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= --golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= --golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= - golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= --golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= - golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= - golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= - golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= --golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= --golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= --golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= --golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= --golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= --golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= - golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= - golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= - golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= --golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= --golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= - golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= --golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= --golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= - golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= --golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= --golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -+golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= - golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= - golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= - golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -+golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= - golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= - golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= - golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= - golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= --golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= --golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -+golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -+golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -+golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -+golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= - golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= --golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= - golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= --golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= --golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= --golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= --golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= --golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= --golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= - golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= --golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= --golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= --golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= --golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= - golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= - golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20200808120158-1030fc2bf1d9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= --golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= - golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -+golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= - golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= - golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= - golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -+golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -+golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= - golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= --golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= - golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= - golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= - golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= - golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= - golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= --golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= - golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= --golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= --golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= --golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= --golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -+golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -+golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -+golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= - golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= - golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= - golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= - golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= --golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= - golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= - golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= --golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= --golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= --golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= - golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= --golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= --golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= --golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= - golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= --golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= - golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= - golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= - golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= - golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= --golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= --google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= - google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= --google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= - google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= - google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= --google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= --google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= --google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= - google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= --google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= - google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= --google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= --google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= --google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= --google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= - google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= --google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= --google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -+google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= - google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= - google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= - google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -@@ -543,34 +294,20 @@ google.golang.org/protobuf v1.20.1-0.202 - google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= - google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= - google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= --google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= - google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= --gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -+google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -+google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= - gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= --gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= --gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= --gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= --gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= - gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= --gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= --gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= --gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= --gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= --gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= - gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= - gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= --gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= - gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= - gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= - gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= - gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= --honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= - honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= - honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= --honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= --rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= --sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= --sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/net/sshtunnel/Makefile b/net/sshtunnel/Makefile index 0b816dcd3..023828993 100644 --- a/net/sshtunnel/Makefile +++ b/net/sshtunnel/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sshtunnel -PKG_VERSION:=4 -PKG_RELEASE:=5 +PKG_VERSION:=5 +PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0-or-later PKG_MAINTAINER:=Nuno Goncalves @@ -21,7 +21,7 @@ define Package/sshtunnel CATEGORY:=Network SUBMENU:=SSH TITLE:=Manages local and remote openssh ssh(1) tunnels - DEPENDS:=+openssh-client + DEPENDS:=@(DROPBEAR_DBCLIENT||PACKAGE_openssh-client) PKGARCH:=all endef diff --git a/net/sshtunnel/files/sshtunnel.init b/net/sshtunnel/files/sshtunnel.init index 3db8dbb11..8b8f97f93 100644 --- a/net/sshtunnel/files/sshtunnel.init +++ b/net/sshtunnel/files/sshtunnel.init @@ -47,17 +47,18 @@ validate_server_section() { 'Compression:or("yes", "no")' \ 'CompressionLevel:range(1,9)' \ 'IdentityFile:file' \ - 'LogLevel:or("QUIET", "FATAL", "ERROR", "INFO", "VERBOSE", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3"):INFO' \ + 'LogLevel:or("QUIET", "FATAL", "ERROR", "INFO", "VERBOSE", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3")' \ 'ServerAliveCountMax:min(1)' \ 'ServerAliveInterval:min(0)' \ - 'StrictHostKeyChecking:or("yes", "no", "accept-new")' \ + 'StrictHostKeyChecking:or("yes", "no", "accept-new"):accept-new' \ 'TCPKeepAlive:or("yes", "no")' \ 'VerifyHostKeyDNS:or("yes", "no")' } validate_tunnelR_section() { uci_load_validate sshtunnel tunnelR "$1" "$2" \ - 'remoteaddress:or(host, "*"):*' \ + 'enabled:bool:1' \ + 'remoteaddress:or(host, "*")' \ 'remoteport:port' \ 'localaddress:host' \ 'localport:port' @@ -65,20 +66,23 @@ validate_tunnelR_section() { validate_tunnelL_section() { uci_load_validate sshtunnel tunnelL "$1" "$2" \ + 'enabled:bool:1' \ 'remoteaddress:host' \ 'remoteport:port' \ - 'localaddress:or(host, "*"):*' \ + 'localaddress:or(host, "*")' \ 'localport:port' } validate_tunnelD_section() { uci_load_validate sshtunnel tunnelD "$1" "$2" \ - 'localaddress:or(host, "*"):*' \ + 'enabled:bool:1' \ + 'localaddress:or(host, "*")' \ 'localport:port' } validate_tunnelW_section() { uci_load_validate sshtunnel tunnelW "$1" "$2" \ + 'enabled:bool:1' \ 'vpntype:or("ethernet", "point-to-point"):point-to-point' \ 'localdev:or("any", min(0))' \ 'remotedev:or("any", min(0))' @@ -86,6 +90,7 @@ validate_tunnelW_section() { load_tunnelR() { config_get section_server "$1" "server" + [ "$enabled" = 0 ] && return 0 # continue to read next section if this is not for the current server [ "$server" = "$section_server" ] || return 0 @@ -93,7 +98,7 @@ load_tunnelR() { # validate and load this remote tunnel config [ "$2" = 0 ] || { _err "tunnelR $1: validation failed"; return 1; } - [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelR $1: missing required options"; return 1; } + [ -n "$remoteport" -a -n "$localport" ] || { _err "tunnelR $1: missing required options"; return 1; } # count nr of valid sections to make sure there are at least one count=$((count+=1)) @@ -104,6 +109,7 @@ load_tunnelR() { load_tunnelL() { config_get section_server "$1" "server" + [ "$enabled" = 0 ] && return 0 # continue to read next section if this is not for the current server [ "$server" = "$section_server" ] || return 0 @@ -111,7 +117,7 @@ load_tunnelL() { # validate and load this remote tunnel config [ "$2" = 0 ] || { _err "tunnelL $1: validation failed"; return 1; } - [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelL $1: missing required options"; return 1; } + [ -n "$remoteport" -a -n "$localport" ] || { _err "tunnelL $1: missing required options"; return 1; } # count nr of valid sections to make sure there are at least one count=$((count+=1)) @@ -122,6 +128,7 @@ load_tunnelL() { load_tunnelD() { config_get section_server "$1" "server" + [ "$enabled" = 0 ] && return 0 # continue to read next section if this is not for the current server [ "$server" = "$section_server" ] || return 0 @@ -140,6 +147,7 @@ load_tunnelD() { load_tunnelW() { config_get section_server "$1" "server" + [ "$enabled" = 0 ] && return 0 # continue to read next section if this is not for the current server [ "$server" = "$section_server" ] || return 0 @@ -174,11 +182,19 @@ load_server() { config_foreach validate_tunnelW_section "tunnelW" load_tunnelW [ "$count" -eq 0 ] && { _err "tunnels to $server not started - no tunnels defined"; return 1; } - append_params CheckHostIP Compression CompressionLevel IdentityFile \ + append_params CheckHostIP Compression CompressionLevel \ LogLevel PKCS11Provider ServerAliveCountMax ServerAliveInterval \ StrictHostKeyChecking TCPKeepAlive VerifyHostKeyDNS - ARGS="$ARGS_options -o ExitOnForwardFailure=yes -o BatchMode=yes -nN $ARGS_tunnels -p $port $user@$hostname" + # dropbear doesn't support -o IdentityFile so use -i instead + [ -n "$IdentityFile" ] && ARGS_options="$ARGS_options -i $IdentityFile" + # dbclient doesn't support StrictHostKeyChecking but it has the -y option that works same + [ "$StrictHostKeyChecking" = "accept-new" ] && ARGS_options="$ARGS_options -y" + [ "$StrictHostKeyChecking" = "no" ] && ARGS_options="$ARGS_options -yy" + ARGS="$ARGS_options -o ExitOnForwardFailure=yes -o BatchMode=yes -nN $ARGS_tunnels " + [ -n "$port" ] && ARGS="$ARGS -p $port " + [ -n "$user" ] && ARGS="$ARGS $user@" + ARGS="${ARGS}$hostname" procd_open_instance "$server" procd_set_param command "$PROG" $ARGS diff --git a/net/sshtunnel/files/uci_sshtunnel b/net/sshtunnel/files/uci_sshtunnel index 87ab9eda9..496e47030 100644 --- a/net/sshtunnel/files/uci_sshtunnel +++ b/net/sshtunnel/files/uci_sshtunnel @@ -1,19 +1,17 @@ -# -# Password authentication is not possible, public key authentication must be used. -# Set "option IdentityFile" to the file from which the identity (private key) for RSA or DSA authentication is read. -# The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. -# ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames. -# +# Password auth is not possible so only Public Key auth must be used. +# Set "option IdentityFile" to the file from which the identity (private key) is read. +# By default the OpenSSH client checks for /root/.ssh/id_rsa, /root/.ssh/id_ed25519 and /root/.ssh/id_ecdsa +# See https://openwrt.org/docs/guide-user/services/ssh/sshtunnel -#config server disney -# option user mourinho -# option hostname server.disney.com +#config server example +# option user root +# option hostname server.example.com # option port 22 -# option retrydelay 1 +# option retrydelay 1 # option CheckHostIP yes # option Compression no # option CompressionLevel 6 -# option IdentityFile ~/.ssh/id_rsa +# option IdentityFile /root/.ssh/id_rsa # option LogLevel INFO # option PKCS11Provider /lib/pteidpkcs11.so # option ServerAliveCountMax 3 @@ -26,7 +24,7 @@ # remoteaddress:remoteport and then forwarded to localaddress:localport # #config tunnelR http -# option server disney +# option server example # option remoteaddress * # option remoteport 9009 # option localaddress 192.168.1.13 @@ -36,17 +34,17 @@ # localaddress:localport and then forwarded to remoteaddress:remoteport # #config tunnelL test -# option server disney +# option server example # option localaddress * # option localport 1022 -# option remoteaddress secretserver.disney.com +# option remoteaddress secretserver.example.com # option remoteport 22 # tunnelD(ynamic) - when the connection will be initiated with the SOCKS4 or SOCKS5 protocol # to the local endpoint at localaddress:localport and then forwarded over the remote host # #config tunnelD proxy -# option server disney +# option server example # option localaddress * # option localport 4055 @@ -56,7 +54,7 @@ # ethernet = TAP # #config tunnelW proxy -# option server disney +# option server example # option vpntype point-to-point|ethernet # option localdev any|0|1|2|... # option remotedev any|0|1|2|... diff --git a/net/tailscale/Makefile b/net/tailscale/Makefile index 64360168a..d787ee25d 100644 --- a/net/tailscale/Makefile +++ b/net/tailscale/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tailscale -PKG_VERSION:=1.50.0 +PKG_VERSION:=1.50.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/tailscale/tailscale/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=a7e024577854c07b793c4bbd81a497250e6a1b4536e303351a388810f13b7316 +PKG_HASH:=183a7d559590a759dd77aa9c2b65486ab6e13c26f3c07fad0b536e318ad5e233 PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=BSD-3-Clause diff --git a/net/tor-fw-helper/Makefile b/net/tor-fw-helper/Makefile deleted file mode 100644 index e46159d12..000000000 --- a/net/tor-fw-helper/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (C) 2018 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tor-fw-helper -PKG_VERSION:=0.3 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.torproject.org/tor-fw-helper.git -PKG_SOURCE_VERSION:=481599ee37dd3135c9e17d1df4810f36b4de4e3d -PKG_SOURCE_DATE:=20150805 -PKG_MIRROR_HASH:=f22d1400bec6b62636bd59cb3a51befc9cddbacccb790a758694c589cb2bc032 - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jeffery To - -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -GO_PKG:=git.torproject.org/tor-fw-helper.git - -include $(INCLUDE_DIR)/package.mk -include ../../lang/golang/golang-package.mk - -define Package/tor-fw-helper/Default - TITLE:=Firewall helper for tor - URL:=https://gitweb.torproject.org/tor-fw-helper.git/ - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/tor-fw-helper -$(call Package/tor-fw-helper/Default) - SECTION:=net - CATEGORY:=Network -endef - -define Package/golang-torproject-tor-fw-helper-dev -$(call Package/tor-fw-helper/Default) -$(call GoPackage/GoSubMenu) - TITLE+= (source files) - PKGARCH:=all -endef - -define Package/tor-fw-helper/Default/description -tor-fw-helper is a helper to automatically configuring port forwarding -for tor, using UPnP or NAT-PMP NAT traversal. - -This is a tor-fw-helper rewrite in Go that functions as a drop in -replacement for the original C code. -endef - -define Package/tor-fw-helper/description -$(call Package/tor-fw-helper/Default/description) - -This package contains the main helper program. -endef - -define Package/golang-torproject-tor-fw-helper-dev/description -$(call Package/tor-fw-helper/Default/description) - -This package provides the source files for the helper program. -endef - -GO_PKG_BUILD_VARS += GO111MODULE=auto - -$(eval $(call GoBinPackage,tor-fw-helper)) -$(eval $(call BuildPackage,tor-fw-helper)) - -$(eval $(call GoSrcPackage,golang-torproject-tor-fw-helper-dev)) -$(eval $(call BuildPackage,golang-torproject-tor-fw-helper-dev)) diff --git a/net/v2ray-core/Makefile b/net/v2ray-core/Makefile index 7609253b0..60084a7df 100644 --- a/net/v2ray-core/Makefile +++ b/net/v2ray-core/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-core -PKG_VERSION:=5.7.0 -PKG_RELEASE:=2 +PKG_VERSION:=5.8.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=599fcd264537e39178b6008a11af68816dfd1609e19a9cf8adc8b2a4240ee370 +PKG_HASH:=340798554d2c7f0e5fb719f9d9dd6a667dfe93ccdd3b1d653c3a3bdb04ed2d00 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/net/v2ray-core/patches/001-DNS-over-QUIC-should-not-have-http-1.1-and-h2-ALPNs-.patch b/net/v2ray-core/patches/001-DNS-over-QUIC-should-not-have-http-1.1-and-h2-ALPNs-.patch deleted file mode 100644 index 141004beb..000000000 --- a/net/v2ray-core/patches/001-DNS-over-QUIC-should-not-have-http-1.1-and-h2-ALPNs-.patch +++ /dev/null @@ -1,38 +0,0 @@ -From cd9f183fa836caba816ee73d486dda507a4e9c56 Mon Sep 17 00:00:00 2001 -From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> -Date: Wed, 28 Jun 2023 14:28:23 +0800 -Subject: [PATCH] DNS over QUIC should not have "http/1.1" and "h2" ALPNs - (#2570) - ---- - app/dns/nameserver_quic.go | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - ---- a/app/dns/nameserver_quic.go -+++ b/app/dns/nameserver_quic.go -@@ -11,7 +11,6 @@ import ( - - "github.com/quic-go/quic-go" - "golang.org/x/net/dns/dnsmessage" -- "golang.org/x/net/http2" - - "github.com/v2fly/v2ray-core/v5/common" - "github.com/v2fly/v2ray-core/v5/common/buf" -@@ -25,7 +24,7 @@ import ( - ) - - // NextProtoDQ - During connection establishment, DNS/QUIC support is indicated --// by selecting the ALPN token "dq" in the crypto handshake. -+// by selecting the ALPN token "doq" in the crypto handshake. - const NextProtoDQ = "doq" - - const handshakeIdleTimeout = time.Second * 8 -@@ -383,7 +382,7 @@ func (s *QUICNameServer) openConnection( - HandshakeIdleTimeout: handshakeIdleTimeout, - } - -- conn, err := quic.DialAddrContext(ctx, s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto("http/1.1", http2.NextProtoTLS, NextProtoDQ)), quicConfig) -+ conn, err := quic.DialAddrContext(ctx, s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto(NextProtoDQ)), quicConfig) - if err != nil { - return nil, err - } diff --git a/net/v2ray-core/patches/002-Migrate-to-quic-go-v0.36.0-2561.patch b/net/v2ray-core/patches/002-Migrate-to-quic-go-v0.36.0-2561.patch deleted file mode 100644 index 3603e93d2..000000000 --- a/net/v2ray-core/patches/002-Migrate-to-quic-go-v0.36.0-2561.patch +++ /dev/null @@ -1,611 +0,0 @@ -From e102d52e7c5485abf0a3d1612078ee4b2d4e9539 Mon Sep 17 00:00:00 2001 -From: Tim Xylon -Date: Sat, 1 Jul 2023 15:31:19 +0800 -Subject: [PATCH] Migrate to quic-go v0.36.0 (#2561) - ---- - app/dns/nameserver_quic.go | 6 +- - go.mod | 72 ++++++------ - go.sum | 176 ++++++++++++++++-------------- - transport/internet/quic/dialer.go | 8 +- - transport/internet/quic/hub.go | 10 +- - 5 files changed, 146 insertions(+), 126 deletions(-) - ---- a/app/dns/nameserver_quic.go -+++ b/app/dns/nameserver_quic.go -@@ -377,12 +377,14 @@ func (s *QUICNameServer) getConnection(c - } - - func (s *QUICNameServer) openConnection(ctx context.Context) (quic.Connection, error) { -- tlsConfig := tls.Config{} -+ tlsConfig := tls.Config{ -+ ServerName: s.destination.Address.Domain(), -+ } - quicConfig := &quic.Config{ - HandshakeIdleTimeout: handshakeIdleTimeout, - } - -- conn, err := quic.DialAddrContext(ctx, s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto(NextProtoDQ)), quicConfig) -+ conn, err := quic.DialAddr(ctx, s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto(NextProtoDQ)), quicConfig) - if err != nil { - return nil, err - } ---- a/go.mod -+++ b/go.mod -@@ -6,34 +6,34 @@ require ( - github.com/adrg/xdg v0.4.0 - github.com/go-chi/chi/v5 v5.0.8 - github.com/go-chi/render v1.0.2 -- github.com/go-playground/validator/v10 v10.11.2 -+ github.com/go-playground/validator/v10 v10.14.1 - github.com/golang/mock v1.6.0 -- github.com/golang/protobuf v1.5.2 -+ github.com/golang/protobuf v1.5.3 - github.com/google/go-cmp v0.5.9 - github.com/gorilla/websocket v1.5.0 -- github.com/jhump/protoreflect v1.15.0 -- github.com/miekg/dns v1.1.51 -+ github.com/jhump/protoreflect v1.15.1 -+ github.com/miekg/dns v1.1.54 - github.com/mustafaturan/bus v1.0.2 - github.com/pelletier/go-toml v1.9.5 -- github.com/pires/go-proxyproto v0.6.2 -+ github.com/pires/go-proxyproto v0.7.0 - github.com/quic-go/qtls-go1-19 v0.3.2 - github.com/quic-go/qtls-go1-20 v0.2.2 -- github.com/quic-go/quic-go v0.33.0 -+ github.com/quic-go/quic-go v0.36.0 - github.com/refraction-networking/utls v1.3.2 - github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb -- github.com/stretchr/testify v1.8.2 -+ github.com/stretchr/testify v1.8.4 - github.com/v2fly/BrowserBridge v0.0.0-20210430233438-0570fc1d7d08 - github.com/v2fly/VSign v0.0.0-20201108000810-e2adc24bf848 - github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e - github.com/xiaokangwang/VLite v0.0.0-20220418190619-cff95160a432 -- go.starlark.net v0.0.0-20220817180228-f738f5508c12 -- go4.org/netipx v0.0.0-20220812043211-3cc044ffd68d -- golang.org/x/crypto v0.6.0 -- golang.org/x/net v0.7.0 -- golang.org/x/sync v0.1.0 -- golang.org/x/sys v0.5.0 -- google.golang.org/grpc v1.53.0 -- google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 -+ go.starlark.net v0.0.0-20230612165344-9532f5667272 -+ go4.org/netipx v0.0.0-20230303233057-f1b76eb4bb35 -+ golang.org/x/crypto v0.9.0 -+ golang.org/x/net v0.10.0 -+ golang.org/x/sync v0.2.0 -+ golang.org/x/sys v0.9.0 -+ google.golang.org/grpc v1.55.0 -+ google.golang.org/protobuf v1.31.0 - gopkg.in/yaml.v3 v3.0.1 - h12.io/socks v1.0.3 - ) -@@ -41,38 +41,38 @@ require ( - require ( - github.com/aead/cmac v0.0.0-20160719120800-7af84192f0b1 // indirect - github.com/ajg/form v1.5.1 // indirect -- github.com/andybalholm/brotli v1.0.4 // indirect -+ github.com/andybalholm/brotli v1.0.5 // indirect - github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d // indirect -- github.com/bufbuild/protocompile v0.2.1-0.20230123224550-da57cd758c2f // indirect -+ github.com/bufbuild/protocompile v0.5.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect -- github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165 // indirect -+ github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 // indirect - github.com/ebfe/bcrypt_pbkdf v0.0.0-20140212075826-3c8d2dcb253a // indirect -+ github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gaukas/godicttls v0.0.3 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect -- github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect -- github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect -- github.com/klauspost/compress v1.15.15 // indirect -- github.com/klauspost/cpuid v1.2.3 // indirect -- github.com/klauspost/reedsolomon v1.9.3 // indirect -- github.com/leodido/go-urn v1.2.1 // indirect -+ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect -+ github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect -+ github.com/klauspost/compress v1.16.5 // indirect -+ github.com/klauspost/cpuid/v2 v2.2.5 // indirect -+ github.com/klauspost/reedsolomon v1.11.7 // indirect -+ github.com/leodido/go-urn v1.2.4 // indirect - github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect - github.com/mustafaturan/monoton v1.0.0 // indirect -- github.com/onsi/ginkgo/v2 v2.2.0 // indirect -+ github.com/onsi/ginkgo/v2 v2.10.0 // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect -- github.com/pion/dtls/v2 v2.2.4 // indirect -+ github.com/pion/dtls/v2 v2.2.7 // indirect - github.com/pion/logging v0.2.2 // indirect -- github.com/pion/sctp v1.7.6 // indirect -- github.com/pion/transport/v2 v2.0.0 // indirect -- github.com/pion/udp v0.1.4 // indirect -- github.com/pkg/errors v0.9.1 // indirect -+ github.com/pion/randutil v0.1.0 // indirect -+ github.com/pion/sctp v1.8.7 // indirect -+ github.com/pion/transport/v2 v2.2.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect - github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4 // indirect -- github.com/xtaci/smux v1.5.15 // indirect -- golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect -- golang.org/x/mod v0.7.0 // indirect -- golang.org/x/text v0.7.0 // indirect -- golang.org/x/tools v0.3.0 // indirect -- google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect -+ github.com/xtaci/smux v1.5.24 // indirect -+ golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect -+ golang.org/x/mod v0.10.0 // indirect -+ golang.org/x/text v0.10.0 // indirect -+ golang.org/x/tools v0.9.3 // indirect -+ google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - ) ---- a/go.sum -+++ b/go.sum -@@ -23,8 +23,8 @@ github.com/ajg/form v1.5.1 h1:t9c7v8JUKu - github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= - github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= - github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= --github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= --github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -+github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -+github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= - github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= - github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= - github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -@@ -34,8 +34,8 @@ github.com/bgentry/speakeasy v0.1.0/go.m - github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= - github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d h1:zsO4lp+bjv5XvPTF58Vq+qgmZEYZttJK+CWtSZhKenI= - github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6ZhUWvbk7PdWVmOaak10o86cqMUYEmn1CZNGEI= --github.com/bufbuild/protocompile v0.2.1-0.20230123224550-da57cd758c2f h1:IXSA5gow10s7zIOJfPOpXDtNBWCTA0715BDAhoJBXEs= --github.com/bufbuild/protocompile v0.2.1-0.20230123224550-da57cd758c2f/go.mod h1:tleDrpPTlLUVmgnEoN6qBliKWqJaZFJXqZdFjTd+ocU= -+github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -+github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= - github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= - github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= - github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -@@ -53,8 +53,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9 - github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= - github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= - github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= --github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165 h1:BS21ZUJ/B5X2UVUbczfmdWH7GapPWAhxcMsDnjJTU1E= - github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= -+github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 h1:y7y0Oa6UawqTFPCDw9JG6pdKt4F9pAhHv0B7FMGaGD0= -+github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= - github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= - github.com/ebfe/bcrypt_pbkdf v0.0.0-20140212075826-3c8d2dcb253a h1:YtdtTUN1iH97s+6PUjLnaiKSQj4oG1/EZ3N9bx6g4kU= - github.com/ebfe/bcrypt_pbkdf v0.0.0-20140212075826-3c8d2dcb253a/go.mod h1:/CZpbhAusDOobpcb9yubw46kdYjq0zRC0Wpg9a9zFQM= -@@ -63,6 +64,8 @@ github.com/envoyproxy/protoc-gen-validat - github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= - github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= - github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -+github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -+github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= - github.com/gaukas/godicttls v0.0.3 h1:YNDIf0d9adcxOijiLrEzpfZGAkNwLRzPaG6OjU7EITk= - github.com/gaukas/godicttls v0.0.3/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= - github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -@@ -74,16 +77,17 @@ github.com/go-gl/glfw v0.0.0-20190409004 - github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= - github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= - github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -+github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= - github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= - github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= - github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= - github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= - github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= --github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= --github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= -+github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= -+github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= - github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= --github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= --github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -+github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -+github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= - github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= - github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= - github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259/go.mod h1:9Qcha0gTWLw//0VNka1Cbnjvg3pNKGFdAm7E9sBabxE= -@@ -104,8 +108,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0 - github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= - github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= - github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= --github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= --github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -+github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -+github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= - github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= - github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= - github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -@@ -121,8 +125,8 @@ github.com/google/gopacket v1.1.17/go.mo - github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= - github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= - github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= --github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= --github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -+github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= -+github.com/google/pprof v0.0.0-20230602150820-91b7bce49751/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= - github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= - github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= - github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -@@ -157,10 +161,9 @@ github.com/hashicorp/logutils v1.0.0/go. - github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= - github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= - github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= --github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= - github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= --github.com/jhump/protoreflect v1.15.0 h1:U5T5/2LF0AZQFP9T4W5GfBjBaTruomrKobiR4E+oA/Q= --github.com/jhump/protoreflect v1.15.0/go.mod h1:qww51KYjD2hoCl/ohxw5cK2LSssFczrbO1t8Ld2TENs= -+github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -+github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= - github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= - github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= - github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -@@ -168,21 +171,23 @@ github.com/jtolds/gls v4.20.0+incompatib - github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= - github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= - github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= --github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= --github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= --github.com/klauspost/cpuid v1.2.3 h1:CCtW0xUnWGVINKvE/WWOYKdsPV6mawAtvQuSl8guwQs= -+github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -+github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= - github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= --github.com/klauspost/reedsolomon v1.9.3 h1:N/VzgeMfHmLc+KHMD1UL/tNkfXAt8FnUqlgXGIduwAY= -+github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -+github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= - github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= -+github.com/klauspost/reedsolomon v1.11.7 h1:9uaHU0slncktTEEg4+7Vl7q7XUNMBUOK4R9gnKhMjAU= -+github.com/klauspost/reedsolomon v1.11.7/go.mod h1:4bXRN+cVzMdml6ti7qLouuYi32KHJ5MGv0Qd8a47h6A= - github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= - github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= - github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= --github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= - github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= - github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= - github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= --github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= --github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -+github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -+github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= - github.com/lunixbochs/struc v0.0.0-20190916212049-a5c72983bc42/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg= - github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 h1:EnfXoSqDfSNJv0VBNqY/88RNnhSGYkrHaO0mmFGbVsc= - github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg= -@@ -191,8 +196,8 @@ github.com/mattn/go-colorable v0.0.9/go. - github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= - github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= - github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= --github.com/miekg/dns v1.1.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo= --github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c= -+github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= -+github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= - github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= - github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= - github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -@@ -212,9 +217,9 @@ github.com/mwitkow/go-conntrack v0.0.0-2 - github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= - github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= - github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= --github.com/onsi/ginkgo/v2 v2.2.0 h1:3ZNA3L1c5FYDFTTxbFeVGGD8jYvjYauHD30YgLxVsNI= --github.com/onsi/ginkgo/v2 v2.2.0/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= --github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= -+github.com/onsi/ginkgo/v2 v2.10.0 h1:sfUl4qgLdvkChZrWCYndY2EAu9BRIw1YphNAzy1VNWs= -+github.com/onsi/ginkgo/v2 v2.10.0/go.mod h1:UDQOh5wbQUlMnkLfVaIUMtQ1Vus92oM+P2JX1aulgcE= -+github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= - github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= - github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= - github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -@@ -224,23 +229,23 @@ github.com/pelletier/go-toml v1.9.5/go.m - github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= - github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= - github.com/pion/dtls/v2 v2.0.0-rc.7/go.mod h1:U199DvHpRBN0muE9+tVN4TMy1jvEhZIZ63lk4xkvVSk= --github.com/pion/dtls/v2 v2.2.4 h1:YSfYwDQgrxMYXLBc/m7PFY5BVtWlNm/DN4qoU2CbcWg= --github.com/pion/dtls/v2 v2.2.4/go.mod h1:WGKfxqhrddne4Kg3p11FUMJrynkOY4lb25zHNO49wuw= -+github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= -+github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= - github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= - github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= --github.com/pion/sctp v1.7.6 h1:8qZTdJtbKfAns/Hv5L0PAj8FyXcsKhMH1pKUCGisQg4= -+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= -+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= - github.com/pion/sctp v1.7.6/go.mod h1:ichkYQ5tlgCQwEwvgfdcAolqx1nHbYCxo4D7zK/K0X8= --github.com/pion/transport v0.8.10 h1:lTiobMEw2PG6BH/mgIVqTV2mBp/mPT+IJLaN8ZxgdHk= -+github.com/pion/sctp v1.8.7 h1:JnABvFakZueGAn4KU/4PSKg+GWbF6QWbKTWZOSGJjXw= -+github.com/pion/sctp v1.8.7/go.mod h1:g1Ul+ARqZq5JEmoFy87Q/4CePtKnTJ1QCL9dBBdN6AU= - github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRhSzR+CZ8= --github.com/pion/transport/v2 v2.0.0 h1:bsMYyqHCbkvHwj+eNCFBuxtlKndKfyGI2vaQmM3fIE4= --github.com/pion/transport/v2 v2.0.0/go.mod h1:HS2MEBJTwD+1ZI2eSXSvHJx/HnzQqRy2/LXxt6eVMHc= --github.com/pion/udp v0.1.4 h1:OowsTmu1Od3sD6i3fQUJxJn2fEvJO6L1TidgadtbTI8= --github.com/pion/udp v0.1.4/go.mod h1:G8LDo56HsFwC24LIcnT4YIDU5qcB6NepqqjP0keL2us= --github.com/pires/go-proxyproto v0.6.2 h1:KAZ7UteSOt6urjme6ZldyFm4wDe/z0ZUP0Yv0Dos0d8= --github.com/pires/go-proxyproto v0.6.2/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY= -+github.com/pion/transport/v2 v2.1.0/go.mod h1:AdSw4YBZVDkZm8fpoz+fclXyQwANWmZAlDuQdctTThQ= -+github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= -+github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= -+github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs= -+github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4= - github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= - github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= --github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= - github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= - github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= - github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -@@ -259,15 +264,14 @@ github.com/quic-go/qtls-go1-19 v0.3.2 h1 - github.com/quic-go/qtls-go1-19 v0.3.2/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= - github.com/quic-go/qtls-go1-20 v0.2.2 h1:WLOPx6OY/hxtTxKV1Zrq20FtXtDEkeY00CGQm8GEa3E= - github.com/quic-go/qtls-go1-20 v0.2.2/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= --github.com/quic-go/quic-go v0.33.0 h1:ItNoTDN/Fm/zBlq769lLJc8ECe9gYaW40veHCCco7y0= --github.com/quic-go/quic-go v0.33.0/go.mod h1:YMuhaAV9/jIu0XclDXwZPAsP/2Kgr5yMYhe9oxhhOFA= -+github.com/quic-go/quic-go v0.36.0 h1:JIrO7p7Ug6hssFcARjWDiqS2RAKJHCiwPxBAA989rbI= -+github.com/quic-go/quic-go v0.36.0/go.mod h1:zPetvwDlILVxt15n3hr3Gf/I3mDf7LpLKPhR4Ez0AZQ= - github.com/refraction-networking/utls v1.3.2 h1:o+AkWB57mkcoW36ET7uJ002CpBWHu0KPxi6vzxvPnv8= - github.com/refraction-networking/utls v1.3.2/go.mod h1:fmoaOww2bxzzEpIKOebIsnBvjQpqP7L2vcm/9KUfm/E= - github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg= - github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s= - github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= - github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= --github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= - github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= - github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= - github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -@@ -304,9 +308,10 @@ github.com/stretchr/testify v1.6.1/go.mo - github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= - github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= - github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= --github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= --github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= - github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -+github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= - github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= - github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= - github.com/txthinking/runnergroup v0.0.0-20200327135940-540a793bb997/go.mod h1:CLUSJbazqETbaR+i0YAhXBICV9TrKH93pziccMhmhpM= -@@ -322,21 +327,22 @@ github.com/xiang90/probing v0.0.0-201901 - github.com/xiaokangwang/VLite v0.0.0-20220418190619-cff95160a432 h1:I/ATawgO2RerCq9ACwL0wBB8xNXZdE3J+93MCEHReRs= - github.com/xiaokangwang/VLite v0.0.0-20220418190619-cff95160a432/go.mod h1:QN7Go2ftTVfx0aCTh9RXHV8pkpi0FtmbwQw40dy61wQ= - github.com/xtaci/smux v1.5.12/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY= --github.com/xtaci/smux v1.5.15 h1:6hMiXswcleXj5oNfcJc+DXS8Vj36XX2LaX98udog6Kc= - github.com/xtaci/smux v1.5.15/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY= -+github.com/xtaci/smux v1.5.24 h1:77emW9dtnOxxOQ5ltR+8BbsX1kzcOxQ5gB+aaV9hXOY= -+github.com/xtaci/smux v1.5.24/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY= - github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= - github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= - github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= - go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= - go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= - go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= --go.starlark.net v0.0.0-20220817180228-f738f5508c12 h1:xOBJXWGEDwU5xSDxH6macxO11Us0AH2fTa9rmsbbF7g= --go.starlark.net v0.0.0-20220817180228-f738f5508c12/go.mod h1:VZcBMdr3cT3PnBoWunTabuSEXwVAH+ZJ5zxfs3AdASk= -+go.starlark.net v0.0.0-20230612165344-9532f5667272 h1:2/wtqS591wZyD2OsClsVBKRPEvBsQt/Js+fsCiYhwu8= -+go.starlark.net v0.0.0-20230612165344-9532f5667272/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= - go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= - go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= - go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= --go4.org/netipx v0.0.0-20220812043211-3cc044ffd68d h1:ggxwEf5eu0l8v+87VhX1czFh8zJul3hK16Gmruxn7hw= --go4.org/netipx v0.0.0-20220812043211-3cc044ffd68d/go.mod h1:tgPU4N2u9RByaTN3NC2p9xOzyFpte4jYwsIIRF7XlSc= -+go4.org/netipx v0.0.0-20230303233057-f1b76eb4bb35 h1:nJAwRlGWZZDOD+6wni9KVUNHMpHko/OnRwsrCYeAzPo= -+go4.org/netipx v0.0.0-20230303233057-f1b76eb4bb35/go.mod h1:TQvodOM+hJTioNQJilmLXu08JNb8i+ccq418+KWu1/Y= - golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= - golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -@@ -348,16 +354,16 @@ golang.org/x/crypto v0.0.0-2020062221362 - golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= - golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= --golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= --golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= --golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -+golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= -+golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -+golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= - golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= - golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= - golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= - golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= - golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= --golang.org/x/exp v0.0.0-20221205204356-47842c84f3db h1:D/cFflL63o2KSLJIwjlcIt8PR064j/xsmdEJL/YvY/o= --golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -+golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -+golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= - golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= - golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= - golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -@@ -374,8 +380,9 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrY - golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= - golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= --golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= --golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -+golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -+golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= - golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= - golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= - golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -@@ -395,11 +402,11 @@ golang.org/x/net v0.0.0-20201021035429-f - golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= - golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= - golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= --golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= --golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= --golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= --golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= --golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -+golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -+golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -+golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= - golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= - golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= - golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -@@ -411,8 +418,9 @@ golang.org/x/sync v0.0.0-20190423024810- - golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= --golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= - golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -+golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -+golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= - golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= - golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= - golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -@@ -429,7 +437,6 @@ golang.org/x/sys v0.0.0-20190507160741-e - golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -@@ -440,27 +447,29 @@ golang.org/x/sys v0.0.0-20210510120138-9 - golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= --golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= --golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= --golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= --golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= --golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= - golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -+golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= --golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= --golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= --golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -+golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -+golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -+golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= - golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= - golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= - golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= - golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= - golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= --golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= --golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= --golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= - golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -+golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -+golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -+golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= - golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= - golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= - golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -@@ -485,8 +494,9 @@ golang.org/x/tools v0.0.0-20191119224855 - golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= - golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= - golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= --golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= --golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -+golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -+golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= - golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= - golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= - golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -@@ -510,15 +520,15 @@ google.golang.org/genproto v0.0.0-201908 - google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= - google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= - google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= --google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= --google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -+google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -+google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= - google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= - google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= - google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= - google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= - google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= --google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= --google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -+google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -+google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= - google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= - google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= - google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -@@ -529,13 +539,13 @@ google.golang.org/protobuf v1.23.1-0.202 - google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= - google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= - google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= --google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= --google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -+google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -+google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= - gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= - gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= --gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= - gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= - gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= - gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= ---- a/transport/internet/quic/dialer.go -+++ b/transport/internet/quic/dialer.go -@@ -150,7 +150,6 @@ func (s *clientConnections) openConnecti - } - - quicConfig := &quic.Config{ -- ConnectionIDLength: 12, - HandshakeIdleTimeout: time.Second * 8, - MaxIdleTimeout: time.Second * 30, - KeepAlivePeriod: time.Second * 15, -@@ -162,7 +161,12 @@ func (s *clientConnections) openConnecti - return nil, err - } - -- conn, err := quic.DialContext(context.Background(), sysConn, destAddr, "", tlsConfig.GetTLSConfig(tls.WithDestination(dest)), quicConfig) -+ tr := quic.Transport{ -+ Conn: sysConn, -+ ConnectionIDLength: 12, -+ } -+ -+ conn, err := tr.Dial(context.Background(), destAddr, tlsConfig.GetTLSConfig(tls.WithDestination(dest)), quicConfig) - if err != nil { - sysConn.Close() - return nil, err ---- a/transport/internet/quic/hub.go -+++ b/transport/internet/quic/hub.go -@@ -17,7 +17,7 @@ import ( - // Listener is an internet.Listener that listens for TCP connections. - type Listener struct { - rawConn *sysConn -- listener quic.Listener -+ listener *quic.Listener - done *done.Instance - addConn internet.ConnHandler - } -@@ -102,7 +102,6 @@ func Listen(ctx context.Context, address - } - - quicConfig := &quic.Config{ -- ConnectionIDLength: 12, - HandshakeIdleTimeout: time.Second * 8, - MaxIdleTimeout: time.Second * 45, - MaxIncomingStreams: 32, -@@ -116,7 +115,12 @@ func Listen(ctx context.Context, address - return nil, err - } - -- qListener, err := quic.Listen(conn, tlsConfig.GetTLSConfig(), quicConfig) -+ tr := quic.Transport{ -+ Conn: conn, -+ ConnectionIDLength: 12, -+ } -+ -+ qListener, err := tr.Listen(tlsConfig.GetTLSConfig(), quicConfig) - if err != nil { - conn.Close() - return nil, err diff --git a/net/v2ray-core/patches/003-fix-panic-in-dns-over-quic-when-address-is-a-ip.patch b/net/v2ray-core/patches/003-fix-panic-in-dns-over-quic-when-address-is-a-ip.patch deleted file mode 100644 index 23bac4b94..000000000 --- a/net/v2ray-core/patches/003-fix-panic-in-dns-over-quic-when-address-is-a-ip.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5c995d97f43e8e97ee0cb3d1aa12450d3968c8d2 Mon Sep 17 00:00:00 2001 -From: AkinoKaede -Date: Sun, 2 Jul 2023 09:47:33 +0800 -Subject: [PATCH] fix: panic in dns over quic when address is a ip - ---- - app/dns/nameserver_quic.go | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - ---- a/app/dns/nameserver_quic.go -+++ b/app/dns/nameserver_quic.go -@@ -378,7 +378,16 @@ func (s *QUICNameServer) getConnection(c - - func (s *QUICNameServer) openConnection(ctx context.Context) (quic.Connection, error) { - tlsConfig := tls.Config{ -- ServerName: s.destination.Address.Domain(), -+ ServerName: func() string { -+ switch s.destination.Address.Family() { -+ case net.AddressFamilyIPv4, net.AddressFamilyIPv6: -+ return s.destination.Address.IP().String() -+ case net.AddressFamilyDomain: -+ return s.destination.Address.Domain() -+ default: -+ panic("unknown address family") -+ } -+ }(), - } - quicConfig := &quic.Config{ - HandshakeIdleTimeout: handshakeIdleTimeout, diff --git a/net/v2ray-core/patches/004-feat-bulit-in-qtls-cipher-suite-implementation.patch b/net/v2ray-core/patches/004-feat-bulit-in-qtls-cipher-suite-implementation.patch deleted file mode 100644 index 54d447658..000000000 --- a/net/v2ray-core/patches/004-feat-bulit-in-qtls-cipher-suite-implementation.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 8c5bcacb996cfecccd71471b682aef9a15da2499 Mon Sep 17 00:00:00 2001 -From: AkinoKaede -Date: Mon, 17 Jul 2023 12:38:25 +0800 -Subject: [PATCH] feat: bulit-in qtls cipher suite implementation - ---- - common/protocol/quic/cipher_suite.go | 23 +++++++++++++++++++++++ - common/protocol/quic/qtls_go119.go | 18 ------------------ - common/protocol/quic/qtls_go120.go | 18 ------------------ - common/protocol/quic/sniff.go | 6 +++--- - go.mod | 4 ++-- - go.sum | 2 ++ - 6 files changed, 30 insertions(+), 41 deletions(-) - create mode 100644 common/protocol/quic/cipher_suite.go - delete mode 100644 common/protocol/quic/qtls_go119.go - delete mode 100644 common/protocol/quic/qtls_go120.go - ---- /dev/null -+++ b/common/protocol/quic/cipher_suite.go -@@ -0,0 +1,23 @@ -+package quic -+ -+import ( -+ "crypto" -+ "crypto/cipher" -+ _ "crypto/tls" -+ _ "unsafe" -+) -+ -+// copied from github.com/quic-go/quic-go/internal/qtls/cipher_suite_go121.go -+ -+type cipherSuiteTLS13 struct { -+ ID uint16 -+ KeyLen int -+ AEAD func(key, fixedNonce []byte) cipher.AEAD -+ Hash crypto.Hash -+} -+ -+// github.com/quic-go/quic-go/internal/handshake/cipher_suite.go describes these cipher suite implementations are copied from the standard library crypto/tls package. -+// So we can user go:linkname to implement the same feature. -+ -+//go:linkname aeadAESGCMTLS13 crypto/tls.aeadAESGCMTLS13 -+func aeadAESGCMTLS13(key, nonceMask []byte) cipher.AEAD ---- a/common/protocol/quic/qtls_go119.go -+++ /dev/null -@@ -1,18 +0,0 @@ --//go:build go1.19 && !go1.20 -- --package quic -- --import ( -- "crypto/cipher" -- -- "github.com/quic-go/qtls-go1-19" --) -- --type ( -- // A CipherSuiteTLS13 is a cipher suite for TLS 1.3 -- CipherSuiteTLS13 = qtls.CipherSuiteTLS13 --) -- --func AEADAESGCMTLS13(key, fixedNonce []byte) cipher.AEAD { -- return qtls.AEADAESGCMTLS13(key, fixedNonce) --} ---- a/common/protocol/quic/qtls_go120.go -+++ /dev/null -@@ -1,18 +0,0 @@ --//go:build go1.20 -- --package quic -- --import ( -- "crypto/cipher" -- -- "github.com/quic-go/qtls-go1-20" --) -- --type ( -- // A CipherSuiteTLS13 is a cipher suite for TLS 1.3 -- CipherSuiteTLS13 = qtls.CipherSuiteTLS13 --) -- --func AEADAESGCMTLS13(key, fixedNonce []byte) cipher.AEAD { -- return qtls.AEADAESGCMTLS13(key, fixedNonce) --} ---- a/common/protocol/quic/sniff.go -+++ b/common/protocol/quic/sniff.go -@@ -37,10 +37,10 @@ const ( - var ( - quicSaltOld = []byte{0xaf, 0xbf, 0xec, 0x28, 0x99, 0x93, 0xd2, 0x4c, 0x9e, 0x97, 0x86, 0xf1, 0x9c, 0x61, 0x11, 0xe0, 0x43, 0x90, 0xa8, 0x99} - quicSalt = []byte{0x38, 0x76, 0x2c, 0xf7, 0xf5, 0x59, 0x34, 0xb3, 0x4d, 0x17, 0x9a, 0xe6, 0xa4, 0xc8, 0x0c, 0xad, 0xcc, 0xbb, 0x7f, 0x0a} -- initialSuite = &CipherSuiteTLS13{ -+ initialSuite = &cipherSuiteTLS13{ - ID: tls.TLS_AES_128_GCM_SHA256, - KeyLen: 16, -- AEAD: AEADAESGCMTLS13, -+ AEAD: aeadAESGCMTLS13, - Hash: crypto.SHA256, - } - errNotQuic = errors.New("not quic") -@@ -153,7 +153,7 @@ func SniffQUIC(b []byte) (*SniffHeader, - - key := hkdfExpandLabel(crypto.SHA256, secret, []byte{}, "quic key", 16) - iv := hkdfExpandLabel(crypto.SHA256, secret, []byte{}, "quic iv", 12) -- cipher := AEADAESGCMTLS13(key, iv) -+ cipher := aeadAESGCMTLS13(key, iv) - nonce := cache.Extend(int32(cipher.NonceSize())) - binary.BigEndian.PutUint64(nonce[len(nonce)-8:], uint64(packetNumber)) - decrypted, err := cipher.Open(b[extHdrLen:extHdrLen], nonce, data, b[:extHdrLen]) diff --git a/net/v2ray-core/patches/010-chore-go-update-dependencies.patch b/net/v2ray-core/patches/010-chore-go-update-dependencies.patch deleted file mode 100644 index c745aebd0..000000000 --- a/net/v2ray-core/patches/010-chore-go-update-dependencies.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/go.mod -+++ b/go.mod -@@ -16,9 +16,7 @@ require ( - github.com/mustafaturan/bus v1.0.2 - github.com/pelletier/go-toml v1.9.5 - github.com/pires/go-proxyproto v0.7.0 -- github.com/quic-go/qtls-go1-19 v0.3.2 -- github.com/quic-go/qtls-go1-20 v0.2.2 -- github.com/quic-go/quic-go v0.36.0 -+ github.com/quic-go/quic-go v0.37.4 - github.com/refraction-networking/utls v1.3.2 - github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb - github.com/stretchr/testify v1.8.4 -@@ -67,6 +65,7 @@ require ( - github.com/pion/sctp v1.8.7 // indirect - github.com/pion/transport/v2 v2.2.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect -+ github.com/quic-go/qtls-go1-20 v0.3.1 // indirect - github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect - github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4 // indirect - github.com/xtaci/smux v1.5.24 // indirect ---- a/go.sum -+++ b/go.sum -@@ -260,12 +260,10 @@ github.com/prometheus/common v0.4.0/go.m - github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= - github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= - github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= --github.com/quic-go/qtls-go1-19 v0.3.2 h1:tFxjCFcTQzK+oMxG6Zcvp4Dq8dx4yD3dDiIiyc86Z5U= --github.com/quic-go/qtls-go1-19 v0.3.2/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= --github.com/quic-go/qtls-go1-20 v0.2.2 h1:WLOPx6OY/hxtTxKV1Zrq20FtXtDEkeY00CGQm8GEa3E= --github.com/quic-go/qtls-go1-20 v0.2.2/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= --github.com/quic-go/quic-go v0.36.0 h1:JIrO7p7Ug6hssFcARjWDiqS2RAKJHCiwPxBAA989rbI= --github.com/quic-go/quic-go v0.36.0/go.mod h1:zPetvwDlILVxt15n3hr3Gf/I3mDf7LpLKPhR4Ez0AZQ= -+github.com/quic-go/qtls-go1-20 v0.3.1 h1:O4BLOM3hwfVF3AcktIylQXyl7Yi2iBNVy5QsV+ySxbg= -+github.com/quic-go/qtls-go1-20 v0.3.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= -+github.com/quic-go/quic-go v0.37.4 h1:ke8B73yMCWGq9MfrCCAw0Uzdm7GaViC3i39dsIdDlH4= -+github.com/quic-go/quic-go v0.37.4/go.mod h1:YsbH1r4mSHPJcLF4k4zruUkLBqctEMBDR6VPvcYjIsU= - github.com/refraction-networking/utls v1.3.2 h1:o+AkWB57mkcoW36ET7uJ002CpBWHu0KPxi6vzxvPnv8= - github.com/refraction-networking/utls v1.3.2/go.mod h1:fmoaOww2bxzzEpIKOebIsnBvjQpqP7L2vcm/9KUfm/E= - github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg= diff --git a/net/v2ray-geodata/Makefile b/net/v2ray-geodata/Makefile index 9cc4d3265..89e737b55 100644 --- a/net/v2ray-geodata/Makefile +++ b/net/v2ray-geodata/Makefile @@ -12,22 +12,31 @@ PKG_MAINTAINER:=Tianling Shen include $(INCLUDE_DIR)/package.mk -GEOIP_VER:=202308310037 +GEOIP_VER:=202310120354 GEOIP_FILE:=geoip.dat.$(GEOIP_VER) define Download/geoip URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/ URL_FILE:=geoip.dat FILE:=$(GEOIP_FILE) - HASH:=536d7aa9f54af747153d4f982adaa3181025dd72faaba8f532b3f514b467eff8 + HASH:=7107cfe4e211d4df5234d0d2b1c47bdcd19f6602c2b7969f3a5e12f7cf48692e endef -GEOSITE_VER:=20230905081311 +GEOSITE_VER:=20231015073627 GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) define Download/geosite URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL_FILE:=dlc.dat FILE:=$(GEOSITE_FILE) - HASH:=d393deda756a446ec5247730ef09fed80ba9fb8d9204d1263c45a3604435fe57 + HASH:=2042c47d520634236fbf238a4168196bea64a2d61ca5e6cbab9fd0ac37c7e659 +endef + +GEOSITE_IRAN_VER:=202310160024 +GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER) +define Download/geosite-ir + URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/ + URL_FILE:=iran.dat + FILE:=$(GEOSITE_IRAN_FILE) + HASH:=70db057c5c1d07de251c4543e6c20ff0a352c95977e120d1522a7f826ff08cf2 endef define Package/v2ray-geodata/template @@ -54,6 +63,14 @@ define Package/v2ray-geosite LICENSE:=MIT endef +define Package/v2ray-geosite-ir + $(call Package/v2ray-geodata/template) + TITLE:=Iran Geosite List for V2Ray + PROVIDES:=xray-geosite-ir + VERSION:=$(GEOSITE_IRAN_VER)-$(PKG_RELEASE) + LICENSE:=MIT +endef + define Build/Prepare $(call Build/Prepare/Default) ifneq ($(CONFIG_PACKAGE_v2ray-geoip),) @@ -62,6 +79,9 @@ endif ifneq ($(CONFIG_PACKAGE_v2ray-geosite),) $(call Download,geosite) endif +ifneq ($(CONFIG_PACKAGE_v2ray-geosite-ir),) + $(call Download,geosite-ir) +endif endef define Build/Compile @@ -79,5 +99,12 @@ define Package/v2ray-geosite/install $(LN) ../v2ray/geosite.dat $(1)/usr/share/xray/geosite.dat endef +define Package/v2ray-geosite-ir/install + $(INSTALL_DIR) $(1)/usr/share/v2ray $(1)/usr/share/xray + $(INSTALL_DATA) $(DL_DIR)/$(GEOSITE_IRAN_FILE) $(1)/usr/share/v2ray/iran.dat + $(LN) ../v2ray/iran.dat $(1)/usr/share/xray/iran.dat +endef + $(eval $(call BuildPackage,v2ray-geoip)) $(eval $(call BuildPackage,v2ray-geosite)) +$(eval $(call BuildPackage,v2ray-geosite-ir)) diff --git a/net/wget/Makefile b/net/wget/Makefile index f70c0def7..aa06b4df1 100644 --- a/net/wget/Makefile +++ b/net/wget/Makefile @@ -8,19 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wget -PKG_VERSION:=1.21.3 -PKG_RELEASE:=3 +PKG_VERSION:=1.21.4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=5726bb8bc5ca0f6dc7110f6416e4bb7019e2d2ff5bf93d1ca2ffcc6656f220e5 +PKG_HASH:=81542f5cefb8faacc39bbbc6c82ded80e3e4a88505ae72ea51df27525bcde04c PKG_MAINTAINER:= PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:gnu:wget -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/net/wget/patches/001-upstream-fix-disable-ntlm-1.patch b/net/wget/patches/001-upstream-fix-disable-ntlm-1.patch deleted file mode 100644 index 5b3b1a64f..000000000 --- a/net/wget/patches/001-upstream-fix-disable-ntlm-1.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 485217d0ff8d0d17ea3815244b2bc2b747451e15 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim=20R=C3=BChsen?= -Date: Sat, 10 Dec 2022 16:43:38 +0100 -Subject: [PATCH] * configure.ac: Allow disabling NTLM if nettle present (Savannah #63431) - ---- - configure.ac | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -648,8 +648,11 @@ else - - if test x"$HAVE_NETTLE" = xyes; then - AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle]) -- ENABLE_NTLM=yes -- AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.]) -+ if test x"$ENABLE_NTLM" != xno -+ then -+ ENABLE_NTLM=yes -+ AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.]) -+ fi - fi - fi - diff --git a/net/wget/patches/002-upstream-fix-disable-ntlm-2.patch b/net/wget/patches/002-upstream-fix-disable-ntlm-2.patch deleted file mode 100644 index 91fb52aa3..000000000 --- a/net/wget/patches/002-upstream-fix-disable-ntlm-2.patch +++ /dev/null @@ -1,65 +0,0 @@ -From c69030a904f8ab25b9ca2704c8a6dd03554e9503 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim=20R=C3=BChsen?= -Date: Sun, 11 Dec 2022 13:31:38 +0100 -Subject: [PATCH] * configure.ac: Disable nettle if NTLM is explicitly disabled - ---- - configure.ac | 41 +++++++++++++++++++---------------------- - 1 file changed, 19 insertions(+), 22 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -622,34 +622,31 @@ AS_IF([test x"$with_ssl" = xopenssl], [ - ]) # endif: --with-ssl == openssl? - - dnl Enable NTLM if requested and if SSL is available. --if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes -+if test x"$ENABLE_NTLM" != xno - then -- if test x"$ENABLE_NTLM" != xno -+ if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes - then - ENABLE_NTLM=yes - AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.]) -- fi --else -- PKG_CHECK_MODULES([NETTLE], nettle, [ -- HAVE_NETTLE=yes -- LIBS="$NETTLE_LIBS $LIBS" -- CFLAGS="$NETTLE_CFLAGS $CFLAGS" -- ], [ -- AC_CHECK_LIB(nettle, nettle_md4_init, [HAVE_NETTLE=yes], [HAVE_NETTLE=no; AC_MSG_WARN(*** libnettle was not found. You will not be able to use NTLM)]) -- if test x"$HAVE_NETTLE" != xyes; then -- if test x"$ENABLE_NTLM" = xyes; then -- AC_MSG_ERROR([NTLM authorization requested and SSL not enabled; aborting]) -- fi -- else -- AC_SUBST(NETTLE_LIBS, "-lnettle") -+ else -+ PKG_CHECK_MODULES([NETTLE], nettle, [ -+ HAVE_NETTLE=yes - LIBS="$NETTLE_LIBS $LIBS" -- fi -- ]) -+ CFLAGS="$NETTLE_CFLAGS $CFLAGS" -+ ], [ -+ AC_CHECK_LIB(nettle, nettle_md4_init, [HAVE_NETTLE=yes], [HAVE_NETTLE=no; AC_MSG_WARN(*** libnettle was not found. You will not be able to use NTLM)]) -+ if test x"$HAVE_NETTLE" != xyes; then -+ if test x"$ENABLE_NTLM" = xyes; then -+ AC_MSG_ERROR([NTLM authorization requested and SSL not enabled; aborting]) -+ fi -+ else -+ AC_SUBST(NETTLE_LIBS, "-lnettle") -+ LIBS="$NETTLE_LIBS $LIBS" -+ fi -+ ]) - -- if test x"$HAVE_NETTLE" = xyes; then -- AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle]) -- if test x"$ENABLE_NTLM" != xno -- then -+ if test x"$HAVE_NETTLE" = xyes; then -+ AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle]) - ENABLE_NTLM=yes - AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.]) - fi diff --git a/utils/arp-whisper/Makefile b/utils/arp-whisper/Makefile index 23461f998..207ed5f1b 100644 --- a/utils/arp-whisper/Makefile +++ b/utils/arp-whisper/Makefile @@ -17,6 +17,7 @@ PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=LICENCE PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/rust/rust-package.mk diff --git a/utils/catatonit/Makefile b/utils/catatonit/Makefile index 5d78af25e..973c171a3 100644 --- a/utils/catatonit/Makefile +++ b/utils/catatonit/Makefile @@ -1,21 +1,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=catatonit -PKG_VERSION:=0.1.7 +PKG_VERSION:=0.2.0 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/openSUSE/catatonit.git -PKG_SOURCE_DATE:=2022-03-07 -PKG_SOURCE_VERSION:=d8d72fea155c144ed3bf298a35a1aba5625a5656 -PKG_MIRROR_HASH:=5dfec105de2b1e674db55e12007aa66cf67769d38e3f294fbca54fc3e9b78674 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/openSUSE/catatonit/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=d0cf1feffdc89c9fb52af20fc10127887a408bbd99e0424558d182b310a3dc92 PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_MAINTAINER:=Oskari Rauta -PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING include $(INCLUDE_DIR)/package.mk diff --git a/utils/cudy-bdinfo/Makefile b/utils/cudy-bdinfo/Makefile new file mode 100644 index 000000000..7d56ffbfe --- /dev/null +++ b/utils/cudy-bdinfo/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2023 David Bauer +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cudy-bdinfo +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/blocktrron/cudy-bdinfo-decrypt.git +PKG_SOURCE_DATE:=2023-06-01 +PKG_SOURCE_VERSION:=5a60308c0fff610c4698207387d7153aba5fd62b +PKG_MIRROR_HASH:=aefcd37e4b059d92226d2bc97b1b199f6a360c4935a6e92c930998b510275838 + +PKG_MAINTAINER:=David Bauer +PKG_LICENSE:=GPL-2.0-or-later + +include $(INCLUDE_DIR)/package.mk + +define Package/cudy-bdinfo + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@(TARGET_ramips||TARGET_mediatek) +libopenssl + TITLE:=Tool for reading the bdinfo partition of Cudy routers +endef + +define Package/cudy-bdinfo/description +This program can be used to obtain information stored on the +bdinfo parition found on routers from Shenzhen Cudy Technology. +endef + +define Package/cudy-bdinfo/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cudy-bdinfo $(1)/usr/bin/cudy-bdinfo +endef + + +$(eval $(call BuildPackage,cudy-bdinfo)) diff --git a/utils/kmod/Makefile b/utils/kmod/Makefile index ed9a6a198..4b1074718 100644 --- a/utils/kmod/Makefile +++ b/utils/kmod/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kmod -PKG_VERSION:=30 +PKG_VERSION:=31 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod -PKG_HASH:=f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f +PKG_HASH:=f5a6949043cc72c001b728d8c218609c5a15f3c33d75614b78c79418fcf00d80 PKG_MAINTAINER:=Jeff Waugh PKG_LICENSE:=LGPL-2.1-or-later diff --git a/utils/mmc-utils/Makefile b/utils/mmc-utils/Makefile index eeb35777d..4243d0895 100644 --- a/utils/mmc-utils/Makefile +++ b/utils/mmc-utils/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git -PKG_SOURCE_DATE:=2023-01-16 -PKG_SOURCE_VERSION:=d4c2910981ff99b983734426dfa99632fb81ac6b -PKG_MIRROR_HASH:=b124409d3482db1e63822a7860b7e4a0dfe6c3545da967283979fe805a287893 +PKG_SOURCE_DATE:=2023-09-26 +PKG_SOURCE_VERSION:=80271e9a6fd0db9cb3a85d024664da886e94315c +PKG_MIRROR_HASH:=317cacbacfbc8a9d4afb978e4c5a601cf489a514604534168971dd20311d9d12 PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:= @@ -40,7 +40,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" \ + $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \ + -UVERSION -DVERSION=\\\"$(shell echo $(PKG_SOURCE_VERSION) | cut -c -6)\\\"" \ mmc endef diff --git a/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch index 1a2081335..de976ca12 100644 --- a/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch +++ b/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch @@ -1,9 +1,10 @@ --- a/Makefile +++ b/Makefile -@@ -1,5 +1,5 @@ +@@ -1,6 +1,6 @@ CC ?= gcc --AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -+AM_CFLAGS = -D_FILE_OFFSET_BITS=64 + GIT_VERSION := "$(shell git describe --abbrev=6 --always --tags)" +-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 \ ++AM_CFLAGS = -D_FILE_OFFSET_BITS=64 \ + -DVERSION=\"$(GIT_VERSION)\" CFLAGS ?= -g -O2 objects = \ - mmc.o \ diff --git a/utils/podman/Makefile b/utils/podman/Makefile index 11afb8765..7a785f537 100644 --- a/utils/podman/Makefile +++ b/utils/podman/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=podman -PKG_VERSION:=4.7.0 +PKG_VERSION:=4.7.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION) -PKG_HASH:=8fbeab8a821c59ac10ade87c9597d7bb13be4f7868b438278a9f6a17c50bf20d +PKG_HASH:=b785fe69041a0f222a8e1f8165816d767cb9bff5418f3f559547da82c0c279cc PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE diff --git a/utils/podman/patches/020-fix-build-with-musl-1.2.4.patch b/utils/podman/patches/020-fix-build-with-musl-1.2.4.patch new file mode 100644 index 000000000..9d56ca780 --- /dev/null +++ b/utils/podman/patches/020-fix-build-with-musl-1.2.4.patch @@ -0,0 +1,16 @@ +From https://github.com/mattn/go-sqlite3/pull/1177/commits/65d6085c5d87280c0d6883c884ddb25f9273942f Mon Sep 17 00:00:00 2001 +From: leso-kn +Date: Mon, 10 Jul 2023 14:58:52 +0200 +Subject: [PATCH] Fix musl build (#1164) + +--- a/vendor/github.com/mattn/go-sqlite3/sqlite3.go ++++ b/vendor/github.com/mattn/go-sqlite3/sqlite3.go +@@ -21,7 +21,7 @@ package sqlite3 + #cgo CFLAGS: -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 + #cgo CFLAGS: -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT + #cgo CFLAGS: -Wno-deprecated-declarations +-#cgo linux,!android CFLAGS: -DHAVE_PREAD64=1 -DHAVE_PWRITE64=1 ++#cgo linux,!android CFLAGS: -DHAVE_PREAD=1 -DHAVE_PWRITE=1 + #cgo openbsd CFLAGS: -I/usr/local/include + #cgo openbsd LDFLAGS: -L/usr/local/lib + #ifndef USE_LIBSQLITE3 diff --git a/utils/procs/Makefile b/utils/procs/Makefile new file mode 100644 index 000000000..41eeb9c18 --- /dev/null +++ b/utils/procs/Makefile @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2023 Facundo Acevedo + +include $(TOPDIR)/rules.mk + +PKG_NAME:=procs +PKG_VERSION:=0.14.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/dalance/procs/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=bb4f9d696081807ca105593092f8acd04ca339ae43fff29e0e820c6fc5e3f9ea + +PKG_MAINTAINER:=Facundo Acevedo +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENCE + +PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include ../../lang/rust/rust-package.mk + +define Package/procs + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Procs is feature-rich alternative to the 'ps' + DEPENDS:=$(RUST_ARCH_DEPENDS) + URL:=https://github.com/dalance/procs/ +endef + +define Package/procs/description + Procs is a 'ps' command replacement written in Rust, offering + enhanced usability and information display. + Features include color-coded output, theme auto-detection, advanced + search, and extended process details + (TCP/UDP ports, Docker names, I/O throughput). + It also supports pager functionality, a 'top'-like watch mode, and + a process tree view​​. +endef + +define Package/procs/conffiles +/etc/procs/procs.toml +endef + +define Package/procs/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/procs $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/procs + $(INSTALL_CONF) ./files/etc/procs/procs.toml $(1)/etc/procs/ +endef + +$(eval $(call RustBinPackage,procs)) +$(eval $(call BuildPackage,procs)) diff --git a/utils/procs/files/etc/procs/procs.toml b/utils/procs/files/etc/procs/procs.toml new file mode 100644 index 000000000..ee25012f2 --- /dev/null +++ b/utils/procs/files/etc/procs/procs.toml @@ -0,0 +1,138 @@ +[[columns]] +kind = "Pid" +style = "BrightYellow|Yellow" +numeric_search = true +nonnumeric_search = false +align = "Left" + +[[columns]] +kind = "User" +style = "BrightGreen|Green" +numeric_search = false +nonnumeric_search = true +align = "Left" + +[[columns]] +kind = "Separator" +style = "White|BrightBlack" +numeric_search = false +nonnumeric_search = false +align = "Left" + +[[columns]] +kind = "Tty" +style = "BrightWhite|Black" +numeric_search = false +nonnumeric_search = false +align = "Left" + +[[columns]] +kind = "UsageCpu" +style = "ByPercentage" +numeric_search = false +nonnumeric_search = false +align = "Right" + +[[columns]] +kind = "UsageMem" +style = "ByPercentage" +numeric_search = false +nonnumeric_search = false +align = "Right" + +[[columns]] +kind = "CpuTime" +style = "BrightCyan|Cyan" +numeric_search = false +nonnumeric_search = false +align = "Left" + +[[columns]] +kind = "MultiSlot" +style = "ByUnit" +numeric_search = false +nonnumeric_search = false +align = "Right" + +[[columns]] +kind = "Separator" +style = "White|BrightBlack" +numeric_search = false +nonnumeric_search = false +align = "Left" + +[[columns]] +kind = "Command" +style = "BrightWhite|Black" +numeric_search = false +nonnumeric_search = true +align = "Left" + +[style] +header = "BrightWhite|Black" +unit = "BrightWhite|Black" +tree = "BrightWhite|Black" + +[style.by_percentage] +color_000 = "BrightBlue|Blue" +color_025 = "BrightGreen|Green" +color_050 = "BrightYellow|Yellow" +color_075 = "BrightRed|Red" +color_100 = "BrightRed|Red" + +[style.by_state] +color_d = "BrightRed|Red" +color_r = "BrightGreen|Green" +color_s = "BrightBlue|Blue" +color_t = "BrightCyan|Cyan" +color_z = "BrightMagenta|Magenta" +color_x = "BrightMagenta|Magenta" +color_k = "BrightYellow|Yellow" +color_w = "BrightYellow|Yellow" +color_p = "BrightYellow|Yellow" + +[style.by_unit] +color_k = "BrightBlue|Blue" +color_m = "BrightGreen|Green" +color_g = "BrightYellow|Yellow" +color_t = "BrightRed|Red" +color_p = "BrightRed|Red" +color_x = "BrightBlue|Blue" + +[search] +numeric_search = "Exact" +nonnumeric_search = "Partial" +logic = "And" +case = "Smart" + +[display] +show_self = false +show_thread = false +show_thread_in_tree = true +show_parent_in_tree = true +show_children_in_tree = true +show_header = true +show_footer = false +cut_to_terminal = true +cut_to_pager = false +cut_to_pipe = false +color_mode = "Auto" +separator = "│" +ascending = "▲" +descending = "▼" +tree_symbols = ["│", "─", "┬", "├", "└"] +abbr_sid = true +theme = "Auto" + +[sort] +column = 0 +order = "Ascending" + +[docker] +path = "unix:///var/run/docker.sock" + +[pager] +mode = "Disable" # OpenWrt's less doen't support the flags '-SR', if needed install the full less pacakge +detect_width = false +use_builtin = false + diff --git a/utils/prometheus-node-exporter-lua/Makefile b/utils/prometheus-node-exporter-lua/Makefile index a69f5320d..f787d0e8a 100644 --- a/utils/prometheus-node-exporter-lua/Makefile +++ b/utils/prometheus-node-exporter-lua/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=prometheus-node-exporter-lua -PKG_VERSION:=2022.08.08 +PKG_VERSION:=2023.07.13 PKG_RELEASE:=1 PKG_MAINTAINER:=Etienne CHAMPETIER @@ -103,6 +103,17 @@ define Package/prometheus-node-exporter-lua-hostapd_ubus_stations/install $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/hostapd_ubus_stations.lua $(1)/usr/lib/lua/prometheus-collectors/ endef +define Package/prometheus-node-exporter-lua-hwmon + $(call Package/prometheus-node-exporter-lua/Default) + TITLE+= (hwmon collector) + DEPENDS:=prometheus-node-exporter-lua +luci-lib-nixio +endef + +define Package/prometheus-node-exporter-lua-hwmon/install + $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors + $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/hwmon.lua $(1)/usr/lib/lua/prometheus-collectors/ +endef + define Package/prometheus-node-exporter-lua-ltq-dsl $(call Package/prometheus-node-exporter-lua/Default) TITLE+= (lantiq dsl collector) @@ -158,6 +169,17 @@ define Package/prometheus-node-exporter-lua-textfile/install $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/textfile.lua $(1)/usr/lib/lua/prometheus-collectors/ endef +define Package/prometheus-node-exporter-lua-thermal + $(call Package/prometheus-node-exporter-lua/Default) + TITLE+= (thermal collector) + DEPENDS:=prometheus-node-exporter-lua +endef + +define Package/prometheus-node-exporter-lua-thermal/install + $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors + $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/thermal.lua $(1)/usr/lib/lua/prometheus-collectors/ +endef + define Package/prometheus-node-exporter-lua-ubnt-manager $(call Package/prometheus-node-exporter-lua/Default) TITLE+= (ubnt-manager collector) @@ -229,11 +251,13 @@ $(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx7)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-dawn)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_stations)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_ubus_stations)) +$(eval $(call BuildPackage,prometheus-node-exporter-lua-hwmon)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-ltq-dsl)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-nat_traffic)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-netstat)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-openwrt)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-textfile)) +$(eval $(call BuildPackage,prometheus-node-exporter-lua-thermal)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-ubnt-manager)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-uci_dhcp_host)) $(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi)) diff --git a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hwmon.lua b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hwmon.lua new file mode 100644 index 000000000..3e00f0524 --- /dev/null +++ b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hwmon.lua @@ -0,0 +1,58 @@ +#!/usr/bin/lua + +local fs = require "nixio.fs" + +local function rtrim(s) + return string.gsub(s, "\n$", "") +end + +local function scrape() + local metric_chip_names = metric("node_hwmon_chip_names", "gauge") + local metric_sensor_label = metric("node_hwmon_sensor_label", "gauge") + local metric_temp_celsius = metric("node_hwmon_temp_celsius", "gauge") + local metric_pwm = metric("node_hwmon_pwm", "gauge") + + for hwmon_path in fs.glob("/sys/class/hwmon/hwmon*") do + -- Produce node_hwmon_chip_names + -- See https://github.com/prometheus/node_exporter/blob/7c564bcbeffade3dacac43b07c2eeca4957ca71d/collector/hwmon_linux.go#L415 + local chip_name = rtrim(get_contents(hwmon_path .. "/name")) + if chip_name == "" then + chip_name = fs.basename(hwmon_path) + end + + -- See https://github.com/prometheus/node_exporter/blob/7c564bcbeffade3dacac43b07c2eeca4957ca71d/collector/hwmon_linux.go#L355 + local chip = chip_name + local real_dev_path, status = fs.realpath(hwmon_path .. "/device") + if not status then + local dev_name = fs.basename(real_dev_path) + local dev_type = fs.basename(fs.dirname(real_dev_path)) + chip = dev_type .. "_" .. dev_name + end + metric_chip_names({chip=chip, chip_name=chip_name}, 1) + + -- Produce node_hwmon_sensor_label + for sensor_path in fs.glob(hwmon_path .. "/*_label") do + local sensor = string.gsub(fs.basename(sensor_path), "_label$", "") + local sensor_label = rtrim(get_contents(sensor_path)) + metric_sensor_label({chip=chip, sensor=sensor, label=sensor_label}, 1) + end + + -- Produce node_hwmon_temp_celsius + for sensor_path in fs.glob(hwmon_path .. "/temp*_input") do + local sensor = string.gsub(fs.basename(sensor_path), "_input$", "") + local temp = get_contents(sensor_path) / 1000 + metric_temp_celsius({chip=chip, sensor=sensor}, temp) + end + + -- Produce node_hwmon_pwm + for sensor_path in fs.glob(hwmon_path .. "/pwm*") do + local sensor = fs.basename(sensor_path) + if string.match(sensor, "^pwm[0-9]+$") then + local pwm = rtrim(get_contents(sensor_path)) + metric_pwm({chip=chip, sensor=sensor}, pwm) + end + end + end +end + +return { scrape = scrape } diff --git a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/thermal.lua b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/thermal.lua new file mode 100644 index 000000000..3996ea581 --- /dev/null +++ b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/thermal.lua @@ -0,0 +1,46 @@ +-- thermal collector +local function scrape() + local i = 0 + local temp_metric = metric("node_thermal_zone_temp", "gauge") + + while true do + local zonePath = "/sys/class/thermal/thermal_zone" .. i + + -- required attributes + + local typ = string.match(get_contents(zonePath .. "/type"), "^%s*(.-)%s*$") + if not typ then + break + end + + local policy = string.match(get_contents(zonePath .. "/policy"), "^%s*(.-)%s*$") + if not policy then + break + end + + local temp = string.match(get_contents(zonePath .. "/temp"), "(%d+)") + if not temp then + break + end + + local labels = {zone = i, type = typ, policy = policy} + + -- optional attributes + + local mode = string.match(get_contents(zonePath .. "/mode"), "^%s*(.-)%s*$") + if mode then + labels.mode = mode + end + + local passive = string.match(get_contents(zonePath .. "/passive"), "(%d+)") + if passive then + labels.passive = passive + end + + temp_metric(labels, temp / 1000) + + i = i + 1 + end +end + +return { scrape = scrape } diff --git a/utils/prometheus-node-exporter-ucode/Makefile b/utils/prometheus-node-exporter-ucode/Makefile new file mode 100644 index 000000000..3d712c10a --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/Makefile @@ -0,0 +1,74 @@ +# Copyright (C) 2013-2017 OpenWrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=prometheus-node-exporter-ucode +PKG_VERSION:=2022.12.02 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Andre Heider +PKG_LICENSE:=Apache-2.0 + +include $(INCLUDE_DIR)/package.mk + +Build/Compile= + +define Package/$(PKG_NAME)/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Prometheus node exporter + PKGARCH:=all +endef + +define Package/$(PKG_NAME) + $(call Package/$(PKG_NAME)/Default) + DEPENDS:=+uhttpd +uhttpd-mod-ucode +rpcd +ucode-mod-fs +ucode-mod-ubus +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/config $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/usr/share/ucode/node-exporter/lib + $(INSTALL_DATA) ./files/metrics.uc $(1)/usr/share/ucode/node-exporter/ + $(INSTALL_DATA) ./files/base/*.uc $(1)/usr/share/ucode/node-exporter/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/run.sh $(1)/usr/bin/$(PKG_NAME) +endef + +define Package/$(PKG_NAME)/conffiles +/etc/config/$(PKG_NAME) +endef + +define Package/$(PKG_NAME)/description + Provides node metrics as Prometheus scraping endpoint. + + This service is a lightweight rewrite in ucode of the offical Prometheus node_exporter. +endef + +$(eval $(call BuildPackage,prometheus-node-exporter-ucode)) + +define Collector + define Package/$(PKG_NAME)-$(1) + $$(call Package/$(PKG_NAME)/Default) + TITLE+= ($(2)) + DEPENDS:=$(PKG_NAME) $(3) + endef + + define Package/$(PKG_NAME)-$(1)/install + $$(INSTALL_DIR) $$(1)/usr/share/ucode/node-exporter/lib + $$(INSTALL_DATA) ./files/extra/$(1).uc $$(1)/usr/share/ucode/node-exporter/lib/ + endef + + $$(eval $$(call BuildPackage,$(PKG_NAME)-$(1))) +endef + +$(eval $(call Collector,dnsmasq,Dnsmasq collector,@dnsmasq)) +$(eval $(call Collector,ltq-dsl,Lantiq/Intel/MaxLinear DSL collector,@ltq-dsl-app)) +$(eval $(call Collector,netstat,netstat collector,)) +$(eval $(call Collector,openwrt,OpenWrt collector,)) +$(eval $(call Collector,snmp6,snmp6 collector,)) +$(eval $(call Collector,uci_dhcp_host,UCI DHCP host collector,)) +$(eval $(call Collector,wifi,Wi-Fi collector,+ucode-mod-nl80211)) +$(eval $(call Collector,wireguard,Wireguard collector,+rpcd-mod-wireguard)) diff --git a/utils/prometheus-node-exporter-ucode/files/base/conntrack.uc b/utils/prometheus-node-exporter-ucode/files/base/conntrack.uc new file mode 100644 index 000000000..b3ee3f3bc --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/conntrack.uc @@ -0,0 +1,4 @@ +gauge("node_nf_conntrack_entries") + (null, oneline("/proc/sys/net/netfilter/nf_conntrack_count")); +gauge("node_nf_conntrack_entries_limit") + (null, oneline("/proc/sys/net/netfilter/nf_conntrack_max")); diff --git a/utils/prometheus-node-exporter-ucode/files/base/cpu.uc b/utils/prometheus-node-exporter-ucode/files/base/cpu.uc new file mode 100644 index 000000000..574655df8 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/cpu.uc @@ -0,0 +1,44 @@ +let f = fs.open("/proc/stat"); + +if (!f) + return false; + +const desc = [ + null, + "user", + "nice", + "system", + "idle", + "iowait", + "irq", + "softirq", + "steal", + "guest", + "guest_nice", +]; +const m_cpu = counter("node_cpu_seconds_total"); + +let line; +while (line = nextline(f)) { + const x = wsplit(line); + + if (length(x) < 2) + continue; + + if (match(x[0], /^cpu\d+/)) { + const count = min(length(x), length(desc)); + for (let i = 1; i < count; i++) + m_cpu({ cpu: x[0], mode: desc[i] }, x[i] / 100.0); + } else if (x[0] == "intr") + counter("node_intr_total")(null, x[1]); + else if (x[0] == "ctxt") + counter("node_context_switches_total")(null, x[1]); + else if (x[0] == "btime") + gauge("node_boot_time_seconds")(null, x[1]); + else if (x[0] == "processes") + counter("node_forks_total")(null, x[1]); + else if (x[0] == "procs_running") + gauge("node_procs_running_total")(null, x[1]); + else if (x[0] == "procs_blocked") + gauge("node_procs_blocked_total")(null, x[1]); +} diff --git a/utils/prometheus-node-exporter-ucode/files/base/entropy.uc b/utils/prometheus-node-exporter-ucode/files/base/entropy.uc new file mode 100644 index 000000000..2df44261a --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/entropy.uc @@ -0,0 +1,4 @@ +gauge("node_entropy_available_bits") + (null, oneline("/proc/sys/kernel/random/entropy_avail")); +gauge("node_entropy_pool_size_bits") + (null, oneline("/proc/sys/kernel/random/poolsize")); diff --git a/utils/prometheus-node-exporter-ucode/files/base/filefd.uc b/utils/prometheus-node-exporter-ucode/files/base/filefd.uc new file mode 100644 index 000000000..359cffd4e --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/filefd.uc @@ -0,0 +1,7 @@ +const x = wsplit(oneline("/proc/sys/fs/file-nr")); + +if (length(x) < 3) + return false; + +gauge("node_filefd_allocated")(null, x[0]); +gauge("node_filefd_maximum")(null, x[2]); diff --git a/utils/prometheus-node-exporter-ucode/files/base/loadavg.uc b/utils/prometheus-node-exporter-ucode/files/base/loadavg.uc new file mode 100644 index 000000000..ba67dafe3 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/loadavg.uc @@ -0,0 +1,8 @@ +const x = wsplit(oneline("/proc/loadavg")); + +if (length(x) < 3) + return false; + +gauge("node_load1")(null, x[0]); +gauge("node_load5")(null, x[1]); +gauge("node_load15")(null, x[2]); diff --git a/utils/prometheus-node-exporter-ucode/files/base/meminfo.uc b/utils/prometheus-node-exporter-ucode/files/base/meminfo.uc new file mode 100644 index 000000000..3cecb124d --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/meminfo.uc @@ -0,0 +1,24 @@ +let f = fs.open("/proc/meminfo"); + +if (!f) + return false; + +let line; +while (line = nextline(f)) { + const x = wsplit(line); + + if (length(x) < 2) + continue; + + if (substr(x[0], -1) != ":") + continue; + + let name; + if (substr(x[0], -2) == "):") + name = replace(substr(x[0], 0, -2), "(", "_"); + else + name = substr(x[0], 0, -1); + + gauge(`node_memory_${name}_bytes`) + (null, x[2] == "kB" ? x[1] * 1024 : x[1]); +} diff --git a/utils/prometheus-node-exporter-ucode/files/base/netclass.uc b/utils/prometheus-node-exporter-ucode/files/base/netclass.uc new file mode 100644 index 000000000..10b3cfd34 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/netclass.uc @@ -0,0 +1,48 @@ +const root = "/sys/class/net/"; +const devices = fs.lsdir(root); + +if (length(devices) < 1) + return false; + +const m_info = gauge("node_network_info"); +const m_speed = gauge("node_network_speed_bytes"); +const metrics = { + addr_assign_type: gauge("node_network_address_assign_type"), + carrier: gauge("node_network_carrier"), + carrier_changes: counter("node_network_carrier_changes_total"), + carrier_down_count: counter("node_network_carrier_down_changes_total"), + carrier_up_count: counter("node_network_carrier_up_changes_total"), + dev_id: gauge("node_network_device_id"), + dormant: gauge("node_network_dormant"), + flags: gauge("node_network_flags"), + ifindex: gauge("node_network_iface_id"), + iflink: gauge("node_network_iface_link"), + link_mode: gauge("node_network_iface_link_mode"), + mtu: gauge("node_network_mtu_bytes"), + name_assign_type: gauge("node_network_name_assign_type"), + netdev_group: gauge("node_network_net_dev_group"), + type: gauge("node_network_protocol_type"), + tx_queue_len: gauge("node_network_transmit_queue_length"), +}; + +for (let device in devices) { + const devroot = root + device + "/"; + + m_info({ + device, + address: oneline(devroot + "address"), + broadcast: oneline(devroot + "broadcast"), + duplex: oneline(devroot + "duplex"), + operstate: oneline(devroot + "operstate"), + ifalias: oneline(devroot + "ifalias"), + }, 1); + + for (let m in metrics) { + let line = oneline(devroot + m); + metrics[m]({ device }, line); + } + + const speed = int(oneline(devroot + "speed")); + if (speed > 0) + m_speed({ device }, speed * 1000 * 1000 / 8); +} diff --git a/utils/prometheus-node-exporter-ucode/files/base/netdev.uc b/utils/prometheus-node-exporter-ucode/files/base/netdev.uc new file mode 100644 index 000000000..f8fc68de4 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/netdev.uc @@ -0,0 +1,40 @@ +let f = fs.open("/proc/net/dev"); + +if (!f) + return false; + +const m = [ + null, + counter("node_network_receive_bytes_total"), + counter("node_network_receive_packets_total"), + counter("node_network_receive_errs_total"), + counter("node_network_receive_drop_total"), + counter("node_network_receive_fifo_total"), + counter("node_network_receive_frame_total"), + counter("node_network_receive_compressed_total"), + counter("node_network_receive_multicast_total"), + counter("node_network_transmit_bytes_total"), + counter("node_network_transmit_packets_total"), + counter("node_network_transmit_errs_total"), + counter("node_network_transmit_drop_total"), + counter("node_network_transmit_fifo_total"), + counter("node_network_transmit_colls_total"), + counter("node_network_transmit_carrier_total"), + counter("node_network_transmit_compressed_total"), +]; + +let line; +while (line = nextline(f)) { + const x = wsplit(ltrim(line), " "); + + if (length(x) < 2) + continue; + + if (substr(x[0], -1) != ":") + continue; + + const count = min(length(x), length(m)); + const labels = { device: substr(x[0], 0, -1) }; + for (let i = 1; i < count; i++) + m[i](labels, x[i]); +} diff --git a/utils/prometheus-node-exporter-ucode/files/base/selinux.uc b/utils/prometheus-node-exporter-ucode/files/base/selinux.uc new file mode 100644 index 000000000..11840a830 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/selinux.uc @@ -0,0 +1,10 @@ +const mode = oneline("/sys/fs/selinux/enforce"); +const enabled = gauge("node_selinux_enabled"); + +if (mode == null) { + enabled(null, 0); + return; +} + +enabled(null, 1); +gauge("node_selinux_current_mode")(null, mode); diff --git a/utils/prometheus-node-exporter-ucode/files/base/time.uc b/utils/prometheus-node-exporter-ucode/files/base/time.uc new file mode 100644 index 000000000..7d13ea841 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/time.uc @@ -0,0 +1 @@ +gauge("node_time_seconds")(null, time()); diff --git a/utils/prometheus-node-exporter-ucode/files/base/uname.uc b/utils/prometheus-node-exporter-ucode/files/base/uname.uc new file mode 100644 index 000000000..50cb352ac --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/base/uname.uc @@ -0,0 +1,8 @@ +gauge("node_uname_info")({ + sysname: oneline("/proc/sys/kernel/ostype"), + nodename: oneline("/proc/sys/kernel/hostname"), + release: oneline("/proc/sys/kernel/osrelease"), + version: oneline("/proc/sys/kernel/version"), + machine: poneline("uname -m"), // TODO lame + domainname: oneline("/proc/sys/kernel/domainname"), +}, 1); diff --git a/utils/prometheus-node-exporter-ucode/files/config b/utils/prometheus-node-exporter-ucode/files/config new file mode 100644 index 000000000..8741f4a25 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/config @@ -0,0 +1,7 @@ +config prometheus-node-exporter-ucode 'main' + option listen_interface 'loopback' + option listen_port '9101' + option http_keepalive '70' + +config collector 'wifi' + option stations '1' diff --git a/utils/prometheus-node-exporter-ucode/files/extra/dnsmasq.uc b/utils/prometheus-node-exporter-ucode/files/extra/dnsmasq.uc new file mode 100644 index 000000000..3644b20f2 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/dnsmasq.uc @@ -0,0 +1,6 @@ +const x = ubus.call("dnsmasq", "metrics"); +if (!x) + return false; + +for (let i in x) + gauge(`dnsmasq_${i}_total`)(null, x[i]); diff --git a/utils/prometheus-node-exporter-ucode/files/extra/ltq-dsl.uc b/utils/prometheus-node-exporter-ucode/files/extra/ltq-dsl.uc new file mode 100644 index 000000000..164449722 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/ltq-dsl.uc @@ -0,0 +1,72 @@ +const x = ubus.call("dsl", "metrics"); + +if (!x) + return false; + +gauge("dsl_info")({ + atuc_vendor: x.atu_c.vendor, + atuc_system_vendor: x.atu_c.system_vendor, + chipset: x.chipset, + firmware_version: x.firmware_version, + api_version: x.api_version, + driver_version: x.driver_version, +}, 1); + +gauge("dsl_line_info")({ + annex: x.annex, + standard: x.standard, + mode: x.mode, + profile: x.profile, +}, 1); + +gauge("dsl_up")({ detail: x.state }, x.up); +gauge("dsl_uptime_seconds")(null, x.uptime); + +gauge("dsl_line_attenuation_db") + ({ direction: "down" }, x.downstream.latn) + ({ direction: "up" }, x.upstream.latn); +gauge("dsl_signal_attenuation_db") + ({ direction: "down" }, x.downstream.satn) + ({ direction: "up" }, x.upstream.satn); +gauge("dsl_signal_to_noise_margin_db") + ({ direction: "down" }, x.downstream.snr) + ({ direction: "up" }, x.upstream.snr); +gauge("dsl_aggregated_transmit_power_db") + ({ direction: "down" }, x.downstream.actatp) + ({ direction: "up" }, x.upstream.actatp); + +if (x.downstream.interleave_delay) + gauge("dsl_latency_seconds") + ({ direction: "down" }, x.downstream.interleave_delay / 1000000.0) + ({ direction: "up" }, x.upstream.interleave_delay / 1000000.0); +gauge("dsl_datarate") + ({ direction: "down" }, x.downstream.data_rate) + ({ direction: "up" }, x.upstream.data_rate); +gauge("dsl_max_datarate") + ({ direction: "down" }, x.downstream.attndr) + ({ direction: "up" }, x.upstream.attndr); + +counter("dsl_error_seconds_total") + ({ err: "forward error correction", loc: "near" }, x.errors.near.fecs) + ({ err: "forward error correction", loc: "far" }, x.errors.far.fecs) + ({ err: "errored", loc: "near" }, x.errors.near.es) + ({ err: "errored", loc: "far" }, x.errors.far.es) + ({ err: "severely errored", loc: "near" }, x.errors.near.ses) + ({ err: "severely errored", loc: "far" }, x.errors.far.ses) + ({ err: "loss of signal", loc: "near" }, x.errors.near.loss) + ({ err: "loss of signal", loc: "far" }, x.errors.far.loss) + ({ err: "unavailable", loc: "near" }, x.errors.near.uas) + ({ err: "unavailable", loc: "far" }, x.errors.far.uas); + +counter("dsl_errors_total") + ({ err: "header error code error", loc: "near" }, x.errors.near.hec) + ({ err: "header error code error", loc: "far" }, x.errors.far.hec) + ({ err: "non pre-emptive crc error", loc: "near" }, x.errors.near.crc_p) + ({ err: "non pre-emptive crc error", loc: "far" }, x.errors.far.crc_p) + ({ err: "pre-emptive crc error", loc: "near" }, x.errors.near.crcp_p) + ({ err: "pre-emptive crc error", loc: "far" }, x.errors.far.crcp_p); + +if (x.erb) + counter("dsl_erb_total") + ({ counter: "sent" }, x.erb.sent) + ({ counter: "discarded" }, x.erb.discarded); diff --git a/utils/prometheus-node-exporter-ucode/files/extra/netstat.uc b/utils/prometheus-node-exporter-ucode/files/extra/netstat.uc new file mode 100644 index 000000000..744930514 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/netstat.uc @@ -0,0 +1,30 @@ +function parse(fn) { + let f = fs.open(fn); + + if (!f) + return false; + + let names, values; + while (names = nextline(f), values = nextline(f)) { + const name = wsplit(names); + const value = wsplit(values); + + if (name[0] != value[0]) + continue; + + if (length(name) != length(value)) + continue; + + let prefix = substr(name[0], 0, -1); + for (let i = 1; i < length(name); i++) + gauge(`node_netstat_${prefix}_${name[i]}`)(null, value[i]); + } + + return true; +} + +let n = parse("/proc/net/netstat"); +let s = parse("/proc/net/snmp"); + +if (!n && !s) + return false; diff --git a/utils/prometheus-node-exporter-ucode/files/extra/openwrt.uc b/utils/prometheus-node-exporter-ucode/files/extra/openwrt.uc new file mode 100644 index 000000000..10c15a10c --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/openwrt.uc @@ -0,0 +1,14 @@ +const x = ubus.call("system", "board"); + +if (!x) + return false; + +gauge("node_openwrt_info")({ + board_name: x.board_name, + id: x.release.distribution, + model: x.model, + release: x.release.version, + revision: x.release.revision, + system: x.system, + target: x.release.target, +}, 1); diff --git a/utils/prometheus-node-exporter-ucode/files/extra/snmp6.uc b/utils/prometheus-node-exporter-ucode/files/extra/snmp6.uc new file mode 100644 index 000000000..d440a889e --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/snmp6.uc @@ -0,0 +1,23 @@ +function parse(fn, device, skipdecl) { + let f = fs.open(fn); + + if (!f) + return false; + + const labels = { device }; + let line; + while (line = nextline(f)) { + const x = wsplit(line); + + if (length(x) < 2) + continue; + + counter(`snmp6_${x[0]}`, null, skipdecl)(labels, x[1]); + } +} + +parse("/proc/net/snmp6", "all"); + +const root = "/proc/net/dev_snmp6/"; +for (let device in fs.lsdir(root)) + parse(root + device, device, true); diff --git a/utils/prometheus-node-exporter-ucode/files/extra/uci_dhcp_host.uc b/utils/prometheus-node-exporter-ucode/files/extra/uci_dhcp_host.uc new file mode 100644 index 000000000..0d55724f9 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/uci_dhcp_host.uc @@ -0,0 +1,14 @@ +import { cursor } from "uci"; + +const uci = cursor(); +uci.load("dhcp"); + +let m = gauge("dhcp_host_info"); + +uci.foreach('dhcp', `host`, (s) => { + m({ + name: s.name, + mac: s.mac, + ip: s.ip, + }, 1); +}); diff --git a/utils/prometheus-node-exporter-ucode/files/extra/wifi.uc b/utils/prometheus-node-exporter-ucode/files/extra/wifi.uc new file mode 100644 index 000000000..f5f58ef68 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/wifi.uc @@ -0,0 +1,118 @@ +import { request, 'const' as wlconst } from 'nl80211'; + +const x = ubus.call("network.wireless", "status"); + +if (!x) + return false; + +const iftypes = [ + "Unknown", + "Ad-Hoc", + "Client", + "Master", + "Master (VLAN)", + "WDS", + "Monitor", + "Mesh Point", + "P2P Client", + "P2P Go", + "P2P Device", + "OCB", +]; + +let m_radio_info = gauge("wifi_radio_info"); +let m_network_info = gauge("wifi_network_info"); +let m_network_quality = gauge("wifi_network_quality"); +let m_network_bitrate = gauge("wifi_network_bitrate"); +let m_network_noise = gauge("wifi_network_noise_dbm"); +let m_network_signal = gauge("wifi_network_signal_dbm"); +let m_stations_total = counter("wifi_stations_total"); +let m_station_inactive = gauge("wifi_station_inactive_milliseconds"); +let m_station_rx_bytes = counter("wifi_station_receive_bytes_total"); +let m_station_tx_bytes = counter("wifi_station_transmit_bytes_total"); +let m_station_rx_packets = counter("wifi_station_receive_packets_total"); +let m_station_tx_packets = counter("wifi_station_transmit_packets_total"); +let m_station_signal = gauge("wifi_station_signal_dbm"); +let m_station_rx_bitrate = gauge("wifi_station_receive_kilobits_per_second"); +let m_station_tx_bitrate = gauge("wifi_station_transmit_kilobits_per_second"); +let m_station_exp_tp = gauge("wifi_station_expected_throughput_kilobits_per_second"); + +for (let radio in x) { + const rc = x[radio]["config"]; + + m_radio_info({ + radio, + htmode: rc["htmode"], + channel: rc["channel"], + country: rc["country"], + } ,1); + + for (let iface in x[radio]["interfaces"]) { + const ifname = iface["ifname"]; + const nc = iface["config"]; + const wif = request(wlconst.NL80211_CMD_GET_INTERFACE, 0, { dev: ifname }); + + if (!wif) + continue; + + m_network_info({ + radio, + ifname, + ssid: nc["ssid"] || nc["mesh_id"], + bssid: wif["mac"], + mode: iftypes[wif["iftype"]], + }, 1); + + const wsta = request(wlconst.NL80211_CMD_GET_STATION, wlconst.NLM_F_DUMP, { dev: ifname }); + let signal = 0; + let bitrate = 0; + const stations = length(wsta) || 0; + if (stations) { + for (let sta in wsta) { + signal += sta["sta_info"].signal; + bitrate += sta["sta_info"]["tx_bitrate"].bitrate32; + } + bitrate /= stations * 0.01; + signal /= stations; + } + + let labels = { radio, ifname }; + m_network_bitrate(labels, bitrate || NaN); + m_network_signal(labels, signal || NaN); + m_network_quality(labels, signal ? 100.0 / 70 * (signal + 110) : NaN); + + const wsur = request(wlconst.NL80211_CMD_GET_SURVEY, wlconst.NLM_F_DUMP, { dev: ifname }); + let noise = 0; + for (let i in wsur) { + if (i["survey_info"]["frequency"] != wif["wiphy_freq"]) + continue; + + noise = i["survey_info"]["noise"]; + break; + } + + m_network_noise(labels, noise || NaN); + + if (config["stations"] != "1") + continue; + + m_stations_total(labels, stations); + if (!stations) + continue; + + for (let sta in wsta) { + labels["mac"] = sta["mac"]; + const info = sta["sta_info"]; + + m_station_inactive(labels, info["inactive_time"]); + m_station_rx_bytes(labels, info["rx_bytes64"]); + m_station_tx_bytes(labels, info["tx_bytes64"]); + m_station_rx_packets(labels, info["rx_packets"]); + m_station_tx_packets(labels, info["tx_packets"]); + m_station_signal(labels, info["signal"]); + m_station_rx_bitrate(labels, info["rx_bitrate"]["bitrate32"] * 100); + m_station_tx_bitrate(labels, info["tx_bitrate"]["bitrate32"] * 100); + m_station_exp_tp(labels, info["expected_throughput"]); + } + } +} diff --git a/utils/prometheus-node-exporter-ucode/files/extra/wireguard.uc b/utils/prometheus-node-exporter-ucode/files/extra/wireguard.uc new file mode 100644 index 000000000..12ae56af9 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/extra/wireguard.uc @@ -0,0 +1,49 @@ +import { cursor } from "uci"; + +const x = ubus.call("wireguard", "status"); +if (!x) + return false; + +const uci = cursor(); +uci.load("network"); + +let m_wg_iface_info = gauge("wireguard_interface_info"); +let m_wg_peer_info = gauge("wireguard_peer_info"); +let m_wg_handshake = gauge ("wireguard_latest_handshake_seconds"); +let m_wg_rx = gauge ("wireguard_received_bytes_total"); +let m_wg_tx = gauge ("wireguard_sent_bytes_total"); + +for (let iface in x) { + const wc = x[iface]; + + m_wg_iface_info({ + name: iface, + public_key: wc["public_key"], + listen_port: wc["listen_port"], + fwmark: wc["fwmark"] || NaN, + }, 1); + + for (let peer in wc["peers"]) { + let description; + uci.foreach('network', `wireguard_${iface}`, (s) => { + if (s.public_key == peer) + description = s.description; + }); + + const pc = wc["peers"][peer]; + + m_wg_peer_info({ + interface: iface, + public_key: peer, + description, + endpoint: pc["endpoint"], + persistent_keepalive_interval: pc["persistent_keepalive_interval"] || NaN, + }, 1); + + const labels = { public_key: peer }; + + m_wg_handshake(labels, pc["last_handshake"]); + m_wg_rx(labels, pc["rx_bytes"]); + m_wg_tx(labels, pc["tx_bytes"]); + } +} diff --git a/utils/prometheus-node-exporter-ucode/files/init b/utils/prometheus-node-exporter-ucode/files/init new file mode 100644 index 000000000..1735236f7 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/init @@ -0,0 +1,73 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2013-2017 OpenWrt.org + +START=60 +USE_PROCD=1 + +_log() { + logger -p daemon.info -t prometheus-node-exporter-ucode "$@" +} + +start_service() { + . /lib/functions/network.sh + + local interface port bind4 bind6 + + config_load prometheus-node-exporter-ucode.main + config_get interface "main" listen_interface "loopback" + config_get port "main" listen_port 9101 + config_get keepalive "main" http_keepalive 70 + + [ "$interface" = "*" ] || { + network_get_ipaddr bind4 "$interface" + network_get_ipaddr6 bind6 "$interface" + [ -n "$bind4$bind6" ] || { + _log "defering start until listen interface $interface becomes ready" + return 0 + } + } + + procd_open_instance + + procd_set_param command /usr/sbin/uhttpd -f -c /dev/null -h /dev/null -S -D -o /metrics -O /usr/share/ucode/node-exporter/metrics.uc + + if [ "$interface" = "*" ]; then + procd_append_param command -p $port + else + [ -n "$bind4" ] && procd_append_param command -p $bind4:$port + [ -n "$bind6" ] && procd_append_param command -p [$bind6]:$port + fi + [ $keepalive -gt 0 ] && procd_append_param command -k $keepalive + + procd_add_jail prometheus-node-exporter-ucode log procfs sysfs ubus + procd_add_jail_mount "/usr/lib/uhttpd_ucode.so" + procd_add_jail_mount "/lib/libubus.so*" + procd_add_jail_mount "/lib/libuci.so" + procd_add_jail_mount "/usr/lib/ucode" + procd_add_jail_mount "/usr/lib/libnl*.so*" + procd_add_jail_mount "/usr/share/ucode/node-exporter" + procd_add_jail_mount "/etc/config" + + # TODO breaks the dsl collector? + #procd_set_param user nobody + #procd_set_param group nogroup + procd_set_param no_new_privs 1 + + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param respawn + + procd_close_instance +} + +service_triggers() +{ + local interface + + procd_add_reload_trigger "prometheus-node-exporter-ucode" + + config_load prometheus-node-exporter-ucode.main + config_get interface "main" listen_interface "loopback" + + [ "$interface" = "*" ] || procd_add_reload_interface_trigger "$interface" +} diff --git a/utils/prometheus-node-exporter-ucode/files/metrics.uc b/utils/prometheus-node-exporter-ucode/files/metrics.uc new file mode 100644 index 000000000..3dce77acc --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/metrics.uc @@ -0,0 +1,227 @@ +{% +'use strict'; + +import * as fs from "fs"; +import { connect } from "ubus"; +import { cursor } from "uci"; + +function debug(...s) { + if (global.debug) + warn("DEBUG: ", ...s, "\n"); +} + +function puts(...s) { + return uhttpd.send(...s, "\n"); +} + +function govalue(value) { + if (value == Infinity) + return "+Inf"; + else if (value == -Infinity) + return "-Inf"; + else if (value != value) + return "NaN"; + else if (type(value) in [ "int", "double" ]) + return value; + else if (type(value) in [ "bool", "string" ]) + return +value; + + return null; +} + +function metric(name, mtype, help, skipdecl) { + let func; + let decl = skipdecl == true ? false : true; + + let yield = function(labels, value) { + let v = govalue(value); + + if (v == null) { + debug(`skipping metric: unsupported value '${value}' (${name})`); + return func; + } + + let labels_str = ""; + if (length(labels)) { + let sep = ""; + let s; + labels_str = "{"; + for (let l in labels) { + if (labels[l] == null) + s = ""; + else if (type(labels[l]) == "string") { + s = labels[l]; + s = replace(labels[l], "\\", "\\\\"); + s = replace(s, "\"", "\\\""); + s = replace(s, "\n", "\\n"); + } else { + s = govalue(labels[l]); + + if (!s) + continue; + } + + labels_str += sep + l + "=\"" + s + "\""; + sep = ","; + } + labels_str += "}"; + } + + if (decl) { + if (help) + puts("# HELP ", name, " ", help); + puts("# TYPE ", name, " ", mtype); + decl = false; + } + + puts(name, labels_str, " ", v); + return func; + }; + + func = yield; + return func; +} + +function counter(name, help, skipdecl) { + return metric(name, "counter", help, skipdecl); +} + +function gauge(name, help, skipdecl) { + return metric(name, "gauge", help, skipdecl); +} + +function httpstatus(status) { + puts("Status: ", status, "\nContent-Type: text/plain; version=0.0.4; charset=utf-8\n"); +} + +function clockdiff(t1, t2) { + return (t2[0] - t1[0]) * 1000000000 + t2[1] - t1[1]; +} + +let collectors = {}; + +global.handle_request = function(env) { + let scope = { + config: null, + fs, + ubus: connect(), + counter, + gauge, + wsplit: function(line) { + return split(line, /\s+/); + }, + nextline: function(f) { + return rtrim(f.read("line"), "\n"); + }, + oneline: function(fn) { + let f = fs.open(fn); + + if (!f) + return null; + + return nextline(f); + }, + poneline: function(cmd) { + let f = fs.popen(cmd); + + if (!f) + return null; + + return nextline(f); + }, + }; + + if (length(collectors) < 1) { + httpstatus("404 No Collectors found"); + return; + } + + let cols = []; + for (let q in split(env.QUERY_STRING, "&")) { + let s = split(q, "=", 2); + if (length(s) == 2 && s[0] == "collect") { + if (!(s[1] in collectors)) { + httpstatus(`404 Collector ${s[1]} not found`); + return; + } + + push(cols, s[1]); + } + } + + if (length(cols) > 0) + cols = uniq(cols); + else + cols = keys(collectors); + + httpstatus("200 OK"); + + let duration = gauge("node_scrape_collector_duration_seconds"); + let success = gauge("node_scrape_collector_success"); + + for (let col in cols) { + let ok = false; + let t1, t2; + + scope["config"] = collectors[col].config; + t1 = clock(true); + try { + ok = call(collectors[col].func, null, scope) != false; + } catch(e) { + warn(`error running collector '${col}':\n${e.message}\n`); + } + t2 = clock(true); + + duration({ collector: col }, clockdiff(t1, t2) / 1000000000.0); + success({ collector: col }, ok); + } +}; + +const lib = "/usr/share/ucode/node-exporter/lib"; +const opts = { + strict_declarations: true, + raw_mode: true, +}; + +let cols = fs.lsdir(lib, "*.uc"); +for (let col in cols) { + let func; + let uci = cursor(); + + try { + func = loadfile(lib + "/" + col, opts); + } catch(e) { + warn(`error compiling collector '${col}':\n${e.message}\n`); + continue; + } + + let name = substr(col, 0, -3); + let config = uci.get_all("prometheus-node-exporter-ucode", name); + if (!config || config[".type"] != "collector") + config = {}; + else { + delete config[".anonymous"]; + delete config[".type"]; + delete config[".name"]; + } + + collectors[name] = { + func, + config, + }; +} + +warn(`prometheus-node-exporter-ucode now serving requests with ${length(collectors)} collectors\n`); + +if (!("uhttpd" in global)) { + global.debug = true; + + puts = function(...s) { + return print(...s, "\n"); + }; + + handle_request({ + QUERY_STRING: join("&", map(ARGV, v => "collect=" + v)), + }); +} +%} diff --git a/utils/prometheus-node-exporter-ucode/files/run.sh b/utils/prometheus-node-exporter-ucode/files/run.sh new file mode 100755 index 000000000..a7cefeff3 --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/files/run.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/ucode -T /usr/share/ucode/node-exporter/metrics.uc $* diff --git a/utils/prometheus-node-exporter-ucode/test.sh b/utils/prometheus-node-exporter-ucode/test.sh new file mode 100755 index 000000000..e72942b8e --- /dev/null +++ b/utils/prometheus-node-exporter-ucode/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +prometheus-node-exporter-ucode time diff --git a/utils/ripgrep/Makefile b/utils/ripgrep/Makefile index 56658540f..bad9f95e2 100644 --- a/utils/ripgrep/Makefile +++ b/utils/ripgrep/Makefile @@ -17,6 +17,7 @@ PKG_LICENSE:=MIT Unlicense PKG_LICENSE_FILES:=LICENSE-MIT UNLICENSE PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 RUST_PKG_FEATURES:=pcre2 diff --git a/utils/rpcd-mod-wireguard/Makefile b/utils/rpcd-mod-wireguard/Makefile new file mode 100644 index 000000000..9fb7d7e88 --- /dev/null +++ b/utils/rpcd-mod-wireguard/Makefile @@ -0,0 +1,31 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=rpcd-mod-wireguard +PKG_RELEASE=1 + +PKG_LICENSE:=LGPL-2.1+ +PKG_BUILD_FLAGS:=gc-sections + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/rpcd-mod-wireguard + SECTION:=libs + CATEGORY:=Libraries + TITLE:=WireGuard rpcd module + DEPENDS:=+rpcd +kmod-wireguard + MAINTAINER:=Andre Heider +endef + +define Package/rpcd-mod-wireguard/install + $(INSTALL_DIR) $(1)/usr/lib/rpcd + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/rpcd/wireguard.so \ + $(1)/usr/lib/rpcd/ +endef + +define Package/rpcd-mod-wireguard/postinst +#!/bin/sh +[ -n "$$IPKG_INSTROOT" ] || /etc/init.d/rpcd reload +endef + +$(eval $(call BuildPackage,rpcd-mod-wireguard)) diff --git a/utils/rpcd-mod-wireguard/src/CMakeLists.txt b/utils/rpcd-mod-wireguard/src/CMakeLists.txt new file mode 100644 index 000000000..97e06aa31 --- /dev/null +++ b/utils/rpcd-mod-wireguard/src/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +PROJECT(rpcd-mod-wireguard) +ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) + +SET(SOURCES wireguard.c api.c) + +ADD_LIBRARY(rpcd-mod-wireguard SHARED ${SOURCES}) + +SET_TARGET_PROPERTIES(rpcd-mod-wireguard PROPERTIES OUTPUT_NAME wireguard PREFIX "") +INSTALL(TARGETS rpcd-mod-wireguard LIBRARY DESTINATION lib/rpcd) diff --git a/utils/rpcd-mod-wireguard/src/api.c b/utils/rpcd-mod-wireguard/src/api.c new file mode 100644 index 000000000..e80ed5303 --- /dev/null +++ b/utils/rpcd-mod-wireguard/src/api.c @@ -0,0 +1,245 @@ +// SPDX-License-Identifier: LGPL-2.1+ +// Copyright (C) 2023 Andre Heider + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include "wireguard.h" + +static struct blob_buf buf; + +enum { + RPC_PK_DEVICE, + __RPC_PK_MAX, +}; + +static const struct blobmsg_policy rpc_privatekey_policy[__RPC_PK_MAX] = { + [RPC_PK_DEVICE] = { .name = "private", .type = BLOBMSG_TYPE_STRING }, +}; + +static void rpc_wireguard_add_endpoint(const wg_endpoint *endpoint) +{ + char host[1025]; // NI_MAXHOST + char serv[32]; // NI_MAXSERV + char res[sizeof(host) + sizeof(serv) + 4]; + socklen_t addr_len; + + memset(res, 0, sizeof(res)); + if (endpoint->addr.sa_family == AF_INET) + addr_len = sizeof(struct sockaddr_in); + else if (endpoint->addr.sa_family == AF_INET6) + addr_len = sizeof(struct sockaddr_in6); + else + return; + + if (getnameinfo(&endpoint->addr, addr_len, host, sizeof(host), serv, sizeof(serv), + NI_DGRAM | NI_NUMERICHOST | NI_NUMERICSERV)) + return; + + if (endpoint->addr.sa_family == AF_INET6 && strchr(host, ':')) + snprintf(res, sizeof(res), "[%s]:%s", host, serv); + else + snprintf(res, sizeof(res), "%s:%s", host, serv); + res[sizeof(res) - 1] = 0; + + blobmsg_add_string(&buf, "endpoint", res); +} + +static void rpc_wireguard_add_allowedip(const wg_allowedip *allowedip) +{ + char res[INET6_ADDRSTRLEN + 4 + 1]; + + memset(res, 0, sizeof(res)); + if (allowedip->family == AF_INET) + inet_ntop(AF_INET, &allowedip->ip4, res, INET6_ADDRSTRLEN); + else if (allowedip->family == AF_INET6) + inet_ntop(AF_INET6, &allowedip->ip6, res, INET6_ADDRSTRLEN); + else + return; + + if (!res[0]) + return; + + sprintf(res + strlen(res), "/%u", allowedip->cidr); + res[sizeof(res) - 1] = 0; + + blobmsg_add_string(&buf, NULL, res); +} + +static void rpc_wireguard_add_peer(const wg_peer *peer) +{ + void *c; + struct wg_allowedip *allowedip; + + rpc_wireguard_add_endpoint(&peer->endpoint); + + c = blobmsg_open_array(&buf, "allowed_ips"); + wg_for_each_allowedip(peer, allowedip) + rpc_wireguard_add_allowedip(allowedip); + blobmsg_close_array(&buf, c); + + blobmsg_add_u64(&buf, "last_handshake", peer->last_handshake_time.tv_sec); + blobmsg_add_u64(&buf, "rx_bytes", peer->rx_bytes); + blobmsg_add_u64(&buf, "tx_bytes", peer->tx_bytes); + if (peer->persistent_keepalive_interval) + blobmsg_add_u16(&buf, "persistent_keepalive_interval", peer->persistent_keepalive_interval); +} + +static void rpc_wireguard_add_device(const wg_device *device) +{ + void *c, *d; + wg_peer *peer; + wg_key_b64_string key; + + blobmsg_add_u32(&buf, "ifindex", device->ifindex); + + if (device->flags & WGDEVICE_HAS_PUBLIC_KEY) { + wg_key_to_base64(key, device->public_key); + blobmsg_add_string(&buf, "public_key", key); + } + + if (device->listen_port) + blobmsg_add_u16(&buf, "listen_port", device->listen_port); + + if (device->fwmark) + blobmsg_add_u32(&buf, "fwmark", device->fwmark); + + c = blobmsg_open_table(&buf, "peers"); + wg_for_each_peer(device, peer) { + wg_key_to_base64(key, peer->public_key); + d = blobmsg_open_table(&buf, key); + rpc_wireguard_add_peer(peer); + blobmsg_close_table(&buf, d); + } + blobmsg_close_table(&buf, c); +} + +static int rpc_wireguard_status(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, struct blob_attr *msg) +{ + void *c; + char *device_names, *device_name; + size_t len; + + device_names = wg_list_device_names(); + if (!device_names) + return UBUS_STATUS_NOT_FOUND; + + blob_buf_init(&buf, 0); + + wg_for_each_device_name(device_names, device_name, len) { + wg_device *device; + + if (wg_get_device(&device, device_name) < 0) + continue; + + c = blobmsg_open_table(&buf, device_name); + rpc_wireguard_add_device(device); + blobmsg_close_table(&buf, c); + + wg_free_device(device); + } + + free(device_names); + + ubus_send_reply(ctx, req, buf.head); + + return UBUS_STATUS_OK; +} + +static int rpc_wireguard_genkey(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, struct blob_attr *msg) +{ + wg_key private_key, public_key; + wg_key_b64_string key; + + wg_generate_private_key(private_key); + wg_generate_public_key(public_key, private_key); + + blob_buf_init(&buf, 0); + wg_key_to_base64(key, private_key); + blobmsg_add_string(&buf, "private", key); + wg_key_to_base64(key, public_key); + blobmsg_add_string(&buf, "public", key); + ubus_send_reply(ctx, req, buf.head); + + return UBUS_STATUS_OK; +} + +static int rpc_wireguard_genpsk(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, struct blob_attr *msg) +{ + wg_key preshared_key; + wg_key_b64_string key; + + wg_generate_preshared_key(preshared_key); + + blob_buf_init(&buf, 0); + wg_key_to_base64(key, preshared_key); + blobmsg_add_string(&buf, "preshared", key); + ubus_send_reply(ctx, req, buf.head); + + return UBUS_STATUS_OK; +} + +static int rpc_wireguard_pubkey(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, struct blob_attr *msg) +{ + static struct blob_attr *tb[__RPC_PK_MAX]; + wg_key_b64_string key; + wg_key private_key, public_key; + + blobmsg_parse(rpc_privatekey_policy, __RPC_PK_MAX, tb, blob_data(msg), blob_len(msg)); + + if (!tb[RPC_PK_DEVICE]) + return UBUS_STATUS_INVALID_ARGUMENT; + + if (wg_key_from_base64(private_key, blobmsg_get_string(tb[RPC_PK_DEVICE]))) + return UBUS_STATUS_INVALID_ARGUMENT; + + wg_generate_public_key(public_key, private_key); + blob_buf_init(&buf, 0); + wg_key_to_base64(key, public_key); + blobmsg_add_string(&buf, "public", key); + ubus_send_reply(ctx, req, buf.head); + + return UBUS_STATUS_OK; +} + +static int rpc_wireguard_api_init(const struct rpc_daemon_ops *ops, struct ubus_context *ctx) +{ + static const struct ubus_method wireguard_methods[] = { + UBUS_METHOD_NOARG("status", rpc_wireguard_status), + UBUS_METHOD_NOARG("genkey", rpc_wireguard_genkey), + UBUS_METHOD_NOARG("genpsk", rpc_wireguard_genpsk), + UBUS_METHOD("pubkey", rpc_wireguard_pubkey, rpc_privatekey_policy), + }; + + static struct ubus_object_type wireguard_type = + UBUS_OBJECT_TYPE("rpcd-plugin-wireguard", wireguard_methods); + + static struct ubus_object obj = { + .name = "wireguard", + .type = &wireguard_type, + .methods = wireguard_methods, + .n_methods = ARRAY_SIZE(wireguard_methods), + }; + + return ubus_add_object(ctx, &obj); +} + +struct rpc_plugin rpc_plugin = { + .init = rpc_wireguard_api_init +}; diff --git a/utils/rpcd-mod-wireguard/src/wireguard.c b/utils/rpcd-mod-wireguard/src/wireguard.c new file mode 100644 index 000000000..4941549af --- /dev/null +++ b/utils/rpcd-mod-wireguard/src/wireguard.c @@ -0,0 +1,1755 @@ +// SPDX-License-Identifier: LGPL-2.1+ +/* + * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. + * Copyright (C) 2008-2012 Pablo Neira Ayuso . + */ + +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "wireguard.h" + +/* wireguard.h netlink uapi: */ + +#define WG_GENL_NAME "wireguard" +#define WG_GENL_VERSION 1 + +enum wg_cmd { + WG_CMD_GET_DEVICE, + WG_CMD_SET_DEVICE, + __WG_CMD_MAX +}; + +enum wgdevice_flag { + WGDEVICE_F_REPLACE_PEERS = 1U << 0 +}; +enum wgdevice_attribute { + WGDEVICE_A_UNSPEC, + WGDEVICE_A_IFINDEX, + WGDEVICE_A_IFNAME, + WGDEVICE_A_PRIVATE_KEY, + WGDEVICE_A_PUBLIC_KEY, + WGDEVICE_A_FLAGS, + WGDEVICE_A_LISTEN_PORT, + WGDEVICE_A_FWMARK, + WGDEVICE_A_PEERS, + __WGDEVICE_A_LAST +}; + +enum wgpeer_flag { + WGPEER_F_REMOVE_ME = 1U << 0, + WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1 +}; +enum wgpeer_attribute { + WGPEER_A_UNSPEC, + WGPEER_A_PUBLIC_KEY, + WGPEER_A_PRESHARED_KEY, + WGPEER_A_FLAGS, + WGPEER_A_ENDPOINT, + WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, + WGPEER_A_LAST_HANDSHAKE_TIME, + WGPEER_A_RX_BYTES, + WGPEER_A_TX_BYTES, + WGPEER_A_ALLOWEDIPS, + WGPEER_A_PROTOCOL_VERSION, + __WGPEER_A_LAST +}; + +enum wgallowedip_attribute { + WGALLOWEDIP_A_UNSPEC, + WGALLOWEDIP_A_FAMILY, + WGALLOWEDIP_A_IPADDR, + WGALLOWEDIP_A_CIDR_MASK, + __WGALLOWEDIP_A_LAST +}; + +/* libmnl mini library: */ + +#define MNL_SOCKET_AUTOPID 0 +#define MNL_ALIGNTO 4 +#define MNL_ALIGN(len) (((len)+MNL_ALIGNTO-1) & ~(MNL_ALIGNTO-1)) +#define MNL_NLMSG_HDRLEN MNL_ALIGN(sizeof(struct nlmsghdr)) +#define MNL_ATTR_HDRLEN MNL_ALIGN(sizeof(struct nlattr)) + +enum mnl_attr_data_type { + MNL_TYPE_UNSPEC, + MNL_TYPE_U8, + MNL_TYPE_U16, + MNL_TYPE_U32, + MNL_TYPE_U64, + MNL_TYPE_STRING, + MNL_TYPE_FLAG, + MNL_TYPE_MSECS, + MNL_TYPE_NESTED, + MNL_TYPE_NESTED_COMPAT, + MNL_TYPE_NUL_STRING, + MNL_TYPE_BINARY, + MNL_TYPE_MAX, +}; + +#define mnl_attr_for_each(attr, nlh, offset) \ + for ((attr) = mnl_nlmsg_get_payload_offset((nlh), (offset)); \ + mnl_attr_ok((attr), (char *)mnl_nlmsg_get_payload_tail(nlh) - (char *)(attr)); \ + (attr) = mnl_attr_next(attr)) + +#define mnl_attr_for_each_nested(attr, nest) \ + for ((attr) = mnl_attr_get_payload(nest); \ + mnl_attr_ok((attr), (char *)mnl_attr_get_payload(nest) + mnl_attr_get_payload_len(nest) - (char *)(attr)); \ + (attr) = mnl_attr_next(attr)) + +#define mnl_attr_for_each_payload(payload, payload_size) \ + for ((attr) = (payload); \ + mnl_attr_ok((attr), (char *)(payload) + payload_size - (char *)(attr)); \ + (attr) = mnl_attr_next(attr)) + +#define MNL_CB_ERROR -1 +#define MNL_CB_STOP 0 +#define MNL_CB_OK 1 + +typedef int (*mnl_attr_cb_t)(const struct nlattr *attr, void *data); +typedef int (*mnl_cb_t)(const struct nlmsghdr *nlh, void *data); + +#ifndef MNL_ARRAY_SIZE +#define MNL_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) +#endif + +static size_t mnl_ideal_socket_buffer_size(void) +{ + static size_t size = 0; + + if (size) + return size; + size = (size_t)sysconf(_SC_PAGESIZE); + if (size > 8192) + size = 8192; + return size; +} + +static size_t mnl_nlmsg_size(size_t len) +{ + return len + MNL_NLMSG_HDRLEN; +} + +static struct nlmsghdr *mnl_nlmsg_put_header(void *buf) +{ + int len = MNL_ALIGN(sizeof(struct nlmsghdr)); + struct nlmsghdr *nlh = buf; + + memset(buf, 0, len); + nlh->nlmsg_len = len; + return nlh; +} + +static void *mnl_nlmsg_put_extra_header(struct nlmsghdr *nlh, size_t size) +{ + char *ptr = (char *)nlh + nlh->nlmsg_len; + size_t len = MNL_ALIGN(size); + nlh->nlmsg_len += len; + memset(ptr, 0, len); + return ptr; +} + +static void *mnl_nlmsg_get_payload(const struct nlmsghdr *nlh) +{ + return (void *)nlh + MNL_NLMSG_HDRLEN; +} + +static void *mnl_nlmsg_get_payload_offset(const struct nlmsghdr *nlh, size_t offset) +{ + return (void *)nlh + MNL_NLMSG_HDRLEN + MNL_ALIGN(offset); +} + +static bool mnl_nlmsg_ok(const struct nlmsghdr *nlh, int len) +{ + return len >= (int)sizeof(struct nlmsghdr) && + nlh->nlmsg_len >= sizeof(struct nlmsghdr) && + (int)nlh->nlmsg_len <= len; +} + +static struct nlmsghdr *mnl_nlmsg_next(const struct nlmsghdr *nlh, int *len) +{ + *len -= MNL_ALIGN(nlh->nlmsg_len); + return (struct nlmsghdr *)((void *)nlh + MNL_ALIGN(nlh->nlmsg_len)); +} + +static void *mnl_nlmsg_get_payload_tail(const struct nlmsghdr *nlh) +{ + return (void *)nlh + MNL_ALIGN(nlh->nlmsg_len); +} + +static bool mnl_nlmsg_seq_ok(const struct nlmsghdr *nlh, unsigned int seq) +{ + return nlh->nlmsg_seq && seq ? nlh->nlmsg_seq == seq : true; +} + +static bool mnl_nlmsg_portid_ok(const struct nlmsghdr *nlh, unsigned int portid) +{ + return nlh->nlmsg_pid && portid ? nlh->nlmsg_pid == portid : true; +} + +static uint16_t mnl_attr_get_type(const struct nlattr *attr) +{ + return attr->nla_type & NLA_TYPE_MASK; +} + +static uint16_t mnl_attr_get_payload_len(const struct nlattr *attr) +{ + return attr->nla_len - MNL_ATTR_HDRLEN; +} + +static void *mnl_attr_get_payload(const struct nlattr *attr) +{ + return (void *)attr + MNL_ATTR_HDRLEN; +} + +static bool mnl_attr_ok(const struct nlattr *attr, int len) +{ + return len >= (int)sizeof(struct nlattr) && + attr->nla_len >= sizeof(struct nlattr) && + (int)attr->nla_len <= len; +} + +static struct nlattr *mnl_attr_next(const struct nlattr *attr) +{ + return (struct nlattr *)((void *)attr + MNL_ALIGN(attr->nla_len)); +} + +static int mnl_attr_type_valid(const struct nlattr *attr, uint16_t max) +{ + if (mnl_attr_get_type(attr) > max) { + errno = EOPNOTSUPP; + return -1; + } + return 1; +} + +static int __mnl_attr_validate(const struct nlattr *attr, + enum mnl_attr_data_type type, size_t exp_len) +{ + uint16_t attr_len = mnl_attr_get_payload_len(attr); + const char *attr_data = mnl_attr_get_payload(attr); + + if (attr_len < exp_len) { + errno = ERANGE; + return -1; + } + switch(type) { + case MNL_TYPE_FLAG: + if (attr_len > 0) { + errno = ERANGE; + return -1; + } + break; + case MNL_TYPE_NUL_STRING: + if (attr_len == 0) { + errno = ERANGE; + return -1; + } + if (attr_data[attr_len-1] != '\0') { + errno = EINVAL; + return -1; + } + break; + case MNL_TYPE_STRING: + if (attr_len == 0) { + errno = ERANGE; + return -1; + } + break; + case MNL_TYPE_NESTED: + + if (attr_len == 0) + break; + + if (attr_len < MNL_ATTR_HDRLEN) { + errno = ERANGE; + return -1; + } + break; + default: + + break; + } + if (exp_len && attr_len > exp_len) { + errno = ERANGE; + return -1; + } + return 0; +} + +static const size_t mnl_attr_data_type_len[MNL_TYPE_MAX] = { + [MNL_TYPE_U8] = sizeof(uint8_t), + [MNL_TYPE_U16] = sizeof(uint16_t), + [MNL_TYPE_U32] = sizeof(uint32_t), + [MNL_TYPE_U64] = sizeof(uint64_t), + [MNL_TYPE_MSECS] = sizeof(uint64_t), +}; + +static int mnl_attr_validate(const struct nlattr *attr, enum mnl_attr_data_type type) +{ + int exp_len; + + if (type >= MNL_TYPE_MAX) { + errno = EINVAL; + return -1; + } + exp_len = mnl_attr_data_type_len[type]; + return __mnl_attr_validate(attr, type, exp_len); +} + +static int mnl_attr_parse(const struct nlmsghdr *nlh, unsigned int offset, + mnl_attr_cb_t cb, void *data) +{ + int ret = MNL_CB_OK; + const struct nlattr *attr; + + mnl_attr_for_each(attr, nlh, offset) + if ((ret = cb(attr, data)) <= MNL_CB_STOP) + return ret; + return ret; +} + +static int mnl_attr_parse_nested(const struct nlattr *nested, mnl_attr_cb_t cb, + void *data) +{ + int ret = MNL_CB_OK; + const struct nlattr *attr; + + mnl_attr_for_each_nested(attr, nested) + if ((ret = cb(attr, data)) <= MNL_CB_STOP) + return ret; + return ret; +} + +static uint8_t mnl_attr_get_u8(const struct nlattr *attr) +{ + return *((uint8_t *)mnl_attr_get_payload(attr)); +} + +static uint16_t mnl_attr_get_u16(const struct nlattr *attr) +{ + return *((uint16_t *)mnl_attr_get_payload(attr)); +} + +static uint32_t mnl_attr_get_u32(const struct nlattr *attr) +{ + return *((uint32_t *)mnl_attr_get_payload(attr)); +} + +static uint64_t mnl_attr_get_u64(const struct nlattr *attr) +{ + uint64_t tmp; + memcpy(&tmp, mnl_attr_get_payload(attr), sizeof(tmp)); + return tmp; +} + +static const char *mnl_attr_get_str(const struct nlattr *attr) +{ + return mnl_attr_get_payload(attr); +} + +static void mnl_attr_put(struct nlmsghdr *nlh, uint16_t type, size_t len, + const void *data) +{ + struct nlattr *attr = mnl_nlmsg_get_payload_tail(nlh); + uint16_t payload_len = MNL_ALIGN(sizeof(struct nlattr)) + len; + int pad; + + attr->nla_type = type; + attr->nla_len = payload_len; + memcpy(mnl_attr_get_payload(attr), data, len); + nlh->nlmsg_len += MNL_ALIGN(payload_len); + pad = MNL_ALIGN(len) - len; + if (pad > 0) + memset(mnl_attr_get_payload(attr) + len, 0, pad); +} + +static void mnl_attr_put_u16(struct nlmsghdr *nlh, uint16_t type, uint16_t data) +{ + mnl_attr_put(nlh, type, sizeof(uint16_t), &data); +} + +static void mnl_attr_put_u32(struct nlmsghdr *nlh, uint16_t type, uint32_t data) +{ + mnl_attr_put(nlh, type, sizeof(uint32_t), &data); +} + +static void mnl_attr_put_strz(struct nlmsghdr *nlh, uint16_t type, const char *data) +{ + mnl_attr_put(nlh, type, strlen(data)+1, data); +} + +static struct nlattr *mnl_attr_nest_start(struct nlmsghdr *nlh, uint16_t type) +{ + struct nlattr *start = mnl_nlmsg_get_payload_tail(nlh); + + start->nla_type = NLA_F_NESTED | type; + nlh->nlmsg_len += MNL_ALIGN(sizeof(struct nlattr)); + return start; +} + +static bool mnl_attr_put_check(struct nlmsghdr *nlh, size_t buflen, + uint16_t type, size_t len, const void *data) +{ + if (nlh->nlmsg_len + MNL_ATTR_HDRLEN + MNL_ALIGN(len) > buflen) + return false; + mnl_attr_put(nlh, type, len, data); + return true; +} + +static bool mnl_attr_put_u8_check(struct nlmsghdr *nlh, size_t buflen, + uint16_t type, uint8_t data) +{ + return mnl_attr_put_check(nlh, buflen, type, sizeof(uint8_t), &data); +} + +static bool mnl_attr_put_u16_check(struct nlmsghdr *nlh, size_t buflen, + uint16_t type, uint16_t data) +{ + return mnl_attr_put_check(nlh, buflen, type, sizeof(uint16_t), &data); +} + +static bool mnl_attr_put_u32_check(struct nlmsghdr *nlh, size_t buflen, + uint16_t type, uint32_t data) +{ + return mnl_attr_put_check(nlh, buflen, type, sizeof(uint32_t), &data); +} + +static struct nlattr *mnl_attr_nest_start_check(struct nlmsghdr *nlh, size_t buflen, + uint16_t type) +{ + if (nlh->nlmsg_len + MNL_ATTR_HDRLEN > buflen) + return NULL; + return mnl_attr_nest_start(nlh, type); +} + +static void mnl_attr_nest_end(struct nlmsghdr *nlh, struct nlattr *start) +{ + start->nla_len = mnl_nlmsg_get_payload_tail(nlh) - (void *)start; +} + +static void mnl_attr_nest_cancel(struct nlmsghdr *nlh, struct nlattr *start) +{ + nlh->nlmsg_len -= mnl_nlmsg_get_payload_tail(nlh) - (void *)start; +} + +static int mnl_cb_noop(__attribute__((unused)) const struct nlmsghdr *nlh, __attribute__((unused)) void *data) +{ + return MNL_CB_OK; +} + +static int mnl_cb_error(const struct nlmsghdr *nlh, __attribute__((unused)) void *data) +{ + const struct nlmsgerr *err = mnl_nlmsg_get_payload(nlh); + + if (nlh->nlmsg_len < mnl_nlmsg_size(sizeof(struct nlmsgerr))) { + errno = EBADMSG; + return MNL_CB_ERROR; + } + + if (err->error < 0) + errno = -err->error; + else + errno = err->error; + + return err->error == 0 ? MNL_CB_STOP : MNL_CB_ERROR; +} + +static int mnl_cb_stop(__attribute__((unused)) const struct nlmsghdr *nlh, __attribute__((unused)) void *data) +{ + return MNL_CB_STOP; +} + +static const mnl_cb_t default_cb_array[NLMSG_MIN_TYPE] = { + [NLMSG_NOOP] = mnl_cb_noop, + [NLMSG_ERROR] = mnl_cb_error, + [NLMSG_DONE] = mnl_cb_stop, + [NLMSG_OVERRUN] = mnl_cb_noop, +}; + +static int __mnl_cb_run(const void *buf, size_t numbytes, + unsigned int seq, unsigned int portid, + mnl_cb_t cb_data, void *data, + const mnl_cb_t *cb_ctl_array, + unsigned int cb_ctl_array_len) +{ + int ret = MNL_CB_OK, len = numbytes; + const struct nlmsghdr *nlh = buf; + + while (mnl_nlmsg_ok(nlh, len)) { + + if (!mnl_nlmsg_portid_ok(nlh, portid)) { + errno = ESRCH; + return -1; + } + + if (!mnl_nlmsg_seq_ok(nlh, seq)) { + errno = EPROTO; + return -1; + } + + if (nlh->nlmsg_flags & NLM_F_DUMP_INTR) { + errno = EINTR; + return -1; + } + + if (nlh->nlmsg_type >= NLMSG_MIN_TYPE) { + if (cb_data){ + ret = cb_data(nlh, data); + if (ret <= MNL_CB_STOP) + goto out; + } + } else if (nlh->nlmsg_type < cb_ctl_array_len) { + if (cb_ctl_array && cb_ctl_array[nlh->nlmsg_type]) { + ret = cb_ctl_array[nlh->nlmsg_type](nlh, data); + if (ret <= MNL_CB_STOP) + goto out; + } + } else if (default_cb_array[nlh->nlmsg_type]) { + ret = default_cb_array[nlh->nlmsg_type](nlh, data); + if (ret <= MNL_CB_STOP) + goto out; + } + nlh = mnl_nlmsg_next(nlh, &len); + } +out: + return ret; +} + +static int mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq, + unsigned int portid, mnl_cb_t cb_data, void *data, + const mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len) +{ + return __mnl_cb_run(buf, numbytes, seq, portid, cb_data, data, + cb_ctl_array, cb_ctl_array_len); +} + +static int mnl_cb_run(const void *buf, size_t numbytes, unsigned int seq, + unsigned int portid, mnl_cb_t cb_data, void *data) +{ + return __mnl_cb_run(buf, numbytes, seq, portid, cb_data, data, NULL, 0); +} + +struct mnl_socket { + int fd; + struct sockaddr_nl addr; +}; + +static unsigned int mnl_socket_get_portid(const struct mnl_socket *nl) +{ + return nl->addr.nl_pid; +} + +static struct mnl_socket *__mnl_socket_open(int bus, int flags) +{ + struct mnl_socket *nl; + + nl = calloc(1, sizeof(struct mnl_socket)); + if (nl == NULL) + return NULL; + + nl->fd = socket(AF_NETLINK, SOCK_RAW | flags, bus); + if (nl->fd == -1) { + free(nl); + return NULL; + } + + return nl; +} + +static struct mnl_socket *mnl_socket_open(int bus) +{ + return __mnl_socket_open(bus, 0); +} + +static int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid) +{ + int ret; + socklen_t addr_len; + + nl->addr.nl_family = AF_NETLINK; + nl->addr.nl_groups = groups; + nl->addr.nl_pid = pid; + + ret = bind(nl->fd, (struct sockaddr *) &nl->addr, sizeof (nl->addr)); + if (ret < 0) + return ret; + + addr_len = sizeof(nl->addr); + ret = getsockname(nl->fd, (struct sockaddr *) &nl->addr, &addr_len); + if (ret < 0) + return ret; + + if (addr_len != sizeof(nl->addr)) { + errno = EINVAL; + return -1; + } + if (nl->addr.nl_family != AF_NETLINK) { + errno = EINVAL; + return -1; + } + return 0; +} + +static ssize_t mnl_socket_sendto(const struct mnl_socket *nl, const void *buf, + size_t len) +{ + static const struct sockaddr_nl snl = { + .nl_family = AF_NETLINK + }; + return sendto(nl->fd, buf, len, 0, + (struct sockaddr *) &snl, sizeof(snl)); +} + +static ssize_t mnl_socket_recvfrom(const struct mnl_socket *nl, void *buf, + size_t bufsiz) +{ + ssize_t ret; + struct sockaddr_nl addr; + struct iovec iov = { + .iov_base = buf, + .iov_len = bufsiz, + }; + struct msghdr msg = { + .msg_name = &addr, + .msg_namelen = sizeof(struct sockaddr_nl), + .msg_iov = &iov, + .msg_iovlen = 1, + .msg_control = NULL, + .msg_controllen = 0, + .msg_flags = 0, + }; + ret = recvmsg(nl->fd, &msg, 0); + if (ret == -1) + return ret; + + if (msg.msg_flags & MSG_TRUNC) { + errno = ENOSPC; + return -1; + } + if (msg.msg_namelen != sizeof(struct sockaddr_nl)) { + errno = EINVAL; + return -1; + } + return ret; +} + +static int mnl_socket_close(struct mnl_socket *nl) +{ + int ret = close(nl->fd); + free(nl); + return ret; +} + +/* mnlg mini library: */ + +struct mnlg_socket { + struct mnl_socket *nl; + char *buf; + uint16_t id; + uint8_t version; + unsigned int seq; + unsigned int portid; +}; + +static struct nlmsghdr *__mnlg_msg_prepare(struct mnlg_socket *nlg, uint8_t cmd, + uint16_t flags, uint16_t id, + uint8_t version) +{ + struct nlmsghdr *nlh; + struct genlmsghdr *genl; + + nlh = mnl_nlmsg_put_header(nlg->buf); + nlh->nlmsg_type = id; + nlh->nlmsg_flags = flags; + nlg->seq = time(NULL); + nlh->nlmsg_seq = nlg->seq; + + genl = mnl_nlmsg_put_extra_header(nlh, sizeof(struct genlmsghdr)); + genl->cmd = cmd; + genl->version = version; + + return nlh; +} + +static struct nlmsghdr *mnlg_msg_prepare(struct mnlg_socket *nlg, uint8_t cmd, + uint16_t flags) +{ + return __mnlg_msg_prepare(nlg, cmd, flags, nlg->id, nlg->version); +} + +static int mnlg_socket_send(struct mnlg_socket *nlg, const struct nlmsghdr *nlh) +{ + return mnl_socket_sendto(nlg->nl, nlh, nlh->nlmsg_len); +} + +static int mnlg_cb_noop(const struct nlmsghdr *nlh, void *data) +{ + (void)nlh; + (void)data; + return MNL_CB_OK; +} + +static int mnlg_cb_error(const struct nlmsghdr *nlh, void *data) +{ + const struct nlmsgerr *err = mnl_nlmsg_get_payload(nlh); + (void)data; + + if (nlh->nlmsg_len < mnl_nlmsg_size(sizeof(struct nlmsgerr))) { + errno = EBADMSG; + return MNL_CB_ERROR; + } + /* Netlink subsystems returns the errno value with different signess */ + if (err->error < 0) + errno = -err->error; + else + errno = err->error; + + return err->error == 0 ? MNL_CB_STOP : MNL_CB_ERROR; +} + +static int mnlg_cb_stop(const struct nlmsghdr *nlh, void *data) +{ + (void)data; + if (nlh->nlmsg_flags & NLM_F_MULTI && nlh->nlmsg_len == mnl_nlmsg_size(sizeof(int))) { + int error = *(int *)mnl_nlmsg_get_payload(nlh); + /* Netlink subsystems returns the errno value with different signess */ + if (error < 0) + errno = -error; + else + errno = error; + + return error == 0 ? MNL_CB_STOP : MNL_CB_ERROR; + } + return MNL_CB_STOP; +} + +static const mnl_cb_t mnlg_cb_array[] = { + [NLMSG_NOOP] = mnlg_cb_noop, + [NLMSG_ERROR] = mnlg_cb_error, + [NLMSG_DONE] = mnlg_cb_stop, + [NLMSG_OVERRUN] = mnlg_cb_noop, +}; + +static int mnlg_socket_recv_run(struct mnlg_socket *nlg, mnl_cb_t data_cb, void *data) +{ + int err; + + do { + err = mnl_socket_recvfrom(nlg->nl, nlg->buf, + mnl_ideal_socket_buffer_size()); + if (err <= 0) + break; + err = mnl_cb_run2(nlg->buf, err, nlg->seq, nlg->portid, + data_cb, data, mnlg_cb_array, MNL_ARRAY_SIZE(mnlg_cb_array)); + } while (err > 0); + + return err; +} + +static int get_family_id_attr_cb(const struct nlattr *attr, void *data) +{ + const struct nlattr **tb = data; + int type = mnl_attr_get_type(attr); + + if (mnl_attr_type_valid(attr, CTRL_ATTR_MAX) < 0) + return MNL_CB_ERROR; + + if (type == CTRL_ATTR_FAMILY_ID && + mnl_attr_validate(attr, MNL_TYPE_U16) < 0) + return MNL_CB_ERROR; + tb[type] = attr; + return MNL_CB_OK; +} + +static int get_family_id_cb(const struct nlmsghdr *nlh, void *data) +{ + uint16_t *p_id = data; + struct nlattr *tb[CTRL_ATTR_MAX + 1] = { 0 }; + + mnl_attr_parse(nlh, sizeof(struct genlmsghdr), get_family_id_attr_cb, tb); + if (!tb[CTRL_ATTR_FAMILY_ID]) + return MNL_CB_ERROR; + *p_id = mnl_attr_get_u16(tb[CTRL_ATTR_FAMILY_ID]); + return MNL_CB_OK; +} + +static struct mnlg_socket *mnlg_socket_open(const char *family_name, uint8_t version) +{ + struct mnlg_socket *nlg; + struct nlmsghdr *nlh; + int err; + + nlg = malloc(sizeof(*nlg)); + if (!nlg) + return NULL; + nlg->id = 0; + + err = -ENOMEM; + nlg->buf = malloc(mnl_ideal_socket_buffer_size()); + if (!nlg->buf) + goto err_buf_alloc; + + nlg->nl = mnl_socket_open(NETLINK_GENERIC); + if (!nlg->nl) { + err = -errno; + goto err_mnl_socket_open; + } + + if (mnl_socket_bind(nlg->nl, 0, MNL_SOCKET_AUTOPID) < 0) { + err = -errno; + goto err_mnl_socket_bind; + } + + nlg->portid = mnl_socket_get_portid(nlg->nl); + + nlh = __mnlg_msg_prepare(nlg, CTRL_CMD_GETFAMILY, + NLM_F_REQUEST | NLM_F_ACK, GENL_ID_CTRL, 1); + mnl_attr_put_strz(nlh, CTRL_ATTR_FAMILY_NAME, family_name); + + if (mnlg_socket_send(nlg, nlh) < 0) { + err = -errno; + goto err_mnlg_socket_send; + } + + errno = 0; + if (mnlg_socket_recv_run(nlg, get_family_id_cb, &nlg->id) < 0) { + errno = errno == ENOENT ? EPROTONOSUPPORT : errno; + err = errno ? -errno : -ENOSYS; + goto err_mnlg_socket_recv_run; + } + + nlg->version = version; + errno = 0; + return nlg; + +err_mnlg_socket_recv_run: +err_mnlg_socket_send: +err_mnl_socket_bind: + mnl_socket_close(nlg->nl); +err_mnl_socket_open: + free(nlg->buf); +err_buf_alloc: + free(nlg); + errno = -err; + return NULL; +} + +static void mnlg_socket_close(struct mnlg_socket *nlg) +{ + mnl_socket_close(nlg->nl); + free(nlg->buf); + free(nlg); +} + +/* wireguard-specific parts: */ + +struct string_list { + char *buffer; + size_t len; + size_t cap; +}; + +static int string_list_add(struct string_list *list, const char *str) +{ + size_t len = strlen(str) + 1; + + if (len == 1) + return 0; + + if (len >= list->cap - list->len) { + char *new_buffer; + size_t new_cap = list->cap * 2; + + if (new_cap < list->len +len + 1) + new_cap = list->len + len + 1; + new_buffer = realloc(list->buffer, new_cap); + if (!new_buffer) + return -errno; + list->buffer = new_buffer; + list->cap = new_cap; + } + memcpy(list->buffer + list->len, str, len); + list->len += len; + list->buffer[list->len] = '\0'; + return 0; +} + +struct interface { + const char *name; + bool is_wireguard; +}; + +static int parse_linkinfo(const struct nlattr *attr, void *data) +{ + struct interface *interface = data; + + if (mnl_attr_get_type(attr) == IFLA_INFO_KIND && !strcmp(WG_GENL_NAME, mnl_attr_get_str(attr))) + interface->is_wireguard = true; + return MNL_CB_OK; +} + +static int parse_infomsg(const struct nlattr *attr, void *data) +{ + struct interface *interface = data; + + if (mnl_attr_get_type(attr) == IFLA_LINKINFO) + return mnl_attr_parse_nested(attr, parse_linkinfo, data); + else if (mnl_attr_get_type(attr) == IFLA_IFNAME) + interface->name = mnl_attr_get_str(attr); + return MNL_CB_OK; +} + +static int read_devices_cb(const struct nlmsghdr *nlh, void *data) +{ + struct string_list *list = data; + struct interface interface = { 0 }; + int ret; + + ret = mnl_attr_parse(nlh, sizeof(struct ifinfomsg), parse_infomsg, &interface); + if (ret != MNL_CB_OK) + return ret; + if (interface.name && interface.is_wireguard) + ret = string_list_add(list, interface.name); + if (ret < 0) + return ret; + if (nlh->nlmsg_type != NLMSG_DONE) + return MNL_CB_OK + 1; + return MNL_CB_OK; +} + +static int fetch_device_names(struct string_list *list) +{ + struct mnl_socket *nl = NULL; + char *rtnl_buffer = NULL; + size_t message_len; + unsigned int portid, seq; + ssize_t len; + int ret = 0; + struct nlmsghdr *nlh; + struct ifinfomsg *ifm; + + ret = -ENOMEM; + rtnl_buffer = calloc(mnl_ideal_socket_buffer_size(), 1); + if (!rtnl_buffer) + goto cleanup; + + nl = mnl_socket_open(NETLINK_ROUTE); + if (!nl) { + ret = -errno; + goto cleanup; + } + + if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) { + ret = -errno; + goto cleanup; + } + + seq = time(NULL); + portid = mnl_socket_get_portid(nl); + nlh = mnl_nlmsg_put_header(rtnl_buffer); + nlh->nlmsg_type = RTM_GETLINK; + nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | NLM_F_DUMP; + nlh->nlmsg_seq = seq; + ifm = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifm)); + ifm->ifi_family = AF_UNSPEC; + message_len = nlh->nlmsg_len; + + if (mnl_socket_sendto(nl, rtnl_buffer, message_len) < 0) { + ret = -errno; + goto cleanup; + } + +another: + if ((len = mnl_socket_recvfrom(nl, rtnl_buffer, mnl_ideal_socket_buffer_size())) < 0) { + ret = -errno; + goto cleanup; + } + if ((len = mnl_cb_run(rtnl_buffer, len, seq, portid, read_devices_cb, list)) < 0) { + /* Netlink returns NLM_F_DUMP_INTR if the set of all tunnels changed + * during the dump. That's unfortunate, but is pretty common on busy + * systems that are adding and removing tunnels all the time. Rather + * than retrying, potentially indefinitely, we just work with the + * partial results. */ + if (errno != EINTR) { + ret = -errno; + goto cleanup; + } + } + if (len == MNL_CB_OK + 1) + goto another; + ret = 0; + +cleanup: + free(rtnl_buffer); + if (nl) + mnl_socket_close(nl); + return ret; +} + +static int add_del_iface(const char *ifname, bool add) +{ + struct mnl_socket *nl = NULL; + char *rtnl_buffer; + ssize_t len; + int ret; + struct nlmsghdr *nlh; + struct ifinfomsg *ifm; + struct nlattr *nest; + + rtnl_buffer = calloc(mnl_ideal_socket_buffer_size(), 1); + if (!rtnl_buffer) { + ret = -ENOMEM; + goto cleanup; + } + + nl = mnl_socket_open(NETLINK_ROUTE); + if (!nl) { + ret = -errno; + goto cleanup; + } + + if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) { + ret = -errno; + goto cleanup; + } + + nlh = mnl_nlmsg_put_header(rtnl_buffer); + nlh->nlmsg_type = add ? RTM_NEWLINK : RTM_DELLINK; + nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | (add ? NLM_F_CREATE | NLM_F_EXCL : 0); + nlh->nlmsg_seq = time(NULL); + ifm = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifm)); + ifm->ifi_family = AF_UNSPEC; + mnl_attr_put_strz(nlh, IFLA_IFNAME, ifname); + nest = mnl_attr_nest_start(nlh, IFLA_LINKINFO); + mnl_attr_put_strz(nlh, IFLA_INFO_KIND, WG_GENL_NAME); + mnl_attr_nest_end(nlh, nest); + + if (mnl_socket_sendto(nl, rtnl_buffer, nlh->nlmsg_len) < 0) { + ret = -errno; + goto cleanup; + } + if ((len = mnl_socket_recvfrom(nl, rtnl_buffer, mnl_ideal_socket_buffer_size())) < 0) { + ret = -errno; + goto cleanup; + } + if (mnl_cb_run(rtnl_buffer, len, nlh->nlmsg_seq, mnl_socket_get_portid(nl), NULL, NULL) < 0) { + ret = -errno; + goto cleanup; + } + ret = 0; + +cleanup: + free(rtnl_buffer); + if (nl) + mnl_socket_close(nl); + return ret; +} + +int wg_set_device(wg_device *dev) +{ + int ret = 0; + wg_peer *peer = NULL; + wg_allowedip *allowedip = NULL; + struct nlattr *peers_nest, *peer_nest, *allowedips_nest, *allowedip_nest; + struct nlmsghdr *nlh; + struct mnlg_socket *nlg; + + nlg = mnlg_socket_open(WG_GENL_NAME, WG_GENL_VERSION); + if (!nlg) + return -errno; + +again: + nlh = mnlg_msg_prepare(nlg, WG_CMD_SET_DEVICE, NLM_F_REQUEST | NLM_F_ACK); + mnl_attr_put_strz(nlh, WGDEVICE_A_IFNAME, dev->name); + + if (!peer) { + uint32_t flags = 0; + + if (dev->flags & WGDEVICE_HAS_PRIVATE_KEY) + mnl_attr_put(nlh, WGDEVICE_A_PRIVATE_KEY, sizeof(dev->private_key), dev->private_key); + if (dev->flags & WGDEVICE_HAS_LISTEN_PORT) + mnl_attr_put_u16(nlh, WGDEVICE_A_LISTEN_PORT, dev->listen_port); + if (dev->flags & WGDEVICE_HAS_FWMARK) + mnl_attr_put_u32(nlh, WGDEVICE_A_FWMARK, dev->fwmark); + if (dev->flags & WGDEVICE_REPLACE_PEERS) + flags |= WGDEVICE_F_REPLACE_PEERS; + if (flags) + mnl_attr_put_u32(nlh, WGDEVICE_A_FLAGS, flags); + } + if (!dev->first_peer) + goto send; + peers_nest = peer_nest = allowedips_nest = allowedip_nest = NULL; + peers_nest = mnl_attr_nest_start(nlh, WGDEVICE_A_PEERS); + for (peer = peer ? peer : dev->first_peer; peer; peer = peer->next_peer) { + uint32_t flags = 0; + + peer_nest = mnl_attr_nest_start_check(nlh, mnl_ideal_socket_buffer_size(), 0); + if (!peer_nest) + goto toobig_peers; + if (!mnl_attr_put_check(nlh, mnl_ideal_socket_buffer_size(), WGPEER_A_PUBLIC_KEY, sizeof(peer->public_key), peer->public_key)) + goto toobig_peers; + if (peer->flags & WGPEER_REMOVE_ME) + flags |= WGPEER_F_REMOVE_ME; + if (!allowedip) { + if (peer->flags & WGPEER_REPLACE_ALLOWEDIPS) + flags |= WGPEER_F_REPLACE_ALLOWEDIPS; + if (peer->flags & WGPEER_HAS_PRESHARED_KEY) { + if (!mnl_attr_put_check(nlh, mnl_ideal_socket_buffer_size(), WGPEER_A_PRESHARED_KEY, sizeof(peer->preshared_key), peer->preshared_key)) + goto toobig_peers; + } + if (peer->endpoint.addr.sa_family == AF_INET) { + if (!mnl_attr_put_check(nlh, mnl_ideal_socket_buffer_size(), WGPEER_A_ENDPOINT, sizeof(peer->endpoint.addr4), &peer->endpoint.addr4)) + goto toobig_peers; + } else if (peer->endpoint.addr.sa_family == AF_INET6) { + if (!mnl_attr_put_check(nlh, mnl_ideal_socket_buffer_size(), WGPEER_A_ENDPOINT, sizeof(peer->endpoint.addr6), &peer->endpoint.addr6)) + goto toobig_peers; + } + if (peer->flags & WGPEER_HAS_PERSISTENT_KEEPALIVE_INTERVAL) { + if (!mnl_attr_put_u16_check(nlh, mnl_ideal_socket_buffer_size(), WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, peer->persistent_keepalive_interval)) + goto toobig_peers; + } + } + if (flags) { + if (!mnl_attr_put_u32_check(nlh, mnl_ideal_socket_buffer_size(), WGPEER_A_FLAGS, flags)) + goto toobig_peers; + } + if (peer->first_allowedip) { + if (!allowedip) + allowedip = peer->first_allowedip; + allowedips_nest = mnl_attr_nest_start_check(nlh, mnl_ideal_socket_buffer_size(), WGPEER_A_ALLOWEDIPS); + if (!allowedips_nest) + goto toobig_allowedips; + for (; allowedip; allowedip = allowedip->next_allowedip) { + allowedip_nest = mnl_attr_nest_start_check(nlh, mnl_ideal_socket_buffer_size(), 0); + if (!allowedip_nest) + goto toobig_allowedips; + if (!mnl_attr_put_u16_check(nlh, mnl_ideal_socket_buffer_size(), WGALLOWEDIP_A_FAMILY, allowedip->family)) + goto toobig_allowedips; + if (allowedip->family == AF_INET) { + if (!mnl_attr_put_check(nlh, mnl_ideal_socket_buffer_size(), WGALLOWEDIP_A_IPADDR, sizeof(allowedip->ip4), &allowedip->ip4)) + goto toobig_allowedips; + } else if (allowedip->family == AF_INET6) { + if (!mnl_attr_put_check(nlh, mnl_ideal_socket_buffer_size(), WGALLOWEDIP_A_IPADDR, sizeof(allowedip->ip6), &allowedip->ip6)) + goto toobig_allowedips; + } + if (!mnl_attr_put_u8_check(nlh, mnl_ideal_socket_buffer_size(), WGALLOWEDIP_A_CIDR_MASK, allowedip->cidr)) + goto toobig_allowedips; + mnl_attr_nest_end(nlh, allowedip_nest); + allowedip_nest = NULL; + } + mnl_attr_nest_end(nlh, allowedips_nest); + allowedips_nest = NULL; + } + + mnl_attr_nest_end(nlh, peer_nest); + peer_nest = NULL; + } + mnl_attr_nest_end(nlh, peers_nest); + peers_nest = NULL; + goto send; +toobig_allowedips: + if (allowedip_nest) + mnl_attr_nest_cancel(nlh, allowedip_nest); + if (allowedips_nest) + mnl_attr_nest_end(nlh, allowedips_nest); + mnl_attr_nest_end(nlh, peer_nest); + mnl_attr_nest_end(nlh, peers_nest); + goto send; +toobig_peers: + if (peer_nest) + mnl_attr_nest_cancel(nlh, peer_nest); + mnl_attr_nest_end(nlh, peers_nest); + goto send; +send: + if (mnlg_socket_send(nlg, nlh) < 0) { + ret = -errno; + goto out; + } + errno = 0; + if (mnlg_socket_recv_run(nlg, NULL, NULL) < 0) { + ret = errno ? -errno : -EINVAL; + goto out; + } + if (peer) + goto again; + +out: + mnlg_socket_close(nlg); + errno = -ret; + return ret; +} + +static int parse_allowedip(const struct nlattr *attr, void *data) +{ + wg_allowedip *allowedip = data; + + switch (mnl_attr_get_type(attr)) { + case WGALLOWEDIP_A_UNSPEC: + break; + case WGALLOWEDIP_A_FAMILY: + if (!mnl_attr_validate(attr, MNL_TYPE_U16)) + allowedip->family = mnl_attr_get_u16(attr); + break; + case WGALLOWEDIP_A_IPADDR: + if (mnl_attr_get_payload_len(attr) == sizeof(allowedip->ip4)) + memcpy(&allowedip->ip4, mnl_attr_get_payload(attr), sizeof(allowedip->ip4)); + else if (mnl_attr_get_payload_len(attr) == sizeof(allowedip->ip6)) + memcpy(&allowedip->ip6, mnl_attr_get_payload(attr), sizeof(allowedip->ip6)); + break; + case WGALLOWEDIP_A_CIDR_MASK: + if (!mnl_attr_validate(attr, MNL_TYPE_U8)) + allowedip->cidr = mnl_attr_get_u8(attr); + break; + } + + return MNL_CB_OK; +} + +static int parse_allowedips(const struct nlattr *attr, void *data) +{ + wg_peer *peer = data; + wg_allowedip *new_allowedip = calloc(1, sizeof(wg_allowedip)); + int ret; + + if (!new_allowedip) + return MNL_CB_ERROR; + if (!peer->first_allowedip) + peer->first_allowedip = peer->last_allowedip = new_allowedip; + else { + peer->last_allowedip->next_allowedip = new_allowedip; + peer->last_allowedip = new_allowedip; + } + ret = mnl_attr_parse_nested(attr, parse_allowedip, new_allowedip); + if (!ret) + return ret; + if (!((new_allowedip->family == AF_INET && new_allowedip->cidr <= 32) || (new_allowedip->family == AF_INET6 && new_allowedip->cidr <= 128))) { + errno = EAFNOSUPPORT; + return MNL_CB_ERROR; + } + return MNL_CB_OK; +} + +bool wg_key_is_zero(const wg_key key) +{ + volatile uint8_t acc = 0; + unsigned int i; + + for (i = 0; i < sizeof(wg_key); ++i) { + acc |= key[i]; + __asm__ ("" : "=r" (acc) : "0" (acc)); + } + return 1 & ((acc - 1) >> 8); +} + +static int parse_peer(const struct nlattr *attr, void *data) +{ + wg_peer *peer = data; + + switch (mnl_attr_get_type(attr)) { + case WGPEER_A_UNSPEC: + break; + case WGPEER_A_PUBLIC_KEY: + if (mnl_attr_get_payload_len(attr) == sizeof(peer->public_key)) { + memcpy(peer->public_key, mnl_attr_get_payload(attr), sizeof(peer->public_key)); + peer->flags |= WGPEER_HAS_PUBLIC_KEY; + } + break; + case WGPEER_A_PRESHARED_KEY: + if (mnl_attr_get_payload_len(attr) == sizeof(peer->preshared_key)) { + memcpy(peer->preshared_key, mnl_attr_get_payload(attr), sizeof(peer->preshared_key)); + if (!wg_key_is_zero(peer->preshared_key)) + peer->flags |= WGPEER_HAS_PRESHARED_KEY; + } + break; + case WGPEER_A_ENDPOINT: { + struct sockaddr *addr; + + if (mnl_attr_get_payload_len(attr) < sizeof(*addr)) + break; + addr = mnl_attr_get_payload(attr); + if (addr->sa_family == AF_INET && mnl_attr_get_payload_len(attr) == sizeof(peer->endpoint.addr4)) + memcpy(&peer->endpoint.addr4, addr, sizeof(peer->endpoint.addr4)); + else if (addr->sa_family == AF_INET6 && mnl_attr_get_payload_len(attr) == sizeof(peer->endpoint.addr6)) + memcpy(&peer->endpoint.addr6, addr, sizeof(peer->endpoint.addr6)); + break; + } + case WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: + if (!mnl_attr_validate(attr, MNL_TYPE_U16)) + peer->persistent_keepalive_interval = mnl_attr_get_u16(attr); + break; + case WGPEER_A_LAST_HANDSHAKE_TIME: + if (mnl_attr_get_payload_len(attr) == sizeof(peer->last_handshake_time)) + memcpy(&peer->last_handshake_time, mnl_attr_get_payload(attr), sizeof(peer->last_handshake_time)); + break; + case WGPEER_A_RX_BYTES: + if (!mnl_attr_validate(attr, MNL_TYPE_U64)) + peer->rx_bytes = mnl_attr_get_u64(attr); + break; + case WGPEER_A_TX_BYTES: + if (!mnl_attr_validate(attr, MNL_TYPE_U64)) + peer->tx_bytes = mnl_attr_get_u64(attr); + break; + case WGPEER_A_ALLOWEDIPS: + return mnl_attr_parse_nested(attr, parse_allowedips, peer); + } + + return MNL_CB_OK; +} + +static int parse_peers(const struct nlattr *attr, void *data) +{ + wg_device *device = data; + wg_peer *new_peer = calloc(1, sizeof(wg_peer)); + int ret; + + if (!new_peer) + return MNL_CB_ERROR; + if (!device->first_peer) + device->first_peer = device->last_peer = new_peer; + else { + device->last_peer->next_peer = new_peer; + device->last_peer = new_peer; + } + ret = mnl_attr_parse_nested(attr, parse_peer, new_peer); + if (!ret) + return ret; + if (!(new_peer->flags & WGPEER_HAS_PUBLIC_KEY)) { + errno = ENXIO; + return MNL_CB_ERROR; + } + return MNL_CB_OK; +} + +static int parse_device(const struct nlattr *attr, void *data) +{ + wg_device *device = data; + + switch (mnl_attr_get_type(attr)) { + case WGDEVICE_A_UNSPEC: + break; + case WGDEVICE_A_IFINDEX: + if (!mnl_attr_validate(attr, MNL_TYPE_U32)) + device->ifindex = mnl_attr_get_u32(attr); + break; + case WGDEVICE_A_IFNAME: + if (!mnl_attr_validate(attr, MNL_TYPE_STRING)) { + strncpy(device->name, mnl_attr_get_str(attr), sizeof(device->name) - 1); + device->name[sizeof(device->name) - 1] = '\0'; + } + break; + case WGDEVICE_A_PRIVATE_KEY: + if (mnl_attr_get_payload_len(attr) == sizeof(device->private_key)) { + memcpy(device->private_key, mnl_attr_get_payload(attr), sizeof(device->private_key)); + device->flags |= WGDEVICE_HAS_PRIVATE_KEY; + } + break; + case WGDEVICE_A_PUBLIC_KEY: + if (mnl_attr_get_payload_len(attr) == sizeof(device->public_key)) { + memcpy(device->public_key, mnl_attr_get_payload(attr), sizeof(device->public_key)); + device->flags |= WGDEVICE_HAS_PUBLIC_KEY; + } + break; + case WGDEVICE_A_LISTEN_PORT: + if (!mnl_attr_validate(attr, MNL_TYPE_U16)) + device->listen_port = mnl_attr_get_u16(attr); + break; + case WGDEVICE_A_FWMARK: + if (!mnl_attr_validate(attr, MNL_TYPE_U32)) + device->fwmark = mnl_attr_get_u32(attr); + break; + case WGDEVICE_A_PEERS: + return mnl_attr_parse_nested(attr, parse_peers, device); + } + + return MNL_CB_OK; +} + +static int read_device_cb(const struct nlmsghdr *nlh, void *data) +{ + return mnl_attr_parse(nlh, sizeof(struct genlmsghdr), parse_device, data); +} + +static void coalesce_peers(wg_device *device) +{ + wg_peer *old_next_peer, *peer = device->first_peer; + + while (peer && peer->next_peer) { + if (memcmp(peer->public_key, peer->next_peer->public_key, sizeof(wg_key))) { + peer = peer->next_peer; + continue; + } + if (!peer->first_allowedip) { + peer->first_allowedip = peer->next_peer->first_allowedip; + peer->last_allowedip = peer->next_peer->last_allowedip; + } else { + peer->last_allowedip->next_allowedip = peer->next_peer->first_allowedip; + peer->last_allowedip = peer->next_peer->last_allowedip; + } + old_next_peer = peer->next_peer; + peer->next_peer = old_next_peer->next_peer; + free(old_next_peer); + } +} + +int wg_get_device(wg_device **device, const char *device_name) +{ + int ret = 0; + struct nlmsghdr *nlh; + struct mnlg_socket *nlg; + +try_again: + *device = calloc(1, sizeof(wg_device)); + if (!*device) + return -errno; + + nlg = mnlg_socket_open(WG_GENL_NAME, WG_GENL_VERSION); + if (!nlg) { + wg_free_device(*device); + *device = NULL; + return -errno; + } + + nlh = mnlg_msg_prepare(nlg, WG_CMD_GET_DEVICE, NLM_F_REQUEST | NLM_F_ACK | NLM_F_DUMP); + mnl_attr_put_strz(nlh, WGDEVICE_A_IFNAME, device_name); + if (mnlg_socket_send(nlg, nlh) < 0) { + ret = -errno; + goto out; + } + errno = 0; + if (mnlg_socket_recv_run(nlg, read_device_cb, *device) < 0) { + ret = errno ? -errno : -EINVAL; + goto out; + } + coalesce_peers(*device); + +out: + if (nlg) + mnlg_socket_close(nlg); + if (ret) { + wg_free_device(*device); + if (ret == -EINTR) + goto try_again; + *device = NULL; + } + errno = -ret; + return ret; +} + +/* first\0second\0third\0forth\0last\0\0 */ +char *wg_list_device_names(void) +{ + struct string_list list = { 0 }; + int ret = fetch_device_names(&list); + + errno = -ret; + if (errno) { + free(list.buffer); + return NULL; + } + return list.buffer ?: strdup("\0"); +} + +int wg_add_device(const char *device_name) +{ + return add_del_iface(device_name, true); +} + +int wg_del_device(const char *device_name) +{ + return add_del_iface(device_name, false); +} + +void wg_free_device(wg_device *dev) +{ + wg_peer *peer, *np; + wg_allowedip *allowedip, *na; + + if (!dev) + return; + for (peer = dev->first_peer, np = peer ? peer->next_peer : NULL; peer; peer = np, np = peer ? peer->next_peer : NULL) { + for (allowedip = peer->first_allowedip, na = allowedip ? allowedip->next_allowedip : NULL; allowedip; allowedip = na, na = allowedip ? allowedip->next_allowedip : NULL) + free(allowedip); + free(peer); + } + free(dev); +} + +static void encode_base64(char dest[static 4], const uint8_t src[static 3]) +{ + const uint8_t input[] = { (src[0] >> 2) & 63, ((src[0] << 4) | (src[1] >> 4)) & 63, ((src[1] << 2) | (src[2] >> 6)) & 63, src[2] & 63 }; + unsigned int i; + + for (i = 0; i < 4; ++i) + dest[i] = input[i] + 'A' + + (((25 - input[i]) >> 8) & 6) + - (((51 - input[i]) >> 8) & 75) + - (((61 - input[i]) >> 8) & 15) + + (((62 - input[i]) >> 8) & 3); + +} + +void wg_key_to_base64(wg_key_b64_string base64, const wg_key key) +{ + unsigned int i; + + for (i = 0; i < 32 / 3; ++i) + encode_base64(&base64[i * 4], &key[i * 3]); + encode_base64(&base64[i * 4], (const uint8_t[]){ key[i * 3 + 0], key[i * 3 + 1], 0 }); + base64[sizeof(wg_key_b64_string) - 2] = '='; + base64[sizeof(wg_key_b64_string) - 1] = '\0'; +} + +static int decode_base64(const char src[static 4]) +{ + int val = 0; + unsigned int i; + + for (i = 0; i < 4; ++i) + val |= (-1 + + ((((('A' - 1) - src[i]) & (src[i] - ('Z' + 1))) >> 8) & (src[i] - 64)) + + ((((('a' - 1) - src[i]) & (src[i] - ('z' + 1))) >> 8) & (src[i] - 70)) + + ((((('0' - 1) - src[i]) & (src[i] - ('9' + 1))) >> 8) & (src[i] + 5)) + + ((((('+' - 1) - src[i]) & (src[i] - ('+' + 1))) >> 8) & 63) + + ((((('/' - 1) - src[i]) & (src[i] - ('/' + 1))) >> 8) & 64) + ) << (18 - 6 * i); + return val; +} + +int wg_key_from_base64(wg_key key, const wg_key_b64_string base64) +{ + unsigned int i; + int val; + volatile uint8_t ret = 0; + + if (strlen(base64) != sizeof(wg_key_b64_string) - 1 || base64[sizeof(wg_key_b64_string) - 2] != '=') { + errno = EINVAL; + goto out; + } + + for (i = 0; i < 32 / 3; ++i) { + val = decode_base64(&base64[i * 4]); + ret |= (uint32_t)val >> 31; + key[i * 3 + 0] = (val >> 16) & 0xff; + key[i * 3 + 1] = (val >> 8) & 0xff; + key[i * 3 + 2] = val & 0xff; + } + val = decode_base64((const char[]){ base64[i * 4 + 0], base64[i * 4 + 1], base64[i * 4 + 2], 'A' }); + ret |= ((uint32_t)val >> 31) | (val & 0xff); + key[i * 3 + 0] = (val >> 16) & 0xff; + key[i * 3 + 1] = (val >> 8) & 0xff; + errno = EINVAL & ~((ret - 1) >> 8); +out: + return -errno; +} + +typedef int64_t fe[16]; + +static __attribute__((noinline)) void memzero_explicit(void *s, size_t count) +{ + memset(s, 0, count); + __asm__ __volatile__("": :"r"(s) :"memory"); +} + +static void carry(fe o) +{ + int i; + + for (i = 0; i < 16; ++i) { + o[(i + 1) % 16] += (i == 15 ? 38 : 1) * (o[i] >> 16); + o[i] &= 0xffff; + } +} + +static void cswap(fe p, fe q, int b) +{ + int i; + int64_t t, c = ~(b - 1); + + for (i = 0; i < 16; ++i) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } + + memzero_explicit(&t, sizeof(t)); + memzero_explicit(&c, sizeof(c)); + memzero_explicit(&b, sizeof(b)); +} + +static void pack(uint8_t *o, const fe n) +{ + int i, j, b; + fe m, t; + + memcpy(t, n, sizeof(t)); + carry(t); + carry(t); + carry(t); + for (j = 0; j < 2; ++j) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; ++i) { + m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1); + m[i - 1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1); + b = (m[15] >> 16) & 1; + m[14] &= 0xffff; + cswap(t, m, 1 - b); + } + for (i = 0; i < 16; ++i) { + o[2 * i] = t[i] & 0xff; + o[2 * i + 1] = t[i] >> 8; + } + + memzero_explicit(m, sizeof(m)); + memzero_explicit(t, sizeof(t)); + memzero_explicit(&b, sizeof(b)); +} + +static void add(fe o, const fe a, const fe b) +{ + int i; + + for (i = 0; i < 16; ++i) + o[i] = a[i] + b[i]; +} + +static void subtract(fe o, const fe a, const fe b) +{ + int i; + + for (i = 0; i < 16; ++i) + o[i] = a[i] - b[i]; +} + +static void multmod(fe o, const fe a, const fe b) +{ + int i, j; + int64_t t[31] = { 0 }; + + for (i = 0; i < 16; ++i) { + for (j = 0; j < 16; ++j) + t[i + j] += a[i] * b[j]; + } + for (i = 0; i < 15; ++i) + t[i] += 38 * t[i + 16]; + memcpy(o, t, sizeof(fe)); + carry(o); + carry(o); + + memzero_explicit(t, sizeof(t)); +} + +static void invert(fe o, const fe i) +{ + fe c; + int a; + + memcpy(c, i, sizeof(c)); + for (a = 253; a >= 0; --a) { + multmod(c, c, c); + if (a != 2 && a != 4) + multmod(c, c, i); + } + memcpy(o, c, sizeof(fe)); + + memzero_explicit(c, sizeof(c)); +} + +static void clamp_key(uint8_t *z) +{ + z[31] = (z[31] & 127) | 64; + z[0] &= 248; +} + +void wg_generate_public_key(wg_key public_key, const wg_key private_key) +{ + int i, r; + uint8_t z[32]; + fe a = { 1 }, b = { 9 }, c = { 0 }, d = { 1 }, e, f; + + memcpy(z, private_key, sizeof(z)); + clamp_key(z); + + for (i = 254; i >= 0; --i) { + r = (z[i >> 3] >> (i & 7)) & 1; + cswap(a, b, r); + cswap(c, d, r); + add(e, a, c); + subtract(a, a, c); + add(c, b, d); + subtract(b, b, d); + multmod(d, e, e); + multmod(f, a, a); + multmod(a, c, a); + multmod(c, b, e); + add(e, a, c); + subtract(a, a, c); + multmod(b, a, a); + subtract(c, d, f); + multmod(a, c, (const fe){ 0xdb41, 1 }); + add(a, a, d); + multmod(c, c, a); + multmod(a, d, f); + multmod(d, b, (const fe){ 9 }); + multmod(b, e, e); + cswap(a, b, r); + cswap(c, d, r); + } + invert(c, c); + multmod(a, a, c); + pack(public_key, a); + + memzero_explicit(&r, sizeof(r)); + memzero_explicit(z, sizeof(z)); + memzero_explicit(a, sizeof(a)); + memzero_explicit(b, sizeof(b)); + memzero_explicit(c, sizeof(c)); + memzero_explicit(d, sizeof(d)); + memzero_explicit(e, sizeof(e)); + memzero_explicit(f, sizeof(f)); +} + +void wg_generate_private_key(wg_key private_key) +{ + wg_generate_preshared_key(private_key); + clamp_key(private_key); +} + +void wg_generate_preshared_key(wg_key preshared_key) +{ + ssize_t ret; + size_t i; + int fd; +#if defined(__OpenBSD__) || (defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12) || (defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))) + if (!getentropy(preshared_key, sizeof(wg_key))) + return; +#endif +#if defined(__NR_getrandom) && defined(__linux__) + if (syscall(__NR_getrandom, preshared_key, sizeof(wg_key), 0) == sizeof(wg_key)) + return; +#endif + fd = open("/dev/urandom", O_RDONLY); + assert(fd >= 0); + for (i = 0; i < sizeof(wg_key); i += ret) { + ret = read(fd, preshared_key + i, sizeof(wg_key) - i); + assert(ret > 0); + } + close(fd); +} diff --git a/utils/rpcd-mod-wireguard/src/wireguard.h b/utils/rpcd-mod-wireguard/src/wireguard.h new file mode 100644 index 000000000..328fcb423 --- /dev/null +++ b/utils/rpcd-mod-wireguard/src/wireguard.h @@ -0,0 +1,105 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +/* + * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. + */ + +#ifndef WIREGUARD_H +#define WIREGUARD_H + +#include +#include +#include +#include +#include +#include + +typedef uint8_t wg_key[32]; +typedef char wg_key_b64_string[((sizeof(wg_key) + 2) / 3) * 4 + 1]; + +/* Cross platform __kernel_timespec */ +struct timespec64 { + int64_t tv_sec; + int64_t tv_nsec; +}; + +typedef struct wg_allowedip { + uint16_t family; + union { + struct in_addr ip4; + struct in6_addr ip6; + }; + uint8_t cidr; + struct wg_allowedip *next_allowedip; +} wg_allowedip; + +enum wg_peer_flags { + WGPEER_REMOVE_ME = 1U << 0, + WGPEER_REPLACE_ALLOWEDIPS = 1U << 1, + WGPEER_HAS_PUBLIC_KEY = 1U << 2, + WGPEER_HAS_PRESHARED_KEY = 1U << 3, + WGPEER_HAS_PERSISTENT_KEEPALIVE_INTERVAL = 1U << 4 +}; + +typedef union wg_endpoint { + struct sockaddr addr; + struct sockaddr_in addr4; + struct sockaddr_in6 addr6; +} wg_endpoint; + +typedef struct wg_peer { + enum wg_peer_flags flags; + + wg_key public_key; + wg_key preshared_key; + + wg_endpoint endpoint; + + struct timespec64 last_handshake_time; + uint64_t rx_bytes, tx_bytes; + uint16_t persistent_keepalive_interval; + + struct wg_allowedip *first_allowedip, *last_allowedip; + struct wg_peer *next_peer; +} wg_peer; + +enum wg_device_flags { + WGDEVICE_REPLACE_PEERS = 1U << 0, + WGDEVICE_HAS_PRIVATE_KEY = 1U << 1, + WGDEVICE_HAS_PUBLIC_KEY = 1U << 2, + WGDEVICE_HAS_LISTEN_PORT = 1U << 3, + WGDEVICE_HAS_FWMARK = 1U << 4 +}; + +typedef struct wg_device { + char name[IFNAMSIZ]; + uint32_t ifindex; + + enum wg_device_flags flags; + + wg_key public_key; + wg_key private_key; + + uint32_t fwmark; + uint16_t listen_port; + + struct wg_peer *first_peer, *last_peer; +} wg_device; + +#define wg_for_each_device_name(__names, __name, __len) for ((__name) = (__names), (__len) = 0; ((__len) = strlen(__name)); (__name) += (__len) + 1) +#define wg_for_each_peer(__dev, __peer) for ((__peer) = (__dev)->first_peer; (__peer); (__peer) = (__peer)->next_peer) +#define wg_for_each_allowedip(__peer, __allowedip) for ((__allowedip) = (__peer)->first_allowedip; (__allowedip); (__allowedip) = (__allowedip)->next_allowedip) + +int wg_set_device(wg_device *dev); +int wg_get_device(wg_device **dev, const char *device_name); +int wg_add_device(const char *device_name); +int wg_del_device(const char *device_name); +void wg_free_device(wg_device *dev); +char *wg_list_device_names(void); /* first\0second\0third\0forth\0last\0\0 */ +void wg_key_to_base64(wg_key_b64_string base64, const wg_key key); +int wg_key_from_base64(wg_key key, const wg_key_b64_string base64); +bool wg_key_is_zero(const wg_key key); +void wg_generate_public_key(wg_key public_key, const wg_key private_key); +void wg_generate_private_key(wg_key private_key); +void wg_generate_preshared_key(wg_key preshared_key); + +#endif diff --git a/utils/stress-ng/Makefile b/utils/stress-ng/Makefile index 0edf09f17..890a7be1b 100644 --- a/utils/stress-ng/Makefile +++ b/utils/stress-ng/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=stress-ng -PKG_VERSION:=0.15.10 +PKG_VERSION:=0.17.00 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ColinIanKing/stress-ng/tar.gz/refs/tags/V$(PKG_VERSION)? -PKG_HASH:=fcd86e1b8db5b2c22182cefbf4b3131a8599bff5bdd85edf776ec15c2d80e8f1 +PKG_HASH:=eca62128f4918edc6d1e309f426a223968f44b304b737275443ec9e62855d42e PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=GPL-2.0-only diff --git a/utils/stress-ng/patches/001-disable-extra-stressors.patch b/utils/stress-ng/patches/001-disable-extra-stressors.patch index b4ec4c303..c9dd59cfe 100644 --- a/utils/stress-ng/patches/001-disable-extra-stressors.patch +++ b/utils/stress-ng/patches/001-disable-extra-stressors.patch @@ -1,8 +1,8 @@ --- a/Makefile.config +++ b/Makefile.config -@@ -319,9 +319,9 @@ compiler: configdir +@@ -326,9 +326,9 @@ clean: libraries: \ - compiler \ + configdir \ LIB_AIO LIB_APPARMOR LIB_BSD LIB_CRYPT LIB_DL \ - LIB_EGL LIB_GBM LIB_GLES2 LIB_IPSEC_MB LIB_JPEG \ - LIB_JUDY LIB_KMOD LIB_MD LIB_MPFR LIB_PTHREAD LIB_PTHREAD_SPINLOCK \ @@ -11,5 +11,5 @@ + LIB_JUDY LIB_KMOD LIB_MD LIB_PTHREAD LIB_PTHREAD_SPINLOCK \ + LIB_RT LIB_SCTP LIB_Z - LIB_AIO: compiler + LIB_AIO: $(call check,test-libaio,HAVE_LIB_AIO,$(LIB_AIO),$(LIB_AIO)) diff --git a/utils/stress-ng/patches/002-disable-compiler-test.patch b/utils/stress-ng/patches/002-disable-compiler-test.patch deleted file mode 100644 index 886b3a649..000000000 --- a/utils/stress-ng/patches/002-disable-compiler-test.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/Makefile.config -+++ b/Makefile.config -@@ -309,10 +309,6 @@ clean: - @rm -rf $(CONFIGS) config config.h - - compiler: configdir -- @echo "checking compiler ..." -- @$(CC) test/test-compiler.c -o test/test-compiler -- @echo "" > $(CONFIGS)/$$(./test/test-compiler) -- @rm -f test/test-compiler - $(call check,test-glibc,HAVE_GLIBC,using glibc) - - .PHONY: libraries diff --git a/utils/zsh/Makefile b/utils/zsh/Makefile index 6fc713a5d..e894bc6ee 100644 --- a/utils/zsh/Makefile +++ b/utils/zsh/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zsh PKG_VERSION:=5.9 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/zsh @@ -20,10 +20,19 @@ PKG_LICENSE:=ZSH PKG_LICENSE_FILES:=LICENCE PKG_CPE_ID:=cpe:/a:zsh_project:zsh +PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_BUILD_FLAGS:=gc-sections lto +# zsh include custom macro in the default aclocal.m4 +# When autoreconf PKG_FIXUP is used, if PKG_REMOVE_FILES +# is not defined, it's set to remove the file aclocak.m4 +# by default resulting in problem with the custom macro +# AC_PROG_LN +# To prevent this, declare empty PKG_REMOVE_FILES +PKG_REMOVE_FILES:= + include $(INCLUDE_DIR)/package.mk define Package/zsh @@ -31,7 +40,7 @@ define Package/zsh CATEGORY:=Utilities SUBMENU:=Shells TITLE:=The Z shell - DEPENDS:=+libcap +libncurses +libncursesw +libpcre +librt + DEPENDS:=+libcap +libncurses +libncursesw +libpcre2 +librt URL:=https://www.zsh.org/ endef diff --git a/utils/zsh/patches/001-50658-test-Enable-to-switch-between-C-UTF-8-locales-.patch b/utils/zsh/patches/001-50658-test-Enable-to-switch-between-C-UTF-8-locales-.patch new file mode 100644 index 000000000..79e352a99 --- /dev/null +++ b/utils/zsh/patches/001-50658-test-Enable-to-switch-between-C-UTF-8-locales-.patch @@ -0,0 +1,71 @@ +From 1b421e4978440234fb73117c8505dad1ccc68d46 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto +Date: Mon, 26 Sep 2022 10:52:50 +0900 +Subject: [PATCH] 50658 + test: Enable to switch between C/UTF-8 locales in + PCRE + +--- + ChangeLog | 5 +++++ + Src/Modules/pcre.c | 10 ++-------- + Test/V07pcre.ztst | 11 +++++++++++ + 3 files changed, 18 insertions(+), 8 deletions(-) + +# diff --git a/ChangeLog b/ChangeLog +# index 48c65d01b..77345c050 100644 +# --- a/ChangeLog +# +++ b/ChangeLog +# @@ -1,3 +1,8 @@ +# +2022-09-26 Jun-ichi Takimoto +# + +# + * 50658 + test: Src/Modules/pcre.c, Test/V07pcre.ztst: Enable to +# + switch between C/UTF-8 locales in PCRE +# + +# 2022-09-25 Peter Stephenson + +# * 50648: Functions/Misc/zcalc: Julian Prein: Use ZCALC_HISTFILE +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -47,8 +47,6 @@ zpcre_utf8_enabled(void) + #if defined(MULTIBYTE_SUPPORT) && defined(HAVE_NL_LANGINFO) && defined(CODESET) + static int have_utf8_pcre = -1; + +- /* value can toggle based on MULTIBYTE, so don't +- * be too eager with caching */ + if (have_utf8_pcre < -1) + return 0; + +@@ -56,15 +54,11 @@ zpcre_utf8_enabled(void) + return 0; + + if ((have_utf8_pcre == -1) && +- (!strcmp(nl_langinfo(CODESET), "UTF-8"))) { +- +- if (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre)) ++ (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre))) { + have_utf8_pcre = -2; /* erk, failed to ask */ + } + +- if (have_utf8_pcre < 0) +- return 0; +- return have_utf8_pcre; ++ return (have_utf8_pcre == 1) && (!strcmp(nl_langinfo(CODESET), "UTF-8")); + + #else + return 0; +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -174,3 +174,14 @@ + echo $match[2] ) + 0:regression for segmentation fault, workers/38307 + >test ++ ++ LANG_SAVE=$LANG ++ [[ é =~ '^.\z' ]]; echo $? ++ LANG=C ++ [[ é =~ '^..\z' ]]; echo $? ++ LANG=$LANG_SAVE ++ [[ é =~ '^.\z' ]]; echo $? ++0:swich between C/UTF-8 locales ++>0 ++>0 ++>0 diff --git a/utils/zsh/patches/002-51723-migrate-pcre-module-to-pcre2.patch b/utils/zsh/patches/002-51723-migrate-pcre-module-to-pcre2.patch new file mode 100644 index 000000000..6e0b7f1e8 --- /dev/null +++ b/utils/zsh/patches/002-51723-migrate-pcre-module-to-pcre2.patch @@ -0,0 +1,540 @@ +From b62e911341c8ec7446378b477c47da4256053dc0 Mon Sep 17 00:00:00 2001 +From: Oliver Kiddle +Date: Sat, 13 May 2023 00:53:32 +0200 +Subject: [PATCH] 51723: migrate pcre module to pcre2 + +--- + ChangeLog | 3 + + Src/Modules/pcre.c | 223 ++++++++++++++++++--------------------------- + Test/V07pcre.ztst | 13 ++- + configure.ac | 20 ++-- + 4 files changed, 110 insertions(+), 149 deletions(-) + +# diff --git a/ChangeLog b/ChangeLog +# index f5c77f801..285b73b2c 100644 +# --- a/ChangeLog +# +++ b/ChangeLog +# @@ -1,5 +1,8 @@ +# 2023-05-13 Oliver Kiddle + +# + * 51723: Src/Modules/pcre.c, Test/V07pcre.ztst, configure.ac: +# + migrate pcre module to pcre2 +# + +# * Felipe Contreras: 50612: Misc/vcs_info-examples: fix typo + +# * github #98: Vidhan Bhatt: Completion/Darwin/Command/_shortcuts: +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -34,11 +34,11 @@ + #define CPCRE_PLAIN 0 + + /**/ +-#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) +-#include ++#if defined(HAVE_PCRE2_COMPILE_8) && defined(HAVE_PCRE2_H) ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + +-static pcre *pcre_pattern; +-static pcre_extra *pcre_hints; ++static pcre2_code *pcre_pattern; + + /**/ + static int +@@ -54,8 +54,8 @@ zpcre_utf8_enabled(void) + return 0; + + if ((have_utf8_pcre == -1) && +- (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre))) { +- have_utf8_pcre = -2; /* erk, failed to ask */ ++ (pcre2_config(PCRE2_CONFIG_UNICODE, &have_utf8_pcre))) { ++ have_utf8_pcre = -2; /* erk, failed to ask */ + } + + return (have_utf8_pcre == 1) && (!strcmp(nl_langinfo(CODESET), "UTF-8")); +@@ -69,47 +69,38 @@ zpcre_utf8_enabled(void) + static int + bin_pcre_compile(char *nam, char **args, Options ops, UNUSED(int func)) + { +- int pcre_opts = 0, pcre_errptr, target_len; +- const char *pcre_error; ++ uint32_t pcre_opts = 0; ++ int target_len; ++ int pcre_error; ++ PCRE2_SIZE pcre_offset; + char *target; + +- if(OPT_ISSET(ops,'a')) pcre_opts |= PCRE_ANCHORED; +- if(OPT_ISSET(ops,'i')) pcre_opts |= PCRE_CASELESS; +- if(OPT_ISSET(ops,'m')) pcre_opts |= PCRE_MULTILINE; +- if(OPT_ISSET(ops,'x')) pcre_opts |= PCRE_EXTENDED; +- if(OPT_ISSET(ops,'s')) pcre_opts |= PCRE_DOTALL; ++ if (OPT_ISSET(ops, 'a')) pcre_opts |= PCRE2_ANCHORED; ++ if (OPT_ISSET(ops, 'i')) pcre_opts |= PCRE2_CASELESS; ++ if (OPT_ISSET(ops, 'm')) pcre_opts |= PCRE2_MULTILINE; ++ if (OPT_ISSET(ops, 'x')) pcre_opts |= PCRE2_EXTENDED; ++ if (OPT_ISSET(ops, 's')) pcre_opts |= PCRE2_DOTALL; + + if (zpcre_utf8_enabled()) +- pcre_opts |= PCRE_UTF8; +- +-#ifdef HAVE_PCRE_STUDY +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; +-#endif ++ pcre_opts |= PCRE2_UTF; + + if (pcre_pattern) +- pcre_free(pcre_pattern); ++ pcre2_code_free(pcre_pattern); + pcre_pattern = NULL; + + target = ztrdup(*args); + unmetafy(target, &target_len); + +- if ((int)strlen(target) != target_len) { +- zwarnnam(nam, "embedded NULs in PCRE pattern terminate pattern"); +- } +- +- pcre_pattern = pcre_compile(target, pcre_opts, &pcre_error, &pcre_errptr, NULL); ++ pcre_pattern = pcre2_compile((PCRE2_SPTR) target, (PCRE2_SIZE) target_len, ++ pcre_opts, &pcre_error, &pcre_offset, NULL); + + free(target); + + if (pcre_pattern == NULL) + { +- zwarnnam(nam, "error in regex: %s", pcre_error); ++ PCRE2_UCHAR buffer[256]; ++ pcre2_get_error_message(pcre_error, buffer, sizeof(buffer)); ++ zwarnnam(nam, "error in regex: %s", buffer); + return 1; + } + +@@ -117,67 +108,48 @@ bin_pcre_compile(char *nam, char **args, + } + + /**/ +-#ifdef HAVE_PCRE_STUDY +- +-/**/ + static int + bin_pcre_study(char *nam, UNUSED(char **args), UNUSED(Options ops), UNUSED(int func)) + { +- const char *pcre_error; +- + if (pcre_pattern == NULL) + { + zwarnnam(nam, "no pattern has been compiled for study"); + return 1; + } +- +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; + +- pcre_hints = pcre_study(pcre_pattern, 0, &pcre_error); +- if (pcre_error != NULL) +- { +- zwarnnam(nam, "error while studying regex: %s", pcre_error); +- return 1; ++ int jit = 0; ++ if (!pcre2_config(PCRE2_CONFIG_JIT, &jit) && jit) { ++ if (pcre2_jit_compile(pcre_pattern, PCRE2_JIT_COMPLETE) < 0) { ++ zwarnnam(nam, "error while studying regex"); ++ return 1; ++ } + } + + return 0; + } + +-/**/ +-#else /* !HAVE_PCRE_STUDY */ +- +-# define bin_pcre_study bin_notavail +- +-/**/ +-#endif /* !HAVE_PCRE_STUDY */ +- +-/**/ + static int +-zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, +- char *substravar, int want_offset_pair, int matchedinarr, +- int want_begin_end) ++zpcre_get_substrings(char *arg, pcre2_match_data *mdata, int captured_count, ++ char *matchvar, char *substravar, int want_offset_pair, ++ int matchedinarr, int want_begin_end) + { +- char **captures, *match_all, **matches; ++ PCRE2_SIZE *ovec; ++ char *match_all, **matches; + char offset_all[50]; + int capture_start = 1; + + if (matchedinarr) { +- /* bash-style captures[0] entire-matched string in the array */ ++ /* bash-style ovec[0] entire-matched string in the array */ + capture_start = 0; + } + +- /* captures[0] will be entire matched string, [1] first substring */ +- if (!pcre_get_substring_list(arg, ovec, captured_count, (const char ***)&captures)) { +- int nelem = arrlen(captures)-1; ++ /* ovec[0] will be entire matched string, [1] first substring */ ++ ovec = pcre2_get_ovector_pointer(mdata); ++ if (ovec) { ++ int nelem = captured_count - 1; + /* Set to the offsets of the complete match */ + if (want_offset_pair) { +- sprintf(offset_all, "%d %d", ovec[0], ovec[1]); ++ sprintf(offset_all, "%ld %ld", ovec[0], ovec[1]); + setsparam("ZPCRE_OP", ztrdup(offset_all)); + } + /* +@@ -186,7 +158,7 @@ zpcre_get_substrings(char *arg, int *ove + * ovec is length 2*(1+capture_list_length) + */ + if (matchvar) { +- match_all = metafy(captures[0], ovec[1] - ovec[0], META_DUP); ++ match_all = metafy(arg + ovec[0], ovec[1] - ovec[0], META_DUP); + setsparam(matchvar, match_all); + } + /* +@@ -201,16 +173,12 @@ zpcre_get_substrings(char *arg, int *ove + */ + if (substravar && + (!want_begin_end || nelem)) { +- char **x, **y; ++ char **x; + int vec_off, i; +- y = &captures[capture_start]; + matches = x = (char **) zalloc(sizeof(char *) * (captured_count+1-capture_start)); +- for (i = capture_start; i < captured_count; i++, y++) { ++ for (i = capture_start; i < captured_count; i++) { + vec_off = 2*i; +- if (*y) +- *x++ = metafy(*y, ovec[vec_off+1]-ovec[vec_off], META_DUP); +- else +- *x++ = NULL; ++ *x++ = metafy(arg + ovec[vec_off], ovec[vec_off+1]-ovec[vec_off], META_DUP); + } + *x = NULL; + setaparam(substravar, matches); +@@ -247,7 +215,8 @@ zpcre_get_substrings(char *arg, int *ove + setiparam("MEND", offs + !isset(KSHARRAYS) - 1); + if (nelem) { + char **mbegin, **mend, **bptr, **eptr; +- int i, *ipair; ++ int i; ++ size_t *ipair; + + bptr = mbegin = zalloc(sizeof(char*)*(nelem+1)); + eptr = mend = zalloc(sizeof(char*)*(nelem+1)); +@@ -287,8 +256,6 @@ zpcre_get_substrings(char *arg, int *ove + setaparam("mend", mend); + } + } +- +- pcre_free_substring_list((const char **)captures); + } + + return 0; +@@ -314,7 +281,8 @@ getposint(char *instr, char *nam) + static int + bin_pcre_match(char *nam, char **args, Options ops, UNUSED(int func)) + { +- int ret, capcount, *ovec, ovecsize, c; ++ int ret, c; ++ pcre2_match_data *pcre_mdata = NULL; + char *matched_portion = NULL; + char *plaintext = NULL; + char *receptacle = NULL; +@@ -344,36 +312,30 @@ bin_pcre_match(char *nam, char **args, O + /* For the entire match, 'Return' the offset byte positions instead of the matched string */ + if(OPT_ISSET(ops,'b')) want_offset_pair = 1; + +- if ((ret = pcre_fullinfo(pcre_pattern, pcre_hints, PCRE_INFO_CAPTURECOUNT, &capcount))) +- { +- zwarnnam(nam, "error %d in fullinfo", ret); +- return 1; +- } +- +- ovecsize = (capcount+1)*3; +- ovec = zalloc(ovecsize*sizeof(int)); +- + plaintext = ztrdup(*args); + unmetafy(plaintext, &subject_len); + + if (offset_start > 0 && offset_start >= subject_len) +- ret = PCRE_ERROR_NOMATCH; +- else +- ret = pcre_exec(pcre_pattern, pcre_hints, plaintext, subject_len, offset_start, 0, ovec, ovecsize); ++ ret = PCRE2_ERROR_NOMATCH; ++ else { ++ pcre_mdata = pcre2_match_data_create_from_pattern(pcre_pattern, NULL); ++ ret = pcre2_match(pcre_pattern, (PCRE2_SPTR) plaintext, subject_len, ++ offset_start, 0, pcre_mdata, NULL); ++ } + + if (ret==0) return_value = 0; +- else if (ret==PCRE_ERROR_NOMATCH) /* no match */; ++ else if (ret == PCRE2_ERROR_NOMATCH) /* no match */; + else if (ret>0) { +- zpcre_get_substrings(plaintext, ovec, ret, matched_portion, receptacle, ++ zpcre_get_substrings(plaintext, pcre_mdata, ret, matched_portion, receptacle, + want_offset_pair, 0, 0); + return_value = 0; + } + else { +- zwarnnam(nam, "error in pcre_exec [%d]", ret); ++ zwarnnam(nam, "error in pcre2_match [%d]", ret); + } + +- if (ovec) +- zfree(ovec, ovecsize*sizeof(int)); ++ if (pcre_mdata) ++ pcre2_match_data_free(pcre_mdata); + zsfree(plaintext); + + return return_value; +@@ -383,17 +345,19 @@ bin_pcre_match(char *nam, char **args, O + static int + cond_pcre_match(char **a, int id) + { +- pcre *pcre_pat; +- const char *pcre_err; ++ pcre2_code *pcre_pat = NULL; ++ int pcre_err; ++ PCRE2_SIZE pcre_erroff; + char *lhstr, *rhre, *lhstr_plain, *rhre_plain, *avar, *svar; +- int r = 0, pcre_opts = 0, pcre_errptr, capcnt, *ov, ovsize; ++ int r = 0, pcre_opts = 0; ++ pcre2_match_data *pcre_mdata = NULL; + int lhstr_plain_len, rhre_plain_len; + int return_value = 0; + + if (zpcre_utf8_enabled()) +- pcre_opts |= PCRE_UTF8; ++ pcre_opts |= PCRE2_UTF; + if (isset(REMATCHPCRE) && !isset(CASEMATCH)) +- pcre_opts |= PCRE_CASELESS; ++ pcre_opts |= PCRE2_CASELESS; + + lhstr = cond_str(a,0,0); + rhre = cond_str(a,1,0); +@@ -401,9 +365,6 @@ cond_pcre_match(char **a, int id) + rhre_plain = ztrdup(rhre); + unmetafy(lhstr_plain, &lhstr_plain_len); + unmetafy(rhre_plain, &rhre_plain_len); +- pcre_pat = NULL; +- ov = NULL; +- ovsize = 0; + + if (isset(BASHREMATCH)) { + svar = NULL; +@@ -415,27 +376,27 @@ cond_pcre_match(char **a, int id) + + switch(id) { + case CPCRE_PLAIN: +- if ((int)strlen(rhre_plain) != rhre_plain_len) { +- zwarn("embedded NULs in PCRE pattern terminate pattern"); +- } +- pcre_pat = pcre_compile(rhre_plain, pcre_opts, &pcre_err, &pcre_errptr, NULL); +- if (pcre_pat == NULL) { +- zwarn("failed to compile regexp /%s/: %s", rhre, pcre_err); ++ if (!(pcre_pat = pcre2_compile((PCRE2_SPTR) rhre_plain, ++ (PCRE2_SIZE) rhre_plain_len, pcre_opts, ++ &pcre_err, &pcre_erroff, NULL))) ++ { ++ PCRE2_UCHAR buffer[256]; ++ pcre2_get_error_message(pcre_err, buffer, sizeof(buffer)); ++ zwarn("failed to compile regexp /%s/: %s", rhre, buffer); + break; + } +- pcre_fullinfo(pcre_pat, NULL, PCRE_INFO_CAPTURECOUNT, &capcnt); +- ovsize = (capcnt+1)*3; +- ov = zalloc(ovsize*sizeof(int)); +- r = pcre_exec(pcre_pat, NULL, lhstr_plain, lhstr_plain_len, 0, 0, ov, ovsize); +- /* r < 0 => error; r==0 match but not enough size in ov ++ pcre_mdata = pcre2_match_data_create_from_pattern(pcre_pat, NULL); ++ r = pcre2_match(pcre_pat, (PCRE2_SPTR8) lhstr_plain, lhstr_plain_len, ++ 0, 0, pcre_mdata, NULL); ++ /* r < 0 => error; r==0 match but not enough size in match data + * r > 0 => (r-1) substrings found; r==1 => no substrings + */ + if (r==0) { +- zwarn("reportable zsh problem: pcre_exec() returned 0"); ++ zwarn("reportable zsh problem: pcre2_match() returned 0"); + return_value = 1; + break; + } +- else if (r==PCRE_ERROR_NOMATCH) { ++ else if (r == PCRE2_ERROR_NOMATCH) { + return_value = 0; /* no match */ + break; + } +@@ -444,7 +405,7 @@ cond_pcre_match(char **a, int id) + break; + } + else if (r>0) { +- zpcre_get_substrings(lhstr_plain, ov, r, svar, avar, 0, ++ zpcre_get_substrings(lhstr_plain, pcre_mdata, r, svar, avar, 0, + isset(BASHREMATCH), + !isset(BASHREMATCH)); + return_value = 1; +@@ -457,10 +418,10 @@ cond_pcre_match(char **a, int id) + free(lhstr_plain); + if(rhre_plain) + free(rhre_plain); ++ if (pcre_mdata) ++ pcre2_match_data_free(pcre_mdata); + if (pcre_pat) +- pcre_free(pcre_pat); +- if (ov) +- zfree(ov, ovsize*sizeof(int)); ++ pcre2_code_free(pcre_pat); + + return return_value; + } +@@ -489,11 +450,11 @@ static struct builtin bintab[] = { + + static struct features module_features = { + bintab, sizeof(bintab)/sizeof(*bintab), +-#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) ++#if defined(HAVE_PCRE2_COMPILE_8) && defined(HAVE_PCRE2_H) + cotab, sizeof(cotab)/sizeof(*cotab), +-#else /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ ++#else /* !(HAVE_PCRE2_COMPILE_8 && HAVE_PCRE2_H) */ + NULL, 0, +-#endif /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ ++#endif /* !(HAVE_PCRE2_COMPILE_8 && HAVE_PCRE2_H) */ + NULL, 0, + NULL, 0, + 0 +@@ -540,19 +501,9 @@ cleanup_(Module m) + int + finish_(UNUSED(Module m)) + { +-#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) +-#ifdef HAVE_PCRE_STUDY +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; +-#endif +- ++#if defined(HAVE_PCRE2_COMPILE_8) && defined(HAVE_PCRE2_H) + if (pcre_pattern) +- pcre_free(pcre_pattern); ++ pcre2_code_free(pcre_pattern); + pcre_pattern = NULL; + #endif + +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -129,12 +129,17 @@ + >78884; ZPCRE_OP: 25 30 + >90210; ZPCRE_OP: 31 36 + +-# Embedded NULs allowed in plaintext, but not in RE (although \0 as two-chars allowed) ++# Embedded NULs allowed in plaintext, in RE, pcre supports \0 as two-chars + [[ $'a\0bc\0d' =~ '^(a\0.)(.+)$' ]] + print "${#MATCH}; ${#match[1]}; ${#match[2]}" + 0:ensure ASCII NUL passes in and out of matched plaintext + >6; 3; 3 + ++# PCRE2 supports NULs also in the RE ++ [[ $'a\0b\0c' =~ $'^(.\0)+' ]] && print "${#MATCH}; ${#match[1]}" ++0:ensure ASCII NUL works also in the regex ++>4; 2 ++ + # Ensure the long-form infix operator works + [[ foo -pcre-match ^f..$ ]] + print $? +@@ -181,7 +186,11 @@ + [[ é =~ '^..\z' ]]; echo $? + LANG=$LANG_SAVE + [[ é =~ '^.\z' ]]; echo $? +-0:swich between C/UTF-8 locales ++0:switch between C/UTF-8 locales + >0 + >0 + >0 ++ ++ [[ abc =~ 'a(d*)bc' ]] && print "$#MATCH; $#match; ${#match[1]}" ++0:empty capture ++>3; 1; 0 +--- a/configure.ac ++++ b/configure.ac +@@ -438,7 +438,7 @@ fi], + + dnl Do you want to look for pcre support? + AC_ARG_ENABLE(pcre, +-AS_HELP_STRING([--enable-pcre],[enable the search for the pcre library (may create run-time library dependencies)])) ++AS_HELP_STRING([--enable-pcre],[enable the search for the pcre2 library (may create run-time library dependencies)])) + + dnl Do you want to look for capability support? + AC_ARG_ENABLE(cap, +@@ -662,13 +662,12 @@ AC_HEADER_SYS_WAIT + + oldcflags="$CFLAGS" + if test x$enable_pcre = xyes; then +-AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config) +-dnl Typically (meaning on this single RedHat 9 box in front of me) +-dnl pcre-config --cflags produces a -I output which needs to go into ++AC_CHECK_PROG([PCRECONF], pcre2-config, pcre2-config) ++dnl pcre2-config --cflags may produce a -I output which needs to go into + dnl CPPFLAGS else configure's preprocessor tests don't pick it up, + dnl producing a warning. +-if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then +- CPPFLAGS="$CPPFLAGS `pcre-config --cflags`" ++if test "x$ac_cv_prog_PCRECONF" = xpcre2-config; then ++ CPPFLAGS="$CPPFLAGS `pcre2-config --cflags`" + fi + fi + +@@ -678,9 +677,10 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h + locale.h errno.h stdio.h stdarg.h varargs.h stdlib.h \ + unistd.h sys/capability.h \ + utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \ +- netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \ ++ netinet/in_systm.h langinfo.h wchar.h stddef.h \ + sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \ + ncurses/ncurses.h) ++AC_CHECK_HEADERS([pcre2.h],,,[#define PCRE2_CODE_UNIT_WIDTH 8]) + if test x$dynamic = xyes; then + AC_CHECK_HEADERS(dlfcn.h) + AC_CHECK_HEADERS(dl.h) +@@ -958,9 +958,7 @@ if test "x$ac_found_iconv" = "xyes"; the + fi + + if test x$enable_pcre = xyes; then +-dnl pcre-config should probably be employed here +-dnl AC_SEARCH_LIBS(pcre_compile, pcre) +- LIBS="`$ac_cv_prog_PCRECONF --libs` $LIBS" ++ LIBS="`$ac_cv_prog_PCRECONF --libs8` $LIBS" + fi + + dnl --------------------- +@@ -1323,7 +1321,7 @@ AC_CHECK_FUNCS(strftime strptime mktime + pathconf sysconf \ + tgetent tigetflag tigetnum tigetstr setupterm initscr resize_term \ + getcchar setcchar waddwstr wget_wch win_wch use_default_colors \ +- pcre_compile pcre_study pcre_exec \ ++ pcre2_compile_8 \ + nl_langinfo \ + erand48 open_memstream \ + posix_openpt \ diff --git a/utils/zsh/patches/003-51728-assign-pcre-named-capture-groups-to-a-hash.patch b/utils/zsh/patches/003-51728-assign-pcre-named-capture-groups-to-a-hash.patch new file mode 100644 index 000000000..4b59218b3 --- /dev/null +++ b/utils/zsh/patches/003-51728-assign-pcre-named-capture-groups-to-a-hash.patch @@ -0,0 +1,180 @@ +From f3f371deb376478176866fd770fbcf9bc0d0609f Mon Sep 17 00:00:00 2001 +From: Oliver Kiddle +Date: Sat, 13 May 2023 00:56:48 +0200 +Subject: [PATCH] 51728: assign pcre named capture groups to a hash + +--- + ChangeLog | 3 +++ + Doc/Zsh/mod_pcre.yo | 10 ++++++---- + Src/Modules/pcre.c | 43 +++++++++++++++++++++++++++++++++---------- + Test/V07pcre.ztst | 14 ++++++++++++++ + 4 files changed, 56 insertions(+), 14 deletions(-) + +# diff --git a/ChangeLog b/ChangeLog +# index 285b73b2c..2835a9405 100644 +# --- a/ChangeLog +# +++ b/ChangeLog +# @@ -1,5 +1,8 @@ +# 2023-05-13 Oliver Kiddle + +# + * 51728: Doc/Zsh/mod_pcre.yo, Src/Modules/pcre.c, +# + Test/V07pcre.ztst: assign pcre named capture groups to a hash +# + +# * 51723: Src/Modules/pcre.c, Test/V07pcre.ztst, configure.ac: +# migrate pcre module to pcre2 + +--- a/Doc/Zsh/mod_pcre.yo ++++ b/Doc/Zsh/mod_pcre.yo +@@ -20,12 +20,12 @@ including those that indicate newline. + ) + findex(pcre_study) + item(tt(pcre_study))( +-Studies the previously-compiled PCRE which may result in faster +-matching. ++Requests JIT compilation for the previously-compiled PCRE which ++may result in faster matching. + ) + findex(pcre_match) + item(tt(pcre_match) [ tt(-v) var(var) ] [ tt(-a) var(arr) ] \ +-[ tt(-n) var(offset) ] [ tt(-b) ] var(string))( ++[ tt(-A) var(assoc) ] [ tt(-n) var(offset) ] [ tt(-b) ] var(string))( + Returns successfully if tt(string) matches the previously-compiled + PCRE. + +@@ -36,7 +36,9 @@ substrings, unless the tt(-a) option is + case it will set the array var(arr). Similarly, the variable + tt(MATCH) will be set to the entire matched portion of the + string, unless the tt(-v) option is given, in which case the variable +-var(var) will be set. ++var(var) will be set. Furthermore, any named captures will ++be stored in the associative array tt(.pcre.match) unless an ++alternative is given with tt(-A). + No variables are altered if there is no successful match. + A tt(-n) option starts searching for a match from the + byte var(offset) position in var(string). If the tt(-b) option is given, +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -129,14 +129,17 @@ bin_pcre_study(char *nam, UNUSED(char ** + } + + static int +-zpcre_get_substrings(char *arg, pcre2_match_data *mdata, int captured_count, +- char *matchvar, char *substravar, int want_offset_pair, +- int matchedinarr, int want_begin_end) ++zpcre_get_substrings(pcre2_code *pat, char *arg, pcre2_match_data *mdata, ++ int captured_count, char *matchvar, char *substravar, char *namedassoc, ++ int want_offset_pair, int matchedinarr, int want_begin_end) + { + PCRE2_SIZE *ovec; + char *match_all, **matches; + char offset_all[50]; + int capture_start = 1; ++ int vec_off; ++ PCRE2_SPTR ntable; /* table of named captures */ ++ uint32_t ncount, nsize; + + if (matchedinarr) { + /* bash-style ovec[0] entire-matched string in the array */ +@@ -174,7 +177,7 @@ zpcre_get_substrings(char *arg, pcre2_ma + if (substravar && + (!want_begin_end || nelem)) { + char **x; +- int vec_off, i; ++ int i; + matches = x = (char **) zalloc(sizeof(char *) * (captured_count+1-capture_start)); + for (i = capture_start; i < captured_count; i++) { + vec_off = 2*i; +@@ -184,6 +187,23 @@ zpcre_get_substrings(char *arg, pcre2_ma + setaparam(substravar, matches); + } + ++ if (!pcre2_pattern_info(pat, PCRE2_INFO_NAMECOUNT, &ncount) && ncount ++ && !pcre2_pattern_info(pat, PCRE2_INFO_NAMEENTRYSIZE, &nsize) ++ && !pcre2_pattern_info(pat, PCRE2_INFO_NAMETABLE, &ntable)) ++ { ++ char **hash, **hashptr; ++ uint32_t nidx; ++ hashptr = hash = (char **)zshcalloc((ncount+1)*2*sizeof(char *)); ++ for (nidx = 0; nidx < ncount; nidx++) { ++ vec_off = (ntable[nsize * nidx] << 9) + 2 * ntable[nsize * nidx + 1]; ++ /* would metafy the key but pcre limits characters in the name */ ++ *hashptr++ = ztrdup((char *) ntable + nsize * nidx + 2); ++ *hashptr++ = metafy(arg + ovec[vec_off], ++ ovec[vec_off+1]-ovec[vec_off], META_DUP); ++ } ++ sethparam(namedassoc, hash); ++ } ++ + if (want_begin_end) { + /* + * cond-infix rather than builtin; also not bash; so we set a bunch +@@ -286,6 +306,7 @@ bin_pcre_match(char *nam, char **args, O + char *matched_portion = NULL; + char *plaintext = NULL; + char *receptacle = NULL; ++ char *named = ".pcre.match"; + int return_value = 1; + /* The subject length and offset start are both int values in pcre_exec */ + int subject_len; +@@ -305,6 +326,9 @@ bin_pcre_match(char *nam, char **args, O + if(OPT_HASARG(ops,c='v')) { + matched_portion = OPT_ARG(ops,c); + } ++ if (OPT_HASARG(ops, c='A')) { ++ named = OPT_ARG(ops, c); ++ } + if(OPT_HASARG(ops,c='n')) { /* The offset position to start the search, in bytes. */ + if ((offset_start = getposint(OPT_ARG(ops,c), nam)) < 0) + return 1; +@@ -326,8 +350,8 @@ bin_pcre_match(char *nam, char **args, O + if (ret==0) return_value = 0; + else if (ret == PCRE2_ERROR_NOMATCH) /* no match */; + else if (ret>0) { +- zpcre_get_substrings(plaintext, pcre_mdata, ret, matched_portion, receptacle, +- want_offset_pair, 0, 0); ++ zpcre_get_substrings(pcre_pattern, plaintext, pcre_mdata, ret, matched_portion, ++ receptacle, named, want_offset_pair, 0, 0); + return_value = 0; + } + else { +@@ -405,9 +429,8 @@ cond_pcre_match(char **a, int id) + break; + } + else if (r>0) { +- zpcre_get_substrings(lhstr_plain, pcre_mdata, r, svar, avar, 0, +- isset(BASHREMATCH), +- !isset(BASHREMATCH)); ++ zpcre_get_substrings(pcre_pat, lhstr_plain, pcre_mdata, r, svar, avar, ++ ".pcre.match", 0, isset(BASHREMATCH), !isset(BASHREMATCH)); + return_value = 1; + break; + } +@@ -443,7 +466,7 @@ static struct conddef cotab[] = { + + static struct builtin bintab[] = { + BUILTIN("pcre_compile", 0, bin_pcre_compile, 1, 1, 0, "aimxs", NULL), +- BUILTIN("pcre_match", 0, bin_pcre_match, 1, 1, 0, "a:v:n:b", NULL), ++ BUILTIN("pcre_match", 0, bin_pcre_match, 1, 1, 0, "A:a:v:n:b", NULL), + BUILTIN("pcre_study", 0, bin_pcre_study, 0, 0, 0, NULL, NULL) + }; + +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -194,3 +194,17 @@ + [[ abc =~ 'a(d*)bc' ]] && print "$#MATCH; $#match; ${#match[1]}" + 0:empty capture + >3; 1; 0 ++ ++ [[ category/name-12345 =~ '(?x)^ ++ (? [^/]* ) / ++ (? ++ (? \w+ ) - ++ (? \d+ ))$' ]] ++ typeset -p1 .pcre.match ++0:named captures ++>typeset -g -A .pcre.match=( ++> [category]=category ++> [name]=name ++> [package]=name-12345 ++> [version]=12345 ++>) diff --git a/utils/zsh/patches/004-51738-support-pcre-s-alternative-DFA-matching-algori.patch b/utils/zsh/patches/004-51738-support-pcre-s-alternative-DFA-matching-algori.patch new file mode 100644 index 000000000..8e06745fe --- /dev/null +++ b/utils/zsh/patches/004-51738-support-pcre-s-alternative-DFA-matching-algori.patch @@ -0,0 +1,156 @@ +From b4d1c756f50909b4a13e5c8fe5f26f71e9d54f63 Mon Sep 17 00:00:00 2001 +From: Oliver Kiddle +Date: Sat, 13 May 2023 00:59:00 +0200 +Subject: [PATCH] 51738: support pcre's alternative DFA matching algorithm + +--- + ChangeLog | 3 +++ + Doc/Zsh/mod_pcre.yo | 6 ++++- + Src/Modules/pcre.c | 53 ++++++++++++++++++++++++++++++--------------- + Test/V07pcre.ztst | 5 +++++ + 4 files changed, 49 insertions(+), 18 deletions(-) + +# diff --git a/ChangeLog b/ChangeLog +# index 2835a9405..18bc4a698 100644 +# --- a/ChangeLog +# +++ b/ChangeLog +# @@ -1,5 +1,8 @@ +# 2023-05-13 Oliver Kiddle + +# + * 51738: Doc/Zsh/mod_pcre.yo, Src/Modules/pcre.c, +# + Test/V07pcre.ztst: support pcre's DFA matching algorithm +# + +# * 51728: Doc/Zsh/mod_pcre.yo, Src/Modules/pcre.c, +# Test/V07pcre.ztst: assign pcre named capture groups to a hash + +--- a/Doc/Zsh/mod_pcre.yo ++++ b/Doc/Zsh/mod_pcre.yo +@@ -25,7 +25,7 @@ may result in faster matching. + ) + findex(pcre_match) + item(tt(pcre_match) [ tt(-v) var(var) ] [ tt(-a) var(arr) ] \ +-[ tt(-A) var(assoc) ] [ tt(-n) var(offset) ] [ tt(-b) ] var(string))( ++[ tt(-A) var(assoc) ] [ tt(-n) var(offset) ] [ tt(-bd) ] var(string))( + Returns successfully if tt(string) matches the previously-compiled + PCRE. + +@@ -69,6 +69,10 @@ print -l $accum) + ) + enditem() + ++The option tt(-d) uses the alternative breadth-first DFA search algorithm of ++pcre. This sets tt(match), or the array given with tt(-a), to all the matches ++found from the same start point in the subject. ++ + The tt(zsh/pcre) module makes available the following test condition: + + startitem() +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -305,30 +305,29 @@ bin_pcre_match(char *nam, char **args, O + pcre2_match_data *pcre_mdata = NULL; + char *matched_portion = NULL; + char *plaintext = NULL; +- char *receptacle = NULL; +- char *named = ".pcre.match"; ++ char *receptacle; ++ char *named = NULL; + int return_value = 1; + /* The subject length and offset start are both int values in pcre_exec */ + int subject_len; + int offset_start = 0; + int want_offset_pair = 0; ++ int use_dfa = 0; + + if (pcre_pattern == NULL) { + zwarnnam(nam, "no pattern has been compiled"); + return 1; + } + +- matched_portion = "MATCH"; +- receptacle = "match"; +- if(OPT_HASARG(ops,c='a')) { +- receptacle = OPT_ARG(ops,c); +- } +- if(OPT_HASARG(ops,c='v')) { +- matched_portion = OPT_ARG(ops,c); +- } +- if (OPT_HASARG(ops, c='A')) { +- named = OPT_ARG(ops, c); ++ if (!(use_dfa = OPT_ISSET(ops, 'd'))) { ++ matched_portion = OPT_HASARG(ops, c='v') ? OPT_ARG(ops, c) : "MATCH"; ++ named = OPT_HASARG(ops, c='A') ? OPT_ARG(ops, c) : ".pcre.match"; ++ } else if (OPT_HASARG(ops, c='v') || OPT_HASARG(ops, c='A')) { ++ zwarnnam(nam, "-d cannot be combined with -%c", c); ++ return 1; + } ++ receptacle = OPT_HASARG(ops, 'a') ? OPT_ARG(ops, 'a') : "match"; ++ + if(OPT_HASARG(ops,c='n')) { /* The offset position to start the search, in bytes. */ + if ((offset_start = getposint(OPT_ARG(ops,c), nam)) < 0) + return 1; +@@ -341,7 +340,25 @@ bin_pcre_match(char *nam, char **args, O + + if (offset_start > 0 && offset_start >= subject_len) + ret = PCRE2_ERROR_NOMATCH; +- else { ++ else if (use_dfa) { ++ PCRE2_SIZE old, wscount = 128, capcount = 128; ++ void *workspace = zhalloc(sizeof(int) * wscount); ++ pcre_mdata = pcre2_match_data_create(capcount, NULL); ++ do { ++ ret = pcre2_dfa_match(pcre_pattern, (PCRE2_SPTR) plaintext, subject_len, ++ offset_start, 0, pcre_mdata, NULL, (int *) workspace, wscount); ++ if (ret == PCRE2_ERROR_DFA_WSSIZE) { ++ old = wscount; ++ wscount += wscount / 2; ++ workspace = hrealloc(workspace, sizeof(int) * old, sizeof(int) * wscount); ++ } else if (ret == 0) { ++ capcount += capcount / 2; ++ pcre2_match_data_free(pcre_mdata); ++ pcre_mdata = pcre2_match_data_create(capcount, NULL); ++ } else ++ break; ++ } while(1); ++ } else { + pcre_mdata = pcre2_match_data_create_from_pattern(pcre_pattern, NULL); + ret = pcre2_match(pcre_pattern, (PCRE2_SPTR) plaintext, subject_len, + offset_start, 0, pcre_mdata, NULL); +@@ -350,12 +367,14 @@ bin_pcre_match(char *nam, char **args, O + if (ret==0) return_value = 0; + else if (ret == PCRE2_ERROR_NOMATCH) /* no match */; + else if (ret>0) { +- zpcre_get_substrings(pcre_pattern, plaintext, pcre_mdata, ret, matched_portion, +- receptacle, named, want_offset_pair, 0, 0); ++ zpcre_get_substrings(pcre_pattern, plaintext, pcre_mdata, ret, ++ matched_portion, receptacle, named, want_offset_pair, use_dfa, 0); + return_value = 0; + } + else { +- zwarnnam(nam, "error in pcre2_match [%d]", ret); ++ PCRE2_UCHAR buffer[256]; ++ pcre2_get_error_message(ret, buffer, sizeof(buffer)); ++ zwarnnam(nam, "error in pcre matching for /%s/: %s", plaintext, buffer); + } + + if (pcre_mdata) +@@ -466,7 +485,7 @@ static struct conddef cotab[] = { + + static struct builtin bintab[] = { + BUILTIN("pcre_compile", 0, bin_pcre_compile, 1, 1, 0, "aimxs", NULL), +- BUILTIN("pcre_match", 0, bin_pcre_match, 1, 1, 0, "A:a:v:n:b", NULL), ++ BUILTIN("pcre_match", 0, bin_pcre_match, 1, 1, 0, "A:a:v:n:bd", NULL), + BUILTIN("pcre_study", 0, bin_pcre_study, 0, 0, 0, NULL, NULL) + }; + +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -208,3 +208,8 @@ + > [package]=name-12345 + > [version]=12345 + >) ++ ++ pcre_compile 'cat(er(pillar)?)?' ++ pcre_match -d 'the caterpillar catchment' && print $match ++0:pcre_match -d ++>caterpillar cater cat diff --git a/utils/zsh/patches/005-51877-do-not-build-pcre-module-if-pcre2-config-is-no.patch b/utils/zsh/patches/005-51877-do-not-build-pcre-module-if-pcre2-config-is-no.patch new file mode 100644 index 000000000..81632e7c1 --- /dev/null +++ b/utils/zsh/patches/005-51877-do-not-build-pcre-module-if-pcre2-config-is-no.patch @@ -0,0 +1,111 @@ +From 10bdbd8b5b0b43445aff23dcd412f25cf6aa328a Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto +Date: Tue, 20 Jun 2023 18:14:27 +0900 +Subject: [PATCH] 51877: do not build pcre module if pcre2-config is not found + +--- + ChangeLog | 5 +++++ + Src/Modules/pcre.mdd | 2 +- + configure.ac | 31 +++++++++++++++++++------------ + 3 files changed, 25 insertions(+), 13 deletions(-) + +# diff --git a/ChangeLog b/ChangeLog +# index 14349dcf2..e89ffee1b 100644 +# --- a/ChangeLog +# +++ b/ChangeLog +# @@ -1,3 +1,8 @@ +# +2023-06-20 Jun-ichi Takimoto +# + +# + * 51877: Src/Modules/pcre.mdd, configure.ac: do not build pcre +# + module if pcre2-config is not available. +# + +# 2023-06-19 Jun-ichi Takimoto + +# * 51862: Doc/Makefile.in, configure.ac: support texinfo-7.0 +--- a/Src/Modules/pcre.mdd ++++ b/Src/Modules/pcre.mdd +@@ -1,5 +1,5 @@ + name=zsh/pcre +-link=`if test x$enable_pcre = xyes && (pcre-config --version >/dev/null 2>/dev/null); then echo dynamic; else echo no; fi` ++link=`if test x$enable_pcre = xyes; then echo dynamic; else echo no; fi` + load=no + + autofeatures="b:pcre_compile b:pcre_study b:pcre_match" +--- a/configure.ac ++++ b/configure.ac +@@ -440,6 +440,17 @@ dnl Do you want to look for pcre support + AC_ARG_ENABLE(pcre, + AS_HELP_STRING([--enable-pcre],[enable the search for the pcre2 library (may create run-time library dependencies)])) + ++AC_ARG_VAR(PCRE_CONFIG, [pathname of pcre2-config if it is not in PATH]) ++if test "x$enable_pcre" = xyes; then ++ AC_CHECK_PROG([PCRE_CONFIG], pcre2-config, pcre2-config) ++ if test "x$PCRE_CONFIG" = x; then ++ enable_pcre=no ++ AC_MSG_WARN([pcre2-config not found: pcre module is disabled.]) ++ AC_MSG_NOTICE( ++ [Set PCRE_CONFIG to pathname of pcre2-config if it is not in PATH.]) ++ fi ++fi ++ + dnl Do you want to look for capability support? + AC_ARG_ENABLE(cap, + AS_HELP_STRING([--enable-cap],[enable the search for POSIX capabilities (may require additional headers to be added by hand)])) +@@ -660,15 +671,12 @@ AC_HEADER_DIRENT + AC_HEADER_STAT + AC_HEADER_SYS_WAIT + +-oldcflags="$CFLAGS" +-if test x$enable_pcre = xyes; then +-AC_CHECK_PROG([PCRECONF], pcre2-config, pcre2-config) + dnl pcre2-config --cflags may produce a -I output which needs to go into + dnl CPPFLAGS else configure's preprocessor tests don't pick it up, + dnl producing a warning. +-if test "x$ac_cv_prog_PCRECONF" = xpcre2-config; then +- CPPFLAGS="$CPPFLAGS `pcre2-config --cflags`" +-fi ++if test "x$enable_pcre" = xyes; then ++ CPPFLAGS="`$PCRE_CONFIG --cflags` $CPPFLAGS" ++ AC_CHECK_HEADERS([pcre2.h],,,[#define PCRE2_CODE_UNIT_WIDTH 8]) + fi + + AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ +@@ -680,7 +688,6 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h + netinet/in_systm.h langinfo.h wchar.h stddef.h \ + sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \ + ncurses/ncurses.h) +-AC_CHECK_HEADERS([pcre2.h],,,[#define PCRE2_CODE_UNIT_WIDTH 8]) + if test x$dynamic = xyes; then + AC_CHECK_HEADERS(dlfcn.h) + AC_CHECK_HEADERS(dl.h) +@@ -957,10 +964,6 @@ if test "x$ac_found_iconv" = "xyes"; the + [Define as const if the declaration of iconv() needs const.]) + fi + +-if test x$enable_pcre = xyes; then +- LIBS="`$ac_cv_prog_PCRECONF --libs8` $LIBS" +-fi +- + dnl --------------------- + dnl CHECK TERMCAP LIBRARY + dnl --------------------- +@@ -1321,7 +1324,6 @@ AC_CHECK_FUNCS(strftime strptime mktime + pathconf sysconf \ + tgetent tigetflag tigetnum tigetstr setupterm initscr resize_term \ + getcchar setcchar waddwstr wget_wch win_wch use_default_colors \ +- pcre2_compile_8 \ + nl_langinfo \ + erand48 open_memstream \ + posix_openpt \ +@@ -1376,6 +1378,11 @@ if test x$zsh_cv_func_realpath_accepts_n + AC_DEFINE(REALPATH_ACCEPTS_NULL) + fi + ++if test x$enable_pcre = xyes; then ++ LIBS="`$PCRE_CONFIG --libs8` $LIBS" ++ AC_CHECK_FUNCS(pcre2_compile_8) ++fi ++ + if test x$enable_cap = xyes; then + AC_CHECK_FUNCS(cap_get_proc) + fi