|
|
@ -483,6 +483,7 @@ func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(*NetworkM
|
|
|
|
Endpoints: ep,
|
|
|
|
Endpoints: ep,
|
|
|
|
Stream: allowStream,
|
|
|
|
Stream: allowStream,
|
|
|
|
Hostinfo: hostinfo,
|
|
|
|
Hostinfo: hostinfo,
|
|
|
|
|
|
|
|
DebugForceDisco: Debug.ForceDisco,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if c.newDecompressor != nil {
|
|
|
|
if c.newDecompressor != nil {
|
|
|
|
request.Compress = "zstd"
|
|
|
|
request.Compress = "zstd"
|
|
|
@ -785,14 +786,20 @@ type debug struct {
|
|
|
|
NetMap bool
|
|
|
|
NetMap bool
|
|
|
|
OnlyDisco bool
|
|
|
|
OnlyDisco bool
|
|
|
|
Disco bool
|
|
|
|
Disco bool
|
|
|
|
|
|
|
|
ForceDisco bool // ask control server to not filter out our disco key
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func initDebug() debug {
|
|
|
|
func initDebug() debug {
|
|
|
|
return debug{
|
|
|
|
d := debug{
|
|
|
|
NetMap: envBool("TS_DEBUG_NETMAP"),
|
|
|
|
NetMap: envBool("TS_DEBUG_NETMAP"),
|
|
|
|
OnlyDisco: os.Getenv("TS_DEBUG_USE_DISCO") == "only",
|
|
|
|
OnlyDisco: os.Getenv("TS_DEBUG_USE_DISCO") == "only",
|
|
|
|
Disco: os.Getenv("TS_DEBUG_USE_DISCO") == "only" || envBool("TS_DEBUG_USE_DISCO"),
|
|
|
|
ForceDisco: os.Getenv("TS_DEBUG_USE_DISCO") == "only" || envBool("TS_DEBUG_USE_DISCO"),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if d.ForceDisco || os.Getenv("TS_DEBUG_USE_DISCO") == "" {
|
|
|
|
|
|
|
|
// This is now defaults to on.
|
|
|
|
|
|
|
|
d.Disco = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return d
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func envBool(k string) bool {
|
|
|
|
func envBool(k string) bool {
|
|
|
|