{"id":23483563,"url":"https://github.com/jakewmeyer/ddrs","last_synced_at":"2025-04-14T00:14:36.714Z","repository":{"id":268465067,"uuid":"747512746","full_name":"jakewmeyer/ddrs","owner":"jakewmeyer","description":"A dynamic DNS client 🦀","archived":false,"fork":false,"pushed_at":"2025-04-12T18:48:47.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T00:14:29.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakewmeyer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-24T04:32:00.000Z","updated_at":"2025-04-12T18:48:51.000Z","dependencies_parsed_at":"2024-12-16T23:53:11.214Z","dependency_job_id":"c203ebed-fc14-43b6-ba11-8ecf64e7976b","html_url":"https://github.com/jakewmeyer/ddrs","commit_stats":null,"previous_names":["jakewmeyer/ddrs"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakewmeyer%2Fddrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakewmeyer%2Fddrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakewmeyer%2Fddrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakewmeyer%2Fddrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakewmeyer","download_url":"https://codeload.github.com/jakewmeyer/ddrs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799955,"owners_count":21163404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T21:12:47.180Z","updated_at":"2025-04-14T00:14:36.673Z","avatar_url":"https://github.com/jakewmeyer.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DDRS - A dynamic DNS client written in Rust 🦀\n\n## Features\n* IP lookups via [STUN](https://en.wikipedia.org/wiki/STUN), HTTP(S), or local network interfaces\n* Support for multiple DNS providers\n* Support for multiple domains/subdomains\n* Support for IPv4 and IPv6\n\n## Config\nThe configuration file is in [TOML](https://toml.io/en/) format. The default location for the configuration file is `/etc/ddrs/config.toml`. A custom location can be specified with the `--config` flag.\n\n### Options\n* `versions` - IP version to fetch and update\n* `dry_run` - Fetch the IP address but do not update the DNS records\n* `stun_urls` - A list of STUN servers to use for IP lookups\n* `http_ipv4` - A list of HTTP(S) URLs to use for IPv4 lookups\n* `http_ipv6` - A list of HTTP(S) URLs to use for IPv6 lookups\n* `source` - The source to use for IP lookups\n  * `type` - The source type. Must be `stun`, `http`, or `interface`\n  * `name` - Only required for `interface` source type, (e.g. `eth0`, `wlan0`)\n\n### Default Config\n\n```toml\nversions = [\"v4\"]\n\n# versions = [\"v4\", \"v6\"]\n\ndry_run = false\n\nstun_urls = [\n  \"stun://stun.l.google.com:19302\",\n  \"stun://stun.cloudflare.com:3478\",\n  \"stun://global.stun.twilio.com:3478\",\n]\n\nhttp_ipv4 = [\n  \"https://api.ipify.org\",\n  \"https://ipv4.icanhazip.com\",\n  \"https://ipv4.seeip.org\",\n]\n\nhttp_ipv6 = [\n  \"https://api6.ipify.org\",\n  \"https://ipv6.icanhazip.com\",\n  \"https://ipv6.seeip.org\",\n]\n\n[source]\ntype = \"stun\"\n\n# [source]\n# type = \"http\"\n\n# [source]\n# type = \"interface\"\n# name = \"eth0\"\n\n[[providers]]\n# Provider(s) configuration\n```\n\n## Providers\n\n### Cloudflare\n* `type` - The provider type. Must be `cloudflare`\n* `zone` - The zone root domain to update\n* `api_token` - Cloudflare API token with the `Zone.DNS Edit` permission\n* `api_url` - Optional API URL, default is `https://api.cloudflare.com/client/v4`\n* `domains` - A list of domains to update\n  * `name` - The full domain name to update (Required)\n  * `ttl` - The TTL for the record, default is `1` (Auto)\n  * `proxied` - Whether the record is proxied through Cloudflare, default is `false`\n  * `comment` - A comment to add to the record, default is `Created by DDRS`\n\n```toml\n[[providers]]\ntype = \"cloudflare\"\nzone = \"domain.com\"\napi_token = \"TOKEN\"\n\n[[providers.domains]]\nname = \"domain.com\"\nttl = 1\nproxied = false\ncomment = \"Root domain\"\n\n[[providers.domains]]\nname = \"*.domain.com\"\nttl = 1\nproxied = false\ncomment = \"Wildcard subdomain\"\n\n[[providers.domains]]\nname = \"sub.domain.com\"\nttl = 1\nproxied = false\ncomment = \"Subdomain\"\n```\n\n## Deployment\n* Logging can be configured with the [RUST_LOG](https://docs.rs/env_logger/latest/env_logger/#enabling-logging) environment variable. By default, the log level is set to `info`. For more verbose logging, set the environment variable to `RUST_LOG=ddrs=debug`.\n\n### Docker Compose\n* Create configuration file `config.toml`\n* Create a `docker-compose.yml` file\n* Run `docker-compose up -d`\n\n```yaml\nservices:\n  ddrs:\n    image: ghcr.io/jakewmeyer/ddrs:latest\n    container_name: ddrs\n    restart: unless-stopped\n    network_mode: \"host\"\n    volumes:\n      - ./config.toml:/etc/ddrs/config.toml\n```\n\n### Systemd\n* Save the binary to `/usr/local/bin/ddrs`\n* Save the configuration file to `/etc/ddrs/config.toml`\n* Create a systemd service file at `/etc/systemd/system/ddrs.service`\n* Reload systemd with `sudo systemctl daemon-reload`\n* Start the service with `sudo systemctl start ddrs`\n* Enable the service with `sudo systemctl enable ddrs`\n\n```ini\n# Systemd service file\n\n[Unit]\nDescription=Dynamic DNS Rust Service (DDRS)\nAfter=network.target network-online.target\nRequires=network-online.target\n\n[Service]\nType=simple\nUser=ddrs\nExecStart=/usr/local/bin/ddrs\nRestart=on-failure\nRestartSec=5\nStandardOutput=journal\nStandardError=journal\nProtectSystem=full\n\n# Hardening\nPrivateDevices=true\nPrivateTmp=true\nNoNewPrivileges=true\nProtectHome=true\nProtectControlGroups=true\nProtectKernelModules=true\nProtectKernelTunables=true\nRestrictSUIDSGID=true\n\n[Install]\nWantedBy=multi-user.target\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakewmeyer%2Fddrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakewmeyer%2Fddrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakewmeyer%2Fddrs/lists"}