Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thehxdev/dohc
Check wich DoH servers are working on your network
https://github.com/thehxdev/dohc
anti-censorship doh golang
Last synced: 7 days ago
JSON representation
Check wich DoH servers are working on your network
- Host: GitHub
- URL: https://github.com/thehxdev/dohc
- Owner: thehxdev
- License: mit
- Created: 2024-07-26T11:27:40.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T22:36:59.000Z (5 months ago)
- Last Synced: 2024-11-14T04:22:57.263Z (2 months ago)
- Topics: anti-censorship, doh, golang
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dohc
dohc is a DoH server scanner. With this tool you can check wich DoH servers are working on your network.## Build
### Linux / macOS
```bash
CGO_ENABLED=0 go build -ldflags='-s -buildid=' .
```### Windows
```powershell
$env:CGO_ENABLED=0
go build -ldflags='-s -buildid=' .
```### Makefile
```bash
make
```### Cross-Platform build
```bash
make cross-plat
```## Usage
To print a help message:
```bash
./dohc -help
```To start testing:
```bash
./dohc -f doh_servers.txt
```## Source of DoH servers data
### Scraping cURL DoH wiki
You can use [scrape_doh_providers.py](misc/scrape_doh_providers.py) python3 script to scrape [cURL DoH wiki](https://github.com/curl/curl/wiki/DNS-over-HTTPS)
to make a list of DoH resolvers. This method is recommended and most up-to-date.
```bash
python3 ./misc/scrape_doh_providers.py '"{}".format(o["url"])' > ./doh_servers.txt
```
I took the python script from [HERE](https://gist.github.com/kimbo/dd65d539970e3a28a10628f15398247b).### Using resolvers data
> [!NOTE]
> This method also uses cURL DoH wiki but it may be outdated or old.I took DoH resolvers data ([This file](misc/doh_resolvers_data_20240119.json)) from [encrypted-dns-resolvers](https://github.com/cslev/encrypted_dns_resolvers) repository.
Then I extracted URIs with [converter.sh](misc/converter.sh) shell script. The final file (`doh_servers.txt`) is a list of DoH resolvers each on a seperate line.
```bash
./misc/converter.sh ./misc/doh_resolvers_data_20240119.json ./doh_servers.txt
```## Contribution
If you can improve the source code or make this software better, feel free to send a PR :)