feature/featuretags: add build tag to remove captive portal detection

This doesn't yet fully pull it out into a feature/captiveportal package.
This is the usual first step, moving the code to its own files within
the same packages.

Updates #17254

Change-Id: Idfaec839debf7c96f51ca6520ce36ccf2f8eec92
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-09-23 15:49:49 -07:00
committed by Brad Fitzpatrick
parent 4657cbdb11
commit 8fe575409f
9 changed files with 304 additions and 202 deletions
@@ -0,0 +1,13 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
// Code generated by gen.go; DO NOT EDIT.
//go:build ts_omit_captiveportal
package buildfeatures
// HasCaptivePortal is whether the binary was built with support for modular feature "Captive portal detection".
// Specifically, it's whether the binary was NOT built with the "ts_omit_captiveportal" build tag.
// It's a const so it can be used for dead code elimination.
const HasCaptivePortal = false
@@ -0,0 +1,13 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
// Code generated by gen.go; DO NOT EDIT.
//go:build !ts_omit_captiveportal
package buildfeatures
// HasCaptivePortal is whether the binary was built with support for modular feature "Captive portal detection".
// Specifically, it's whether the binary was NOT built with the "ts_omit_captiveportal" build tag.
// It's a const so it can be used for dead code elimination.
const HasCaptivePortal = true
+1
View File
@@ -93,6 +93,7 @@ var Features = map[FeatureTag]FeatureMeta{
"acme": {"ACME", "ACME TLS certificate management", nil},
"aws": {"AWS", "AWS integration", nil},
"bird": {"Bird", "Bird BGP integration", nil},
"captiveportal": {"CaptivePortal", "Captive portal detection", nil},
"capture": {"Capture", "Packet capture", nil},
"cli": {"CLI", "embed the CLI into the tailscaled binary", nil},
"completion": {"Completion", "CLI shell completion", nil},