|
|
@ -18,6 +18,7 @@ import (
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"runtime"
|
|
|
|
"runtime"
|
|
|
|
|
|
|
|
"strconv"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
@ -538,6 +539,14 @@ func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(*NetworkM
|
|
|
|
Hostinfo: resp.Node.Hostinfo,
|
|
|
|
Hostinfo: resp.Node.Hostinfo,
|
|
|
|
PacketFilter: resp.PacketFilter,
|
|
|
|
PacketFilter: resp.PacketFilter,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Temporary (2020-02-21) knob to force debug, during DERP testing:
|
|
|
|
|
|
|
|
if ok, _ := strconv.ParseBool(os.Getenv("DEBUG_FORCE_DERP")); ok {
|
|
|
|
|
|
|
|
c.logf("debug: adding DERP endpoints to all peers")
|
|
|
|
|
|
|
|
for i := range nm.Peers {
|
|
|
|
|
|
|
|
peer := &nm.Peers[i]
|
|
|
|
|
|
|
|
peer.Endpoints = append(peer.Endpoints, "127.3.3.40:1")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
for _, profile := range resp.UserProfiles {
|
|
|
|
for _, profile := range resp.UserProfiles {
|
|
|
|
nm.UserProfiles[profile.ID] = profile
|
|
|
|
nm.UserProfiles[profile.ID] = profile
|
|
|
|
}
|
|
|
|
}
|
|
|
|