Backport changes from https://github.com/wtud/alternative-internet before pull request