Originally Posted by bubbleguuum
It is true that BubbleUPnP Server will return stream URLs with your LAN ip address in that case. But when you play a media, Android BubbleUPnP is supposed to substitute the LAN ip by whatever hostname you set to connect to BubbleUPnP Server. Although looking at it, I found a bug and this will not work if you play a video to the local renderer or any media to the OpenHome local renderer.
Are you in one of these 2 cases ?
Ideally BubbleUPnP Server should send the proper stream URL but last I looked at it long ago, this was more problematic than it looks.
EDIT: and there's a complication: the stream URL themselves cannot use reverse proxying due to them being always http for compat reasons (while you can connect to BubbleUPnP Server via a reverse https proxy).
So http ://<your home hostname>:58050 must still be opened for streaming to work with reverse proxying and the ip/hostname substitution I mentioned.
I do not really recommend to do reverse proxying with BubbleUPnP Server due to the complexity and caveats. Just connecting normally via https is much simplier.
I'm playing to the local renderer, so yes I fit one of those cases.
I changed the BubbleUPnP Server to host on ports 80/443, so my external ports are the same as the BubbleUPnP server. They're just pointing to the reverse proxy instead of directly to the BubbleUPnP Server. The stream URL did have the correct port in it. It was only the ip/hostname that was wrong. I guess that is something to note for anyone that tries to replicate my setup, the BubbleUPnP Server's http port must match the external port.
My Packet Path: Internet => Router port 80/443 => Reverse Proxy 80/443 => BubbleUPnP Server 80/443
The reason why I'm doing this is because I have added security on my reverse proxy. If I just open up BubbleUPnP to the internet, eventually someone is going to notice that there's an http server on port 58050 and then they can attack it until they find a bug. My reverse proxy is configured to make that difficult and identify attacks so the source address can automatically be blacklisted.
As for issues generating the proper steam url, why not always use whatever is in the HOST header and fall back to the ip only if it is blank or they specify the useNumericIpInStreamURL option? That could be entered as an if statement that you can put at the beginning of your code that processes incoming web requests to set a variable that can be used as the start of the url during your response. If you have the code hosted in git somewhere, I would be willing to see if I can get it working and then submit a pull request for you to review before, hopefully, merging it in.