github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/transport/internet/quic/quic.go (about)

     1  package quic
     2  
     3  import (
     4  	"github.com/v2fly/v2ray-core/v5/common"
     5  	"github.com/v2fly/v2ray-core/v5/transport/internet"
     6  )
     7  
     8  //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
     9  
    10  // Here is some modification needs to be done before update quic vendor.
    11  // * use bytespool in buffer_pool.go
    12  // * set MaxReceivePacketSize to 1452 - 32 (16 bytes auth, 16 bytes head)
    13  //
    14  //
    15  
    16  const (
    17  	protocolName   = "quic"
    18  	internalDomain = "quic.internal.v2fly.org"
    19  )
    20  
    21  func init() {
    22  	common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
    23  		return new(Config)
    24  	}))
    25  }