Skip to content

Conversation

@cmdPromptCritical
Copy link

PING_INTERVAL_MINUTES = 5

Useful for @reboot crons.

cmdPromptCritical and others added 12 commits June 9, 2025 21:04
Adds interval config variable to config.sample.py
- Add get_ip_from_cloudflare_record() function for direct IP retrieval
- Add get_ip_from_existing_record() function using existing config format
- Update requirements.txt to include cloudflare package
- Add comprehensive documentation in GET_IP_FUNCTIONS.md
- Add example scripts and test files
- Update README.md with new functionality overview

Functions use official Cloudflare Python SDK with proper error handling
and integrate seamlessly with existing codebase configuration.
- Add dual IP checking: compare current IP against both last saved IP and DNS record IP
- Implement selective updates: only update records that actually need updating
- Add update verification: re-check DNS records after updates to confirm success
- Enhance logging: detailed information about what needs updating and why
- Improve fault tolerance: continue with other records if one fails
- Reduce API usage: skip unnecessary updates when DNS records are already correct
- Add comprehensive test and demo scripts for the enhanced functionality

Benefits:
- Fewer API calls and reduced rate limit usage
- Better accuracy handling corrupted/missing last IP files
- Verification of successful updates
- Granular logging for better monitoring and troubleshooting
…val-functions

Add cloudflare ip retrieval functions
- Move documentation files to docs/ folder (GET_IP_FUNCTIONS.md, ENHANCEMENT_SUMMARY.md)
- Remove demo files (demo_enhanced_run.py, demo_integration.py)
- Remove example files (example_get_ip.py)
- Remove test files (test_get_ip.py, test_updated_run.py)
- Clean up __pycache__ directories
- Update README.md to reference docs/ folder

Repository now has a cleaner structure with core functionality and organized documentation.
…val-functions

Add Cloudflare DNS record IP retrieval and enhance update logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants