[rtmpdump] r108 - in trunk: Makefile log.h rtmpsrv.c
Howard Chu
hyc at highlandsun.com
Tue Dec 22 09:11:37 CET 2009
hyc wrote:
> Author: hyc
> Date: Tue Dec 22 07:10:37 2009
> New Revision: 108
>
> Log:
> Add dummy RTMP server. Doesn't serve any data, just sucks up
> connection parameters from a client.
>
> Added:
> trunk/rtmpsrv.c
> Modified:
> trunk/Makefile
> trunk/log.h
This started as a copy of streams.c and then I ripped out all the HTTP code
and added in all the RTMP server side handling. I had originally planned to
write a complete transparent proxy, but I'm not sure that's really necessary
at this point.
All you need to do is redirect your Flash clients to the machine running this
server and it will dump out all the connect / play parameters that the Flash
client sent. The simplest way to cause the redirect is by editing /etc/hosts
when you know the hostname of the RTMP server, and point it to localhost while
running rtmpsrv on your machine.
The other way on Linux is to use iptables to redirect all outbound RTMP
connections. You can do this as root:
iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
In my original plan I would have the transparent proxy running as a special
user (e.g. user "proxy"), and regular flash clients running as any other user.
In that case the proxy would make the connection to the real RTMP server. The
iptables rule would look like this:
iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner proxy -j
REDIRECT
That should give you some idea of where to go from here.
-- hyc
More information about the rtmpdump
mailing list