Pass disableIPv6
setting to libsignal-net
Co-authored-by: Sergey Skrobotov <sergey@signal.org>
This commit is contained in:
parent
fa3f8b08ab
commit
90c9b0ecaa
3 changed files with 4 additions and 2 deletions
|
@ -559,8 +559,6 @@ export class SocketManager extends EventListener {
|
|||
: TransportOption.ShadowingLow;
|
||||
}
|
||||
|
||||
// in prod, switch to using 'ShadowingHigh' mode, unless user opts out,
|
||||
// in which case switching to `ShadowingLow`
|
||||
const configValue = window.Signal.RemoteConfig.isEnabled(
|
||||
'desktop.experimentalTransportEnabled.prod'
|
||||
);
|
||||
|
|
|
@ -640,6 +640,7 @@ type InitializeOptionsType = {
|
|||
version: string;
|
||||
directoryConfig: DirectoryConfigType;
|
||||
libsignalNetEnvironment: string | undefined;
|
||||
disableIPv6: boolean;
|
||||
};
|
||||
|
||||
export type MessageType = Readonly<{
|
||||
|
@ -1459,6 +1460,7 @@ export function initialize({
|
|||
proxyUrl,
|
||||
version,
|
||||
libsignalNetEnvironment,
|
||||
disableIPv6,
|
||||
}: InitializeOptionsType): WebAPIConnectType {
|
||||
if (!isString(url)) {
|
||||
throw new Error('WebAPI.initialize: Invalid server url');
|
||||
|
@ -1510,6 +1512,7 @@ export function initialize({
|
|||
);
|
||||
log.info(`libsignal net environment resolved to [${Net.Environment[env]}]`);
|
||||
const libsignalNet = new Net.Net(env);
|
||||
libsignalNet.setIpv6Enabled(!disableIPv6);
|
||||
|
||||
// Thanks to function-hoisting, we can put this return statement before all of the
|
||||
// below function definitions.
|
||||
|
|
|
@ -39,6 +39,7 @@ window.WebAPI = window.textsecure.WebAPI.initialize({
|
|||
proxyUrl: config.proxyUrl,
|
||||
version: config.version,
|
||||
libsignalNetEnvironment: config.libsignalNetEnvironment,
|
||||
disableIPv6: config.disableIPv6,
|
||||
});
|
||||
|
||||
window.libphonenumberInstance = PhoneNumberUtil.getInstance();
|
||||
|
|
Loading…
Reference in a new issue