Browse Source

Port and related changes for secure connections with nginx as reverse proxy

drgx
fekt 2 years ago
parent
commit
6b3cc20054
  1. 2
      sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/service/LightWalletGrpcService.kt
  2. 8
      sdk-lib/src/main/java/cash/z/ecc/android/sdk/model/LightWalletEndpointExt.kt

2
sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/service/LightWalletGrpcService.kt

@ -163,7 +163,7 @@ class LightWalletGrpcService private constructor(
.context(appContext) .context(appContext)
.enableFullStreamDecompression() .enableFullStreamDecompression()
.apply { .apply {
usePlaintext() useTransportSecurity()
/* /*
if (lightWalletEndpoint.isSecure) { if (lightWalletEndpoint.isSecure) {
useTransportSecurity() useTransportSecurity()

8
sdk-lib/src/main/java/cash/z/ecc/android/sdk/model/LightWalletEndpointExt.kt

@ -20,25 +20,25 @@ fun LightWalletEndpoint.Companion.defaultForNetwork(zcashNetwork: ZcashNetwork):
*/ */
private const val COMPUTER_LOCALHOST = "10.0.2.2" private const val COMPUTER_LOCALHOST = "10.0.2.2"
private const val DEFAULT_PORT = 9067 private const val DEFAULT_PORT = 443
val LightWalletEndpoint.Companion.Mainnet val LightWalletEndpoint.Companion.Mainnet
get() = LightWalletEndpoint( get() = LightWalletEndpoint(
"lite2.hushpool.is", "lite2.hushpool.is",
DEFAULT_PORT, DEFAULT_PORT,
isSecure = false isSecure = true
) )
val LightWalletEndpoint.Companion.Testnet val LightWalletEndpoint.Companion.Testnet
get() = LightWalletEndpoint( get() = LightWalletEndpoint(
"lite2.hushpool.is", "lite2.hushpool.is",
DEFAULT_PORT, DEFAULT_PORT,
isSecure = false isSecure = true
) )
val LightWalletEndpoint.Companion.Darkside val LightWalletEndpoint.Companion.Darkside
get() = LightWalletEndpoint( get() = LightWalletEndpoint(
COMPUTER_LOCALHOST, COMPUTER_LOCALHOST,
DEFAULT_PORT, DEFAULT_PORT,
isSecure = false isSecure = true
) )