mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2026-10-14 05:41:54 +00:00
[PR #136] [MERGED] Fallback + tuntests #159
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-go#159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-go/pull/136
Author: @FrogRocky
Created: 5/7/2026
Status: ✅ Merged
Merged: 5/11/2026
Merged by: @ygurov
Base:
experimental← Head:experimental-fallback📝 Commits (2)
5c71040feat: add conceal fallback port proxying90add63fix(conn): route UDP conceal format errors to fallback📊 Changes
20 files changed (+1316 additions, -80 deletions)
View changed files
📝
README.md(+7 -0)📝
conceal/conn_framed.go(+22 -13)📝
conceal/conn_prelude.go(+13 -0)➕
conceal/errors.go(+45 -0)➕
conceal/format_error_test.go(+44 -0)📝
conceal/rule.go(+77 -12)📝
conceal/udp_datagram_pipeline.go(+17 -4)📝
conn/bind_std.go(+8 -0)📝
conn/bind_stream.go(+24 -9)📝
conn/conceal.go(+18 -0)📝
conn/conceal_pipeline_test.go(+6 -18)➕
conn/fallback.go(+336 -0)➕
conn/fallback_test.go(+198 -0)📝
conn/udp_conceal_bind.go(+142 -2)📝
device/device.go(+5 -0)📝
device/device_test.go(+213 -1)📝
device/uapi.go(+20 -0)➕
device/uapi_fallback_test.go(+35 -0)📝
outline/fallback.go(+26 -21)📝
tun/tuntest/tuntest.go(+60 -0)📄 Description
Summary
This PR completes fallback coverage for both TCP and UDP conceal paths and fixes the missing UDP fallback behavior in the current default bind stack.
TCP fallback already existed in
BindStream: when the TCP conceal pipeline returnsconceal.ErrFormat, the stream is proxied to the configured fallback TCP port and data is copied both ways. This PR keeps that behavior and adds device-level coverage for it.UDP fallback existed at the lower
StdNetBind/conn wrapper level, but the current default UDP path decodes conceal traffic inConcealBind. Invalid UDP conceal packets were decoded there and then silently dropped before the lower fallback wrapper could see the format error. This PR makes UDP datagram decoding preserveconceal.ErrFormatand teachesConcealBindto route those invalid datagrams to the configured fallback UDP port.Changes
DecodeInPlaceErrtoUDPDatagramPipelineso UDP conceal decode failures can be surfaced as typed errors instead of onlyfalse.conceal.ErrFormatwhere appropriate, preserving the original bytes for fallback forwarding.ConcealBindimplementFallbackable.ConcealBind:FallbackPorttun/tuntest.tuntestcoverage for:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.