wg-quick: android: prefer kernel module over userspace for AWG configs - #64
Open
erophey7 wants to merge 1 commit into
Open
wg-quick: android: prefer kernel module over userspace for AWG configs#64erophey7 wants to merge 1 commit into
erophey7 wants to merge 1 commit into
Conversation
add_if() previously routed any config containing AmneziaWG parameters (Jc, Jmin, Jmax, S1-S4, H1-H4, I1-I5) to the userspace amneziawg-go binary, even when the amneziawg kernel module is present. Since the kernel module supports all these parameters via awg setconf, and amneziawg-go is not shipped with the Android app, kernel-mode tunnels with AWG obfuscation failed with 'amneziawg-go: inaccessible or not found' (exit 127). Switch the selection to kernel-first: use ip link add ... type amneziawg whenever /sys/module/amneziawg is available, and keep amneziawg-go only as a fallback for devices without the kernel module. Drop the now-unused is_awg_on flag and the parser branches that only existed to set it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make
wg-quick's Android integration prefer the amneziawg kernel module over the userspaceamneziawg-gobinary for configurations that use AWG obfuscation parameters.Why
add_if()previously routed any config containing AmneziaWG parameters (Jc, Jmin, Jmax, S1-S4, H1-H4, I1-I5) to the userspaceamneziawg-gobinary, even when the kernel module is present. Sinceamneziawg-gois not shipped with the Android app, kernel-mode tunnels with AWG obfuscation failed withamneziawg-go: inaccessible or not found(exit 127).The kernel module supports all these parameters via
awg setconf, so the selection is now kernel-first:ip link add ... type amneziawgwhenever/sys/module/amneziawgis available;amneziawg-goonly as a fallback for devices without the kernel module.Drops the now-unused
is_awg_onflag and the parser branches that only existed to set it.Testing performed
wg-quickfor Android target.wg-quick up/wg-quick downcycle verified in both kernel-module and userspace-fallback modes.Files changed
src/wg-quick/android.c(+10, −40)