From 106a58779dc2caac17c9a3ccc76f1352da7a6560 Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Tue, 17 Jan 2023 22:06:21 +0800 Subject: [PATCH] chore: update quic-go --- go.mod | 2 +- go.sum | 4 ++-- transport/hysteria/core/client.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 56532f53..6aaf9b6b 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/jpillora/backoff v1.0.0 github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 github.com/mdlayher/netlink v1.7.2-0.20221213171556-9881fafed8c7 - github.com/metacubex/quic-go v0.31.1-0.20221127023445-9f0ce65a734e + github.com/metacubex/quic-go v0.31.1-0.20230117135846-c981c4c16e91 github.com/metacubex/sing-shadowsocks v0.1.0 github.com/metacubex/sing-tun v0.1.0 github.com/metacubex/sing-wireguard v0.0.0-20221109114053-16c22adda03c diff --git a/go.sum b/go.sum index 87f9cdaa..b965c336 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,8 @@ github.com/mdlayher/socket v0.4.0 h1:280wsy40IC9M9q1uPGcLBwXpcTQDtoGwVt+BNoITxIw github.com/mdlayher/socket v0.4.0/go.mod h1:xxFqz5GRCUN3UEOm9CZqEJsAbe1C8OwSK46NlmWuVoc= github.com/metacubex/gvisor v0.0.0-20221217030112-bdcd835fd60e h1:3PHqNvIAwYbv9cOQbRFIUgzJ+K6fhV1HHj+Vpg8U7g8= github.com/metacubex/gvisor v0.0.0-20221217030112-bdcd835fd60e/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM= -github.com/metacubex/quic-go v0.31.1-0.20221127023445-9f0ce65a734e h1:RnfC6+sShJ3biU2Q2wuh4FxZ8/3fp1QG+1zAfswVehA= -github.com/metacubex/quic-go v0.31.1-0.20221127023445-9f0ce65a734e/go.mod h1:7NPWVTLiX2Ss9q9gBNZaNHsPqZ3Tg/ApyrXxxUYbl78= +github.com/metacubex/quic-go v0.31.1-0.20230117135846-c981c4c16e91 h1:CGn1ku3QZ/OjJjnRH4eO9jtXegdPQZUJ7y1Y6CppLd0= +github.com/metacubex/quic-go v0.31.1-0.20230117135846-c981c4c16e91/go.mod h1:8VvqBlJaARNcwAE9zrbhKI/I1R5Lu4gqmt3CSGrJl7s= github.com/metacubex/sing-shadowsocks v0.1.0 h1:uGBtNkpy4QFlofaNkJf+iFegeLU11VzTUlkC46FHF8A= github.com/metacubex/sing-shadowsocks v0.1.0/go.mod h1:8pBSYDKVxTtqUtGZyEh4ZpFJXwP6wBVVKrs6oQiOwmQ= github.com/metacubex/sing-tun v0.1.0 h1:iQj0+0WjJynSKAtfv87wOZlVKWl3w9RvkOSkVe9zuMg= diff --git a/transport/hysteria/core/client.go b/transport/hysteria/core/client.go index 5465e3d2..1df14242 100644 --- a/transport/hysteria/core/client.go +++ b/transport/hysteria/core/client.go @@ -406,7 +406,7 @@ func (c *quicPktConn) WriteTo(p []byte, addr string) error { _ = struc.Pack(&msgBuf, &msg) err = c.Session.SendMessage(msgBuf.Bytes()) if err != nil { - if errSize, ok := err.(quic.ErrMessageToLarge); ok { + if errSize, ok := err.(quic.ErrMessageTooLarge); ok { // need to frag msg.MsgID = uint16(rand.Intn(0xFFFF)) + 1 // msgID must be > 0 when fragCount > 1 fragMsgs := fragUDPMessage(msg, int(errSize))