From 2cf989d3064db551e70b227b38039ae74486c2fb Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:20:00 +0800 Subject: [PATCH] Fix inbound with v2ray transport missing InboundOptions --- protocol/vless/inbound.go | 4 ++++ protocol/vmess/inbound.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/protocol/vless/inbound.go b/protocol/vless/inbound.go index a977f739..f9e505a8 100644 --- a/protocol/vless/inbound.go +++ b/protocol/vless/inbound.go @@ -205,6 +205,10 @@ func (h *inboundTransportHandler) NewConnectionEx(ctx context.Context, conn net. var metadata adapter.InboundContext metadata.Source = source metadata.Destination = destination + //nolint:staticcheck + metadata.InboundDetour = h.listener.ListenOptions().Detour + //nolint:staticcheck + metadata.InboundOptions = h.listener.ListenOptions().InboundOptions h.logger.InfoContext(ctx, "inbound connection from ", metadata.Source) (*Inbound)(h).NewConnectionEx(ctx, conn, metadata, onClose) } diff --git a/protocol/vmess/inbound.go b/protocol/vmess/inbound.go index 0b8c96c6..706beb17 100644 --- a/protocol/vmess/inbound.go +++ b/protocol/vmess/inbound.go @@ -219,6 +219,10 @@ func (h *inboundTransportHandler) NewConnectionEx(ctx context.Context, conn net. var metadata adapter.InboundContext metadata.Source = source metadata.Destination = destination + //nolint:staticcheck + metadata.InboundDetour = h.listener.ListenOptions().Detour + //nolint:staticcheck + metadata.InboundOptions = h.listener.ListenOptions().InboundOptions h.logger.InfoContext(ctx, "inbound connection from ", metadata.Source) (*Inbound)(h).NewConnectionEx(ctx, conn, metadata, onClose) }