make proxy optional

This commit is contained in:
Abhishek Kondur
2022-11-20 09:35:29 +05:30
parent c54080e150
commit f95306ddbd
19 changed files with 294 additions and 167 deletions

View File

@@ -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
}