XTLS/Xray-core · error
client handshake
Error message
client handshake
What it means
Shadowsocks-2022 outbound Process could not send the zero-length initial write used to trigger the early-data handshake when no payload was available; the chained error means the server connection failed at handshake initiation.
Solutions
- Inspect .Base(err) for the underlying connection error
- Verify server availability and key correctness
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at proxy/shadowsocks_2022/outbound.go:121 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/e7386be579fd2b28.
Report an issue: GitHub.
Appendix: source
Thrown at proxy/shadowsocks_2022/outbound.go:121
payload.Truncate(n)
_, err = serverConn.Write(payload.Bytes())
if err != nil {
payload.Release()
return errors.New("write payload").Base(err)
}
handshake = true
}
if nb.IsEmpty() {
break
}
mb = nb
}
payload.Release()
}
if !handshake {
_, err = serverConn.Write(nil)
if err != nil {
return errors.New("client handshake").Base(err)
}
}
return singbridge.CopyConn(ctx, inboundConn, link, serverConn)
} else {
var packetConn N.PacketConn
if pc, isPacketConn := inboundConn.(N.PacketConn); isPacketConn {
packetConn = pc
} else if nc, isNetPacket := inboundConn.(net.PacketConn); isNetPacket {
packetConn = bufio.NewPacketConn(nc)
} else {
packetConn = &singbridge.PacketConnWrapper{
Reader: link.Reader,
Writer: link.Writer,
Conn: inboundConn,
Dest: destination,
T: signal.CancelAfterInactivity(ctx, func() {
common.Interrupt(link.Reader)
}, 300*time.Second),View on GitHub (pinned to 7d214f8b09)