wgengine/magicsock: move debug knobs to their own file, compile out on iOS

No need for these knobs on iOS where you can set the environment
variables anyway.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-08-15 13:20:44 -07:00
parent 98d557dd24
commit 39610aeb09
3 changed files with 73 additions and 40 deletions
+20
View File
@@ -0,0 +1,20 @@
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package magicsock
// All knobs are disabled on iOS.
// Further, they're const, so the toolchain can produce smaller binaries.
const (
logPacketDests = false
debugDisco = false
debugOmitLocalAddresses = false
debugUseDerpRouteEnv = ""
debugUseDerpRoute = false
logDerpVerbose = false
debugReSTUNStopOnIdle = false
debugAlwaysDERP = false
)
func inTest() bool { return false }