Thread: [Ddclient-forum] [ddclient - Developers] Patch for namecheap
Brought to you by:
supersandro2000,
wimpunk
From: SourceForge.net <no...@so...> - 2008-02-20 16:59:33
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4789961 By: hankessels namecheap updates have this format: host=[host_name]&domain=[domain.com]&password=[domain_password]&ip=[your_ip] The host_name cannot contain the domain part. This causes problems when update of multiple namecheap hosted domains is attempted: Since the configuration is a hash keyed on host, hosts of the same name in multiple domains get overwritten in the hash. The following small patch allows specifying a fully qualified host in the configuration, so that the hash keys are different, but strips off the domain part just before sending the update. The patch is against 3.7.3. Han $ diff -up ddclient.old ddclient --- ddclient.old 2008-02-21 00:57:17.000000000 +0900 +++ ddclient 2008-02-21 01:36:42.000000000 +0900 @@ -3060,8 +3060,11 @@ sub nic_namecheap_update { my $url; $url = "http://$config{$h}{'server'}/update"; - $url .= "?host=$h"; - $url .= "&domain=$config{$h}{'login'}"; + my $domain = $config{$h}{'login'}; + my $host = $h; + $host =~ s/(.*)\.$domain(.*)/$1$2/; + $url .= "?host=$host"; + $url .= "&domain=$domain"; $url .= "&password=$config{$h}{'password'}"; $url .= "&ip="; $url .= $ip if $ip; ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=399429 |
From: SourceForge.net <no...@so...> - 2008-02-21 09:26:34
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4791427 By: wimpunk There's been a long discussion [1] about namecheap. I didn't had the time to look into the differences but could you please check the discussion and confirm your patch? [1] https://sourceforge.net/forum/message.php?msg_id=4316938 ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=399429 |
From: SourceForge.net <no...@so...> - 2009-06-07 04:12:25
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=7430222 By: cashion77 I just finished testing hankessels patch with the 3.8.0 release and can confirm that his works for updating multiple domains using the same host names. I believe the patch mentioned by edmdude was implemented into 3.8.0, and it appears to me that patch only worked if you were dealing with a single domain (allowing multiple hosts as necessary). If you were to implement hankessels patch, I would change the sample config file like so: ## ## NameCheap (namecheap.com) ## # protocol=namecheap, \ # server=dynamicdns.park-your-domain.com, \ # login=yourdomain.com \ # password=dyndns password \ # @.yourdomain.com # www.yourdomain.com ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=399429 |
From: SourceForge.net <no...@so...> - 2009-06-07 04:15:56
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=7430223 By: cashion77 Sorry, the last line in the example config shouldn't have the "http://" inserted. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=399429 |
From: SourceForge.net <no...@so...> - 2008-02-24 02:12:48
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4796958 By: hankessels Thanks for pointing out the thread. As far as I can see there were two separate problems: 1. Multiple hosts for a single domain. This was fixed by edmdude's patch 2. Hosts with identical names in multiple domains. This is the problem alluded to in the original post of the older thread (https://sourceforge.net/forum/message.php?msg_id=2865672). This is the same problem I had, and that is fixed by the new patch. I checked that multiple hosts in the same domain still work. The configuration that did not work was: protocol=namecheap, \ login=domain1.com , \ password=password1 \ @ protocol=namecheap, \ login=domain2.com, \ password=password2 \ @ It doesn't work because the config hash uses the host name (@ in this case) for its key, so one of the sections is lost. You can't combine the sections because each domain gets its own password. After the patch, the FQDN of the host name can be used in the config: protocol=namecheap, \ login=domain1.com , \ password=password1 \ @.domain1.com protocol=namecheap, \ login=domain2.com, \ password=password2 \ @.domain2.com This disambiguates the host name for the config hash. The patch simply strips off the domain name if it is present before submitting to namecheap. It doesn't break existing configs, since specifying just the host name will still work unchanged. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=399429 |
From: SourceForge.net <no...@so...> - 2009-04-22 20:26:24
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=7263782 By: dcg9381 Namecheap seems to be unaware of this problem. I mentioned that their documentation indicating how to correctly configure a ddclient.conf file resulted in errors. They basically asked me over a long chain of emails to test scenario A, scenario B, etc. Their solution works for a named host within a domain. If you're just trying to update the domain itself, there are problems. The conf file that works for me: # /etc/ddclient.conf protocol=namecheap use=if, if=eth1 server=dynamicdns.park-your-domain.com login=mydomain.net password=<password> <hostA>,www Where <password> = your dynamic DNS password as indicated by namecheap. This is not your account password, it is dynamically generated. <hostA> = apparently you must list at least one host within your domain. It does not need to be a real host, but must be created on the namecheap side. Other notes: When I do this, I get a cache file. If I attempt to rerun referencing that same cache file, I get the following error: "Use of uninitialized value in string ne at /usr/sbin/ddclient line 2030." I'm working around by removing the cached file each time, but that obviously breaks the "don't update unless dirty IP" functionality... ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=399429 |