segler-alex / radiobrowser-api

radio browser server api
GNU Affero General Public License v3.0
73 stars 15 forks source link

List SSL streams #33

Open davidhedlund opened 7 years ago

davidhedlund commented 7 years ago

Most streams are over HTTP even if most people prefer HTTPS. It would be great if secure connections could be listed.

segler-alex commented 6 years ago

i like that idea! i think i will add a parameter to the station lists, to filter out http streams

davidhedlund commented 6 years ago

I think you should validate the SSL certificates and label the stations to either "SSL" or "Bad SSL".

See https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml for status codes.

http://http-live.sr.se/p4kalmar-aac-192

Sometimes http is listed on official websites even if the https works flawless so https status should be evaluated for http URL's in the database.

$ curl -o /dev/null --silent --head --write-out '%{http_code}\n' http://http-live.sr.se/p4kalmar-aac-192 200 $ curl -o /dev/null --silent --head --write-out '%{http_code}\n' https://http-live.sr.se/p4kalmar-aac-192 200 $ cvlc http://http-live.sr.se/p4kalmar-aac-192 VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28) [0x1a85ba8] dummy interface: using the dummy interface module... [0x7f594c000fd8] access_http access: Raw-audio server found, m4a demuxer selected [0x7f594cc06538] packetizer_mpeg4audio demux packetizer: AAC channels: 2 samplerate: 48000 $ cvlc https://http-live.sr.se/p4kalmar-aac-192 VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28) [0x1ebbc08] dummy interface: using the dummy interface module... [0x7f7dbc001008] access_http access: Raw-audio server found, m4a demuxer selected [0x7f7dbc0549c8] packetizer_mpeg4audio demux packetizer: AAC channels: 2 samplerate: 48000

https://ilr.bigfm.de/bigfm-nitroxdeep-128-aac

cvlc didn't give a positive results despite that curl did.

$ curl -o /dev/null --silent --head --write-out '%{http_code}\n' https://ilr.bigfm.de/bigfm-nitroxdeep-128-aac 200 cvlc https://ilr.bigfm.de/bigfm-nitroxdeep-128-aac VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28) [0x2537c08] dummy interface: using the dummy interface module... [0x7f465c051958] gnutls tls session error: Certificate verification failure (0x0042) [0x7f465c051958] gnutls tls session error: Certificate not verified [0x7f465c051958] gnutls tls session error: Signer not found [0x7f465c000fc8] access_http access: Raw-audio server found, m4a demuxer selected [0x7f465c05e898] packetizer_mpeg4audio demux packetizer: AAC channels: 2 samplerate: 22050

https://animesradio.moe:8443/stream

curl complains but not cvlc.

$ curl -o /dev/null --silent --head --write-out '%{http_code}\n' https://animesradio.moe:8443/stream 400 $ cvlc https://animesradio.moe:8443/stream VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28) [0x1166e18] dummy interface: using the dummy interface module...

https://st01.dlf.de/dlf/01/104/ogg/stream.ogg

$ curl -o /dev/null --silent --head --write-out '%{http_code}\n' https://st01.dlf.de/dlf/01/104/ogg/stream.ogg 000 $ cvlc https://st01.dlf.de/dlf/01/104/ogg/stream.ogg VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28) [0x1926c08] dummy interface: using the dummy interface module... [0x7f691c000fc8] main access error: connection failed: Connection refused [0x7f691c000fc8] main access error: connection failed: Connection refused [0x7f691c000fc8] access_http access error: cannot connect to st01.dlf.de:443 [0x7f692c000be8] main input error: open of `https://st01.dlf.de/dlf/01/104/ogg/stream.ogg' failed [0x7f692c000be8] main input error: Your input can't be opened [0x7f692c000be8] main input error: VLC is unable to open the MRL 'https://st01.dlf.de/dlf/01/104/ogg/stream.ogg'. Check the log for details.

davidhedlund commented 6 years ago

https://github.com/segler-alex/radiobrowser/issues/83