Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix various stuff #571

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021-2022 Favonia and contributors
Copyright 2021-2023 Favonia and contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this work except in compliance with the License.
Expand Down
20 changes: 11 additions & 9 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ _(Click to expand the following items.)_
<details>
<summary>📍 Domains and IP providers</summary>

| Name | Valid Values | Meaning | Required? | Default Value |
| -------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------- | ------------------ |
| `DOMAINS` | Comma-separated fully qualified domain names or wildcard domain names | The domains the updater should manage for both `A` and `AAAA` records | (See below) | (empty list) |
| `IP4_DOMAINS` | Comma-separated fully qualified domain names or wildcard domain names | The domains the updater should manage for `A` records | (See below) | (empty list) |
| `IP6_DOMAINS` | Comma-separated fully qualified domain names or wildcard domain names | The domains the updater should manage for `AAAA` records | (See below) | (empty list) |
| `IP4_PROVIDER` | `cloudflare.doh`, `cloudflare.trace`, `local`, and `none` | How to detect IPv4 addresses. (See below) | No | `cloudflare.trace` |
| `IP6_PROVIDER` | `cloudflare.doh`, `cloudflare.trace`, `local`, and `none` | How to detect IPv6 addresses. (See below) | No | `cloudflare.trace` |
| Name | Valid Values | Meaning | Required? | Default Value |
| -------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------- | ------------------ |
| `DOMAINS` | Comma-separated fully qualified domain names or wildcard domain names | The domains the updater should manage for both `A` and `AAAA` records | (See below) | (empty list) |
| `IP4_DOMAINS` | Comma-separated fully qualified domain names or wildcard domain names | The domains the updater should manage for `A` records | (See below) | (empty list) |
| `IP6_DOMAINS` | Comma-separated fully qualified domain names or wildcard domain names | The domains the updater should manage for `AAAA` records | (See below) | (empty list) |
| `IP4_PROVIDER` | `cloudflare.doh`, `cloudflare.trace`, `local`, and `none`. 🧪 See below for the experimental custom provider `url:URL`. | How to detect IPv4 addresses. (See below) | No | `cloudflare.trace` |
| `IP6_PROVIDER` | `cloudflare.doh`, `cloudflare.trace`, `local`, and `none`. 🧪 See below for the experimental custom provider `url:URL`. | How to detect IPv6 addresses. (See below) | No | `cloudflare.trace` |

> <details>
> <summary>📍 At least one of <code>DOMAINS</code> and <code>IP4/6_DOMAINS</code> must be non-empty.</summary>
Expand All @@ -229,11 +229,13 @@ _(Click to expand the following items.)_
> - `cloudflare.trace`\
> Get the public IP address by parsing the [Cloudflare debugging page](https://one.one.one.one/cdn-cgi/trace) and update DNS records accordingly. This is the default provider.
> - `local`\
> Get the address via local network interfaces and update DNS records accordingly. When multiple local network interfaces or in general multiple IP addresses are present, the updater will use the address that would have been used for outbound UDP connections to Cloudflare servers. ⚠️ You need access to the host network (such as `network_mode: host` in Docker Compose) for this policy, for otherwise the updater will detect the addresses inside the [bridge network in Docker](https://docs.docker.com/network/bridge/) instead of those in the host network.
> Get the address via local network interfaces and update DNS records accordingly. When multiple local network interfaces or in general multiple IP addresses are present, the updater will use the address that would have been used for outbound UDP connections to Cloudflare servers.
> ⚠️ You need access to the host network (such as `network_mode: host` in Docker Compose) for this policy, for otherwise the updater will detect the addresses inside the [bridge network in Docker](https://docs.docker.com/network/bridge/) instead of those in the host network.
> - `none`\
> Stop the DNS updating completely. Existing DNS records will not be removed.
> - `url:URL` (🧪 experimental)\
> Fetch the content at a URL via the HTTP(S) protocol as the IP address. The provider format is `url:` followed by the URL. For example, `IP4_PROVIDER=url:https://api4.ipify.org` will fetch the IPv4 addresses from <https://api4.ipify.org>, a server maintained by [ipify](https://www.ipify.org). ⚠️ Currently, the updater does not force the HTTP(S) connections to use IPv4 or IPv6 when retrieving the content at the URL, and thus the service must restrict its access to the correct network (IPv4 or IPv6) or return the correct address even when the wrong network is used. The reason is that there is no elegant way to force IPv4 or IPv6 using the Go standard library; please [open a GitHub issue](https://github.com/favonia/cloudflare-ddns/issues/new) if you have a use case.
> Fetch the content at a URL via the HTTP(S) protocol as the IP address. The provider format is `url:` followed by the URL. For example, `IP4_PROVIDER=url:https://api4.ipify.org` will fetch the IPv4 addresses from <https://api4.ipify.org>, a server maintained by [ipify](https://www.ipify.org).
> ⚠️ Currently, the updater does not force IPv4 or IPv6 when retrieving the IPv4 or IPv6 address at the URL, and thus the service must either restrict its access to the correct IP network or return the correct IP address regardless of what IP network is used. The reason is that there is no elegant way to force IPv4 or IPv6 using the Go standard library; please [open a GitHub issue](https://github.com/favonia/cloudflare-ddns/issues/new) if you have a use case so that I might explore the hack to force it.
>
> The option `IP4_PROVIDER` is governing IPv4 addresses and `A`-type records, while the option `IP6_PROVIDER` is governing IPv6 addresses and `AAAA`-type records. The two options act independently of each other; that is, you can specify different address providers for IPv4 and IPv6.
>
Expand Down
2 changes: 1 addition & 1 deletion internal/config/network_probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
ppfmt.Warningf(pp.EmojiGood, "1.0.0.1 appears to be working and will be used instead of 1.1.1.1")
c.Use1001 = true
} else {
ppfmt.Warningf(pp.EmojiGood, "1.0.0.1 appears to be blocked or hijacked as well; sticking to 1.1.1.1")
ppfmt.Warningf(pp.EmojiError, "1.0.0.1 is not working either---perhaps the network is down; sticking to 1.1.1.1")

Check warning on line 54 in internal/config/network_probe.go

View check run for this annotation

Codecov / codecov/patch

internal/config/network_probe.go#L54

Added line #L54 was not covered by tests
}
}
return true
Expand Down
Loading