tailscale/feature/useproxy/useproxy.go
Brad Fitzpatrick 442a3a779d 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>
2025-09-30 10:25:56 -07:00

19 lines
617 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
// Package useproxy registers support for using system proxies.
package useproxy
import (
"tailscale.com/feature"
"tailscale.com/net/tshttpproxy"
)
func init() {
feature.HookProxyFromEnvironment.Set(tshttpproxy.ProxyFromEnvironment)
feature.HookProxyInvalidateCache.Set(tshttpproxy.InvalidateCache)
feature.HookProxyGetAuthHeader.Set(tshttpproxy.GetAuthHeader)
feature.HookProxySetSelfProxy.Set(tshttpproxy.SetSelfProxy)
feature.HookProxySetTransportGetProxyConnectHeader.Set(tshttpproxy.SetTransportGetProxyConnectHeader)
}