feat: add IP placeholder support for custom update URL#75
Open
HJS72 wants to merge 7 commits intosimatec:mainfrom
Open
feat: add IP placeholder support for custom update URL#75HJS72 wants to merge 7 commits intosimatec:mainfrom
HJS72 wants to merge 7 commits intosimatec:mainfrom
Conversation
In the Custom provider mode, the configured update URL now supports\nplaceholders that are replaced with the current IP at runtime:\n\n- {{ipv4}} → current public IPv4\n- {{ipv6}} → current public IPv6\n- {{ip}} → current IP (v4 in IPv4 update, v6 in IPv6 update)\n\nDocumented in README.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When using the Custom provider, the configured update URL is now sent as-is without any way to include the current IP address. This PR adds placeholder support so users can embed the IP directly in the URL.
Changes
src/main.tsIn both
updateDNSv4andupdateDNSv6, thecustomcase now replaces placeholders before sending the request:{{ipv4}}→ current public IPv4 address{{ipv6}}→ current public IPv6 address{{ip}}→ current IP (IPv4 in the IPv4 update path, IPv6 in the IPv6 update path)README.mdDocuments the three available placeholders and shows an example URL.
Example