Browse Source

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

pull/2/head
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)
.enableFullStreamDecompression()
.apply {
usePlaintext()
useTransportSecurity()
/*
if (lightWalletEndpoint.isSecure) {
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 DEFAULT_PORT = 9067
private const val DEFAULT_PORT = 443
val LightWalletEndpoint.Companion.Mainnet
get() = LightWalletEndpoint(
"lite2.hushpool.is",
DEFAULT_PORT,
isSecure = false
isSecure = true
)
val LightWalletEndpoint.Companion.Testnet
get() = LightWalletEndpoint(
"lite2.hushpool.is",
DEFAULT_PORT,
isSecure = false
isSecure = true
)
val LightWalletEndpoint.Companion.Darkside
get() = LightWalletEndpoint(
COMPUTER_LOCALHOST,
DEFAULT_PORT,
isSecure = false
isSecure = true
)

Loading…
Cancel
Save