From bb11168fdaaf142922ebb58d8831f3577b728805 Mon Sep 17 00:00:00 2001 From: Meo597 <197331664+Meo597@users.noreply.github.com> Date: Wed, 2 Sep 2026 06:57:24 +0800 Subject: [PATCH] Remove unused session.Outbound.Conn --- app/proxyman/outbound/handler.go | 8 -------- common/session/session.go | 2 -- proxy/vless/outbound/outbound.go | 2 -- 3 files changed, 12 deletions(-) diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index b25fbecc4..021620c51 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -194,7 +194,6 @@ func (h *Handler) Dispatch(ctx context.Context, link *transport.Link) { common.Interrupt(link.Reader) return } - } else { unchangedDomain := ob.Target.Address.Domain() ob.Target.Address = net.IPAddress(ips[dice.Roll(len(ips))]) @@ -275,13 +274,6 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (stat.Connecti conn, err := internet.Dial(ctx, dest, h.streamSettings) conn = h.getStatCouterConnection(conn) - outbounds := session.OutboundsFromContext(ctx) - if outbounds != nil { - ob := outbounds[len(outbounds)-1] - ob.Conn = conn - } else { - // for Vision's pre-connect - } return conn, err } diff --git a/common/session/session.go b/common/session/session.go index 674f44372..8d47bd77b 100644 --- a/common/session/session.go +++ b/common/session/session.go @@ -70,8 +70,6 @@ type Outbound struct { Tag string // Name of the outbound proxy that handles the connection. Name string - // Unused. Conn is actually internet.Connection. May be nil. - Conn net.Conn // CanSpliceCopy is a property for this connection // 1 = can, 2 = after processing protocol info should be able to, 3 = cannot CanSpliceCopy int diff --git a/proxy/vless/outbound/outbound.go b/proxy/vless/outbound/outbound.go index ac087c637..6a013dae2 100644 --- a/proxy/vless/outbound/outbound.go +++ b/proxy/vless/outbound/outbound.go @@ -202,8 +202,6 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte } defer conn.Close() - ob.Conn = conn // for Vision's pre-connect - iConn := stat.TryUnwrapStatsConn(conn) target := ob.Target errors.LogInfo(ctx, "tunneling request to ", target, " via ", rec.Destination.NetAddr())