Hysteria outbound: Fix UDP DATAGRAM truncation with ChromeParrot (#6788)

https://github.com/XTLS/Xray-core/pull/6788#issuecomment-5751428127

---------

Co-authored-by: LjhAUMEM <llnu14702@gmail.com>
This commit is contained in:
Жора Змейкин
2026-09-20 22:51:03 +00:00
committed by GitHub
co-authored by LjhAUMEM
parent dbb1ea30ba
commit d562d8947d
2 changed files with 168 additions and 3 deletions
+3 -3
View File
@@ -236,14 +236,14 @@ type UDPReader struct {
func (r *UDPReader) ReadFrom(p []byte) (n int, addr *net.Destination, err error) {
for {
var buf [hysteria.MaxDatagramFrameSize]byte
var packet [1500]byte
n, err := r.reader.Read(buf[:])
n, err := r.reader.Read(packet[:])
if err != nil {
return 0, nil, err
}
msg, err := ParseUDPMessage(buf[:n])
msg, err := ParseUDPMessage(packet[:n])
if err != nil {
continue
}