https://github.com/blakeliafk/cloudflare-ddns
https://github.com/blakeliafk/cloudflare-ddns
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/blakeliafk/cloudflare-ddns
- Owner: BlakeLiAFK
- Created: 2018-06-01T16:57:47.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-12T04:31:57.000Z (almost 7 years ago)
- Last Synced: 2025-02-07T08:23:29.419Z (4 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
./cloudflare-ddns -d domain -u mail -k cloudflare-key -z zones-id -i [new-IP|option] -x [domain id|option]
-d domain 域名
-u mail CF用户名
-k cloudflare key CF访问KEY
-z zones id 域名的zone id
-i new IP 新指定的IP(可选参数, 未指定则自动去查询)
-x domain id 子域名id(可选参数, 未指定则自动去CF查询)
```
## all by command```
#!/bin/bash
#### get domain id
curl --insecure -X GET "https://api.cloudflare.com/client/v4/zones/xx-zones_id-xx/dns_records?type=A&name=xx-your_domain-xx&page=1&per_page=20&order=type&direction=desc&match=all" \
-H "X-Auth-Email: [email protected]" \
-H "X-Auth-Key: your-cf-key" \
-H "Content-Type: application/json"#### change dns record
curl -X PUT "https://api.cloudflare.com/client/v4/zones/xx--zones_id-xx/dns_records/xx-domain_id-xx" \
-H "X-Auth-Email: [email protected]" \
-H "X-Auth-Key: your-cf-key" \
-H "Content-Type: application/json" \
--data '{"type":"A","name":"xx-your-domain-xx","content":"xx--new_ip-xx","ttl":120,"proxied":false}'```
## mips32le 编译
```
git clone https://github.com/gomini/go-mips32.git
cd go-mips32/src
export GOOS=linux
export GOARCH=mips32le
./make.bash
cd ..
sudo mkdir /opt/mipsgo
sudo cp -R * /opt/mipsgo
```