Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support custom url and servers responses without an ip address #7

Closed
wants to merge 1 commit into from
Closed

support custom url and servers responses without an ip address #7

wants to merge 1 commit into from

Conversation

jayennis22
Copy link
Contributor

Hi,

These proposed modifications enable noipy to work with ddns servers that use the same protocols but are not run by the official providers and aren't at the standard addresses. It does this by allowing you to specify a custom url on the command line with a "--url" argument. The reason someone would want to do this is if they want to run their ddns on one of their own internet servers and have control over their dns records.

I also modified response message parsing to no longer crash in the event that a "good" or "nochg" message is received without an IP address, as is the case with this ddns server implementation: https://github.com/ianloic/dreamhost-ddns.

I included a couple of unit tests and they all pass.

Please let me know if I can be of any assistance,
Jay

@coveralls
Copy link

Coverage Status

Coverage increased (+1.07%) when pulling 8f6cfbc on jayennis22:master into a3b625d on povieira:master.

@pv8
Copy link
Owner

pv8 commented Oct 10, 2014

Hi Jay.
In case of using a custom URL (--url) for updating a DDNS, shouldn't be necessary a custom dnsupdater provider as well? The --provider argument is not mandatory but its default is noip. Also, the DDNS authentication and hostname/IP arguments are based on this provider structure.
Am I missing something?

Cheers,
Pablo

@jayennis22
Copy link
Contributor Author

I could certainly do it with a custom provider, and in fact I started out that way. However, it seemed more appropriate to implement a general mechanism that would work with all of the providers.

I'm not sure I understand the point you are making about the hostname / IP arguments being based on provider structure, but I am happy to rewrite it as a custom dynddns provider. If you have any other hints about how you would want it done, please let me know.

Jay

@pv8 pv8 mentioned this pull request Oct 11, 2014
@pv8
Copy link
Owner

pv8 commented Oct 11, 2014

Running noipywith a custom URL (proposed implementation) would be like:

$ noipy -u user -p pass -n my.domain.com --url http://customddns.com/update

If --provider argument is not supplied, the default noip is used. This way the update call will be like:

http://customddns.com/update?hostname=my.domain.com&myip=1.2.3.4

And the authentication will be passed on HTTP header as a base64 encoded string of "user:pass".

Considering the proposed implementation:

  1. If a custom DDNS expects a parameter other than hostname (e.g. domain) for the hostname, the update won't work.
  2. If a custom DDNS expects a parameter other than myip (e.g. new_ip) for IP, the update won't work.
  3. If a custom DDNS doesn't perform the authentication via HTTP header, the update won't work.

I really liked the idea of a custom URL, let's just work a little bit more on it.

Pablo

@pv8
Copy link
Owner

pv8 commented Oct 11, 2014

If we assume that parameters and authentication will not change for custom DDNS, I guess the easiest way is creating a new dnsupdater provider like GenericDnsUpdater and adapt the command line parsing to make this new "provider" default and the --url parameter mandatory when no provider is specified.

What do you think about this approach, Jay?

@pv8
Copy link
Owner

pv8 commented Dec 16, 2014

Closed by #9

@pv8 pv8 closed this Dec 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants