golang port of https://github.com/cjdelisle/cjdns