I have tried:
Add layer 7 protocol with the domain-name api that gets the public IP (/ip firewall layer7-protocol) and make a Mangle to add a Routing mark.
But if I run a (get) script it not detected the domain-name. If I use a browser on my computer it detect and work SO the regex in /ip firewall layer7-protocol is ok.
It there an option?
I have tried in the Mangle rule the chain to input/forward/output… but the script was not detected.
It is NOT possible to redirect or re-route traffic based on L7 matches!
When you know the name of the system your wget is going to beforehand, you MAY be able to fix it using an address-list with that DNS name and a match for the connections to the members of that address-list.
That will work fine for classic servers with a single or a couple of IP addresses that never change.
It will still fail when the service is provided via a content delivery system that uses many addresses that change all the time.