An open API service indexing awesome lists of open source software.

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

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:

ipns://v2ex.bit in Brave