diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2025-06-19 10:29:32 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2025-06-19 10:29:32 -0700 |
| commit | f6a1b149df3ff08408a0ad0b2d41f2a7a85200cd (patch) | |
| tree | 0a899dc30b1410b249a0da526f21545f72a8f9ae /derp/derp_server.go | |
| parent | 583f740c0b583081b0c1a39f92e349c49c0c4a41 (diff) | |
| download | tailscale-bradfitz/tinyderpclient.tar.xz tailscale-bradfitz/tinyderpclient.zip | |
Change-Id: Idcc360abdcc723fcf5ccef9d539056c68b7aa2b2
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'derp/derp_server.go')
| -rw-r--r-- | derp/derp_server.go | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/derp/derp_server.go b/derp/derp_server.go index bd67e7eec..1c9c10129 100644 --- a/derp/derp_server.go +++ b/derp/derp_server.go @@ -1,6 +1,8 @@ // Copyright (c) Tailscale Inc & AUTHORS // SPDX-License-Identifier: BSD-3-Clause +//go:build !ts_omit_derpserver + package derp // TODO(crawshaw): with predefined serverKey in clients and HMAC on packets we could skip TLS @@ -60,12 +62,6 @@ import ( // verbosely log whenever DERP drops a packet. var verboseDropKeys = map[key.NodePublic]bool{} -// IdealNodeHeader is the HTTP request header sent on DERP HTTP client requests -// to indicate that they're connecting to their ideal (Region.Nodes[0]) node. -// The HTTP header value is the name of the node they wish they were connected -// to. This is an optional header. -const IdealNodeHeader = "Ideal-Node" - // IdealNodeContextKey is the context key used to pass the IdealNodeHeader value // from the HTTP handler to the DERP server's Accept method. var IdealNodeContextKey = ctxkey.New[string]("ideal-node", "") @@ -1505,13 +1501,6 @@ func (s *Server) noteClientActivity(c *sclient) { dup.sendHistory = append(dup.sendHistory, c) } -type serverInfo struct { - Version int `json:"version,omitempty"` - - TokenBucketBytesPerSecond int `json:",omitempty"` - TokenBucketBytesBurst int `json:",omitempty"` -} - func (s *Server) sendServerInfo(bw *lazyBufioWriter, clientKey key.NodePublic) error { msg, err := json.Marshal(serverInfo{Version: ProtocolVersion}) if err != nil { |
