New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord Alert: Only use public IP #1664

Closed
robobenklein opened this Issue Oct 21, 2017 · 5 comments

Comments

@robobenklein

robobenklein commented Oct 21, 2017

"value": "[${ip}:${port}](https://www.gametracker.com/server_info/${ip}:${port})"

Test environment: TF2 on Ubuntu server.

When on a server with multiple interfaces, we need to set the ip variable so that the source engine knows where to bind the port, but that's a local network IP address. (192.168.X.X or whatever the network might be)

In the discord notification, it then uses the private IP address, meaning it's useless to have a gameserver tracker link there at all; nobody but the ones inside the network can even know what the address is.

Proposed workaround:

Allow custom variable to override ip variable.

Changes here:

"value": "[${ip}:${port}](https://www.gametracker.com/server_info/${ip}:${port})"

to

"value": "[${public_ip:-$ip}:${public_port:-$port}](https://www.gametracker.com/server_info/${public_ip:-$ip}:${public_port:-$port})"

Using public_ip and public_port if given allowing ip and port to be overridden if the router or network changes them in transit to the server.

I could submit a PR if needed, but this is such a small change I figured it wasn't that big a deal.

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Oct 25, 2017

I like this idea. Thanks

@gamersalpha

This comment has been minimized.

gamersalpha commented Nov 6, 2017

same problem

thanks

robobenklein added a commit to robobenklein/LinuxGSM that referenced this issue Jan 24, 2018

robobenklein added a commit to robobenklein/LinuxGSM that referenced this issue Jan 24, 2018

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Apr 8, 2018

LinuxGSM now has an internet ip variable. I think I will set it to this instead

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Apr 8, 2018

I will be altering the IP to use extip however some though does need to go in to all the possible variations of how IP addresses may change

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Nov 23, 2018

Updated this for other notifications as well

@dgibbs64 dgibbs64 closed this Nov 23, 2018

@dgibbs64 dgibbs64 changed the title from Discord Notification: Don't use private IP in discord notification to Discord Alert: Only use public IP Nov 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment