dns_one 0.4.49 → 0.4.50
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/lib/dns_one/backend/http_bell.rb +4 -4
- data/lib/dns_one/version.rb +1 -1
- data/lib/dns_one/zone_search.rb +3 -3
- data/util/sample_conf.yml +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 118a9ea3ff72f1a77e5735b7b1511e567e154772
|
|
4
|
+
data.tar.gz: 264c158771706188c9ebb91edc52e48da536d260
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3367a5ec3b62bd03e79d1b1c5421acfec1a5133a3751cd1f77ba8a3ed54e2b934acaf04af088902c6d9c1f23b1e32a9b2a2058660f96d915c2da762e85a8dae8
|
|
7
|
+
data.tar.gz: 2adcd0aaad8da4bb9d8634fbe19647365b2a67e3d9466cac1aca94530d95ffb3be0a6517488fffced37bf0c5669401dca0dff54cd734d1d58e354b2c71ec5b08
|
|
@@ -22,7 +22,7 @@ module DnsOne; module Backend; class HTTPBell < Base
|
|
|
22
22
|
def update
|
|
23
23
|
last_id = @last_id || 0
|
|
24
24
|
|
|
25
|
-
url = @conf[:
|
|
25
|
+
url = @conf[:http_bell_url].sub '$id', last_id.to_s
|
|
26
26
|
|
|
27
27
|
recs = `curl #{url}`
|
|
28
28
|
.split("\n")
|
|
@@ -33,7 +33,7 @@ module DnsOne; module Backend; class HTTPBell < Base
|
|
|
33
33
|
recs.each do |rec|
|
|
34
34
|
id, domain = rec
|
|
35
35
|
id = id.to_i
|
|
36
|
-
@domains[domain] = @conf[:
|
|
36
|
+
@domains[domain] = @conf[:http_bell_record_set]
|
|
37
37
|
if !@last_id || @last_id < id
|
|
38
38
|
@last_id = id
|
|
39
39
|
end
|
|
@@ -43,11 +43,11 @@ module DnsOne; module Backend; class HTTPBell < Base
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def listen_updater_bell
|
|
46
|
-
unless @conf[:
|
|
46
|
+
unless @conf[:http_bell_bell_port]
|
|
47
47
|
return
|
|
48
48
|
end
|
|
49
49
|
require "socket"
|
|
50
|
-
dts = TCPServer.new '0.0.0.0', @conf[:
|
|
50
|
+
dts = TCPServer.new '0.0.0.0', @conf[:http_bell_bell_port]
|
|
51
51
|
Thread.new do
|
|
52
52
|
loop do
|
|
53
53
|
Thread.start(dts.accept) do |s|
|
data/lib/dns_one/version.rb
CHANGED
data/lib/dns_one/zone_search.rb
CHANGED
|
@@ -83,9 +83,9 @@ module DnsOne; class ZoneSearch
|
|
|
83
83
|
Util.die "Domain list file #{file} not found."
|
|
84
84
|
end
|
|
85
85
|
Backend::File.new file
|
|
86
|
-
elsif @conf[:backend][:
|
|
87
|
-
unless @conf[:backend][:
|
|
88
|
-
Util.die "backend.
|
|
86
|
+
elsif @conf[:backend][:http_bell_url]
|
|
87
|
+
unless @conf[:backend][:http_bell_record_set]
|
|
88
|
+
Util.die "backend.http_bell_record_set not set."
|
|
89
89
|
end
|
|
90
90
|
Backend::HTTPBell.new @conf[:backend]
|
|
91
91
|
else
|
data/util/sample_conf.yml
CHANGED
|
@@ -8,7 +8,6 @@ config:
|
|
|
8
8
|
backend:
|
|
9
9
|
##############
|
|
10
10
|
# DB backend #
|
|
11
|
-
##############
|
|
12
11
|
database: db_name
|
|
13
12
|
username: db_user
|
|
14
13
|
password: db_pass
|
|
@@ -26,11 +25,15 @@ backend:
|
|
|
26
25
|
query: SELECT 'my_set_1' FROM domains WHERE url = $domain LIMIT 1
|
|
27
26
|
# query: SELECT domains.record_set FROM domains WHERE domain_name = $domain LIMIT 1
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
#####################
|
|
29
|
+
# HTTP Bell backend #
|
|
30
|
+
|
|
31
|
+
http_bell_url: https://dnsapi.mysite.com/dns/fetch_since?id=$id
|
|
32
|
+
http_bell_record_set: my_set_1
|
|
33
|
+
http_bell_bell_port: 27861
|
|
30
34
|
|
|
31
35
|
################
|
|
32
36
|
# File backend #
|
|
33
|
-
################
|
|
34
37
|
|
|
35
38
|
# file: /etc/dns_one/domains.csv
|
|
36
39
|
|