Add NS servers in sslip.io domain

We currently use three nameservers in the `nono.io` domain, but that's
confusing--why not have the nameservers in the `sslip.io` domain?

This commit starts the ball rolling to convert to the sslip.io. We'll
have a brief period where we have _both_ `nono.io` and `sslip.io`
nameservers.

At which point we'll add the `sslip.io` nameservers to our registrar,
Namecheap.com.

Once they've been added to our registrar, we'll wait a day or two to
propagate, and then we'll delete references to the `nono.io`
nameservers.
This commit is contained in:
Brian Cunnie
2021-11-27 10:37:47 -08:00
parent 992458f67c
commit fda3baeaaa
4 changed files with 37 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
#
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/../src/sslip.io-dns-server
ldflags="-X xip/xip.VersionSemantic=2.2.2 \
ldflags="-X xip/xip.VersionSemantic=2.2.3 \
-X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \
-X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)"
export GOOS GOARCH

View File

@@ -179,18 +179,25 @@ var _ = Describe("sslip.io-dns-server", func() {
digCmd = exec.Command("dig", strings.Split(digArgs, " ")...)
digSession, err = Start(digCmd, GinkgoWriter, GinkgoWriter)
Expect(err).ToNot(HaveOccurred())
Eventually(digSession).Should(Say(`flags: qr aa rd; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 4`))
Eventually(digSession).Should(Say(`flags: qr aa rd; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 8`))
Eventually(digSession).Should(Say(`;; ANSWER SECTION:`))
Eventually(digSession).Should(Say(`ns-aws.nono.io.\n`))
Eventually(digSession).Should(Say(`ns-azure.nono.io.\n`))
Eventually(digSession).Should(Say(`ns-gce.nono.io.\n`))
Eventually(digSession).Should(Say(`ns-aws.sslip.io.\n`))
Eventually(digSession).Should(Say(`ns-azure.sslip.io.\n`))
Eventually(digSession).Should(Say(`ns-gce.sslip.io.\n`))
Eventually(digSession).Should(Say(`;; ADDITIONAL SECTION:`))
Eventually(digSession).Should(Say(`ns-aws.nono.io..*52.0.56.137\n`))
Eventually(digSession).Should(Say(`ns-aws.nono.io..*2600:1f18:aaf:6900::a\n`))
Eventually(digSession).Should(Say(`ns-azure.nono.io..*52.187.42.158\n`))
Eventually(digSession).Should(Say(`ns-gce.nono.io..*104.155.144.4\n`))
Eventually(digSession).Should(Say(`ns-aws.sslip.io..*52.0.56.137\n`))
Eventually(digSession).Should(Say(`ns-aws.sslip.io..*2600:1f18:aaf:6900::a\n`))
Eventually(digSession).Should(Say(`ns-azure.sslip.io..*52.187.42.158\n`))
Eventually(digSession).Should(Say(`ns-gce.sslip.io..*104.155.144.4\n`))
Eventually(digSession, 1).Should(Exit(0))
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeNS example.com. \? ns-aws.nono.io., ns-azure.nono.io., ns-gce.nono.io.\n`))
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeNS example.com. \? ns-aws.nono.io., ns-azure.nono.io., ns-gce.nono.io., ns-aws.sslip.io., ns-azure.sslip.io., ns-gce.sslip.io.\n`))
})
})
When(`there are multiple TXT records returned (e.g. SPF for sslip.io)`, func() {

View File

@@ -46,10 +46,16 @@ var (
nsAws, _ = dnsmessage.NewName("ns-aws.nono.io.")
nsAzure, _ = dnsmessage.NewName("ns-azure.nono.io.")
nsGce, _ = dnsmessage.NewName("ns-gce.nono.io.")
nsAwsSslip, _ = dnsmessage.NewName("ns-aws.sslip.io.")
nsAzureSslip, _ = dnsmessage.NewName("ns-azure.sslip.io.")
nsGceSslip, _ = dnsmessage.NewName("ns-gce.sslip.io.")
NameServers = []dnsmessage.NSResource{
{NS: nsAws},
{NS: nsAzure},
{NS: nsGce},
{NS: nsAwsSslip},
{NS: nsAzureSslip},
{NS: nsGceSslip},
}
mbox, _ = dnsmessage.NewName("briancunnie.gmail.com.")
@@ -107,6 +113,12 @@ var (
},
"ns-azure.nono.io.": {A: []dnsmessage.AResource{{A: [4]byte{52, 187, 42, 158}}}},
"ns-gce.nono.io.": {A: []dnsmessage.AResource{{A: [4]byte{104, 155, 144, 4}}}},
"ns-aws.sslip.io.": {
A: []dnsmessage.AResource{{A: [4]byte{52, 0, 56, 137}}},
AAAA: []dnsmessage.AAAAResource{{AAAA: [16]byte{0x26, 0, 0x1f, 0x18, 0x0a, 0xaf, 0x69, 0, 0, 0, 0, 0, 0, 0, 0, 0xa}}},
},
"ns-azure.sslip.io.": {A: []dnsmessage.AResource{{A: [4]byte{52, 187, 42, 158}}}},
"ns-gce.sslip.io.": {A: []dnsmessage.AResource{{A: [4]byte{104, 155, 144, 4}}}},
// CNAMEs for sslip.io for DKIM signing
"protonmail._domainkey.sslip.io.": {
CNAME: dnsmessage.CNAMEResource{

View File

@@ -47,6 +47,7 @@ var _ = Describe("Xip", func() {
RCode).To(Equal(dnsmessage.RCodeNotImplemented))
})
})
Describe("CNAMEResources()", func() {
It("returns nil by default", func() {
randomDomain := random8ByteString() + ".com."
@@ -110,10 +111,13 @@ var _ = Describe("Xip", func() {
It("returns an array of hard-coded name servers", func() {
randomDomain := random8ByteString() + ".com."
ns := xip.NSResources(randomDomain)
Expect(len(ns)).To(Equal(3))
Expect(len(ns)).To(Equal(6))
Expect(string(ns[0].NS.String())).To(Equal("ns-aws.nono.io."))
Expect(string(ns[1].NS.String())).To(Equal("ns-azure.nono.io."))
Expect(string(ns[2].NS.String())).To(Equal("ns-gce.nono.io."))
Expect(string(ns[3].NS.String())).To(Equal("ns-aws.sslip.io."))
Expect(string(ns[4].NS.String())).To(Equal("ns-azure.sslip.io."))
Expect(string(ns[5].NS.String())).To(Equal("ns-gce.sslip.io."))
})
When(`the domain name contains "_acme-challenge."`, func() {
When("the domain name has an embedded IP", func() {
@@ -132,7 +136,7 @@ var _ = Describe("Xip", func() {
It("returns the default trinity of nameservers", func() {
randomDomain := "_acme-challenge." + random8ByteString() + ".com."
ns := xip.NSResources(randomDomain)
Expect(len(ns)).To(Equal(3))
Expect(len(ns)).To(Equal(6))
})
})
})
@@ -194,9 +198,12 @@ var _ = Describe("Xip", func() {
// sslip.io website
Entry("sslip.io", "ssLIP.io.", dnsmessage.AResource{A: [4]byte{78, 46, 204, 247}}),
// nameservers
Entry("ns-aws", "ns-aws.nono.io.", dnsmessage.AResource{A: [4]byte{52, 0, 56, 137}}),
Entry("ns-azure", "ns-azure.nono.io.", dnsmessage.AResource{A: [4]byte{52, 187, 42, 158}}),
Entry("ns-gce", "ns-gce.nono.io.", dnsmessage.AResource{A: [4]byte{104, 155, 144, 4}}),
Entry("ns-aws.nono.io.", "ns-aws.nono.io.", dnsmessage.AResource{A: [4]byte{52, 0, 56, 137}}),
Entry("ns-azure.nono.io.", "ns-azure.nono.io.", dnsmessage.AResource{A: [4]byte{52, 187, 42, 158}}),
Entry("ns-gce.nono.io.", "ns-gce.nono.io.", dnsmessage.AResource{A: [4]byte{104, 155, 144, 4}}),
Entry("ns-aws.sslip.io.", "ns-aws.sslip.io.", dnsmessage.AResource{A: [4]byte{52, 0, 56, 137}}),
Entry("ns-azure.sslip.io.", "ns-azure.sslip.io.", dnsmessage.AResource{A: [4]byte{52, 187, 42, 158}}),
Entry("ns-gce.sslip.io.", "ns-gce.sslip.io.", dnsmessage.AResource{A: [4]byte{104, 155, 144, 4}}),
// dots
Entry("loopback", "127.0.0.1", dnsmessage.AResource{A: [4]byte{127, 0, 0, 1}}),
Entry("255 with domain", "255.254.253.252.com", dnsmessage.AResource{A: [4]byte{255, 254, 253, 252}}),
@@ -305,6 +312,9 @@ var _ = Describe("Xip", func() {
},
// sslip.io website
Entry("sslip.io", "SSLip.io.", xip.Customizations["sslip.io."].AAAA[0]),
// nameservers
Entry("ns-aws.nono.io.", "ns-aws.nono.io.", xip.Customizations["ns-aws.nono.io."].AAAA[0]),
Entry("ns-aws.sslip.io.", "ns-aws.sslip.io.", xip.Customizations["ns-aws.sslip.io."].AAAA[0]),
// dashes only
Entry("loopback", "--1", dnsmessage.AAAAResource{AAAA: [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}),
Entry("ff with domain", "fffe-fdfc-fbfa-f9f8-f7f6-f5f4-f3f2-f1f0.com", dnsmessage.AAAAResource{AAAA: [16]byte{255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240}}),