{"id":25039736,"url":"https://github.com/ninjamar/compactdns","last_synced_at":"2025-03-30T21:45:57.309Z","repository":{"id":271637954,"uuid":"913499280","full_name":"ninjamar/compactdns","owner":"ninjamar","description":"Forwarding DNS server","archived":false,"fork":false,"pushed_at":"2025-03-17T23:51:15.000Z","size":297,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T00:31:51.962Z","etag":null,"topics":["adblocker","dns","dns-server","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ninjamar.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-01-07T19:59:15.000Z","updated_at":"2025-03-17T23:51:19.000Z","dependencies_parsed_at":"2025-01-27T02:30:04.242Z","dependency_job_id":"fbebc070-1ede-4e50-815d-f8857e5a24ed","html_url":"https://github.com/ninjamar/compactdns","commit_stats":null,"previous_names":["ninjamar/dns-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjamar%2Fcompactdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjamar%2Fcompactdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjamar%2Fcompactdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjamar%2Fcompactdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninjamar","download_url":"https://codeload.github.com/ninjamar/compactdns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246385385,"owners_count":20768668,"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":["adblocker","dns","dns-server","python"],"created_at":"2025-02-06T02:53:09.950Z","updated_at":"2025-03-30T21:45:57.303Z","avatar_url":"https://github.com/ninjamar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CompactDNS (CDNS)\nCompactDNS, also known as CDNS is a authoritative and forwarding DNS server.\n\n## Features\n- Easy to setup\n- Can be configured as an adblocker\n- Caches responses locally\n\n\n## Installation\n\nInstall CDNS from source\n```bash\ngit clone https://github.com/ninjamar/compactdns\ncd compactdns\npip install .\n```\nFor development,\n```bash\npip install -e .\n```\n\n## Usage\n\nAfter installation, CDNS can be used by running:\n```bash\ncdns [command] [options]\n```\n\n### Commands\n\n#### `run`\nStarts the DNS server.\n```bash\ncdns run [options]\n```\nConfiguration is stored in a `toml` or `json` file. See `config.toml` for an example configuration.\n```bash\ncdns run --config config.toml\n```\n\n\n#### `shell`\n```bash\ncdns shell [options]\n```\n\nOptions:\n  `--host`, `-h`: The host address of the shell server in the format of a.b.c.d:port\n  `--secret`, `s`: The secret of the shell server. The secret is logged when cdns is started.\n\n### TLS\n\nA key and certificate file is needed to use TLS.\nGenerate it:\n```bash\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes\n```\n\n### Interactive shell\n\nFor debugging, CDNS includes an interactive python shell. The shell can be accessed using the `shell` command.\n```bash\n\u003e\u003e\u003e help(self.command)\n\u003e\u003e\u003e help(cdns.manager.ServerManager.command)\n```\n\n## DNS Zones\n\nDNS zones can be stored in a folder. Make sure that each filename is in the format of `domain.zone`.\n\n## Changing the DNS server\n\nOn MacOS:\n```bash\nnetworksetup -setdnsservers Wi-Fi A.B.C.D\n```\n\nDNS runs over port `53` for both UDP and TCP.\n\n## Testing\n\nSend test queries using dig.\n```bash\ndig @A.B.C.D -p PORT google.com\n```\n\n## License\n\nThis project is licensed under the MIT License. Please see the LICENSE file for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjamar%2Fcompactdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninjamar%2Fcompactdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjamar%2Fcompactdns/lists"}