{"id":26255213,"url":"https://github.com/1999azzar/doh-switcher","last_synced_at":"2026-02-01T05:34:29.758Z","repository":{"id":277023102,"uuid":"931082413","full_name":"1999AZZAR/doh-switcher","owner":"1999AZZAR","description":"A modern, web-based interface to manage and switch between DNS over HTTPS (DoH) providers for your system. DoH Switcher allows you to easily select, test, and manage your DNS over HTTPS providers through an intuitive interface.","archived":false,"fork":false,"pushed_at":"2026-01-24T18:41:29.000Z","size":532,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-25T07:45:43.121Z","etag":null,"topics":["cloudflareddns","dns-management","dns-over-https"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1999AZZAR.png","metadata":{"files":{"readme":"README.md","changelog":"change_dns.sh","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-02-11T17:31:45.000Z","updated_at":"2026-01-24T18:41:33.000Z","dependencies_parsed_at":"2025-06-16T02:41:09.464Z","dependency_job_id":"240aac6b-b636-4eca-91da-65f7c7703750","html_url":"https://github.com/1999AZZAR/doh-switcher","commit_stats":null,"previous_names":["1999azzar/doh-switcher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1999AZZAR/doh-switcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fdoh-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fdoh-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fdoh-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fdoh-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999AZZAR","download_url":"https://codeload.github.com/1999AZZAR/doh-switcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fdoh-switcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28970095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T04:44:20.970Z","status":"ssl_error","status_checked_at":"2026-02-01T04:44:19.994Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cloudflareddns","dns-management","dns-over-https"],"created_at":"2025-03-13T19:17:50.301Z","updated_at":"2026-02-01T05:34:29.753Z","avatar_url":"https://github.com/1999AZZAR.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DoH Switcher\n\nA modern, web-based interface to manage and switch between DNS over HTTPS (DoH) providers for your system. DoH Switcher allows you to easily select, test, and manage your DNS over HTTPS providers through an intuitive interface.\n\n![DoH Switcher](screenshot.png)\n\n## Overview\n\nDoH Switcher is a Flask-based web application that helps you manage the DNS over HTTPS service running on your system. It works with Cloudflared as the DoH proxy service and allows you to:\n\n- Switch between different DoH providers with a single click\n- Test and compare latency between providers\n- Add custom DoH providers\n- Backup and restore your configuration\n- Monitor service status\n\n## Prerequisites\n\nThe `install.sh` script will automatically check for Cloudflared and install it if missing. You can run:\n\n```bash\nsudo ./install.sh\n```\n\nto install all required components.\n\nIf you prefer to install prerequisites manually, see the [Prerequisites guide](Prerequisites/README.md) in the Prerequisites folder.\n\n## Installation\n\n1. Clone this repository and enter the directory:\n   \n   ```bash\n   git clone https://github.com/1999AZZAR/doh-switcher.git\n   cd doh-switcher\n   ```\n\n2. Run the installer script:\n   \n   ```bash\n   sudo ./install.sh\n   ```\n   \n   This will:\n   \n   - Install the `cdns` alias\n   - Create a Python virtual environment and install dependencies\n   - Set up and start the systemd service\n   - Add the `cdns` alias to your shell configuration\n\n3. Reload your shell configuration:\n   \n   ```bash\n   source ~/.bashrc  # or ~/.zshrc, ~/.profile\n   ```\n\n4. Launch the Web UI:\n   \n   ```bash\n   cdns\n   ```\n   \n   This will silently start the service and open your browser.\n\n### Uninstallation\n\nTo remove DoH Switcher and clean up all components, run:\n\n```bash\nsudo ./uninstall.sh\n```\n\nThis will:\n\n- Stop any running Web UI processes and the systemd service\n- Remove the service unit, application files, logs, and alias\n\n## Features\n\n### Service Controls\n\n- **Backup Config**: Save your current DoH providers configuration\n- **Restore Config**: Restore a previously saved configuration\n- **Test All Providers**: Measure latency and connectivity of all providers at once\n\n### DoH Provider Management\n\n- **View Current Provider**: See which DoH provider is currently active\n- **Service Status Monitoring**: Check if the Cloudflared service is running\n- **Switch Providers**: Change your DoH provider with a single click\n- **Test Individual Providers**: Check the performance of specific providers\n- **Add Custom Providers**: Add your own DoH provider endpoints\n- **Delete Custom Providers**: Remove custom providers you no longer need\n\n### Performance Testing\n\nThe application performs one type of test:\n\n- **Ping Test**: Basic connectivity test to the provider's host\n\n## Default Providers\n\nThe application comes with these pre-configured providers:\n\n- Cloudflare (`https://cloudflare-dns.com/dns-query`)\n- Google (`https://dns.google/dns-query`)\n- Quad9 (`https://dns.quad9.net/dns-query`)\n- NextDNS (`https://dns.nextdns.io`)\n- AdGuard (`https://dns.adguard.com/dns-query`)\n\n## Adding Custom Providers\n\nTo add a custom DoH provider:\n\n1. Enter the provider name in the \"Provider Name\" field\n2. Enter the DoH URL in the \"DoH URL\" field\n3. Click \"Add Provider\"\n\nThe application will validate the DoH URL before adding it to ensure it's a valid DNS over HTTPS endpoint.\n\n## Technical Details\n\n### How it works\n\nDoH Switcher manages the Cloudflared service by:\n\n1. Modifying the systemd service file located at `/etc/systemd/system/cloudflared.service`\n2. Updating the `--upstream` parameter to point to your selected DoH provider\n3. Reloading the systemd daemon and restarting the service\n\n### File Structure\n\nThe project follows Flask best practices with a modular structure:\n\n```\ndoh-switcher/\n├── app/                      # Main application package\n│   ├── services/            # Business logic layer\n│   ├── utils/               # Utility functions\n│   ├── routes.py           # Route handlers\n│   └── models.py           # Data models\n├── templates/               # Jinja2 templates\n├── static/                  # CSS, JS, images\n├── tests/                   # Unit tests\n├── run.py                   # Application entry point\n└── config.py               # Configuration\n```\n\nFor detailed architecture documentation, see [ARCHITECTURE.md](ARCHITECTURE.md)\n\n### Logging\n\nThe application logs all actions to `doh_manager.log` for troubleshooting and auditing purposes.\n\n## Troubleshooting\n\n### Service Not Running\n\nIf the service status shows \"not running\":\n\n1. Check the Cloudflared service manually: `sudo systemctl status cloudflared`\n2. Check logs: `sudo journalctl -u cloudflared`\n3. Ensure prerequisites are installed: run `sudo ./install.sh` (it will install Cloudflared if needed), or consult the [Prerequisites guide](Prerequisites/README.md)\n4. Try restarting the service: `sudo systemctl restart cloudflared`\n\n### Failed Tests\n\nIf providers show \"Failed\" in testing:\n\n1. Check your internet connection\n2. Verify the DoH provider is operational\n3. Ensure there's no firewall blocking the connection\n\n### Permission Issues\n\nThe application requires root privileges to modify system service files. Always run with:\n\n```bash\nsudo python app.py\n```\n\n## Security Considerations\n\n- The application requires root privileges to modify systemd service files\n- All provider URLs are validated before use\n- The web interface is only accessible from localhost by default\n- Consider setting up basic authentication if exposing to a network\n\n## License\n\n[MIT License](LICENSE)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Acknowledgments\n\n- This project relies on Cloudflared by Cloudflare\n- Thanks to all the public DoH providers for their services\n\n---\n\n**Note:** The installer automatically handles Cloudflared setup. Run `sudo ./install.sh`, or see the [Prerequisites guide](Prerequisites/README.md) for manual installation steps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fdoh-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999azzar%2Fdoh-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fdoh-switcher/lists"}