From b9894451f93164b5ff5abe326b45c1ff266ff2eb Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Thu, 30 Jul 2026 09:13:03 +0800 Subject: [PATCH] fix: reduce PROTOCOL_VIOLATION errors on masque dialing by setting ConnectionIDLength --- adapter/outbound/masque.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adapter/outbound/masque.go b/adapter/outbound/masque.go index da65e020..4458d03a 100644 --- a/adapter/outbound/masque.go +++ b/adapter/outbound/masque.go @@ -263,7 +263,8 @@ func NewMasque(option MasqueOption) (*Masque, error) { } func (w *Masque) dialQuic(ctx context.Context) (net.PacketConn, *quic.Conn, error) { - pc, quicConn, err := common.DialQuic(ctx, w.addr, w.DialOptions(), w.dialer, w.tlsConfig, w.quicConfig, common.DialQuicOption{}) + // without ConnectionIDLength set, backend occasionally throws PROTOCOL_VIOLATION and that closes our connection + pc, quicConn, err := common.DialQuic(ctx, w.addr, w.DialOptions(), w.dialer, w.tlsConfig, w.quicConfig, common.DialQuicOption{ConnectionIDLength: 20}) if err != nil { return nil, nil, err }