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?

  • curbstickle@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    3
    ·
    edit-2
    2 months ago

    Should all be local after the connection is made, as long as nothing is wonky with your setup.

    Locally you should resolve that DNS to your local server though, not via cloudflare.

    • CameronDev@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 months ago

      I dont know that that is true. With cloudflare tunnels, their server.x.y.z will resolve to a cloudlfare IP address, which then tunnels it to their server? The traffic has to hit the cloudflare server, it can’t short circuit that connection? Am I missing something?

      • curbstickle@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        2 months ago

        Depends on the server obviously, but most will pass off their local once the initial handshake is made.

        Once that is done, DNS isnt relevant anymore.

        Edit: This is especially true for media (movies, TV) servers.

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

          How does that work? Do they do something like what tailscale does to negotiate the connection? Can you point me to any doco for how that works?

        • SteveTech@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          2 months ago

          Uhh, this might be true for WebRTC, except not much uses WebRTC other than for realtime streaming/calling. Jellyfin for example is just an mp4 stream over http; and http(s) will only use the IP in the DNS record. I’d like to see a packet capture if you are certain something is switching IP.