mirror of
https://github.com/masterking32/MasterHttpRelayVPN.git
synced 2026-05-18 06:44:35 +03:00
Remove dead initial-payload path from SOCKS connect and align client relay flow
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user