I don't think there is any easy way to customize that.
Wake on LAN works by sending a "magic packet", which can be any stream of data that somewhere contains FF FF FF FF FF FF FF, followed by sixteen repetitions of the device's MAC address.
Note that processing of the magic packet does not work in the usual way (i.e. parsing packet headers and passing its payload to the next level in the stack) as the target PC at that time does not have a working network stack. Instead, the incoming data is just scanned for the magic string and the device boots as soon as that string is encountered.
Therefore the whole process knows nothing about ports. In order to generate a magic packet, all you need to do is to generate a stream of data which contains the required byte sequence and make sure it goes over the physical wire to which the target device is connected.
If the device sending the magic packet and the device to be woken are separated by a bridge or switch (which is the most common situation nowadays), that usually means ensuring that the packet is a valid Ethernet frame with a destination MAC address of FF:FF:FF:FF:FF:FF
(the broadcast address).
There are some tools available that accomplish this. For Linux, one is powerwake
; for other OSes you may need to google. Get one of those, instruct it to wake your PC (this requires you to know its MAC address), and it should wake up.