How do I send a WOL packet using Web Core?

I've asked Claude to translate to Web Core a Delphi WOL-sending procedure that uses Indy and it provided several non-working "options" that I didn't understand well enough to fix them. Is this really such a difficult task?

I'm trying to understand what exactly you try to accomplish.
You want to send from a TMS WEB Core web client applications a WOL packet to some specific IP address?
If so, that is for security reasons not possible. Imagine directing just any person to a web page where then suddenly a WOL is sent that might trigger machines to start without consent...
If you want to do this, you could install a REST API server on the machine from where the WOL is sent, have the REST API send the WOL upon a HTTP request executed from the web application.

Yes, I want to send a WOL to a specific IP address. Here's the complete scenario:

I have an HTPC running a PVR program (CW_EPG) that puts information into a Google Drive folder, including its MAC, WAN IP, and LAN IP addresses. The HTPC is generally asleep except when it's making a recording so if I want reliably to send it information I need to wake it up using the location info in that GDrive folder.

It seems silly to me that "security reasons" should prevent sending that WOL from a browser when it evidently can just tell another computer to do the sending. Is that really the case??

It IS a security measure and a measure that makes very much sense.
Again, it would be highly undesirable when just redirecting anyone to an URL and the browser could execute harmful code like this.
Server side is in the back-end and access to it can be authenticated and authorized.

See also:
https://stackoverflow.com/questions/37491131/wake-on-lan-from-a-browser-via-javascript

Thanks for the SO pointer with such interesting comments! :saluting_face:

BTW, the PWA is authenticated to access the GDrive folder and find the MAC and IP addresses so not just "any person" can issue that WOL.

Everything in your browser is wide open & fully transparent. So, even if your PWA is authenticated, one can inspect the full browser context and thus also the MAC & IP address etc... Via the browser console, you can see all.
The browser security pattern is always and will remain always: NOTHING that should be secured should happen from the browser, it belongs in the back-end.

Who is this one who "can inspect the full browser context"? Someone who has hacked my phone? That someone can do more than inspect my browser so safeguarding its contents is a minor concern in that case. Are you referring to some other scenario?

I’m just explaining why browsers have to implement necessary security measures. We can’t choose these, they are there for good reasons and it’s a security measure by itself there is no workaround.