Repository: favonia/cloudflare-ddns
Pull request #833 (2024-07-24 06:09:13)

docs: minor documentation tweaks

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/833?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) Report
Attention: Patch coverage is `0%` with `1 line` in your changes missing coverage. Please review.
> Project coverage is 94.00%. Comparing base [(`a48ac57`)](https://app.codecov.io/gh/favonia/cloudflare-ddns/commit/a48ac571e169dd2aa0090eb4001df36367f5c38c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) to head [(`9fbdc4e`)](https://app.codecov.io/gh/favonia/cloudflare-ddns/commit/9fbdc4ec5c582ef96e33cb79d5fac08cc55c5f9a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).

| [Files](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/833?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | Patch % | Lines |
|---|---|---|
| [internal/config/check\_root.go](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/833?src=pr&el=tree&filepath=internal%2Fconfig%2Fcheck_root.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia#diff-aW50ZXJuYWwvY29uZmlnL2NoZWNrX3Jvb3QuZ28=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/833?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) |

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main     #833   +/-   ##
=======================================
  Coverage   94.00%   94.00%           
=======================================
  Files          54       54           
  Lines        2200     2200           
=======================================
  Hits         2068     2068           
  Misses        120      120           
  Partials       12       12           
```

| [Flag](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/833/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | Coverage Δ | |
|---|---|---|
| [unittests](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/833/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | `94.00% <0.00%> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/favonia/cloudflare-ddns/pull/833?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia).


Patch:
diff --git a/README.markdown b/README.markdown
index 21dad78..bddd589 100644
--- a/README.markdown
+++ b/README.markdown
@@ -173,23 +173,23 @@ docker-compose up --detach --build cloudflare-ddns
 ## ❓ Frequently Asked Questions
 
 <details>
-<summary>😠 I simulated an IP address change by editing the DNS records, but the updater never picks it up!</summary>
+<summary>😠 I simulated an IP address change by editing the DNS records, but the updater never picked it up!</summary>
 
-Please rest assured that the updater is working as expected. **It will update the DNS records _immediately_ in the event of a real IP change.** Here is the detailed explanation. There are two causes of an IP mismatch:
+Please rest assured that the updater is working as expected. **It will update the DNS records _immediately_ for a real IP change.** Here is a detailed explanation. There are two causes of an IP mismatch:
 
 1. A change of your actual IP address (a real change), or
 2. A change of the IP address in the DNS records (a simulated change).
 
-The updater assumes no one will actively change the DNS records. In other words, it assumes simulated changes will not happen. It thus caches the DNS records and cannot pick up your simulated changes. However, when your IP address actually changes, the updater will immediately update the DNS records. Also, the updater will eventually check the DNS records when `CACHE_EXPIRATION` (six hours by default) has passed.
+The updater assumes no one will actively change the DNS records. In other words, it assumes simulated changes will not happen. It thus caches the DNS records and cannot detect your simulated changes. However, when your actual IP address changes, the updater will immediately update the DNS records. Also, the updater will eventually check the DNS records and detect simulated changes after `CACHE_EXPIRATION` (six hours by default) has passed.
 
-If you really wish to test the updater with simulated IP changes in the DNS records, you can set `CACHE_EXPIRATION=1ns` (all cache expiring in one nanosecond), which effectively disables the caching. However, it is recommended to keep the default value (six hours) to reduce your network traffic.
+If you really wish to test the updater with simulated IP changes in the DNS records, you can set `CACHE_EXPIRATION=1ns` (all cache expiring in one nanosecond), effectively disabling the caching. However, it is recommended to keep the default value (six hours) to reduce your network traffic.
 
 </details>
 
 <details>
-<summary>😠 Why did the updater detect a public IP address different from the WAN address on my router?</summary>
+<summary>😠 Why did the updater detect a public IP address different from the WAN IP address on my router?</summary>
 
-Is your “public” IP on your router between 100.64.0.0 and 100.127.255.255? If so, you are within your ISP’s [CGNAT (Carrier-grade NAT)](https://en.wikipedia.org/wiki/Carrier-grade_NAT). In practice, there is no way for DDNS to work with CGNAT, because your ISP does not give you a real public address, nor does it allow you to forward packages to your router using cool protocols such as [Port Control Protocol](https://en.wikipedia.org/wiki/Port_Control_Protocol). You have to give up DDNS or switch to another ISP. You may consider other services such as [Cloudflare Tunnels](https://www.cloudflare.com/products/tunnel/) that can work around CGNAT.
+Is your “public” IP address on your router between `100.64.0.0` and `100.127.255.255`? If so, you are within your ISP’s [CGNAT (Carrier-grade NAT)](https://en.wikipedia.org/wiki/Carrier-grade_NAT). In practice, there is no way for DDNS to work with CGNAT, because your ISP does not give you a real public IP address, nor does it allow you to forward IP packages to your router using cool protocols such as [Port Control Protocol](https://en.wikipedia.org/wiki/Port_Control_Protocol). You have to give up DDNS or switch to another ISP. You may consider other services such as [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) that can work around CGNAT.
 
 </details>
 
diff --git a/docs/DESIGN.markdown b/docs/DESIGN.markdown
index 62dc32c..c6038aa 100644
--- a/docs/DESIGN.markdown
+++ b/docs/DESIGN.markdown
@@ -2,7 +2,7 @@
 
 ## Principles and Priorities
 
-Be the 🌟 best DDNS tool 🌟 that [favonia](mailto:favonia+github@gmail.com) wants to use.
+Be the 🌟 best DDNS updater 🌟 that [favonia](mailto:favonia+github@gmail.com) wants to use.
 
 1. Support all features [favonia](mailto:favonia+github@gmail.com) wants, including emojis.
 
@@ -41,7 +41,7 @@ The goal is to stop the adversary from tricking the updater into updating manage
 
 ### Protection
 
-The connection to Cloudflare’s servers is always protected by HTTPS, making it more resistant to forged IP packets. Many other DDNS tools use simple DNS lookups to detect public IP addresses, which is less secure because of [DNS spoofing](https://en.wikipedia.org/wiki/DNS_spoofing).
+The connection to Cloudflare’s servers is always protected by HTTPS, making it more resistant to forged IP packets. Many other DDNS updaters use simple DNS lookups to detect public IP addresses, which is less secure because of [DNS spoofing](https://en.wikipedia.org/wiki/DNS_spoofing).
 
 ### Unsafe Scenarios
 
@@ -51,4 +51,4 @@ Public IP addresses, by their own definition, depend on how other machines (in o
 2. The adversary can access networks close to Cloudflare’s servers and intercept your IP packets. Note that the adversary does not need to break HTTPS---HTTPS does not protect the source and target IP addresses.
 3. The adversary can access the cable between your machine and the internet, or that you are within a country-scale firewall. (Although they can already redirect the traffic in this case, and thus whether the updater is secure or not is no longer relevant.)
 
-There is no way to securely detect the intended public IP address in these scenarios. If you wish to be immune to these attacks, it is recommended to buy static IP addresses instead of using this tool (or any DDNS updater).
+There is no way to securely detect the intended public IP address in these scenarios. If you wish to be immune to these attacks, it is recommended to buy static IP addresses instead of using this updater (or any DDNS updater).
diff --git a/internal/config/check_root.go b/internal/config/check_root.go
index 58f95bd..dde8d2f 100644
--- a/internal/config/check_root.go
+++ b/internal/config/check_root.go
@@ -9,7 +9,7 @@ import (
 // CheckRoot checks whether the effective user ID is 0 and whether PUID or PGID is set.
 func CheckRoot(ppfmt pp.PP) {
 	if syscall.Geteuid() == 0 {
-		ppfmt.Warningf(pp.EmojiUserWarning, "You are running this tool as root, which is usually a bad idea")
+		ppfmt.Warningf(pp.EmojiUserWarning, "You are running this updater as root, which is usually a bad idea")
 	}
 
 	useDeprecated := false
diff --git a/internal/pp/emoji.go b/internal/pp/emoji.go
index 80ae46e..2d002f8 100644
--- a/internal/pp/emoji.go
+++ b/internal/pp/emoji.go
@@ -3,9 +3,9 @@ package pp
 // Emoji is the type of emoji strings.
 type Emoji string
 
-// Various constants defining emojis used in the tool.
+// Various constants defining emojis used in the updater.
 const (
-	EmojiStar   Emoji = "🌟" // stars attached to the tool name
+	EmojiStar   Emoji = "🌟" // stars attached to the updater name
 	EmojiBullet Emoji = "🔸" // generic bullet points
 
 	EmojiEnvVars      Emoji = "📖" // reading configuration


Test patch:
diff --git a/internal/config/check_root_test.go b/internal/config/check_root_test.go
index 122422a..bcad4ca 100644
--- a/internal/config/check_root_test.go
+++ b/internal/config/check_root_test.go
@@ -18,7 +18,7 @@ func TestCheckRoot(t *testing.T) {
 	mockCtrl := gomock.NewController(t)
 	mockPP := mocks.NewMockPP(mockCtrl)
 	if syscall.Geteuid() == 0 {
-		mockPP.EXPECT().Warningf(pp.EmojiUserWarning, "You are running this tool as root, which is usually a bad idea")
+		mockPP.EXPECT().Warningf(pp.EmojiUserWarning, "You are running this updater as root, which is usually a bad idea")
 	}
 	config.CheckRoot(mockPP)
 }
@@ -32,7 +32,7 @@ func TestCheckRootWithOldConfigs(t *testing.T) {
 	mockPP := mocks.NewMockPP(mockCtrl)
 	var calls []any
 	if syscall.Geteuid() == 0 {
-		calls = append(calls, mockPP.EXPECT().Warningf(pp.EmojiUserWarning, "You are running this tool as root, which is usually a bad idea")) //nolint:lll
+		calls = append(calls, mockPP.EXPECT().Warningf(pp.EmojiUserWarning, "You are running this updater as root, which is usually a bad idea")) //nolint:lll
 	}
 	calls = append(calls,
 		mockPP.EXPECT().Warningf(pp.EmojiUserError, "PUID=%s is ignored; use Docker's built-in mechanism to set user ID", "1000"),  //nolint:lll