Let’s say I setup some subdomains and then point them to my home server via Cloudflare tunnel.

If I use one of those subdomains from my personal PC on the same network as my home server, to watch a movie for example, is all of that traffic going out to the internet and then back? Or does all the traffic stay internal once the connection has been made?

  • rumba@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    23 hours ago

    Plex does this on its own. It’s one of the features they provide. The client/service knows when the server is local even though you go outside to make the initial connection. They go through a lot of trouble to do this. You connect externally it brokers the initial connection proxies date of back and forth to see if you can talk to each other directly, your client knows your server is now local and it switches over.

    I don’t know if any other video hosting package that does this. Jellyfin certainly would not. I ‘think’ if you threw a tailscale in the middle, It would be able to do it without hair pinning as long as you were using a local exit node instead of tailnet. They’d still probably go through that local exit node.

    • CameronDev@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      21 hours ago

      As you’ve described it, and from what I have read, its very similar to how tailscale negotiates its connections.

      Does seem to be unique to Plex though.

      • rumba@lemmy.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        20 hours ago

        Yup, there are few efficient ways to handle that, so anything that does it looks something like everything else that handles it.

        Sadly, not many things handle it :)