Add cloudflare-ddns command

This commit is contained in:
世界 2022-04-20 16:06:39 +08:00
parent 12e645e9d2
commit 14da4a9d2e
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
10 changed files with 234 additions and 12 deletions

View file

@ -26,4 +26,24 @@ wget 'https://github.com/Dreamacro/maxmind-geoip/releases/latest/download/Countr
```shell
go install -v -trimpath -ldflags "-s -w -buildid=" ./cli/ss-local
```
### ddns
```shell
GOBIN=/usr/local/bin/ go install -v -trimpath -ldflags "-s -w -buildid=" ./cli/cloudflare-ddns
cat > /usr/local/etc/ddns.json <<EOF
{
"cloudflare_api_key": "",
"cloudflare_api_email": "",
"domain": "example.com",
"over_proxy": false
}
EOF
sudo cp ./cli/cloudflare-ddns/ddns.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable ddns
sudo systemctl start ddns
```