29
submitted 3 days ago by [email protected] to c/[email protected]

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?

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 3 points 2 days 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?

[-] [email protected] 2 points 2 days 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.

[-] [email protected] 2 points 2 days 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.

[-] [email protected] 2 points 2 days 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 :)

[-] [email protected] 2 points 2 days ago

Remember that we're talking about a server on your local network, and a device on the local network to make the connection for the stream. We aren't talking about streaming over the internet.

  • Client looks up server via DNS
  • Client connects to public IP
  • Client handshakes to server
  • Server announces to client available connections (public, local)
  • Client continues connections with local address

There is no need for tailscale or anything, this is a local connection. The only thing the public address is doing is the initial call to the server.

[-] [email protected] 3 points 2 days ago

I get how that could work, but what services actually do that? Homeassistant can, but that needs to be setup explicitly for it to work.

[-] [email protected] 2 points 2 days ago

Plex is a good example that does just that (not on my rec list but a good example) along with many business grade IPTV and media streaming products (think digital signage).

I'd really love to rework JF to do it, but structurally it wouldn't work, you'd need a management service in front of it.

this post was submitted on 15 Jul 2025
29 points (100.0% liked)

Selfhosted

49549 readers
578 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS