Azuracast: Harbor SSL Input

Created on 16 Nov 2018  路  4Comments  路  Source: AzuraCast/AzuraCast

Installation method
Traditional Installation on Ubuntu 18.04

Describe the bug & To Reproduce
I am trying to setup SSL Websockets so I can use Webcaster.js and stream to AzuraCast from my web browser. However, I can only do this if I 'load unsafe scripts' in Google Chrome etc (this then streams successfully).
Using OpenSSL, I created an SSL certificate pair and then entered this into the Custom Configuration field in the Profile page of a station:
set( "harbor.ssl.certificate", '/var/azuracast/stations/test2/config/cert2.pem' ); set( "harbor.ssl.private_key", '/var/azuracast/stations/test2/config/key2.pem' ); set( "harbor.ssl.password", 'helloall');

That works fine, but when I want to actually use the SSL source, by adding
live = audio_to_stereo(input.harbor.ssl("/", id="test2_input_streamer", port=8005, user="shoutcast", auth=dj_auth, icy=true, max=30., buffer=2., icy_metadata_charset="UTF-8", metadata_charset=$ ignore(output.dummy(live, fallible=true))

I get a SPAWN error :(
The contents of the custom configuration field was successfully copied over to the liquidsoap.liq file.

test_2 is the slug of the AzuraCast station.

I am not sure if WebCaster with Secure WebSockets is possible with AzuraCast/Liquidsoap so please forgive me I am a noob or what I am even doing.

enhancement

Most helpful comment

@adamderann Currently, there's no official support for SSL via Harbor connections as this isn't required (or supported even) by most broadcasting software.

There has also been a long-running request to provide tighter and cleaner integration with Icecast's SSL support, which likely involves much of the same work as this project would.

In the end, it's looking likely that we will want to create some sort of "SSL Certificate Manager" page inside AzuraCast's administration, that lets you create, renew and apply SSL certs to nginx, Icecast and Liquidsoap all from the same place, and also lets AzuraCast handle the auto-renewal of certs issued via LetsEncrypt, etc.

All 4 comments

@adamderann Currently, there's no official support for SSL via Harbor connections as this isn't required (or supported even) by most broadcasting software.

There has also been a long-running request to provide tighter and cleaner integration with Icecast's SSL support, which likely involves much of the same work as this project would.

In the end, it's looking likely that we will want to create some sort of "SSL Certificate Manager" page inside AzuraCast's administration, that lets you create, renew and apply SSL certs to nginx, Icecast and Liquidsoap all from the same place, and also lets AzuraCast handle the auto-renewal of certs issued via LetsEncrypt, etc.

Some time ago I had a look at Webcaster.js and really liked the idea to have a fully functional streaming application for DJs in the browser. I couldn't get it to work with another radio management software. I think with AzuraCast this will be much easier to get working. I could imagine that it could be a good addition to the project if AzuraCast would provide a Webcaster.js page. Then AzuraCast would come with everything one needs to start streaming right away after setting up AzuraCast.

Yeah i had a look too, looks pretty awsome, praise HTML5 https://experiments.withgoogle.com/search?q=music i currently use loopback on OSX to stream anything from my browser to butt.

I have created a "master discussion" for how AzuraCast should handle generating and sharing SSL certificates moving forward, so follow #964 for updates on that.

In the meantime, @adamderann, I discovered that our existing nginx proxy _can_ handle the web socket connections needed to broadcast to Liquidsoap's harbor input using Webcaster.js, with only a minor modification needed. I've applied this modification to both the Traditional and Docker nginx configurations, so you can now direct webcaster to connect to wss://dj-username:dj-password@your-azuracast-site/radio/8005/ (or ws:// for insecure) and it will pass the DJ connection directly through, while taking advantage of any SSL certificate or LetsEncrypt that may be set up on the main nginx service.

I also agree with @Vaalyn's comments about the possible applicability of rolling Webcaster.js directly into AzuraCast itself, so I have also created another issue to track that project's progress: #969

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Vaalyn picture Vaalyn  路  4Comments

Rafaelrds2017 picture Rafaelrds2017  路  3Comments

bo2008 picture bo2008  路  3Comments

frozenplaya picture frozenplaya  路  4Comments

bebjakub picture bebjakub  路  3Comments