Request a custom URI from master server

Hi! Does anyone know of a script to grab the custom URI from the master server? I would like for people to join my server through a website and servers will start/stop on the user’s command (or join one of the permanently hosted servers)

I’m not sure how to extract the global ip:port address through the CoD4x console (if that is even possible). Any advice in this direction would be much appreciated.

Looks like the format is [::ffff:SERVER_IP]:SERVER_PORT… maybe you can use that.

I mean, you are right. However, the IP I use when I startup the server is the local IP from my router and differs from which appears on the master server.

Obviously, people wouldn’t be able to connect over the internet with [::ffff:LOCAL_IP]:SERVER_PORT. That’s why I mention about any means of obtaining my ‘global’ IP.

(K-Factor) Thanks for the suggestion, but I don’t think you understand my question.

Could be the wrong IP is set in config. Never seen the local IP show up on master server. Make sure that the set net_ip INTERNET_IP is properly set.

The local IP doesn’t appear on the master server. I think I am wording it wrong.

Regardless, I think I found the solution. How it works is that I set my local IP in the server config and correctly port forwarding. If people connect, they use the internet IP:port to join. My router then redirects it to my PC, which is the local IP I set. The problem lies that I want to find my global IP consistently.

Initially, I though I could query the master server for the IP, but this is not the case.

The solution lies in the fact that I have set up a DDNS service for other uses. I think I can use this to grab my internet IP instead of relying on the master server.

I am now wondering if I can use the DDNS link to direct to my server, for example: cod4:// If this doesn’t work, then I just need to get my internet IP from the DDNS itself.

Another solution is just this StackOverflow post which uses the requests python library and to grab your internet IP.

Any other solutions to this problem would still be appreciated.