https://github.com/planetable/dweb-dns
Simple DoH Server for Blockchain Name Systems
https://github.com/planetable/dweb-dns
Last synced: about 1 year ago
JSON representation
Simple DoH Server for Blockchain Name Systems
- Host: GitHub
- URL: https://github.com/planetable/dweb-dns
- Owner: Planetable
- License: mit
- Created: 2023-02-04T09:11:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-04T12:44:45.000Z (about 1 year ago)
- Last Synced: 2025-05-31T19:55:56.982Z (about 1 year ago)
- Language: Python
- Size: 69.3 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple DoH Server for Blockchain Domains
This is a simple DoH server for blockchain domains. Currently, it can support the following blockchain domains:
- [.sol](https://sns.id/) - Solana Name Service
- [.fc](https://warpcast.com/) - Farcaster username's URL field
- [.bit](https://did.id/)
## Usage
Start a local instance:
```
FLASK_DEBUG=true flask run --host=0.0.0.0
```
Look up a [.sol](https://sns.id/) domain:
```bash
curl -H "accept: application/dns-json" -X GET "http://127.0.0.1:5000/dns-query?name=ohlife.sol"
```
Look up a [.bit](https://did.id/bit/) domain:
```bash
curl -H "accept: application/dns-json" -X GET "https://dweb-dns.v2ex.pro/dns-query?name=v2ex.bit"
```
```json
{
"Status": 0,
"TC": false,
"RD": true,
"RA": false,
"AD": false,
"CD": false,
"Question": [
{
"name": "v2ex.bit.",
"type": 16
}
],
"Answer": [
{
"name": "v2ex.bit",
"type": 16,
"TTL": 600,
"data": "dnslink=/ipns/k51qzi5uqu5dkczezx3wje1dizdk7rta8uc50a5o9ix4wmzqniacrdbfapt8cf"
}
],
"Authority": [],
"Additional": []
}
```
## Usage with Kubo (go-ipfs)
You can use this server with [Kubo](https://github.com/ipfs/kubo) by adding the following to your config:
```json
"DNS": {
"Resolvers": {
"bit.": "https://dweb-dns.v2ex.pro/dns-query",
"sol.": "https://dweb-dns.v2ex.pro/dns-query"
}
}
```
After that, your Kubo gateway will be able to resolve and access blockchain domains like this:
- https://ipfs.v2ex.pro/ipns/planetable.sol/
- https://ipfs.v2ex.pro/ipns/v2ex.bit/
- https://ipfs.v2ex.pro/ipns/planetable.bit/
With the IPFS support in Brave, you can access blockchain domains like this:
