{"id":13581907,"url":"https://github.com/cloudflarearchive/odoh-server-go","last_synced_at":"2026-01-17T12:22:38.897Z","repository":{"id":42000239,"uuid":"305723653","full_name":"cloudflarearchive/odoh-server-go","owner":"cloudflarearchive","description":"Oblivious DoH server in Go","archived":false,"fork":false,"pushed_at":"2022-04-17T13:43:39.000Z","size":125,"stargazers_count":66,"open_issues_count":11,"forks_count":17,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-05T21:45:22.908Z","etag":null,"topics":[],"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/cloudflarearchive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-20T13:50:15.000Z","updated_at":"2024-09-11T08:20:59.000Z","dependencies_parsed_at":"2022-08-22T19:51:02.429Z","dependency_job_id":null,"html_url":"https://github.com/cloudflarearchive/odoh-server-go","commit_stats":null,"previous_names":["cloudflare/odoh-server-go"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflarearchive%2Fodoh-server-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflarearchive%2Fodoh-server-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflarearchive%2Fodoh-server-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflarearchive%2Fodoh-server-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudflarearchive","download_url":"https://codeload.github.com/cloudflarearchive/odoh-server-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470545,"owners_count":20944146,"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-08-01T15:02:18.769Z","updated_at":"2026-01-17T12:22:38.891Z","avatar_url":"https://github.com/cloudflarearchive.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# odoh-server-go\n\n[![Coverage Status](https://coveralls.io/repos/github/cloudflare/odoh-server-go/badge.svg?branch=master)](https://coveralls.io/github/cloudflare/odoh-server-go?branch=master)\n\n[Oblivious DoH Server](https://tools.ietf.org/html/draft-pauly-dprive-oblivious-doh)\n\n# Local development\n\nTo deploy the server locally, first acquire a TLS certificate using [mkcert](https://github.com/FiloSottile/mkcert) as follows:\n\n~~~\n$ mkcert -key-file key.pem -cert-file cert.pem 127.0.0.1 localhost\n~~~\n\nThen build and run the server as follows:\n\n~~~\n$ make all\n$ CERT=cert.pem KEY=key.pem PORT=4567 ./odoh-server\n~~~\n\nBy default, the proxy listens on `/proxy` and the target listens on `/dns-query`.\n\nYou may then run the [corresponding client](https://github.com/cloudflare/odoh-client-go) as follows:\n\n~~~\n$ ./odoh-client odoh --proxy localhost:4567 --target odoh.cloudflare-dns.com --domain cloudflare.com\n;; opcode: QUERY, status: NOERROR, id: 14306\n;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0\n\n;; QUESTION SECTION:\n;cloudflare.com.\tIN\t AAAA\n\n;; ANSWER SECTION:\ncloudflare.com.\t271\tIN\tAAAA\t2606:4700::6810:84e5\ncloudflare.com.\t271\tIN\tAAAA\t2606:4700::6810:85e5\n~~~\n\n# Deployment\n\nThis section describes deployment instructions for odoh-server-go.\n\n## Preconfigured deployments\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n[![deploy to Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy)\n\n## Manual deployment\n\nThis server can also be manually deployed on any bare metal machine, or in cloud providers such\nas GCP. Instructions for both follow.\n\n### Bare metal\n\nDeployment on bare metal servers, such as [Equinix](https://metal.equinix.com/), can be done following\nthe instructions below. These steps assume that `git` and `go` are both installed on the metal.\n\n1. Configure a certificate on the metal using [certbot](https://certbot.eff.org/all-instructions).\nOnce complete, the output should be something like the following, assuming the server domain name\nis \"example.com\":\n\n```\nSuccessfully received certificate.\nCertificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem\nKey is saved at:         /etc/letsencrypt/live/example.com/privkey.pem\n```\n\nYou must configure certbot to renew this certificate periodically. The simplest way to do this is\nvia a cron job:\n\n```\n$ 00 00 1 * 1 certbot renew\n```\n\n2. Configure two environment variables to reference these files:\n\n```\n$ export CERT=/etc/letsencrypt/live/example.com/fullchain.pem\n$ export KEY=/etc/letsencrypt/live/example.com/privkey.pem\n```\n\n3. Clone and build the server:\n\n```\n$ git clone git@github.com:cloudflare/odoh-server-go.git\n$ cd odoh-server-go\n$ go build ./...\n```\n\n4. Run the server:\n\n```\n$ PORT=443 ./odoh-server \u0026\n```\n\nThis will run the server until completion. You must configure the server to restart should it\nterminate prematurely.\n\n### GCP\n\nTo deploy, run:\n\n~~~\n$ gcloud app deploy proxy.yaml\n...\n$ gcloud app deploy target.yaml\n...\n~~~\n\nTo check on its status, run:\n\n~~~\n$ gcloud app browse\n~~~\n\nTo stream logs when deployed, run\n\n~~~\n$ gcloud app logs tail -s default\n~~~\n\n### Reverse proxy\n\nYou need to deploy a reverse proxy with a valid TLS server certificate\nfor clients to be able to authenticate the target or proxy.\n\nThe simplest option for this is using [Caddy](https://caddyserver.com).\nCaddy will automatically provision a TLS certificate using ACME from [Let's Encrypt](https://letsencrypt.org).\n\nFor instance:\n\n```\ncaddy reverse-proxy --from https://odoh.example.net:443 --to 127.0.0.1:8080\n```\n\nAlternatively, use a Caddyfile similar to:\n\n```\nodoh.example.net\n\nreverse_proxy localhost:8080\n```\nand run `caddy start`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflarearchive%2Fodoh-server-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudflarearchive%2Fodoh-server-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflarearchive%2Fodoh-server-go/lists"}