将RTSP流转发到远程套接字(RTSP代理?)

Bor*_*jaX 4 python webcam proxy webserver

我对这个问题的普遍性表示歉意。我尝试了很多事情,但似乎没有任何效果。我有服务器吗?(简称为Server A)位于局域网中,该局域网中还有一个IP网络摄像头。这摄像头的地址不断提供RTSP饲料...让我们说...... rtsp://192.168.1.50:554/cam.sdp。摄像机无法访问外部环境(它必须位于LAN中,因此只能访问服务器A,而不能访问服务器B),但是服务器A可以。可悲的是,服务器A没有公共IP,因此我无法从世界任何地方访问服务器A。服务器A可以根据需要退出,但没人可以进入服务器A...(这是被宠坏的小子...小时候有太多玩具)

Now, there's another server (server B, to be original) in the aforementioned outside world which is a regular web server with its public IP and all. That server allows people to reach into it (not spoiled, very nice... sets the table, does the dishes... that kind of stuff). Both Server A and Server B are my computers and are running Ubuntu 12.04 and some Python applications I designed (Server B is actually running Django, but I don't think that's too relevant). What I mean by this is that I have control over what's going on in both servers. I can install/uninstall packages, I can open ports, close ports... whatever is needed (I can even format them if I want, although I don't think that would help much... or yes... who knows?)

                               _____________                                    _____________
    -----------                |           |                                    |           |   
 __ |         |                |           |                                    |           |     
|  \| WebCam  |================| Server A  |===========|  INTERNET  |===========| Server B  |
|__/|         | ->/cam.sdp  <--|           |----------------- > --------------> *           | 
    |         |                |___________|                                    |___________|
    -----------
Run Code Online (Sandbox Code Playgroud)

The question is: How can I grab the RTSP stream with server A dump it onto a designated socket of server B and open it (with a program able to understand RTSP feeds, such as VLC)?

I'm guessing I need something like an RTSP proxy, maybe? But I don't really know where to start.

Any hint, link... would be appreciated.

Thank you in advance

Arm*_*igo 5

我不知道RTSP,但它似乎是标准的纯TCP协议。尝试在服务器A上运行:

ssh -g -R 554:192.168.1.50:554 server_B_hostname
Run Code Online (Sandbox Code Playgroud)

这将打开服务器B上的公共端口554,并从A的角度将其转发到192.168.1.50:554。

某些服务器已将sshd配置为拒绝ssh -g -R转发(没有充分的理由)。如果可以,则应检查服务器B上的/ etc / ssh / sshd_config并添加AllowTcpForwarding yes