问题描述
所以我已经开始设置我的 ShoutCast 服务器 DNAS 并在我的主机上的 Winamp 中设置我的 DSP.服务器侦听端口 8000,因此根据一些说明,我为 winamp(Shoutcast DSP)安装了一个输出插件,并使用 8000 和密码进行连接.服务器接受连接.
So I've gone ahead and set up my ShoutCast server DNAS and set my DSP in Winamp on my host computer. The server listens on port 8000, so per some instructions I installed an output plugin for winamp (Shoutcast DSP) and used 8000 and the password to connect. Server accepts the connection.
现在,我该怎么办?我的主机受 SSL 保护,DNAS 服务器安装在安全 Web 目录中(如果这很重要).我想要的最终结果是我想在家里(主机)上从任何计算机上收听我的 ShoutCast 设置.
Now, what the heck do I do now? My host computer is SSL secured and the DNAS server is installed within the secure web directory (if that matters). My desired end result is that I want to listen to my ShoutCast setup at home (host computer) from any computer.
我尝试浏览到我的 IP 地址和端口 8000(不使用 HTTPS),但它什么也没回来.如果我使用 HTTPS://my.server.com:8000
浏览,我会收到错误代码:ssl_error_rx_record_too_long)
I try browsing to my ip address and port 8000 (without using HTTPS) and it comes back with nothing. If I browse with HTTPS://my.server.com:8000
, I get Error code: ssl_error_rx_record_too_long)
我完全错过了什么,还是我只是个白痴?
Have I completely missed something, or am I just a total moron?
谢谢.
推荐答案
SHOUTcast 不支持 SSL.端口 8000 上的服务是 HTTP 和 ICY(相当无意义的 SHOUTcast 原生流协议,几乎但不完全是 HTTP)的未加密服务器.ssl_error_rx_record_too_long
错误是尝试以 HTTPS 访问非 HTTPS 服务的特征.
SHOUTcast doesn't support SSL. The service on port 8000 is an unencrypted server for HTTP and ICY (the rather pointless SHOUTcast native streaming protocol, which is almost but not quite HTTP). The ssl_error_rx_record_too_long
error is characteristic of trying to access a non-HTTPS service as HTTPS.
您应该能够使用 Web 浏览器连接到 8000 并获得 DNAS 状态页面.另一方面,如果您使用媒体播放器连接到该端口,它将返回直接 MP3 流.(不幸的是,在一个令人难以置信的愚蠢设计中,SHOUTcast 决定响应哪个的方式是通过嗅探您的 User-Agent
标头以获取以 Mozilla
开头的内容,所以如果您正在使用其他浏览器或阻止您的 UA,您将无法获得状态,如果流关闭,您可能什么也得不到.)
You should be able to connect to 8000 with your web browser and get the DNAS status page. If, on the other hand, you connect to that port with a media player, it'll return the direct MP3 stream. (Unfortunately, in an incredibly boneheaded piece of design, the way SHOUTcast decides which to respond with is by sniffing your User-Agent
header for something beginning with Mozilla
, so if you're using an alternative browser or blocking your UA you'll not be able to get the status, and if the stream's down you might just get nothing.)
要通过 SSL 侦听 SHOUTcast 服务器,您需要在将 HTTPS 请求转发到本地 HTTP 请求的另一个端口上设置代理;它也必须是一个支持流媒体的代理,你可能需要一些技巧来阻止 ICY 破坏它.
To listen to a SHOUTcast server through SSL you would need to set up a proxy on another port that forwarded HTTPS requests to local HTTP requests; it'd also have to be a streaming-capable proxy, and you might need some hacks to stop ICY breaking it.
可能更简单,您可以设置一个从客户端到服务器的 SSH 转发端口.这也是允许 DJ 通过加密连接到 SHOUTcast 的唯一方法,因为 DJ 协议根本不兼容 HTTP.显然 SSH 隧道对随机的公共听众不利.
Probably easier, you could set up an SSH forwarded port from your client to the server. That would also be the only way to allow the DJ to connect to SHOUTcast with encryption, since the DJ protocol isn't HTTP compatible at all. Obviously SSH tunnels are no good for random public listeners though.
您也可以尝试使用 Icecast,这是 SHOUTcast 的替代方案,我认为它具有一定的 SSL 支持(并且还使用纯 HTTP 流而不是 ICY).
You could also try Icecast, an alternative to SHOUTcast that I believe has some SSL support (and also uses plain HTTP streaming instead of ICY).
这篇关于通过 SSL 的 ShoutCast的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!