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.
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();
}
Ok, looks like nobody will help with the CSS.
Closing.
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?