[mythtv-users] PATCH: enable mythweb streaming via .asx

Rich West Rich.West at wesmo.com
Wed Nov 8 02:14:36 UTC 2006


Chris Petersen wrote:
> actually, mythweb just checks to make sure that the browser and the
> master backend are both on an rfc1918 IP address, not "a different
> network" since a mixture of 10.* and 192.168.* could be fine for
> streaming across.
>
> FWIW, future versions of mythweb will make the myth:// stuff a clearer
> option (which I may backport into the fixes branch to clear up much of
> this confusion).

Well, the code we were looking at is:

    // Is either the browser xor the master in an rfc 1918 zone?
        if 
(preg_match('/^(?:10|192\.168|172\.(?:1[6-9]|2[0-9]|3[0-6]))\./', 
$Master_Host)
                xor 
preg_match('/^(?:10|192\.168|172\.(?:1[6-9]|2[0-9]|3[0-6]))\./', 
$_SERVER['REMOTE_ADDR'])) {
            return root."pl/stream/$show->chanid/$show->recstartts";
        }

 From what I can tell, it checks to see if the master_host is on a 
private network and if the client browser is on a private network, but 
both of them are not on private networks (hence, the xor), it returns 
the root."pl/stream/..." URL.

After passing through that, it would return the myth:// address...

The problem we came across is that $Master_Host is set to 127.0.0.1 (the 
default).  That will allow for the above if statement to be true since 
it doesn't account for localhost..

-Rich



More information about the mythtv-users mailing list