Category Archives

10 Articles

cloudflare-partner-cli: using CNAME on cloudflare

中文版本

This is a CLI program that let you set CNAME to use Cloudflare using the partner program.

Both Python2.x and Python3.x is supported. No extra library is needed.

To use Chinese menu, set environment variable LANG to use UTF-8 (for example, zh_CN.UTF-8).

Usage

  1. Apply for partner program at https://www.cloudflare.com/partners/.
  2. Clone this repository or download script.
  3. Run python ./cloudflare-partner-cli.py.
  4. Enter your host_key. You can get it here.
  5. Enter the account you use to manage domains (your personal account, not partner login account). User key is stored in .cfhost.
  6. Follow the instructions on screen.

Note

  • Value of resolve_to has to be DNS record (for example: google.com) instead of IP address.

cloudflare-partner-cli: 使用CNAME方式接入Cloudflare

0   9885 轉為簡體

English Version

使用Cloudflare partner功能用CNAME方式接入cloudflare。

你可以使用Python2.x或者Python3.x。無需安裝任何依賴。

如需使用中文菜單,請將環境變量的LANG設置為使用UTF-8 (比如zh_CN.UTF-8)。

使用方法

  1. 申請Cloudflare partner計劃 https://www.cloudflare.com/partners/ 。
  2. clone本項目或者直接下載腳本
  3. 運行 python ./cloudflare-partner-cli.py
  4. 輸入 host_key。可以從這裡獲得。
  5. 輸入要用來管理域名的賬號 (你的個人賬號,不是partner賬號)。賬戶信息保存在.cfhost文件中。
  6. 按照屏幕提示操作。

注意

  • 源站地址必須為DNS記錄,如google.com,不能填寫IP地址。

 

啟用yoooo.us

10   12197 轉為簡體

準備把之前用的一套(山寨)cdn用到博客和其他一堆亂七八糟的站上面,用了yoooo.us(4個o)來做cname。主要現在的yooooo.us還依賴cloudflare的服務沒法搬,所以另外註冊了一個放到cloudxns上根據運營商區分解析。現在電信走的是idcf;聯通移動和港澳台小夥伴是vultr日本;國外是cc的lax。韓國kt用來做冗餘。

所以對於你們來說,每次打開我的博客的時候,可以至少省一個字節的流量了。