mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-06 16:18:00 +08:00

Yes, according to the RFC it shouldn't begin with a hyphen. And, since we're on the topic, underscores were supposed to be off the table, too, but Microsoft used them anyway, and you know what? We're gonna use the "forbidden hyphen". And we're gonna instruct `dig` to not be so persnickety. fixes: ``` dig +short AAAA api.--.sslip.io dig: idn2_lookup_ul failed: string start/ends with forbidden hyphen ``` I had to make it work for old-style (e.g. macOS dig) which is version "DiG 9.8.3-P1" as well as for the new version ("DiG 9.11.3-RedHat-9.11.3-6.fc28") which has this new [library](https://www.gnu.org/software/libidn/libidn2/reference/libidn2-idn2.html) which does the following: > Perform IDNA2008 lookup string conversion on domain name src , as described in section 5 of RFC 5891