mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-10 19:20:42 +08:00
make proxy optional
This commit is contained in:
@@ -672,3 +672,13 @@ func GetStunPort() string {
|
||||
}
|
||||
return port
|
||||
}
|
||||
|
||||
func IsProxyEnabled() bool {
|
||||
var enabled = true //default
|
||||
if os.Getenv("PROXY") != "" {
|
||||
enabled = os.Getenv("PROXY") == "on"
|
||||
} else if config.Config.Server.Proxy != "" {
|
||||
enabled = config.Config.Server.Proxy == "on"
|
||||
}
|
||||
return enabled
|
||||
}
|
||||
|
Reference in New Issue
Block a user