openvpn_xorpatch
openvpn_xorpatch copied to clipboard
How to use the patch?
Could you please tell me where to put the openvpn_xor.patch file? I'm quiet new to this stuff. Thanks!
@Ghost-Recon131 checkout my PKGBUILD for the AUR package I manage that may help....
https://aur.archlinux.org/packages/openvpn-xor-git/
and in particular:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=openvpn-xor-git
patches are split amongst a few files.. you can download all files archived via:
https://aur.archlinux.org/cgit/aur.git/snapshot/openvpn-xor-git.tar.gz
Thanks, but what do I do with the patches? Do I just put them in the OpenVPN install folder?
you run them against the openvpn source code... copy them all into the the extracted openvpn source code folder and simply use "git apply" or "patch -p1"... i prefer the git method as its easier and more cross platform (works for Win/Linux/macOS)...
checkout lines 28 - 41 of the PkGBUILD script which is where this happens:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=openvpn-xor-git#n28
once patched you then build as per normal openvpn building instructions...
I seem to get an error about missing files
/40227626/51963182-da804d00-24b6-11e9-827a-4ce84aa68a12.png)

$ /usr/local/src/openvpn-2.4.6$ patch -p1 < openvpn_xor.patch patching file src/openvpn/forward.c patching file src/openvpn/options.c Hunk #1 succeeded at 812 (offset 1 line). Hunk #2 succeeded at 977 (offset 2 lines). Hunk #3 succeeded at 1497 (offset 16 lines). Hunk #4 succeeded at 5994 (offset 25 lines). patching file src/openvpn/options.h patching file src/openvpn/socket.c patching file src/openvpn/socket.h
all files owned by user - so no sudo needed
you must edit the version of openvpn - the patch is aimed at 2.4.4 - i pulled 2.4.6 and it worked straight away - i have yet to test it this is what the patch looks like:
diff -Naur openvpn_new-2.4.4/src/openvpn/forward.c openvpn-2.4.4/src/openvpn/forward.c --- openvpn_new-2.4.4/src/openvpn/forward.c 2017-09-26 10:27:35.000000000 +0100 +++ openvpn-2.4.4/src/openvpn/forward.c 2017-12-04 19:25:15.248200599 +0000 @@ -729,7 +729,10 @@ .... ... status = link_socket_read(c->c2.link_socket,