From ad5967ddc5ea96444b95cbaa9e9a8e367f7a5d01 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 6 Jan 2024 19:37:26 +0300 Subject: [PATCH] wireguard: hwg patch to change wg packet types: - This is done to bypass STC DPI - All sides must use this patched spec of wireguard Signed-off-by: HeshamTB wireguard packet type patch Signed-off-by: HeshamTB config: restore SPEC_MIT --- PKGBUILD | 10 ++++++---- linux-hwg3.patch | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 linux-hwg3.patch diff --git a/PKGBUILD b/PKGBUILD index ab7ce01..a15fed8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Jan Alexander Steffens (heftig) -pkgbase=linux +pkgbase=linux-hwg pkgver=6.7.arch3 pkgrel=1 pkgdesc='Linux' @@ -31,6 +31,7 @@ source=( https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign} $url/releases/download/$_srctag/linux-$_srctag.patch.zst{,.sig} config # the main kernel config file + linux-hwg3.patch ) validpgpkeys=( ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds @@ -72,7 +73,8 @@ prepare() { echo "Setting config..." cp ../config .config - make olddefconfig + #make olddefconfig + make localmodconfig diff -u ../config .config || : make -s kernelrelease > version @@ -82,7 +84,7 @@ prepare() { build() { cd $_srcname make all - make htmldocs + #make htmldocs } _package() { @@ -229,7 +231,7 @@ _package-docs() { pkgname=( "$pkgbase" "$pkgbase-headers" - "$pkgbase-docs" + #"$pkgbase-docs" ) for _p in "${pkgname[@]}"; do eval "package_$_p() { diff --git a/linux-hwg3.patch b/linux-hwg3.patch new file mode 100644 index 0000000..4129b37 --- /dev/null +++ b/linux-hwg3.patch @@ -0,0 +1,24 @@ + drivers/net/wireguard/messages.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireguard/messages.h b/drivers/net/wireguard/messages.h +index 208da7267..5a65554a6 100644 +--- a/drivers/net/wireguard/messages.h ++++ b/drivers/net/wireguard/messages.h +@@ -54,11 +54,11 @@ enum limits { + }; + + enum message_type { +- MESSAGE_INVALID = 0, +- MESSAGE_HANDSHAKE_INITIATION = 1, +- MESSAGE_HANDSHAKE_RESPONSE = 2, +- MESSAGE_HANDSHAKE_COOKIE = 3, +- MESSAGE_DATA = 4 ++ MESSAGE_INVALID = 5, ++ MESSAGE_HANDSHAKE_INITIATION = 6, ++ MESSAGE_HANDSHAKE_RESPONSE = 7, ++ MESSAGE_HANDSHAKE_COOKIE = 8, ++ MESSAGE_DATA = 9 + }; + + struct message_header {