feat: add AmneziaWG outbound#1
Closed
hawkff wants to merge 1306 commits into
Closed
Conversation
fix typo Signed-off-by: libtry486 <89328481+libtry486@users.noreply.github.com>
Co-authored-by: anytls <anytls>
Signed-off-by: Estel <callmebedrockdigger@gmail.com>
Co-authored-by: anytls <anytls>
Co-authored-by: anytls <anytls>
…h ForceAttemptHTTP2
delete .o file
Add an amneziawg outbound that reuses sing-box's WireGuard transport stack but drives the amnezia-vpn/amneziawg-go engine, so the obfuscation parameters (Jc/Jmin/Jmax, S1-S4, H1-H4, I1-I5) can be configured. Plain WireGuard is left untouched. - transport/amneziawg: copy of transport/wireguard with the device/conn/tun imports pointed at amneziawg-go (3-arg NewDevice, no listener/reserved-bind extensions), plus device-level AmneziaWG IPC params appended to the UAPI config. The device-stack files are kept byte-identical to the wireguard sibling for maintainability. - protocol/amneziawg: outbound registering option.AmneziaWGOutboundOptions under C.TypeAmneziaWG. - option.AmneziaWGOutboundOptions: WireGuard fields + AWG obfuscation knobs. - constant: TypeAmneziaWG. amnezia-vpn/amneziawg-go is consumed as a pristine upstream dependency (no fork), so it can be updated independently.
|
Too many files changed for review. ( |
Owner
Author
|
@coderabbitai review |
Owner
Author
|
Wrong base branch (def is divergent, showed 1306 commits). Reopening against 1.12.x — the actual base this work branches from. |
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.
Summary
Adds an amneziawg outbound: an obfuscated WireGuard variant (AmneziaWG) that evades DPI via junk packets (Jc/Jmin/Jmax), randomized packet-size prefixes (S1-S4), magic-header obfuscation (H1-H4), and optional CPS signature packets (I1-I5). With all params zero it behaves like plain WireGuard.
Approach
Consumes
amnezia-vpn/amneziawg-goas a pristine upstream dependency (no fork) and adapts our sing-box transport instead — the divergence fromsagernet/wireguard-gois tiny (oneNewDevicesignature + a couple ofconn.Bindextras), keeping amneziawg-go independently updatable.Changes
constant.TypeAmneziaWG = "amneziawg"option.AmneziaWGOutboundOptions: WireGuard fields + AWG obfuscation knobstransport/amneziawg/: copy oftransport/wireguardwithdevice/conn/tunimports repointed at amneziawg-go (3-argNewDevice); device-stack files kept byte-identical to the wireguard sibling for maintainability. System-interface mixed-stack mode is unsupported (amneziawg-go lacksDevice.InputPacket); the outbound runs gVisor netstack mode.protocol/amneziawg/: the outbound, registering underC.TypeAmneziaWG.Test plan
go build+go vetclean with libcore build tags.Paired with NekoBox app PR hawkff/NekoBoxForAndroid#25.