發表文章

目前顯示的是 2月, 2024的文章

據說 cloudflare 也是可以用 ddns 的

 實作在 mikrotik 上更新 cloudflare ddns ip ,原來只要開通 cloudflare api 就行…… 單藍,要再加些楜椒和鹽… 工作環境:  Linux Shell  Mikrotik routerOS  cloudflare API # 建立更新 cloudflare DNS 記錄用的 API Token # create API Token in cloudflare The TOKEN value is created in the Cloudflare dashboard. Follow these steps: 1.  Click the profile icon in the top right of the dashboard, and choose 'My Profile' . 2.  Click on 'API Tokens' , then 'Create Token' . 3.  Click 'Start with a template' , then choose the 'Edit zone DNS' template. 4.  Under 'Zone Resources' , choose your top level domain name from the pull-down list on the right. 5.  Click 'Continue to summary' . 6.  Click 'Create Token' . 7.  Copy the token shown on the following screen and set the TOKEN environment variable to its value. # 更新 cloudflare DNS 紀錄會用到的變數 # 參考資料說要用 direnv 因為除錯失敗,直接把變數放到 gen_script 裏了…… # Variables needed for updating cloudflare DNS records HOST =api.cloudflare.com DOMAIN =yourDomain.n