From 60e2d94df91258d249d9093699ed99b660566d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 18 Dec 2025 22:47:51 +0800 Subject: [PATCH] Fix naive network --- protocol/naive/outbound.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/protocol/naive/outbound.go b/protocol/naive/outbound.go index ebaf373d9..8bda26ec1 100644 --- a/protocol/naive/outbound.go +++ b/protocol/naive/outbound.go @@ -204,8 +204,14 @@ func NewOutbound(ctx context.Context, router adapter.Router, logger log.ContextL Version: uotOptions.Version, } } + var networks []string + if uotClient != nil { + networks = []string{N.NetworkTCP, N.NetworkUDP} + } else { + networks = []string{N.NetworkTCP} + } return &Outbound{ - Adapter: outbound.NewAdapterWithDialerOptions(C.TypeNaive, tag, []string{N.NetworkTCP}, options.DialerOptions), + Adapter: outbound.NewAdapterWithDialerOptions(C.TypeNaive, tag, networks, options.DialerOptions), ctx: ctx, logger: logger, client: client,