Well you could patch the ip and port with a media patcher and I am running a proxy which also allows me to inject stuff and I have gameguard up and running but I have this proxy in a virtual machine so gameguard can't close the proxy

it's only a temporary solution but ofcourse the gameguard needs to be bypassed which is just deleting the 2 gameguard lines of the type.txt in the media.pk2 but you need to emulate gameguard which I haven't got time to look into atm