Skip to content
This repository was archived by the owner on Dec 8, 2019. It is now read-only.

Commit 127acfb

Browse files
committed
Use domain instead of IP for default server.
1 parent ca2c4c6 commit 127acfb

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

android/src/main/scala/com/nutomic/ensichat/activities/FirstStartActivity.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class FirstStartActivity extends AppCompatActivity with OnEditorActionListener w
7474
.putBoolean(KeyNotificationSoundsOn, DefaultNotificationSoundsOn)
7575
.putString(KeyScanInterval, DefaultScanInterval.toString)
7676
.putString(KeyMaxConnections, DefaultMaxConnections.toString)
77-
.putString(KeyServers, DefaultServers.mkString(", "))
77+
.putString(KeyServers, DefaultServers)
7878
.apply()
7979

8080
startMainActivity()

core/src/main/scala/com/nutomic/ensichat/core/interfaces/SettingsInterface.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ object SettingsInterface {
2525
val DefaultScanInterval = 15
2626
val DefaultNotificationSoundsOn = true
2727
val DefaultMaxConnections = 1000000
28-
val DefaultServers = Set("46.101.249.188:26344", "46.101.238.107:26344")
28+
// When updating this, be sure to adjust the code in [[InternetInterface.create]].
29+
val DefaultServers = Set("ensichat.nutomic.com:26344").mkString(", ")
2930

3031
}
3132

core/src/main/scala/com/nutomic/ensichat/core/internet/InternetInterface.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class InternetInterface(connectionHandler: ConnectionHandler, crypto: Crypto,
3939
* Initializes and starts discovery and listening.
4040
*/
4141
override def create(): Unit = {
42+
val servers = settings.get(SettingsInterface.KeyServers, "")
43+
.replace("46.101.249.188:26344", SettingsInterface.DefaultServers)
44+
settings.put(SettingsInterface.KeyServers, servers)
45+
4246
FutureHelper {
4347
serverThread.start()
4448
openAllConnections(maxConnections)

server/src/main/scala/com/nutomic/ensichat/server/Main.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ object Main extends App with CallbackInterface {
3838
KeyFolder.mkdirs()
3939
Log.setLogInstance(logInstance)
4040
sys.addShutdownHook(connectionHandler.stop())
41-
settings.put(KeyServers, DefaultServers.mkString(", "))
41+
settings.put(KeyServers, DefaultServers)
4242

4343
val parser = new OptionParser[Config]("ensichat") {
4444
head("ensichat")

0 commit comments

Comments
 (0)