[Icecast] both ssl and non-ssl stream on the same socket

A. Craig West acraigwest at gmail.com
Thu Nov 2 14:10:28 UTC 2017


There is a discussion of this problem at:
https://stackoverflow.com/questions/22453782/nodejs-http-and-https-over-same-port
Some of the solutions depend on the clients honouring redirects (301
status code). Essentially, they boil down to running an http and https
server on two separate ports, and a simple service on your original
port which checks the first byte of the connection. If it is 22, it is
an SSL connection, and is redirected to the https port, if it is not
22, it is redirected to the http port. If for some reason a redirect
doesn't work, it would also be possible to forward the connection to
the appropriate port inside this service, but that would have more
system overhead.
The solutions there are generally based on using node.js on the server
to implement the redirector, but it could be done in almost any
language that supports sockets...

On Thu, Nov 2, 2017 at 9:43 AM, Marius Flage <marius at flage.org> wrote:
> I guess icecast has to be rewritten to support STARTTLS in that case, but I
> guess this is a limitation in the HTTP protocol.
>
> But what you can do is use port redirection if you know that certain sources
> or clients will connect over SSL and then redirect them to the other port
> based on their source ip..? I don't know if that could be an option?
>
> --
> Marius
>
> Den 02.11.2017 14.12, skrev Alexandru Matei:
>
> Hi.
>
> I configured icecast to serve a stream over ssl and it plays nice in Chrome
> and VLC. But on plain http I get connection reset. This stream's url is the
> same for many years now, and it is included in many radio directories,
> TuneIn and other apps. I can't change it or break it.
>
> Is there a way to have a stream that servs the content over ssl and plain
> http in the same time, depending on the request?
>
> Thank you.
>
> Alex G.
> www.ortodoxradio.ro
>
>
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast
>
>
>
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast
>



More information about the Icecast mailing list