snell: Fix UDP requests to domain destinations

This commit is contained in:
世界
2026-08-30 17:41:46 +08:00
parent 37da1712e0
commit 33e63afb0f
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -189,6 +189,8 @@ func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata ada
func (h *Inbound) newPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) {
metadata.Inbound = h.Tag()
metadata.InboundType = h.Type()
// The snell client in Surge rejects UDP responses with domain addresses.
metadata.UDPDisableDomainUnmapping = true
if len(h.users) > 0 {
userIndex, loaded := auth.UserFromContext[int](ctx)
if !loaded {