mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 22:10:05 +00:00
TUN-7333: Default features checkable at runtime across all packages
This commit is contained in:
29
features/features.go
Normal file
29
features/features.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package features
|
||||
|
||||
const (
|
||||
FeatureSerializedHeaders = "serialized_headers"
|
||||
FeatureQuickReconnects = "quick_reconnects"
|
||||
FeatureAllowRemoteConfig = "allow_remote_config"
|
||||
FeatureDatagramV2 = "support_datagram_v2"
|
||||
FeaturePostQuantum = "postquantum"
|
||||
FeatureQUICSupportEOF = "support_quic_eof"
|
||||
FeatureManagementLogs = "management_logs"
|
||||
)
|
||||
|
||||
var (
|
||||
DefaultFeatures = []string{
|
||||
FeatureAllowRemoteConfig,
|
||||
FeatureSerializedHeaders,
|
||||
FeatureDatagramV2,
|
||||
FeatureQUICSupportEOF,
|
||||
}
|
||||
)
|
||||
|
||||
func Contains(feature string) bool {
|
||||
for _, f := range DefaultFeatures {
|
||||
if f == feature {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user