clone from teleportd/dattss v1.0.0