Dnscrypt-proxy: Help wanted: web component to compute stamps

Created on 27 Jan 2018  路  4Comments  路  Source: DNSCrypt/dnscrypt-proxy

A convenient thing to have on the website is a simple way to compute a stamp for unencrypted DNS, DNSCrypt and DoH servers.

The format is very simple (it's a base64 encoded sequence of length-prefixed blobs), and this is something I will document shortly.

So, having a Vue or React component that we could have in a corner of the website could be great, especially for people using server software that doesn't print DNS stamps yet.

feature request good first issue help wanted

Most helpful comment

It's not pretty, but:

https://stamp.dnscrypt.info/

Source code here

Maybe someone can make a CSS to make it look better?

All 4 comments

The Stamps format is documented here: https://github.com/jedisct1/dnscrypt-proxy/wiki/Stamps

Any React or Vue.js developer here? :)

If it can help, here's something that computes a DNSCrypt stamp, from a quick and dirty attempt at writing a Vue component. props and addr are the same as for DoH stamps, so I moved them outside of the specialized function.

    stamp: function() {
      let props = (this.dnssec << 0) | (this.nolog << 1) | (this.nofilter << 2);
      let addr = this.addr.split("").map(c => c.charCodeAt());

      const dnscryptStamp = () => {
        let v = [0x01, props, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];
        v.push(addr.length, ...addr);
        let pk = Buffer.from(this.pk.replace(/[: \t]/g, ""), "hex");
        v.push(pk.length, ...pk);
        let providerName = this.providerName.split("").map(c => c.charCodeAt());
        v.push(providerName.length, ...providerName);
        return `sdns://${URLSafeBase64.encode(Buffer(v))}`;
      };
      return dnscryptStamp();
    }

It's not pretty, but:

https://stamp.dnscrypt.info/

Source code here

Maybe someone can make a CSS to make it look better?

Ok, looks like nobody will help with the CSS.

Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atfreddy picture atfreddy  路  3Comments

rugabunda picture rugabunda  路  5Comments

Marco-vW picture Marco-vW  路  6Comments

JayBrown picture JayBrown  路  6Comments

iWARR picture iWARR  路  6Comments