client update of TURNs and STUNs (#106)

* feature: update STUNs and TURNs in engine

* fix: setup TURN credentials request only when refresh enabled

* feature: update TURNs and STUNs in teh client app on Management update

* chore: disable peer reflexive candidates in ICE

* chore: relocate management.json

* chore: make TURN secret and pwd plain text in config
This commit is contained in:
Mikhail Bragin
2021-09-03 17:47:40 +02:00
committed by GitHub
parent 81c5aa1341
commit a4db0b4e94
10 changed files with 129 additions and 87 deletions

View File

@@ -92,7 +92,9 @@ func (s *Server) Sync(req *proto.EncryptedMessage, srv proto.ManagementService_S
log.Warnf("failed marking peer as connected %s %v", peerKey, err)
}
s.turnCredentialsManager.SetupRefresh(peerKey.String())
if s.config.TURNConfig.TimeBasedCredentials {
s.turnCredentialsManager.SetupRefresh(peerKey.String())
}
// keep a connection to the peer and send updates when available
for {
select {