[rtmpdump] [PATCH] HTTP Proxy Support
hyc at highlandsun.com
Mon Aug 16 04:22:09 CEST 2010
Daniel Burr wrote:
> The attached patch adds the ability to specify a HTTP proxy to be used
> for RTMPT. This functionally requires only 2 changes:
> 1. The hostname/port of the proxy needs to be used when establishing
> the connection instead of connecting directly to the target server.
> 2. The POST request needs to specify the full absolute URL (i.e. server
> name and path name) instead of just the relative path name.
> Theoretically this should not be necessary because the proxy should use
> the hostname from the "Host:" header, but it seems that in practice this
> field is not honoured by at least some proxy implementations
> The remainder of the changes in the patch are to:
> 1. Add a new command line argument (--http) to rtmpdump and rtmpgw to
> allow the HTTP proxy to be specified.
> 2. Add a new struct (RTMPSockInfo) which is used to store target
> server, SOCKS proxy and HTTP proxy information so that they can be
> easily treated in a generic fashion.
Thanks, I've been thinking we need this functionality for a while. But, for
compatibility with other apps like wget and curl, you should have just used
getenv("http_proxy") for the proxy server info in librtmp. I guess adding an
option for rtmpdump may be useful, but at this point rtmpdump's importance is
greatly diminished now that ffmpeg and curl support librtmp.
More information about the rtmpdump