mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-10 19:46:30 -04:00
19 lines
244 B
Go
19 lines
244 B
Go
package peer
|
|
|
|
import (
|
|
"os"
|
|
"runtime"
|
|
"strings"
|
|
)
|
|
|
|
const (
|
|
EnvKeyNBForceRelay = "NB_FORCE_RELAY"
|
|
)
|
|
|
|
func isForceRelayed() bool {
|
|
if runtime.GOOS == "js" {
|
|
return true
|
|
}
|
|
return strings.EqualFold(os.Getenv(EnvKeyNBForceRelay), "true")
|
|
}
|