Cloudflare Trace Infos bugged - prevent setting cloudflare IP ranges as records #11
Labels
No labels
bug
feature request
improvement
low-priority
priority
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
leon/New-CFUpdater#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently cloudflare has a bug where they return their own IPs from the /cdn-cgi/trace endpoint, which the cloudflare updater uses to set the records to, rendering the target unreachable.
Two things need to be implemented to fix this:
@Cloudy see if you can fix this and please document your actions and results in english.
I have read this comment. I will implement the following fixes:
I'll be working on a fork and submitting a PR once done.
I have completed the implementation and created PR #12.
Actions Taken
cloudy/New-CFUpdaterfix/validate-ip-addressexternalip/utils.go:validateIPv4()/validateIPv6()- Validates that returned IPs are:externalip/ipv4.goandexternalip/ipv6.goto call validation before returning IPsexternalip/utils_test.gowith 100% coverage of validation logicTest Results
All 26 unit tests pass, covering:
Ready for review.