Random server support
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package cash.z.ecc.android.ext
|
package cash.z.ecc.android.ext
|
||||||
|
|
||||||
import cash.z.ecc.android.BuildConfig
|
import cash.z.ecc.android.BuildConfig
|
||||||
|
import kotlin.random.Random
|
||||||
|
|
||||||
object Const {
|
object Const {
|
||||||
/**
|
/**
|
||||||
@@ -45,8 +46,19 @@ object Const {
|
|||||||
*/
|
*/
|
||||||
object Default {
|
object Default {
|
||||||
object Server {
|
object Server {
|
||||||
// If you've forked the ECC repo, change this to your hosted lightwalletd instance
|
// Select a random server from list
|
||||||
const val HOST = BuildConfig.DEFAULT_SERVER_URL
|
private val serverList = listOf(
|
||||||
|
"lite.hush.is",
|
||||||
|
"lite.hushpool.is",
|
||||||
|
"wtfistheinternet.hush.is",
|
||||||
|
"lite2.hush.is",
|
||||||
|
"poop.granitefone.me",
|
||||||
|
"lite2.hushpool.is"
|
||||||
|
)
|
||||||
|
private val randomIndex = Random.nextInt(serverList.size);
|
||||||
|
private val randomServer = serverList[randomIndex]
|
||||||
|
|
||||||
|
val HOST = randomServer
|
||||||
const val PORT = 443
|
const val PORT = 443
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user