From 9ee081099072190428146f51859b185c2e49d279 Mon Sep 17 00:00:00 2001 From: Gary Date: Thu, 25 Aug 2022 15:36:53 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c57c0d..6a35ff2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # DASLink -DASLink is a simple tool to link ipfs content from [DAS](https://da.systems/). +DASLink is a simple tool to link ipfs content from [.bit](https://www.did.id/). ## 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). +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/dotbitHQ/das-database). ``` ┌───────────┐ ┌───────────┐ ┌────────────┐ @@ -37,7 +37,7 @@ Dependent on [DNSLink](https://docs.ipfs.io/concepts/dnslink/), [Cloudflare ipfs ## Install ``` # run das-database and keep it synchronized with the latest data -https://github.com/DeAccountSystems/das-database +https://github.com/dotbitHQ/das-database # get the code git clone https://github.com/paicha/daslink.git From a5e0aacf5646445e51e1888c7ca4371d01e6d086 Mon Sep 17 00:00:00 2001 From: Gary Date: Tue, 10 Jan 2023 12:40:01 +0800 Subject: [PATCH 2/2] Enable DNS proxy by default --- dns.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dns.go b/dns.go index ff8150a..02747a2 100644 --- a/dns.go +++ b/dns.go @@ -82,18 +82,17 @@ func (d *DNSData) updateDNSRecord(contentRecord dao.TableRecordsInfo) (dao.Table if recordType == "CNAME" { oldRecords = *d.cnameRecords content := d.ipfsCname - proxied := new(bool) + proxied := true // CNAME content for skynet if contentRecord.Key == "skynet" { content = d.skynetCname - *proxied = true } newRecord = cloudflare.DNSRecord{ Type: recordType, Name: contentRecord.Account + d.hostNameSuffix, Content: content, TTL: ttl, - Proxied: proxied, + Proxied: &proxied, } } else if recordType == "TXT" { oldRecords = *d.txtRecords @@ -124,7 +123,7 @@ func (d *DNSData) updateDNSRecord(contentRecord dao.TableRecordsInfo) (dao.Table if newRecord.Name == oldRecordName { log.Infof("%s record exist: %s", recordType, newRecord.Name) recordExist = true - if newRecord.Content != oldRecord.Content || newRecord.TTL != oldRecord.TTL { + if newRecord.Content != oldRecord.Content || (recordType == "TXT" && newRecord.TTL != oldRecord.TTL) { log.Infof("%s record exist and NEED to update: %s", recordType, newRecord.Name) oldRecordId = oldRecord.ID }