Skip to content

cfddns: 新增支持维护多条DNS记录#147

Open
thetapilla wants to merge 1 commit intokoolshare:masterfrom
thetapilla:master
Open

cfddns: 新增支持维护多条DNS记录#147
thetapilla wants to merge 1 commit intokoolshare:masterfrom
thetapilla:master

Conversation

@thetapilla
Copy link
Copy Markdown

我在使用插件时的想法是路由器设置端口转发到服务器,然后服务器区分子域名做反向代理,所以产生了想让插件同时维护多个域名的想法。
其他的改动主要有对解析日志的优化以及更改默认获取ip的脚本。
附上本地打包运行的效果以及copilot对pr的总结:

image image

This pull request introduces major enhancements to the CloudFlare DDNS script and its web UI, focusing on supporting multiple domain records (up to 10), improving error handling, and streamlining the configuration experience. The backend shell script and frontend web interface have been refactored to manage multiple domain entries, validate input, and provide clearer status reporting.

Multiple domain record support and input validation:

  • Added support for configuring and updating up to 10 domain records simultaneously, both in the backend script (cfddns_config.sh) and the web UI (Module_cfddns.asp). This includes new logic for parsing, validating, and iterating over multiple records, as well as user feedback when limits or errors are encountered. [1] [2] [3] [4]

Backend script improvements:

  • Refactored the update logic to loop through each configured domain, handle errors per record, and aggregate status messages. Improved error handling for record fetching, updating, and local IP retrieval, with more informative logging and status reporting.
  • Default commands for obtaining IPv4 and IPv6 addresses have been updated to use curl ifconfig.me and curl -6 ifconfig.me, respectively, for greater reliability. [1] [2]

Web UI enhancements:

  • Replaced single domain input fields with a dynamic, validated list of domain record entries. Users can add/remove records, with real-time validation for duplicates, format, and maximum count. [1] [2]
  • The UI now displays the number of configured records and disables adding more when the limit is reached.
  • The default values for the IP detection commands in the UI have been updated to match the backend changes.

Version update:

  • Bumped the version from 1.1 to 1.3 to reflect these significant feature additions and improvements.

Add multi-record DNS update support, improve Cloudflare API parsing, and switch default IP fetch commands to ifconfig.me.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant