Project

General

Profile

Bug #474 » ddns_timeout.patch

Marc Dequènes, 2015-08-31 22:12

View differences:

data/ddns/schema/client.yml
"proxy_url": {type: str}
"user": {type: str, required: yes}
"passwd": {type: str, required: yes}
"timeout": {type: int}
"profiles":
type: map
required: yes
data/ddns/schema/myip.yml
"url": {type: str, required: yes}
"proxy_url": {type: str}
"default_interface": {type: str}
"timeout": {type: int}
lib/ddns/myip.rb
curl.follow_location = true
curl.resolve_mode = type
curl.set(:interface, 'if!%s' % iface) if iface
curl.timeout = @config.timeout if @config.timeout
end
# TODO: how to check when IPv4/6 is not available
lib/ddns/regip.rb
curl.proxy_url = @config.proxy_url if @config.proxy_url
curl.follow_location = true
curl.userpwd = sprintf("%s:%s", @config.user, @config.passwd)
curl.timeout = @config.timeout if @config.timeout
end
begin
    (1-1/1)