[client] Implement environment variable handling for Android (#4440)

Some features can only be manipulated via environment variables. With this PR, environment variables can be managed from Android.
This commit is contained in:
Zoltan Papp
2025-09-08 18:42:42 +02:00
committed by GitHub
parent dba7ef667d
commit 7aef0f67df
4 changed files with 63 additions and 4 deletions

View File

@@ -0,0 +1,14 @@
package peer
import (
"os"
"strings"
)
const (
EnvKeyNBForceRelay = "NB_FORCE_RELAY"
)
func isForceRelayed() bool {
return strings.EqualFold(os.Getenv(EnvKeyNBForceRelay), "true")
}