From f7f1052246b4ef8ef6d01296e2ebfe3b57bbf23c Mon Sep 17 00:00:00 2001 From: Alex Bakon Date: Tue, 18 Feb 2025 23:10:01 -0500 Subject: [PATCH] Use libsignal Net without proxy on rejection --- ts/textsecure/WebAPI.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ts/textsecure/WebAPI.ts b/ts/textsecure/WebAPI.ts index 97e160cf6..47e3867f2 100644 --- a/ts/textsecure/WebAPI.ts +++ b/ts/textsecure/WebAPI.ts @@ -1728,7 +1728,12 @@ export function initialize({ libsignalNet.setIpv6Enabled(!disableIPv6); if (proxyUrl) { log.info('Setting libsignal proxy'); - libsignalNet.setProxyFromUrl(proxyUrl); + try { + libsignalNet.setProxyFromUrl(proxyUrl); + } catch (error) { + log.error(`Failed to set proxy: ${error}`); + libsignalNet.clearProxy(); + } } // Thanks to function-hoisting, we can put this return statement before all of the