From 6dccbb7259e5fbc79a0a2d68905db66912d68f8e Mon Sep 17 00:00:00 2001 From: chenjia404 Date: Wed, 5 Jul 2023 18:26:16 +0800 Subject: [PATCH] 1.18.6:add stun servers --- app/build.gradle | 4 ++-- .../thoughtcrime/securesms/webrtc/PeerConnectionWrapper.kt | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 016ae0ca9a8..6505636cf57 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -162,8 +162,8 @@ dependencies { testImplementation 'org.robolectric:shadows-multidex:4.4' } -def canonicalVersionCode = 356 -def canonicalVersionName = "1.18.5" +def canonicalVersionCode = 357 +def canonicalVersionName = "1.18.6" def postFixSize = 10 def abiPostFix = ['armeabi-v7a' : 1, diff --git a/app/src/main/java/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.kt b/app/src/main/java/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.kt index 26d8fc223d3..ea5c0696589 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/webrtc/PeerConnectionWrapper.kt @@ -49,11 +49,8 @@ class PeerConnectionWrapper(private val context: Context, private var isInitiator = false private fun initPeerConnection() { - val random = SecureRandom().asKotlinRandom() - val iceServers = listOf("freyr","fenrir","frigg","angus","hereford","holstein", "brahman").shuffled(random).take(2).map { sub -> - PeerConnection.IceServer.builder("turn:$sub.getsession.org") - .setUsername("session202111") - .setPassword("053c268164bc7bd7") + val iceServers = listOf("stun:stun.qq.com:3478","stun:stun.newrocktech.com:3478","stun:stun.miwifi.com:3478","stun:stun.syncthing.net:3478","stun:stun1.l.google.com:19302","stun:stun.ethtweet.io:3478").map { sub -> + PeerConnection.IceServer.builder(sub) .createIceServer() }