External Components interface configuration:

You can now configure on which network interfaces Prosody will listen for external components.
This commit is contained in:
John Livingston
2023-08-10 14:45:04 +02:00
parent 28c586fc09
commit d0ba7d017d
7 changed files with 72 additions and 7 deletions

View File

@ -315,9 +315,17 @@ class ProsodyConfigContent {
this.authenticated?.add('modules_enabled', 'dialback') // This allows s2s connections without certicicates!
}
useExternalComponents (componentsPort: string, components: ExternalComponent[]): void {
useExternalComponents (
componentsPort: string,
componentsInterfaces: string[] | null,
components: ExternalComponent[]
): void {
this.global.set('component_ports', [componentsPort])
this.global.set('component_interfaces', ['127.0.0.1', '::1'])
if (componentsInterfaces !== null) {
this.global.set('component_interfaces', componentsInterfaces)
} else {
this.global.set('component_interfaces', [])
}
for (const component of components) {
const c = new ProsodyConfigComponent(component.name)