STUN/TURN Server URI schemes 'stuns' and 'turns' are not currently supported
This commit is contained in:
@@ -340,7 +340,7 @@ class AccountActivity : AppCompatActivity() {
|
||||
if (((mediaNat == "stun") || (mediaNat == "ice")) && (newStunServer == ""))
|
||||
newStunServer = resources.getString(R.string.stun_server_default)
|
||||
if (!Utils.checkStunUri(newStunServer) ||
|
||||
((mediaNat == "turn") && !newStunServer.startsWith("turn"))) {
|
||||
((mediaNat == "turn") && !newStunServer.startsWith("turn:"))) {
|
||||
Utils.alertView(this, getString(R.string.notice),
|
||||
String.format(getString(R.string.invalid_stun_server), newStunServer))
|
||||
return false
|
||||
|
||||
@@ -125,8 +125,7 @@ object Utils {
|
||||
}
|
||||
|
||||
fun checkStunUri(uri: String): Boolean {
|
||||
if (!uri.startsWith("stun:") && !uri.startsWith("stuns:") &&
|
||||
!uri.startsWith("turn:") && !uri.startsWith("turns:"))
|
||||
if (!uri.startsWith("stun:") && !uri.startsWith("turn:"))
|
||||
return false
|
||||
return checkHostPort(uri.substringAfter(":"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user