zonesync 0.14.1 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/lib/zonesync/record.rb +1 -11
- data/lib/zonesync/route53.rb +12 -2
- data/lib/zonesync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 46a1af2deec25de218acd4d6cebf63f1a0e6d996d95ec4a0311603e943395501
|
|
4
|
+
data.tar.gz: 7b6b8e32fb8709a02299fa1a805facf2c1dec6cf3491010f960fed90516c31b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90730972e5edb267dafb7c4f7f3da11fbccf5befd25c0d1b99817804275a13543bd1f67b55d4945a982ece2790da74341293e394af120ebce2a8e64b79c77356
|
|
7
|
+
data.tar.gz: da7f4c54f907de870e88b8eeb8c33efa51e8dfe46206a31b366c90d6c6842b4d22e9fba426fb94fe4cea9347415acc692234dc86366c6a6d7cdbbfc2333f7283
|
data/README.md
CHANGED
|
@@ -110,6 +110,22 @@ Zonesync.call(source: "Zonefile", destination: "zonesync", dry_run: true)
|
|
|
110
110
|
Zonesync.generate(source: "zonesync", destination: "Zonefile")
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
+
### Cloudflare proxy status
|
|
114
|
+
|
|
115
|
+
When using the Cloudflare provider, you can control whether a record is proxied through Cloudflare's CDN by adding a `cf_tags` comment to the record in your zone file:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
www IN A 192.0.2.1 ; cf_tags=cf-proxied:true
|
|
119
|
+
mail IN A 192.0.2.2 ; cf_tags=cf-proxied:false
|
|
120
|
+
api IN A 192.0.2.3
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
- `cf_tags=cf-proxied:true` — enable Cloudflare proxy (orange cloud)
|
|
124
|
+
- `cf_tags=cf-proxied:false` — explicitly disable proxy (grey cloud)
|
|
125
|
+
- No `cf_tags` — don't touch the proxied setting (use Cloudflare's default)
|
|
126
|
+
|
|
127
|
+
When generating a zone file with `zonesync generate`, proxied records will automatically include the `cf_tags=cf-proxied:true` tag in their comments.
|
|
128
|
+
|
|
113
129
|
### Managing or avoiding conflicts with other people making edits to the DNS records
|
|
114
130
|
|
|
115
131
|
Zonesync writes two additional TXT records: `zonesync_manifest` and `zonesync_checksum`. These two records together try to handle the situation where someone else makes edits directly to the DNS records managed by zonesync.
|
data/lib/zonesync/record.rb
CHANGED
|
@@ -53,17 +53,7 @@ module Zonesync
|
|
|
53
53
|
|
|
54
54
|
def conflicts_with?(other)
|
|
55
55
|
return false unless name == other.name && type == other.type
|
|
56
|
-
|
|
57
|
-
case type
|
|
58
|
-
when "CNAME", "SOA"
|
|
59
|
-
true
|
|
60
|
-
when "MX"
|
|
61
|
-
existing_priority = rdata.split(' ').first
|
|
62
|
-
new_priority = other.rdata.split(' ').first
|
|
63
|
-
existing_priority == new_priority
|
|
64
|
-
else
|
|
65
|
-
false
|
|
66
|
-
end
|
|
56
|
+
Record.single_record_per_name?(type)
|
|
67
57
|
end
|
|
68
58
|
|
|
69
59
|
def self.single_record_per_name?(type)
|
data/lib/zonesync/route53.rb
CHANGED
|
@@ -68,8 +68,18 @@ module Zonesync
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def change(old_record, new_record)
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
new_set = if old_record.manifest? || old_record.checksum?
|
|
72
|
+
# our metadata records are singletons, always replace
|
|
73
|
+
[new_record]
|
|
74
|
+
else
|
|
75
|
+
existing_records = records.select do |r|
|
|
76
|
+
r.name == old_record.name && r.type == old_record.type
|
|
77
|
+
end
|
|
78
|
+
(existing_records.reject { |r| r.identical_to?(old_record) } + [new_record]).uniq
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
change_records("UPSERT", new_set)
|
|
82
|
+
invalidate_cache!
|
|
73
83
|
end
|
|
74
84
|
|
|
75
85
|
def add(record)
|
data/lib/zonesync/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zonesync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.14.
|
|
4
|
+
version: 0.14.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-06-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: thor
|