Skip to content

Commit

Permalink
docs: Make docs more beautiful (#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeessy2 authored Jan 12, 2024
1 parent 01d3f4d commit 68f8b51
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## 特性

- 支持Mac、Windows、Linux系统,支持ARM、x86架构
- 支持的域名服务商 `阿里云` `腾讯云` `Dnspod` `Cloudflare` `华为云` `Callback` `百度云` `Porkbun` `GoDaddy` `Google Domain`
- 支持的域名服务商 `阿里云` `腾讯云` `Dnspod` `Cloudflare` `华为云` `Callback` `百度云` `Porkbun` `GoDaddy` `Google Domain` `Namecheap` `NameSilo`
- 支持接口/网卡/[命令](https://github.com/jeessy2/ddns-go/wiki/通过命令获取IP参考)获取IP
- 支持以服务的方式运行
- 默认间隔5分钟同步一次
Expand All @@ -43,16 +43,29 @@
- [可选] 服务卸载
- Mac/Linux: `sudo ./ddns-go -s uninstall`
- Win(以管理员打开cmd): `.\ddns-go.exe -s uninstall`
- [可选] 支持安装带参数 `-l`监听地址 `-f`同步间隔时间(秒) `-cacheTimes`间隔N次与服务商比对 `-c`自定义配置文件路径 `-noweb`不启动web服务 `-skipVerify`跳过证书验证 `-dns` 自定义 DNS 服务器。如:`./ddns-go -s install -l :9876 -f 600 -c /Users/name/ddns-go.yaml`
- [可选] 支持安装带参数
- `-l` 监听地址
- `-f` 同步间隔时间(秒)
- `-cacheTimes` 间隔N次与服务商比对
- `-c` 自定义配置文件路径
- `-noweb` 不启动web服务
- `-skipVerify` 跳过证书验证
- `-dns` 自定义 DNS 服务器
- [可选] 参考示例
- 10分钟同步一次, 并指定了配置文件地址
```bash
./ddns-go -s install -f 600 -c /Users/name/.ddns_go_config.yaml
```
- 每 10 秒检查一次本地 IP 变化, 每 30 分钟对比一下 IP 变化, 实现 IP 变化即时触发更新且不会被服务商限流, 如果使用接口获取IP, 需要注意接口限流
```bash
./ddns-go -s install -f 10 -cacheTimes 180
```
- [可选] 使用 [Homebrew](https://brew.sh) 安装 [ddns-go](https://formulae.brew.sh/formula/ddns-go):

```bash
brew install ddns-go
```

> [!NOTE]
> 通过合理的配置 `-f``-cacheTimes` 可以实现 IP 变化即时触发更新且不会被 DDNS 服务商限流, 例如 `-f 10 -cacheTimes 360` 效果为每 10 秒检查一次本地 IP 变化, 每小时去公网对比一下 IP 变化
## Docker中使用

- 挂载主机目录, 使用docker host模式。可把 `/opt/ddns-go` 替换为你主机任意目录, 配置文件为隐藏文件
Expand Down Expand Up @@ -222,7 +235,7 @@
| #{ip} | 新的IPv4/IPv6地址 |
| #{domain} | 当前域名 |
| #{recordType} | 记录类型 `A``AAAA` |
| #{ttl} | ttl |
| #{ttl} | TTL |
- 如 RequestBody 为空则为 GET 请求,否则为 POST 请求
- [Callback配置参考](https://github.com/jeessy2/ddns-go/wiki/Callback配置参考)

Expand Down
18 changes: 17 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,23 @@ Automatically obtain your public IPv4 or IPv6 address and resolve it to the corr
- [Optional] Uninstall service
- Mac/Linux: `sudo ./ddns-go -s uninstall`
- Win(Run as administrator): `.\ddns-go.exe -s uninstall`
- [Optional] Support installation with parameters `-l` listen address `-f` Sync frequency(seconds) `-cacheTimes` interval N times compared with service providers `-c` custom configuration file path `-noweb` does not start web service `-skipVerify` skip certificate verification `-dns` custom DNS server. example:`./ddns-go -s install -l :9876 -f 600 -c /Users/name/ddns-go.yaml`
- [Optional] Support installation with parameters
- `-l` listen address
- `-f` sync frequency(seconds)
- `-cacheTimes` interval N times compared with service providers
- `-c` custom configuration file path
- `-noweb` does not start web service
- `-skipVerify` skip certificate verification
- `-dns` custom DNS server
- [Optional] Examples
- 10 minutes to synchronize once, and the configuration file address is specified
```bash
./ddns-go -s install -f 600 -c /Users/name/.ddns_go_config.yaml
```
- Every 10 seconds to check the local IP changes, every 30 minutes to compare the IP changes, to achieve IP changes immediately trigger updates and will not be limited by the service providers, if the use of api to obtain IP, need to pay attention to the api side of the flow limit
```bash
./ddns-go -s install -f 10 -cacheTimes 180
```
- [Optional] You can use [Homebrew](https://brew.sh) to install [ddns-go](https://formulae.brew.sh/formula/ddns-go)

```bash
Expand Down

0 comments on commit 68f8b51

Please sign in to comment.