Зеркало Leadaxe/wireguard-go-awg2-lx — сабмодуль ядра sing-box-lx (AmneziaWG). GPLv3.
Find a file
Leadaxe 9a23f36748 lx: re-graft egress-provider API onto AWG2 base (upstream 6f5e8b1947)
Upstream wireguard-go added an EgressProvider hook to StdNetBind (egress
anchoring for TUN auto-redirect): EgressProvider interface, egressProvider
field, SetEgressProvider, plus egress branches in Open/Send/Close and a
standardEndpoint cast hoist in Send. sing-box's endpoint-listen refactor
now calls StdNetBind.SetEgressProvider, so our AWG2 fork (which was one
wireguard-go revision behind) failed to build.

Applied the upstream delta to conn/bind_std.go verbatim, then re-applied
SPEC 026: gate BOTH reserved-clear sites behind hasReserved() —

  - main receiveIP path (msg.N > 3 && s.hasReserved())    [existing]
  - NEW egress receive path (dataLength > 3 && s.hasReserved())

Upstream's egress hook re-introduced an UNCONDITIONAL common.ClearArray(
bufs[0][1:4]) — the exact anti-pattern SPEC 026 fixed. Gating it keeps a
small-padding AmneziaWG magic (bytes 1-3) intact when no WARP reserved
value is set, and STILL fires for WARP-over-egress: the egress bind is
only created on the isUDPListener path, where SetReservedForEndpoint is
called for every peer, so hasReserved() is true in that scenario. Verified:
WARP egress unaffected, AWG magic survives, conn tests green.

reservedForEndpoint is populated before receive goroutines start and never
mutated after (same lock-free invariant SPEC 026 already relies on).
2026-08-05 16:55:31 +03:00
conn lx: re-graft egress-provider API onto AWG2 base (upstream 6f5e8b1947) 2026-08-05 16:55:31 +03:00
device lx: gate reserved-byte clear on receive so AmneziaWG magic survives 2026-08-05 16:55:02 +03:00
ipc Rename module 2026-05-17 20:09:28 +08:00
ratelimiter Remove unused 2026-05-17 20:04:34 +08:00
replay Remove unused 2026-05-17 20:04:34 +08:00
rwcancel rwcancel: fix wrong poll event flag on ReadyWrite 2025-05-05 15:10:08 +02:00
tai64n Remove unused 2026-05-17 20:04:34 +08:00
tun Apply Tailscale TUN offload APIs 2026-05-17 20:36:35 +08:00
.gitignore Update .gitignore 2026-05-17 20:02:24 +08:00
go.mod device: add API for on-demand configuration of peers 2026-08-04 19:06:30 +08:00
go.sum Add pause support 2026-05-17 20:36:45 +08:00
LICENSE mod: rename COPYING to LICENSE 2021-03-06 09:09:21 -07:00
Makefile Makefile: don't use test -v because it hides failures in scrollback 2021-11-16 21:07:31 +01:00
reformat.sh Add module rename script 2026-05-17 20:02:24 +08:00
remove-unused.sh Add remove unused script 2026-05-17 20:02:24 +08:00
rename-module.sh Add module rename script 2026-05-17 20:02:24 +08:00
version.go version: bump snapshot 2025-05-22 01:45:02 +02:00