From 7d214f8b094f75322fa3990f8aadad1c912f24f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Wed, 12 Aug 2026 16:38:01 +0800 Subject: [PATCH] WireGuard outbound: Fix `sendThrough` support (#6570) Fixes https://github.com/XTLS/Xray-core/issues/6559 --- app/proxyman/outbound/handler.go | 1 - proxy/wireguard/client.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index 5f4833e9b..8cf2a783a 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -347,7 +347,6 @@ func (h *Handler) SetOutboundGateway(ctx context.Context, ob *session.Outbound) // case addr.Family().IsDomain(): default: ob.Gateway = addr - } } diff --git a/proxy/wireguard/client.go b/proxy/wireguard/client.go index cae846077..59709b4bf 100644 --- a/proxy/wireguard/client.go +++ b/proxy/wireguard/client.go @@ -138,6 +138,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte } ob.Name = "wireguard" ob.CanSpliceCopy = 3 + dialer.SetOutboundGateway(ctx, ob) if err := h.init(ctx); err != nil { return err