{"id":29225502,"url":"https://github.com/jonpulsifer/ddnsb0t","last_synced_at":"2025-12-14T20:20:35.558Z","repository":{"id":37160224,"uuid":"222592070","full_name":"jonpulsifer/ddnsb0t","owner":"jonpulsifer","description":"ddnsb0t is a program that uses CloudEvents to communicate to a Google Cloud Function and update DNS entries using CloudDNS.","archived":false,"fork":false,"pushed_at":"2025-07-02T18:54:23.000Z","size":207,"stargazers_count":0,"open_issues_count":11,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T19:46:47.763Z","etag":null,"topics":["clouddns","cloudevents","ddns","ddns-updater","googlecloudplatform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonpulsifer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2019-11-19T02:36:39.000Z","updated_at":"2024-07-02T04:39:40.000Z","dependencies_parsed_at":"2023-07-15T08:31:59.858Z","dependency_job_id":"459ec11e-2c31-4b65-aad7-c9a8e32151a4","html_url":"https://github.com/jonpulsifer/ddnsb0t","commit_stats":null,"previous_names":["homelab-ng/ddnsb0t"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonpulsifer/ddnsb0t","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonpulsifer%2Fddnsb0t","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonpulsifer%2Fddnsb0t/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonpulsifer%2Fddnsb0t/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonpulsifer%2Fddnsb0t/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonpulsifer","download_url":"https://codeload.github.com/jonpulsifer/ddnsb0t/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonpulsifer%2Fddnsb0t/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263279305,"owners_count":23441683,"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":["clouddns","cloudevents","ddns","ddns-updater","googlecloudplatform"],"created_at":"2025-07-03T07:10:39.484Z","updated_at":"2025-12-14T20:20:35.246Z","avatar_url":"https://github.com/jonpulsifer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ddnsb0t\n\n![ddnsb0t](https://github.com/jonpulsifer/ddnsb0t/workflows/ddnsb0t/badge.svg)\n![function](https://github.com/jonpulsifer/ddnsb0t/workflows/function/badge.svg)\n![docker](https://github.com/jonpulsifer/ddnsb0t/workflows/docker/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jonpulsifer/ddnsb0t)](https://goreportcard.com/report/github.com/jonpulsifer/ddnsb0t)\n\n**ddnsb0t** is a program that uses [CloudEvents](https://cloudevents.io/) to communicate to a [Google Cloud Function](https://cloud.google.com/functions) and update my DNS entries using [Google Cloud DNS](https://cloud.google.com/dns).\n\n```raw\nddnsb0t -  A bot that fires a CloudEvent down range to a cloud function to update my DNS records in Google Cloud.\n\nUsage: ddnsb0t \u003ccommand\u003e\n\nFlags:\n\n  --domain    the default domain (default: \u003cnone\u003e)\n  --endpoint  the remote URL for the cloud function (default: \u003cnone\u003e)\n  --external  use the network's external IP address (default: false)\n  --hostname  the hostname to update (default: \u003cnone\u003e)\n  --interval  how long between each update (eg. 30s, 5m, 1h) (default: 5m0s)\n  --once      run the thing once (default: false)\n  --token     an api token for the cloud function to prevent abuse (default: \u003cnone\u003e)\n  --verbose   set the log level to debug (default: false)\n\nCommands:\n\n  version  Show the version information.\n```\n\n## Installation\n\n1. Install ddnsb0t using `go get https://github.com/jonpulsifer/ddnsb0t`\n2. Run ddnsb0t `$GOPATH/bin/ddnsb0t -endpoint=https://fn.example.com/ddns -token=sometoken -once`\n3. Optionally configure a cron job (below)\n\n```sh\n#!/bin/sh\n# */5 * * * * /path/to/this/script.sh\nexport DDNS_ENDPOINT=\"https://your.url.example.com/ddns\"\nexport DDNS_DOMAIN=\"example.com\"\nexport DDNS_API_TOKEN=\"sometoken\"\nddnsb0t --once \"$@\"\n```\n\nRunning `ddnsb0t` should produce the response from the cloud function\n\n```sh\nINFO[0000] dns update requested   fqdn=somename.example.com. ip=10.13.37.1 status=pending\n```\n\n## Development\n\n1. Run a local cloud events receiver by running `go run ./cmd/main.go` from the `function` directory. This will start an HTTP receiver at `http://localhost:8080`\n2. Build ddnsb0t: `go build -o ddnsb0t`\n3. Use ddnsb0t: `./ddnsb0t -endpoint=http://localhost:8080 -token=sometoken -once`\n\n### Cloud Events\n\n#### Request\n\n```raw\nValidation: valid\nContext Attributes,\n  specversion: 1.0\n  type: dev.pulsifer.ddns.request\n  source: https://github.com/jonpulsifer/ddnsb0t\n  id: 521ccda3-b297-43a0-887c-a76b25557806\n  dataschema: https://github.com/jonpulsifer/ddnsb0t/pkg/ddns/ddns.go\n  datacontenttype: application/json\nData,\n  {\n    \"ip\": \"10.13.37.1\",\n    \"fqdn\": \"somename.example.com.\",\n    \"token\": \"sometoken\"\n  }\n```\n\n#### Response\n\n```raw\nValidation: valid\nContext Attributes,\n  specversion: 1.0\n  type: dev.pulsifer.ddns.response\n  source: https://github.com/jonpulsifer/ddnsb0t\n  id: 5c50e41c-2074-446e-8d4b-0c038e04eb07\n  dataschema: https://github.com/jonpulsifer/ddnsb0t/pkg/ddns/ddns.go\n  datacontenttype: application/json\nData,\n  {\n    \"fqdn\": \"somename.example.com.\",\n    \"status\": \"pending\",\n    \"additions\": 1,\n    \"deletions\": 1\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonpulsifer%2Fddnsb0t","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonpulsifer%2Fddnsb0t","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonpulsifer%2Fddnsb0t/lists"}