diff --git a/keyserver/src/socket/tunnelbroker.js b/keyserver/src/socket/tunnelbroker.js index b95ef2b43..5e8d0dc9b 100644 --- a/keyserver/src/socket/tunnelbroker.js +++ b/keyserver/src/socket/tunnelbroker.js @@ -1,49 +1,49 @@ // @flow import type { ConnectionInitializationMessage } from 'lib/types/tunnelbroker/session-types.js'; import { getCommConfig } from 'lib/utils/comm-config.js'; import TunnelbrokerSocket from './tunnelbroker-socket.js'; import { type IdentityInfo } from '../user/identity.js'; import { getContentSigningKey } from '../utils/olm-utils.js'; type TBConnectionInfo = { +url: string, }; async function getTBConnectionInfo(): Promise { const tbConfig = await getCommConfig({ folder: 'facts', name: 'tunnelbroker', }); if (tbConfig) { return tbConfig; } console.warn('Defaulting to local Tunnelbroker instance'); return { - url: 'ws://127.0.0.1:51001', + url: 'wss://tunnelbroker.staging.commtechnologies.org:51001', }; } async function createAndMaintainTunnelbrokerWebsocket( identityInfo: IdentityInfo, ) { const [deviceID, tbConnectionInfo] = await Promise.all([ getContentSigningKey(), getTBConnectionInfo(), ]); const initMessage: ConnectionInitializationMessage = { type: 'ConnectionInitializationMessage', deviceID: deviceID, accessToken: identityInfo.accessToken, userID: identityInfo.userId, deviceType: 'keyserver', }; new TunnelbrokerSocket(tbConnectionInfo.url, initMessage); } export { createAndMaintainTunnelbrokerWebsocket }; diff --git a/lib/facts/tunnelbroker.js b/lib/facts/tunnelbroker.js index 5c5a7abbd..2dc9b19b9 100644 --- a/lib/facts/tunnelbroker.js +++ b/lib/facts/tunnelbroker.js @@ -1,9 +1,9 @@ // @flow import { isDev } from '../utils/dev-utils.js'; const tunnnelbrokerURL: string = isDev - ? 'ws://localhost:51001' - : 'https://tunnelbroker.commtechnologies.org'; + ? 'wss://tunnelbroker.staging.commtechnologies.org:51001' + : 'wss://tunnelbroker.commtechnologies.org:51001'; export { tunnnelbrokerURL };