Add support for sgnl:// proxy deep links.

This commit is contained in:
Greyson Parrelli
2021-02-03 14:09:38 -05:00
parent 64fe78ff9a
commit 524f3d6d08
3 changed files with 53 additions and 2 deletions

View File

@@ -103,11 +103,17 @@ public final class SignalProxyUtil {
* If this is a valid proxy deep link, this will return the embedded host. If not, it will return
* null.
*/
public static @Nullable String parseHostFromProxyDeepLink(@NonNull String proxyLink) {
public static @Nullable String parseHostFromProxyDeepLink(@Nullable String proxyLink) {
if (proxyLink == null) {
return null;
}
try {
URI uri = new URI(proxyLink);
if (!"https".equalsIgnoreCase(uri.getScheme())) {
if (!"https".equalsIgnoreCase(uri.getScheme()) &&
!"sgnl".equalsIgnoreCase(uri.getScheme()))
{
return null;
}