mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-24 02:31:18 -08:00
tsnet called the serve LocalAPI client and LocalBackend methods unconditionally, so it didn't build with ts_omit_serve, which every minimal feature set includes. Make those methods return feature.ErrUnavailable when serve is omitted, as ListenFunnel and ListenService now do too. Declare tsnet's minimum feature set (netstack) as featuretags.TSNetMin, add cmd/featuretags --tsnet to keep it, and add a test that type-checks tsnet with it and a few other small feature sets. Fixes #22282 Updates #22283 Change-Id: I866fa34d052bfd437b1c9d3309063999d7ebb02c Co-Authored-By: Fredrik Fornwall <[email protected]> Signed-off-by: Brad Fitzpatrick <[email protected]>
47 lines
1.2 KiB
Go
47 lines
1.2 KiB
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build ts_omit_serve
|
|
|
|
// These are temporary (2025-09-13) stubs for when tailscaled is built with the
|
|
// ts_omit_serve build tag, disabling serve.
|
|
//
|
|
// TODO: move serve to a separate package, out of ipnlocal, and delete this
|
|
// file. One step at a time.
|
|
|
|
package ipnlocal
|
|
|
|
import (
|
|
"tailscale.com/feature"
|
|
"tailscale.com/ipn"
|
|
"tailscale.com/tailcfg"
|
|
)
|
|
|
|
const serveEnabled = false
|
|
|
|
type localListener = struct{}
|
|
|
|
func (b *LocalBackend) ServeConfigETag() (ipn.ServeConfigView, string, error) {
|
|
return ipn.ServeConfigView{}, "", feature.ErrUnavailable
|
|
}
|
|
|
|
func (b *LocalBackend) SetServeConfig(config *ipn.ServeConfig, etag string) error {
|
|
return feature.ErrUnavailable
|
|
}
|
|
|
|
func (b *LocalBackend) DeleteForegroundSession(sessionID string) error {
|
|
return nil
|
|
}
|
|
|
|
type funnelFlow = struct{}
|
|
|
|
func (*LocalBackend) hasIngressEnabledLocked() bool { return false }
|
|
func (*LocalBackend) shouldWireInactiveIngressLocked() bool { return false }
|
|
func (*LocalBackend) HasFunnelForHostPort(host string, port uint16) bool {
|
|
return false
|
|
}
|
|
|
|
func (b *LocalBackend) vipServicesFromPrefsLocked(prefs ipn.PrefsView) []*tailcfg.VIPService {
|
|
return nil
|
|
}
|