Jump to content

Reverse Proxy Apple TV


KudoCana

Recommended Posts

KudoCana

I have a reverse proxy set up on my server and when I connect through the Emby app on iOS it allows me to bypass the port requirement and go straight to my domain address for the https version of the site in the Emby app.  However on the Apple TV it is trying to automatically append :8096 to the end of my address when registering the server.  Is there a way to prevent this from happening?

 

For instance on the web remotely and in the iOS app I can route the app or browser to https://emby.domain.com/emby and it takes me to the https version of my Emby install.  I am unable to do this on the Apple TV

Edited by KudoCana
Link to comment
Share on other sites

pir8radio

did you try entering :443 at the end of your domain name?   I think its expecting a port no matter what,  even if its a common http port like 80 or 443

Edited by pir8radio
Link to comment
Share on other sites

As @@pir8radio mentioned if this is regular HTTPS traffic add a :443 to the end of your URL you're entering and it won't append the default 8096 port.

 

So it'd look like: https://your.reverse.proxy:443/.

 

If that doesn't work please provide the value you are entering and what you're reverse proxy is receiving and we can try and debug it.

Edited by corey
Link to comment
Share on other sites

KudoCana

I don't enter a proxy at all. My web address is set up domain.com/emby and it routes me to the https version of emby. This works in every emby app I have encountered so far with the exception of the Apple TV.

Link to comment
Share on other sites

I don't enter a proxy at all. My web address is set up domain.com/emby and it routes me to the https version of emby. This works in every emby app I have encountered so far with the exception of the Apple TV.

Have you or can you please try: https://domain.com:443/emby

 

?

 

Thanks!

Link to comment
Share on other sites

That sounds like it might be a problem at your reverse proxy then because the tvOS code doesn't replace https:// with http:// as far as I can tell.

 

Can you look at your reverse proxy logs to see what it's receiving for a request and how the forwarding is being handled?

Link to comment
Share on other sites

KudoCana

Truthfully I don't want to come across as argumentative because I honestly don't know enough about it to truly know for sure. I am curious though how the issue would be with my proxy when every device works except for the Apple TV. I can't truly test because I can't check the server address on the tablet app. The proxy however does works properly when I type the same server address from the Apple TV into the browser.

Edited by KudoCana
Link to comment
Share on other sites

pir8radio

It allows me access but uses the non secure server for some reason.

 

@@KudoCana I don't understand, you enter https://yourdomain.com:443/emby and you get the non secure emby, how do you know this? I mean what are you seeing that tells you that?   I vaguely recall someone else having an issue when using the /emby rather than the cname.  I hate using domain.com/SOMETHING it gets messy in the reverse proxy, I use SOMETHING.domain.com  you can have just as many of those.   I bet my server works on your apple tv, im running through two proxies. This is my test path so it may or may not actually play video for you due to the second proxy, but let me know!

 

 Try to leave my port off or add 443 (note the pass is case sensitive and ends in a !)  I'll remove the below info after you reply back.

guest.png

 

If you can connect up to my server fine, its probably the ending path you are using not working with the apple tv app for some reason or nginx config we can look into.  

Edited by pir8radio
Link to comment
Share on other sites

KudoCana

@@KudoCana I don't understand, you enter https://yourdomain.com:443/emby and you get the non secure emby, how do you know this? I mean what are you seeing that tells you that?   I vaguely recall someone else having an issue when using the /emby rather than the cname.  I hate using domain.com/SOMETHING it gets messy in the reverse proxy, I use SOMETHING.domain.com  you can have just as many of those.   I bet my server works on your apple tv, im running through two proxies. This is my test path so it may or may not actually play video for you due to the second proxy, but let me know!

 

I can connect to my server just fine.  Connection isn't the issue.  Connecting to the ssl version of the site is the issue.  I can't connect using the https site.  Only the non ssl version. 

 

I attempted to leave the port off.  Apple TV wouldn't connect.  Added port 443 and it still redirected me to the unsecure portion of the server.  I have attached a screenshot.

 

https://anonimage.net/view/TKQyEqBsv

Edited by KudoCana
Link to comment
Share on other sites

pir8radio

I can connect to my server just fine.  Connection isn't the issue.  Connecting to the ssl version of the site is the issue.  I can't connect using the https site.  Only the non ssl version. 

 

I attempted to leave the port off.  Apple TV wouldn't connect.  Added port 443 and it still redirected me to the unsecure portion of the server.  I have attached a screenshot.

 

https://anonimage.net/view/TKQyEqBsv

 

 

See you didn't need to argue..  I can confirm this in my logs I see you initially connect with https then switched over to port 80  not sure why your screen shot shows 8080 thats the Local HTTP port and 8080 is not open on the firewall..  So this does look like some kind of app issue a few glitches there..   I'm not sure who maintains the appletv app maybe @@ebr would?  

  • Like 1
Link to comment
Share on other sites

KudoCana

See you didn't need to argue..  I can confirm this in my logs I see you initially connect with https then switched over to port 80  not sure why your screen shot shows 8080 thats the Local HTTP port and 8080 is not open on the firewall..  So this does look like some kind of app issue a few glitches there..   I'm not sure who maintains the appletv app maybe @@ebr would?

 

Yea, that's why I said I didn't want to sound argumentative. Sometimes in written words it appears that way. I don't know enough about the back end to truly understand what it is doing, and for all I knew it was working and I was having user error on my end.

 

I thought maybe I was going nuts. Thanks for confirming this.

 

Hopefully someone can shed some light.

Link to comment
Share on other sites

KudoCana

See you didn't need to argue..  I can confirm this in my logs I see you initially connect with https then switched over to port 80  not sure why your screen shot shows 8080 thats the Local HTTP port and 8080 is not open on the firewall..  So this does look like some kind of app issue a few glitches there..   I'm not sure who maintains the appletv app maybe @@ebr would?

Would you mind showing me where in the log you see the ports, etc.

 

I'd like to dig into it to check how the tablet is connecting to ensure it is connecting properly.

 

Edit:  Actually pulled the logs and see the tablet is exhibiting the same behavior running iOS.  Would you mind if I connected to your server and tried streaming a video to re-check the behavior?

Edited by KudoCana
Link to comment
Share on other sites

pir8radio

Well the address I gave you will give confusing results. It's running through a CDN for all content except the stream. But you are more than welcome to try anything out. In the nginx logs you can see what port the request came in on if you have logging setup on nginx. I assume you have nginx handling your ssl correct?

Link to comment
Share on other sites

KudoCana

Well the address I gave you will give confusing results. It's running through a CDN for all content except the stream. But you are more than welcome to try anything out. In the nginx logs you can see what port the request came in on if you have logging setup on nginx. I assume you have nginx handling your ssl correct?

 

Actually running Apache2.  I just turned on logging in Emby and was running through the Emby logs.  Will Emby log different things than the actual server?

Edited by KudoCana
Link to comment
Share on other sites

pir8radio

Actually running Apache2.  I just turned on logging in Emby and was running through the Emby logs.  Will Emby log different things than the actual server?

yes it depends how you have things setup..    usually the proxy handles SSL and the path from the proxy to back-end server is usually just http because its usually on a controlled network otherwise you are encrypting to the proxy decrypting, then re-encrypting the traffic.. Kind of a waste unless your proxy is at a different location then your back-end server.  So emby should only show all http traffic you will need the logging enabled in Apache, I don't know Apache so i cant help you there.. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...