tshttpproxy_linux.go 416 B

123456789101112131415161718192021222324
  1. // Copyright (c) Tailscale Inc & AUTHORS
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. //go:build linux
  4. package tshttpproxy
  5. import (
  6. "net/http"
  7. "net/url"
  8. "tailscale.com/version/distro"
  9. )
  10. func init() {
  11. sysProxyFromEnv = linuxSysProxyFromEnv
  12. }
  13. func linuxSysProxyFromEnv(req *http.Request) (*url.URL, error) {
  14. if distro.Get() == distro.Synology {
  15. return synologyProxyFromConfigCached(req)
  16. }
  17. return nil, nil
  18. }