Bug #474 » ddns_timeout.patch
data/ddns/schema/client.yml | ||
---|---|---|
14 | 14 |
"proxy_url": {type: str} |
15 | 15 |
"user": {type: str, required: yes} |
16 | 16 |
"passwd": {type: str, required: yes} |
17 |
"timeout": {type: int} |
|
17 | 18 |
"profiles": |
18 | 19 |
type: map |
19 | 20 |
required: yes |
data/ddns/schema/myip.yml | ||
---|---|---|
5 | 5 |
"url": {type: str, required: yes} |
6 | 6 |
"proxy_url": {type: str} |
7 | 7 |
"default_interface": {type: str} |
8 |
"timeout": {type: int} |
lib/ddns/myip.rb | ||
---|---|---|
38 | 38 |
curl.follow_location = true |
39 | 39 |
curl.resolve_mode = type |
40 | 40 |
curl.set(:interface, 'if!%s' % iface) if iface |
41 |
curl.timeout = @config.timeout if @config.timeout |
|
41 | 42 |
end |
42 | 43 | |
43 | 44 |
# TODO: how to check when IPv4/6 is not available |
lib/ddns/regip.rb | ||
---|---|---|
32 | 32 |
curl.proxy_url = @config.proxy_url if @config.proxy_url |
33 | 33 |
curl.follow_location = true |
34 | 34 |
curl.userpwd = sprintf("%s:%s", @config.user, @config.passwd) |
35 |
curl.timeout = @config.timeout if @config.timeout |
|
35 | 36 |
end |
36 | 37 | |
37 | 38 |
begin |