mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-10-10 04:03:11 +08:00
fix: reduce PROTOCOL_VIOLATION errors on masque dialing by setting ConnectionIDLength
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user