mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-02 07:36:47 +00:00
fix: reduce PROTOCOL_VIOLATION errors on masque dialing by setting ConnectionIDLength
This commit is contained in:
1 parent
98f1200d0d
commit
b9894451f9
1 file changed
+2
-1
@@ -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