MiniDynDNS - Arkanis DevelopmentStuff about programming, technology, life… err… how about the universe?http://arkanis.de/weblog.xml2018-02-19T14:56:18+01:00Comment by StephanStephanhttp://arkanis.de/weblog/2015-11-06-minidyndns#comment-2018-02-19-14-56-18-stephan2018-02-19T14:56:18+01:00
<p>Hi Chris,</p>
<p>That's a really neat idea. Thanks for sharing it and providing a patch. <span class="smiley smile">:)</span> Would have solved some trouble I had a while ago. I've implemented it based on your patch, updated the documentation and released it as v1.2.0.</p>
<p>If you want to use it you just have to download the new dns.rb file.</p>
<p>Happy programming
Stephan</p>
Comment by ChrisChrishttp://arkanis.de/weblog/2015-11-06-minidyndns#comment-2018-02-16-10-55-27-chris2018-02-16T10:55:27+01:00
<p>Hi there,</p>
<p>Chris is calling again :-)</p>
<p>Your minidyndns is working fine since months. Many thanks for that coding. I'd like contribute a patch to update ips more easy. Normally, the client updates it's own public ip. So why the client first has to find out which is his public ip. Instead, the client should tell the server: Update my IP with my current public ip.</p>
<p>So if no myip parameter is provided, use remote-ip.</p>
<p>I'm not a ruby-hacker, so I don't know if this is good code, but it works for me :-)</p>
<p>cp:/opt/minidyndns# diff dns-14.rb dns.rb
481c481,484
<
---
>
> cp_sock_domain, cp_remote_port, cp_remote_hostname, cp_remote_ip = connection.peeraddr
> log "#{cp_remote_ip} calling for update"
>
492c495
< throw :status, :bad_request unless params["myip"]
---
> # throw :status, :bad_request unless params["myip"]
494c497,502
< ip_as_string = CGI::unescape params["myip"].first
---
> if params.include? 'myip'
> ip_as_string = CGI::unescape params["myip"].first
> else
> ip_as_string = cp_remote_ip
> end
></p>
<p>Bye,
Chris</p>