Skip to content

Conversation

@mariogarridopt
Copy link
Contributor

❗ Important Announcements

Click here for more details:

⚠️ Please Note: We do not accept all types of pull requests, and we want to ensure we don’t waste your time. Before submitting, make sure you have read our pull request guidelines: Pull Request Rules

🚫 Please Avoid Unnecessary Pinging of Maintainers

We kindly ask you to refrain from pinging maintainers unless absolutely necessary. Pings are for critical/urgent pull requests that require immediate attention.

📋 Overview

When monitoring a Steam game server with Kuma, I’m encountering an issue where using a domain name as the host doesn’t work properly. This is because Steam’s API uses the server’s public IP address, not the domain name, for health checks.

Context:

Dynamic IP, so I use a domain name (via dynamic DNS) to always point to my current IP.
 
When entering the domain name in Kuma, the health check fails because Steam tries to use the domain name, not the resolved IP.

Expected behavior:

I would expect Kuma to resolve the domain name to its current IP and use that IP in the request.

🛠️ Type of change

  • 🐛 Bugfix (a non-breaking change that resolves an issue)
  • ✨ New feature (a non-breaking change that adds new functionality)
  • ⚠️ Breaking change (a fix or feature that alters existing functionality in a way that could cause issues)
  • 🎨 User Interface (UI) updates
  • 📄 New Documentation (addition of new documentation)
  • 📄 Documentation Update (modification of existing documentation)
  • 📄 Documentation Update Required (the change requires updates to related documentation)
  • 🔧 Other (please specify):
    • Provide additional details here.

📄 Checklist

  • 🔍 My code adheres to the style guidelines of this project.
  • 🦿 I have indicated where (if any) I used an LLM for the contributions
  • ✅ I ran ESLint and other code linters for modified files.
  • 🛠️ I have reviewed and tested my code.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • ⚠️ My changes generate no new warnings.
  • 🤖 My code needed automated testing. I have added them (this is an optional task).
  • 📄 Documentation updates are included (if applicable).
  • 🔒 I have considered potential security impacts and mitigated risks.
  • 🧰 Dependency updates are listed and explained.
  • 📚 I have read and understood the Pull Request guidelines.

@mariogarridopt mariogarridopt changed the title fix #5934: Resolver Game Server DNS before querying the IP fix: Resolver Game Server DNS before querying the IP Jul 4, 2025
Copy link
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this to be mergable, I would like to see a testcase (one dyndns, one not) or maybe just one which mocks part of this interaction

@CommanderStorm CommanderStorm added the pr:please address review comments this PR needs a bit more work to be mergable label Jul 24, 2025
@CommanderStorm CommanderStorm marked this pull request as draft July 24, 2025 20:06
@mariogarridopt
Copy link
Contributor Author

@CommanderStorm I reported on #5934, I'm having problems running tests with npm run test-backend but I get an error: Error: Cannot find module '/Users/myuser/uptime-kuma/test/backend-test'
Have you seen this before?

@CommanderStorm
Copy link
Collaborator

No I have not and CI also does not have the same problem.
I don't currently have the time to actually investigate. Could you try to throw Claude at the problem to see if it can debug it?

@mariogarridopt mariogarridopt marked this pull request as ready for review July 31, 2025 22:36
@mariogarridopt
Copy link
Contributor Author

sorry for reopening, was a mistake, still working on the tests

@louislam
Copy link
Owner

Wait, I think #5934 is about the Steam monitor, it is not related to the Gamedig one.

Gamedig should be able to resolve hostname.

I think this pr is fixing the wrong place. Am I missing anything?

} else if (this.type === "steam") {
const steamApiUrl = "https://api.steampowered.com/IGameServersService/GetServerList/v1/";
const steamAPIKey = await setting("steamAPIKey");
const filter = `addr\\${this.hostname}:${this.port}`;
if (!steamAPIKey) {
throw new Error("Steam API Key not found");
}

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

Labels

needs:resolve-merge-conflict pr:please address review comments this PR needs a bit more work to be mergable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dyndns based Steam game server monitoring

3 participants