Prosody: Generating self-signed certificates for s2s connections.
This commit is contained in:
committed by
John Livingston
parent
38023df6be
commit
772689f9ce
@ -91,6 +91,7 @@ interface ProsodyConfig {
|
||||
logByDefault: boolean
|
||||
logExpiration: ConfigLogExpiration
|
||||
valuesToHideInDiagnostic: Map<string, string>
|
||||
needCerticates: boolean
|
||||
}
|
||||
async function getProsodyConfig (options: RegisterServerOptionsV5): Promise<ProsodyConfig> {
|
||||
const logger = options.peertubeHelpers.logger
|
||||
@ -127,6 +128,7 @@ async function getProsodyConfig (options: RegisterServerOptionsV5): Promise<Pros
|
||||
const prosodyDomain = await getProsodyDomain(options)
|
||||
const paths = await getProsodyFilePaths(options)
|
||||
const roomType = settings['prosody-room-type'] === 'channel' ? 'channel' : 'video'
|
||||
let needCerticates: boolean = false
|
||||
|
||||
const apikey = await getAPIKey(options)
|
||||
valuesToHideInDiagnostic.set('APIKey', apikey)
|
||||
@ -174,6 +176,7 @@ async function getProsodyConfig (options: RegisterServerOptionsV5): Promise<Pros
|
||||
}
|
||||
|
||||
if (enableRoomS2S) {
|
||||
needCerticates = true
|
||||
const s2sPort = (settings['prosody-s2s-port'] as string) || '5269'
|
||||
if (!/^\d+$/.test(s2sPort)) {
|
||||
throw new Error('Invalid s2s port')
|
||||
@ -228,7 +231,8 @@ async function getProsodyConfig (options: RegisterServerOptionsV5): Promise<Pros
|
||||
roomType,
|
||||
logByDefault,
|
||||
logExpiration,
|
||||
valuesToHideInDiagnostic
|
||||
valuesToHideInDiagnostic,
|
||||
needCerticates
|
||||
}
|
||||
}
|
||||
|
||||
@ -309,6 +313,7 @@ function getProsodyConfigContentForDiagnostic (config: ProsodyConfig, content?:
|
||||
}
|
||||
|
||||
export {
|
||||
ProsodyConfig,
|
||||
getProsodyConfig,
|
||||
getWorkingDir,
|
||||
getProsodyFilePaths,
|
||||
|
Reference in New Issue
Block a user