JohnXLivingston / peertube-plugin-livechat

GNU Affero General Public License v3.0
86 stars 26 forks source link

Allow non-localhost C2S connections for Matterbridge #377

Closed poVoq closed 1 month ago

poVoq commented 2 months ago

Given that configuring a Matterbridge can not be easily automated, it is usually left to the streamers themselves to set up bridging, however many Peertube admins are not so XMPP affine and thus do not set up full S2S federation as outlined here.

There is an easier way to connect directly via C2S and SASL anonymous as explained in this tutorial, but it requires direct access to the server that Peertube runs on as currently the built in Prosody server is limited to localhost C2S connections.

It would probably be good to allow non-localhost C2S connections, as this would significantly simplify bridging via Matterbridge and allow streamers themselves to quickly setup a bridge during their streams with no direct involvement of the main Peertube admin, nor the need of involving an external XMPP server as in the case of a full S2S connection.

Furthermore it would be significantly simpler to set up for non xmpp affine Peertube admins as it should be as simple as opening port 5222 with no strict need to have proper SSL certificates (which most XMPP server require for S2S these days) and probably also no XMPP DNS entries.

Caveats would be that this would expose the internal Prosody to bruteforce auth attempts on the C2S interface though, which might require some additional precautions.

Ideally this option should be documented here to make it easy to explain to non xmpp affine Peertube admins.

Thanks a lot!

JohnXLivingston commented 1 month ago

Done in https://github.com/JohnXLivingston/peertube-plugin-livechat/pull/393

If you want to add some documentation, be my guest :)

JohnXLivingston commented 1 month ago

PS: i don't know when the next plugin version will be released. We have some refactoring to finish before.