1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-07 19:40:30 +08:00

TUN-9883: Add new datagram v3 feature flag

After the previous rollout was reverted, the original `support_datagram_v3_1` is deprecated and replaced with
`support_datagram_v3_2`.

Closes TUN-9883
This commit is contained in:
Devin Carr
2025-10-10 13:55:31 -07:00
parent d78e64c8cc
commit 1ac6c45dad
4 changed files with 22 additions and 13 deletions

View File

@@ -23,9 +23,10 @@ const (
// If the TXT record is missing a key, the field will unmarshal to the default Go value
type featuresRecord struct {
DatagramV3Percentage uint32 `json:"dv3_1"`
DatagramV3Percentage uint32 `json:"dv3_2"`
// DatagramV3Percentage int32 `json:"dv3"` // Removed in TUN-9291
// DatagramV3Percentage uint32 `json:"dv3_1"` // Removed in TUN-9883
// PostQuantumPercentage int32 `json:"pq"` // Removed in TUN-7970
}
@@ -105,7 +106,7 @@ func (fs *featureSelector) postQuantumMode() PostQuantumMode {
func (fs *featureSelector) datagramVersion() DatagramVersion {
// If user provides the feature via the cli, we take it as priority over remote feature evaluation
if slices.Contains(fs.cliFeatures, FeatureDatagramV3_1) {
if slices.Contains(fs.cliFeatures, FeatureDatagramV3_2) {
return DatagramV3
}
// If the user specifies DatagramV2, we also take that over remote