[Question] How do clients figure out the local IP (plex.direct name) of the server?

Server Version#: 1.25.0.5246

I have configured my server to disable remote access. I have also configured it with a custom access URL and a matching SSL cert. I have nginx in front of the server, redirecting the public :443 port to :32400 on the server.
I am able to use Plex from the internet as well as from the local network.

I was expecting my internal clients to also go through the custom access URL, but to my surprise, they use the plex.direct URL:

Nov 24, 2021 21:42:24.182 [0908] Debug — Request: [192.168.20.190:59178 (Subnet)] GET /library/metadata/6041?includeMarkers=1&includePreferences=1 (17 live) TLS GZIP Signed-in Token (<myusername>) / Accept => */* / Accept-Encoding => gzip / Host => 192-168-20-6.<myid>.plex.direct:32400 / User-Agent => PlexMediaServer/1.24.2.4973-2b1b51db9 / X-Plex-Internal-Request => 1 / X-Plex-Token => xxxxxxxxxxxxxxxxxxxx

Looking at the resources.xml, I started wondering how my clients are figuring out the internal plex.direct url to use, as this XML doesn’t have this plex.direct entry:

<Device name="FookaPlex" product="Plex Media Server" productVersion="1.25.0.5246-cb2507e4d" platform="Windows" platformVersion="10.0 (Build 17763)" device="PC" clientIdentifier="<clientid>" createdAt="1575326508" lastSeenAt="1637764838" provides="server" owned="1" accessToken="<accesstoken>" publicAddress="87.97.xx.xx" httpsRequired="1" synced="0" relay="0" dnsRebindingProtection="0" natLoopbackSupported="0" publicAddressMatches="1" presence="1">
  <Connection protocol="https" address="<customurl>" port="443" uri="https://<customurl>:443" local="0"/>
</Device>

Is there any other means of autodetect that plays a role here?

I have almost the same configuration and for me the best option is to use two URLs defined in the custom access field, e.g.: http://192.168.x.x:32400,https://plex.mydomain.com:443 (TLS is handled by the reverse proxy, so no cert is defined in the Plex config)

Local clients usually establish connection to the public URL to read some info and after that they will use only the local URL.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.