Skip to content

Conversation

@iotux
Copy link
Contributor

@iotux iotux commented Jan 9, 2026

ℹ️ To keep reviews fast and effective, please make sure you’ve read our pull request guidelines

📝 Summary of changes done and why they are done

The purpose of this PR is to allow for adding Ping type monitors with IDN domains.
To achieve this, I have added IDN translation by calling URL(address) and extracting the hostname from the result.

During testing, I became aware of the URL call imposes square brackes around IPv6 addresses.
I have therefore added a block that remove those bracket to make it compatible with a shell ping command.

I have also added a similar IDN translation to the defaultFriendlyName function for monitor.hostname in EditMonitor.js.
This change will show the punycode in the Friendly Name input field in other hostname related monitor types like it is done for the HTTP(s) monitor types.

📋 Related issues

📄 Checklist

Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • ⚠️ If there are Breaking change (a fix or feature that alters existing functionality in a way that could cause issues) I have called them out
  • 🧠 I have disclosed any use of LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 My code adheres to the style guidelines of this project.
  • ⚠️ My changes generate no new warnings.
  • 🛠️ I have reviewed and tested my code.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🔒 I have considered potential security impacts and mitigated risks.
  • 🧰 Dependency updates are listed and explained.

📷 Screenshots or Visual Changes

  • UI Modifications: Highlight any changes made to the user interface.

Punycode will show in the Friendly Name fields for hostname related monitors the same way as HTTP(s) monitor types
There are no other visible changes to the user interface

@iotux iotux changed the title Fix/idn ping errors fix/idn ping errors Jan 9, 2026
@iotux iotux force-pushed the fix/idn-ping-errors branch from d8da480 to 0664642 Compare January 9, 2026 13:12
@iotux iotux changed the title fix/idn ping errors fix: idn ping errors Jan 9, 2026
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.

could you add a test so that the ping monitor does not backslides on this?

@iotux
Copy link
Contributor Author

iotux commented Jan 10, 2026

could you add a test so that the ping monitor does not backslides on this?

Done!
image

This pr will also fix issue #3929

image

Copy link
Owner

@louislam louislam left a comment

Choose a reason for hiding this comment

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

I think your last manual test was not testing ping monitor?

@iotux iotux force-pushed the fix/idn-ping-errors branch from c5d662b to 286bd73 Compare January 10, 2026 09:36
@iotux iotux force-pushed the fix/idn-ping-errors branch from 0c20f0f to 261d772 Compare January 10, 2026 10:04
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.

From my side this LGTM now.
It needs an approval from louis for a merge

@iotux
Copy link
Contributor Author

iotux commented Jan 11, 2026

From my side this LGTM now. It needs an approval from louis for a merge

I had already pushed an update when I noticed your message.
I admittedly had a bit of struggle with the unusual MacOS error message, but I found a workaround for that.
Now all tests have passed :)

@iotux iotux requested a review from louislam January 11, 2026 07:33
Removed IDN to punycode conversion for hostname.
@louislam louislam merged commit da693e0 into louislam:master Jan 11, 2026
24 checks passed
@CommanderStorm CommanderStorm added this to the 2.1.0 milestone Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants