爱意满满的作品展示区。
marginleft

[3/100]分享一个动态更新本机 ip 到 dns 服务器的脚本

  •  
  •   marginleft ·
    100apps · Jan 9 · 1819 views
    This topic created in 124 days ago, the information mentioned may be changed or developed.

    家里的宽带,打电话开通了公网 IP ,所以需要定时更新公网 IP ,防止重启后 dns 记录不更新。因为是托管在 cloudflare 上的域名,没有找到现成的工具,所以自己用 github copilot 写了一个脚本。自己测试了一下,比较符合预期:

    ./ddns_sync_public_ip.sh --setup-cron
    

    添加到定时任务里面,就不用管了,默认每 5 分钟同步一次。

    3 replies    2026-01-10 10:58:03 +08:00
    yangyaofei
        1
    yangyaofei  
       Jan 10
    https://github.com/qdm12/ddns-updater/tree/master 这个,用了好几年了, 还挺好的
    marginleft
        2
    marginleft  
    OP
       Jan 10
    @yangyaofei 多谢分享,这个项目确实太专业了,基本上市面上的厂商都支持了,太强了。
    wymam
        3
    wymam  
       Jan 10
    不是一个 lucky 就能解决的问题吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   938 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 20:58 · PVG 04:58 · LAX 13:58 · JFK 16:58
    ♥ Do have faith in what you're doing.