diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 23ed85e2e..bff6eaabe 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -6,6 +6,7 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" + android:networkSecurityConfig="@xml/network_security_config" android:theme="@style/AppTheme"> + + + + 54.197.36.175 + amazonaws.com + + diff --git a/capacitor.config.ts b/capacitor.config.ts index 21f0c8902..796c6e143 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -11,6 +11,14 @@ const config: CapacitorConfig = { SplashScreen: { androidScaleType: 'CENTER_CROP' // fix logo stretching } + }, + android: { + // This option allows making requests from HTTPS to HTTP. + // Android 9.0 (Pie) introduced restrictions on cleartext (HTTP) traffic, which is enabled by default. + // Even allowing mixed content, the app will still block these requests due to cleartext restrictions. + // To bypass this, we have a whitelist of HTTP domains/IPs. + // See android/app/src/main/res/xml/network_security_config.xml + allowMixedContent: true } } diff --git a/src/config/development.json b/src/config/development.json index 752513556..6e45b44ad 100644 --- a/src/config/development.json +++ b/src/config/development.json @@ -52,6 +52,18 @@ }, { "url": "https://dschubba.adm.im" + }, + { + "url": "http://ec2-54-197-36-175.compute-1.amazonaws.com:36666" + }, + { + "url": "http://54.197.36.175:36666" + }, + { + "url": "http://54.197.36.175:46666" + }, + { + "url": "http://54.197.36.175:56666" } ], "healthCheck": { @@ -216,4 +228,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/config/production.json b/src/config/production.json index eccf19824..22f94a651 100644 --- a/src/config/production.json +++ b/src/config/production.json @@ -51,6 +51,18 @@ }, { "url": "https://dschubba.adm.im" + }, + { + "url": "http://ec2-54-197-36-175.compute-1.amazonaws.com:36666" + }, + { + "url": "http://54.197.36.175:36666" + }, + { + "url": "http://54.197.36.175:46666" + }, + { + "url": "http://54.197.36.175:56666" } ], "healthCheck": { @@ -216,4 +228,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/lib/nodes/abstract.node.ts b/src/lib/nodes/abstract.node.ts index 05e019ffc..79eb3ed13 100644 --- a/src/lib/nodes/abstract.node.ts +++ b/src/lib/nodes/abstract.node.ts @@ -112,7 +112,7 @@ export abstract class Node { this.hostname = new URL(url).hostname this.minNodeVersion = minNodeVersion this.version = version - this.hasSupportedProtocol = !(this.protocol === 'http:' && appProtocol === 'https:') + this.hasSupportedProtocol = true // @todo add option: Enable HTTP nodes this.active = nodesStorage.isActive(url) this.client = this.buildClient()