feature, net/tshttpproxy: pull out support for using proxies as a feature

Saves 139 KB.

Also Synology support, which I saw had its own large-ish proxy parsing
support on Linux, but support for proxies without Synology proxy
support is reasonable, so I pulled that out as its own thing.

Updates #12614

Change-Id: I22de285a3def7be77fdcf23e2bec7c83c9655593
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-09-30 09:12:42 -07:00
committed by Brad Fitzpatrick
parent 9b997c8f2f
commit 442a3a779d
45 changed files with 267 additions and 79 deletions
@@ -7,7 +7,7 @@
package buildfeatures
// HasOutboundProxy is whether the binary was built with support for modular feature "Outbound localhost HTTP/SOCK5 proxy support".
// HasOutboundProxy is whether the binary was built with support for modular feature "Support running an outbound localhost HTTP/SOCK5 proxy support that sends traffic over Tailscale".
// Specifically, it's whether the binary was NOT built with the "ts_omit_outboundproxy" build tag.
// It's a const so it can be used for dead code elimination.
const HasOutboundProxy = false
@@ -7,7 +7,7 @@
package buildfeatures
// HasOutboundProxy is whether the binary was built with support for modular feature "Outbound localhost HTTP/SOCK5 proxy support".
// HasOutboundProxy is whether the binary was built with support for modular feature "Support running an outbound localhost HTTP/SOCK5 proxy support that sends traffic over Tailscale".
// Specifically, it's whether the binary was NOT built with the "ts_omit_outboundproxy" build tag.
// It's a const so it can be used for dead code elimination.
const HasOutboundProxy = true
@@ -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_synology
package buildfeatures
// HasSynology is whether the binary was built with support for modular feature "Synology NAS integration (applies to Linux builds only)".
// Specifically, it's whether the binary was NOT built with the "ts_omit_synology" build tag.
// It's a const so it can be used for dead code elimination.
const HasSynology = 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_synology
package buildfeatures
// HasSynology is whether the binary was built with support for modular feature "Synology NAS integration (applies to Linux builds only)".
// Specifically, it's whether the binary was NOT built with the "ts_omit_synology" build tag.
// It's a const so it can be used for dead code elimination.
const HasSynology = true
@@ -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_useproxy
package buildfeatures
// HasUseProxy is whether the binary was built with support for modular feature "Support using system proxies as specified by env vars or the system configuration to reach Tailscale servers.".
// Specifically, it's whether the binary was NOT built with the "ts_omit_useproxy" build tag.
// It's a const so it can be used for dead code elimination.
const HasUseProxy = 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_useproxy
package buildfeatures
// HasUseProxy is whether the binary was built with support for modular feature "Support using system proxies as specified by env vars or the system configuration to reach Tailscale servers.".
// Specifically, it's whether the binary was NOT built with the "ts_omit_useproxy" build tag.
// It's a const so it can be used for dead code elimination.
const HasUseProxy = true