XTLS/Xray-core · error
failed to create request from:
Error message
failed to create request from:
What it means
Reading the hysteria TCP request header from an accepted connection failed (invalid address/padding length or I/O error within the handshake deadline); the remote address is included and the failure is recorded as an access-rejected event.
Solutions
- Verify the client uses the correct hysteria protocol
- Check handshake timeout and network conditions
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at proxy/hysteria/server.go:141 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/510a9f4727c1d9c6.
Report an issue: GitHub.
Appendix: source
Thrown at proxy/hysteria/server.go:141
}
return dispatcher.DispatchLink(ctx, *addr, &transport.Link{
Reader: reader,
Writer: writer,
})
} else {
sessionPolicy := s.policyManager.ForLevel(inbound.User.Level)
common.Must(conn.SetReadDeadline(time.Now().Add(sessionPolicy.Timeouts.Handshake)))
addr, err := ReadTCPRequest(conn)
if err != nil {
log.Record(&log.AccessMessage{
From: conn.RemoteAddr(),
To: "",
Status: log.AccessRejected,
Reason: err,
})
return errors.New("failed to create request from: ", conn.RemoteAddr()).Base(err)
}
common.Must(conn.SetReadDeadline(time.Time{}))
dest, err := net.ParseDestination("tcp:" + addr)
if err != nil {
return err
}
ctx = log.ContextWithAccessMessage(ctx, &log.AccessMessage{
From: conn.RemoteAddr(),
To: dest,
Status: log.AccessAccepted,
Reason: "",
Email: inbound.User.Email,
})
errors.LogInfo(ctx, "tunnelling request to ", dest)
bufferedWriter := buf.NewBufferedWriter(buf.NewWriter(conn))
err = WriteTCPResponse(bufferedWriter, true, "")View on GitHub (pinned to 7d214f8b09)