-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from paicha/fix
CHG: refactor a little bit
- Loading branch information
Showing
6 changed files
with
84 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,56 @@ | ||
# DASLink | ||
todo | ||
DASLink is a simple tool to link ipfs content from [DAS](https://da.systems/). | ||
|
||
## How does it work? | ||
Dependent on [DNSLink](https://docs.ipfs.io/concepts/dnslink/), [Cloudflare ipfs gateway](https://developers.cloudflare.com/distributed-web/ipfs-gateway), [Cloudflare DNS](https://api.cloudflare.com/#dns-records-for-a-zone-properties) and [das-database](https://github.com/DeAccountSystems/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/DeAccountSystems/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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters