summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md43
-rwxr-xr-xsimpleddns.py8
2 files changed, 48 insertions, 3 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..dd41b02
--- /dev/null
+++ b/README.md
@@ -0,0 +1,43 @@
+# simpleddns
+
+Very simple DDNS client with support for
+
+- Linode, DigitalOcean, and AWS Route 53 providers.
+- Allows obtaining IP address via any shell command.
+- Customize TTL, API call interval & timeout.
+- Multiple domains.
+
+Run `install.sh` to install.
+Then run `simpleddns --setup` to create a configuration interactively.
+Lastly run `simpleddns` to start the DDNS client.
+Currently only Unixy platforms are supported (i.e. not Windows, but maybe WSL or MinGW or something).
+
+
+## Alternatives
+
+This particular set of features is somewhat unique.
+But there are other DDNS clients out there:
+
+- [godns](https://github.com/TimothyYe/godns)
+- [ddclient](https://github.com/ddclient/ddclient)
+
+
+## Example systemd service
+
+(This assumes a user `simpleddns` has installed the program.)
+
+```
+[Unit]
+Description=Simple DDNS client
+After=network.target
+
+[Service]
+Restart=always
+RestartSec=20
+User=simpleddns
+WorkingDirectory=~
+ExecStart=/bin/sh -c .local/bin/simpleddns
+
+[Install]
+WantedBy=multi-user.target
+```
diff --git a/simpleddns.py b/simpleddns.py
index 7c05e1c..fb00e20 100755
--- a/simpleddns.py
+++ b/simpleddns.py
@@ -53,7 +53,7 @@ def setup_config(config_path: Path) -> None:
print('Aborting.')
return
config_path.unlink()
- default_get_ip = 'curl --no-progress-meter ifconfig.co'
+ default_get_ip = "curl --no-progress-meter https://ifconfig.co"
domain_name = input('Domain name? ').strip()
if not domain_name:
fatal_error('Domain name must be set')
@@ -98,6 +98,8 @@ def setup_config(config_path: Path) -> None:
# In this case, simpleddns will fail if the variable isn't set, and
# to avoid ambiguity the variable's value must still be a python literal!
# So set MY_ACCESS_TOKEN='"foo"', rather than MY_ACCESS_TOKEN=foo
+#
+# Global settings -- these can all be overriden on a per-domain basis.
Settings
# Interval in seconds between checking IP address for changes
# (API calls are only made when it changes)
@@ -105,7 +107,7 @@ Settings
# Timeout to wait for API responses
timeout = 20
# Time To Live (in seconds) with which to create DNS records
- ttl = 300
+ ttl = 30
# Delay between API calls (seconds), to avoid being rate limited.
# 0.4 seconds should be more than enough for both Linode and AWS,
# but you may want to set this higher if you have other things
@@ -128,7 +130,7 @@ class Settings:
dry_run: bool = False
interval: int = 15
timeout: int = 20
- ttl: int = 300
+ ttl: int = 30
request_delay: float = 0.4
class Domain(ABC):