Skip to content

Latest commit

 

History

History
56 lines (49 loc) · 3.49 KB

README.md

File metadata and controls

56 lines (49 loc) · 3.49 KB

DASLink

DASLink is a simple tool to link ipfs content from .bit.

How does it work?

Dependent on DNSLink, Cloudflare ipfs gateway, Cloudflare DNS and das-database.

┌───────────┐               ┌───────────┐               ┌────────────┐
│           │               │           │               │            │
│   Alice   │               │    DNS    │               │ipfs gateway│
│           │               │           │               │            │
└─────┬─────┘               └─────┬─────┘               └──────┬─────┘
      │                           │                            │
      │    visit alice.bit.cc     │                            │
      ├──────────────────────────►│                            │
      │                           │       CNAME point to       │
      │                           ├───────────────────────────►│
      │                           │                            │
      │                           │◄───────────────────────────┤
      │                           │ looking up the TXT record  │
      │                           ├───────────────────────────►│
      │                           │                            ├───────────┐
      │                           │                            │           │
      │                           │                            │    get the│ipfs content
      │                           │                            │           │
      │    return ipfs content    │                            │◄──────────┘
      │◄──────────────────────────┼────────────────────────────┤
      │                           │                            │
      │                           │                            │
┌─────┴─────┐               ┌─────┴─────┐               ┌──────┴─────┐
│           │               │           │               │            │
│   Alice   │               │    DNS    │               │ipfs gateway│
│           │               │           │               │            │
└───────────┘               └───────────┘               └────────────┘

Install

# run das-database and keep it synchronized with the latest data
https://github.com/dotbitHQ/das-database

# get the code
git clone https://github.com/paicha/daslink.git

# get your Cloudflare api tokens
https://dash.cloudflare.com/profile/api-tokens

# edit config.yaml
cd config
cp config.yaml.sample config.yaml
vi config.yaml

# compile and run
go build
./daslink