Remove dead initial-payload path from SOCKS connect and align client relay flow

This commit is contained in:
Amin.MasterkinG
2026-04-21 14:04:01 +03:30
parent 22f13fb234
commit 8a50614510
4 changed files with 3 additions and 21 deletions
-10
View File
@@ -8,7 +8,6 @@ package client
import (
"context"
"encoding/hex"
"net"
"sync"
"sync/atomic"
@@ -27,7 +26,6 @@ type SOCKSConnection struct {
TargetHost string
TargetPort uint16
TargetAddressType byte
InitialPayload []byte
BufferedBytes int
NextSequence uint64
SOCKSAuthMethod byte
@@ -61,13 +59,6 @@ type PendingInboundPacket struct {
QueuedAt time.Time
}
func (s *SOCKSConnection) InitialPayloadHex() string {
if len(s.InitialPayload) == 0 {
return ""
}
return hex.EncodeToString(s.InitialPayload)
}
type SOCKSConnectionStore struct {
nextID atomic.Uint64
mu sync.RWMutex
@@ -206,7 +197,6 @@ func (s *SOCKSConnection) ResetTransportState() {
clear(s.InFlight)
s.queueMu.Unlock()
s.InitialPayload = nil
s.BufferedBytes = 0
s.reorderMu.Lock()
clear(s.PendingInbound)