How do services like discord prevent IP grabbing, when embedded videos/images are attached?

Pretend I have posted an image or a video that is hosted on my private server to the discord channel.

Then someone else in that discord server clicks to play the video, or view the embedded message (Not following the link, just open it up in the app).

How(if at all) does discord prevent the leaking of client information like IP addresses?

Do they relay the video? (seems like a very expensive solution)

Do they not display the embeds from non-trusted sources?


Solution 1:

The only way a service can do that is by copying the image/video from the server to itself, and then substituting a link to itself in the chat instead of the one you posted.

A service is not obligated to do this - it may simply post the link as you send it. Your IP address is then visible to anyone who does a DNS lookup on the domain name.

I've never tried this so I don't know what Discord actually does. Try it in a chat room by yourself or with trusted people only and see what happens.