mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-05 15:46:50 +08:00
09249be0a0a778feba12ee5475d1feac2860f63c

On macOS, `whois` returns _two_ results for the domain `sslip.io` from two different whois servers: - whois.nic.io - whois.namecheap.com This means that every nameservers is double-counted. To fix, we remove the duplicates. fixes: ``` Failure/Error: expect(dig_nameservers.sort).to eq(whois_nameservers.sort) expected: ["ns-aws.nono.io.", "ns-aws.nono.io.", "ns-azure.nono.io.", "ns-azure.nono.io.", "ns-gce.nono.io.", "ns-gce.nono.io."] got: ["ns-aws.nono.io.", "ns-azure.nono.io.", "ns-gce.nono.io."] (compared using ==) # ./spec/check-dns_spec.rb:44:in `block (3 levels) in <top (required)>' ```
sslip.io
sslip.io is a domain that maps specially-crafted DNS A records to IP addresses (e.g. "127-0-0-1.sslip.io" maps to 127.0.0.1). It is similar to, inspired by, and uses much of the code of xip.io.
Refer to the website (sslip.io) for more information.
k8s/document_root/
contains the HTML content of the sslip.io websiteci/
contains the Concourse continuous integration (CI) pipeline and task.spec/
contains the RSpec files for test driven development (TDD). To run the tests:
DOMAIN=sslip.io rspec --format documentation --color spec
conf/sslip.io+nono.io.yml
contains the PowerDNS's pipe backend's configuration in YAML format for use with BOSH. Thepdns_pipe
key is the pipe backend script, andpdns_pipe_conf
is its configuration file.
Golang DNS Server
An experimental bare-bones DNS server written in Golang is available.
This Golang server is currently not configurable:
- it binds to port 53 (you can't change it)
- it only binds to UDP (no TCP, sorry)
- if the hostname queried doesn't match, it doesn't return an Answer section; instead, it returns an Authorities section with an SOA.
- The SOA record is hard-coded (e.g. Serial is
2020090400
) with the exception of the NS record, which is set to the queried hostname (e.g.dig big.apple.com @localhost
would have an SOA with an NS record ofbig.apple.com.
. - The NS, MX records are hard-coded.
- There are no TXT records, or SRV. If those records (or any other unknown ones) are queried, the server returns no Answers but an Authorities section with the SOA
To run the unit tests:
cd src
go get github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...
ginkgo -r .
To run the server on, say, a Mac, you must first start the server:
cd src
go run main.go
And then, in another window, run a query, e.g.:
dig +short 127.0.0.1.sslip.io @localhost
Which will return the expected IP address:
127.0.0.1
You will also see a log message in the server window, something similar to the following:
2020/11/22 03:45:44 ::1.62302 TypeA 127.0.0.1.sslip.io. ? 127.0.0.1
Description
Languages
Go
81%
HTML
14.2%
Ruby
2.6%
Dockerfile
1.8%
Shell
0.4%