Commit Graph

674 Commits

Author SHA1 Message Date
Brian Cunnie
ddde94a4c8 4.1.0: hexadecimal notation 4.1.0 2025-06-23 05:10:08 -07:00
Brian Cunnie
ea233f19bf Website documentation reflects hexadecimal notation
- Include hexadecimal example. Use the nip.io domain name because those
  are the users that want hexadecimal.
- Update the nip.io website to no longer mention that sslip.io doesn't
  have hexadecimal notation. It has hexadecimal notation.
- Make nip.io more prominent in the sslip.io website. Heck, it's a
  shorter domain name. A better domain name.
- Update that nip.io is incorporated into sslip.io

TODO: expand the
2025-06-22 15:59:36 -07:00
Brian Cunnie
d5d02f5999 Resolve hexadecimal notation for IPv6 addresses
e.g. `00000000000000000000000000000001.nip.io` → ::1

This is to bring parity with IPv4's hexadecimal notation, though IPv6's
hexadecimal notation is so clunky that I doubt it'll ever be used.

- The hexadecimal-notated IPv6 must be exactly 32 hexadecimal
  characters, no separators.
- Any hexadecimal notation _must_ be bookended by dots or by the
  beginning or end of the string
  (www.0000000000000000000000000000001.sslip.io or
  00000000000000000000000000000001.sslip.io). No dashes.
- If a normal IP notation and a hex notation are in the same hostname,
  then the normal IP notation takes precedence. This preserves existing
  behavior for sslip.io users, e.g.
  (00000000000000000000000000000001.2600--.nip.io resolves to 2600::,
  not ::1)
2025-06-22 14:09:30 -07:00
Brian Cunnie
08ca8e4e85 Placate VS Code's linter
This commit is cosmetic changes to the code (no change in
functionality). We must mollify the linter, for to do otherwise would
risk wrath.
2025-06-21 17:15:15 -07:00
Brian Cunnie
03eb55555d Resolve hexadecimal notation for IPv4 addresses
e.g. `7f000001.sslip.io` → 127.0.0.1

This came about as a result of the nip.io migration to sslip.io servers:
nip.io supported hexadecimal notation; sslip.io didn't. Several nip.io
users were blindsided by the feature's lack, and raised an issue.

- The hexadecimal-notated IPv4 must be exactly 8 hexadecimal characters,
  no separators.
- Any hexadecimal notation _must_ be bookended by dots or by the
  beginning or end of the string (www.0a09091e.sslip.io or
  0a09091e.sslip.io). No dashes.
- If a normal IP notation and a hex notation are in the same hostname,
  then the normal IP notation takes precedence. This preserves existing
  behavior for sslip.io users, e.g. (0a09091e.127-0-0-1.sslip.io
  resolves to 127.0.0.1, not 10.9.9.30)

[#92]
2025-06-21 13:10:17 -07:00
Brian Cunnie
23ec422620 Please don't submit pull-requests
...because I want to keep the coding to myself; it's the most fun part
of sslip.io.
2025-06-20 18:26:14 -07:00
Brian Cunnie
8aae9a1099 Remove rand.Seed()
rand.Seed() has been deprecated since Golang 1.20, and is now a no-op:

  Deprecated: As of Go 1.20 there is no reason to call Seed with a random
  value. Programs that call Seed with a known value to get a specific
  sequence of results should use New(NewSource(seed)) to obtain a local
  random generator.

  As of Go 1.24 Seed is a no-op.

And the reason I used it — to reproduce failures if necessary — has
never been necessary.
2025-06-19 17:07:33 -07:00
Brian Cunnie
64773e9ca6 Warn users about nip.io changes in behavior
[#92]
2025-06-18 06:54:31 -07:00
Brian Cunnie
a15c302985 🐞 ns-ovh-sg is really dead.
Really dead. We shut down the server, and this commit removes the last
traces of it from our code and tests.
2025-06-16 07:53:14 -07:00
Brian Cunnie
f23f8355ca 🐞 Nameservers: ns-ovh-sg is dead, long live ns-do-sg
ns-ovh-sg, at $60/month, was an expensive experiment. I suspected the
traffic would be voluminous, matching ns-ovh. That wasn't the case: it
wasn't even a tenth of the traffic.

The Digital Ocean droplet costs ~$24/month, almost a third of the OVH
offering,

```
ns-do-sg.sslip.io
"Queries: 33781674 (641.4/s)"

ns-hetzner.sslip.io
"Queries: 89852958 (1716.1/s)"

ns-ovh.sslip.io
"Queries: 661406550 (12670.2/s)"
```
2025-06-16 06:51:58 -07:00
Brian Cunnie
1b64df1018 Homepage: Roopinder dedication is more prominent
Rather than buy the Roopinder dedication in the third line, it's now its
own banner at the top, replacing the navbar which long ago lost its
purpose (a holdover when we had several pages).
2025-06-16 06:44:52 -07:00
Brian Cunnie
75c5db5fc3 Keep nip.io homepage up-to-date
When we update a new sslip.io release, remember to publish any updates
to nip.io's homepage.
2025-06-16 06:32:33 -07:00
Brian Cunnie
d7f8be2cb7 Reflow nip.io HTML
No change, only re-formatting.
2025-06-16 06:28:31 -07:00
Brian Cunnie
dc76782394 nip.io: notify users that it is hosted by sslip.io
So they understand that certain things don't work anymore, e.g.
hex-encoded IP addresses.
2025-06-16 06:28:31 -07:00
Brian Cunnie
9efb68a672 🐞 nip.io has correct DKIM 2025-06-15 16:47:17 -07:00
Brian Cunnie
a43dc4a057 4.0.0: nip.io 4.0.0 2025-06-15 16:14:05 -07:00
Brian Cunnie
7a82e55698 nip.io: accommodate email and webservers
- Proton insists on have a TXT record before adding that domain, and we
  comply with "protonmail-verification=19b0837cc4d9daa1f49980071da231b00e90b313"
- We add A & AAAA records for nip.io, identical to sslip.io's.
- We add convenience records for ns1.nip.io and ns2.nip.io to eliminate
  the dreaded automated message "dig: couldn't get address for
  'ns1.nip.io': not found"
2025-06-15 15:47:08 -07:00
Brian Cunnie
854fe40018 Bump serial 20250420 → 20250615
Happy Father's Day.
2025-06-15 15:25:57 -07:00
Brian Cunnie
2fd8f9d8c6 Bump dependencies
```bash
go get -u -t; go mod tidy
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/onsi/ginkgo/v2/ginkgo@latest
```
2025-06-15 15:20:32 -07:00
Brian Cunnie
6ded919a0b Roopinder's nip.io index.html 2025-05-26 09:59:35 -04:00
Brian Cunnie
dbc1d3c70c 🐞 Nameservers test: whois is a subset of NS
Slight tweak: I want every WHOIS nameserver to be reflected in the NS
records, but I also want to allow for additional NS records.
Specifically, I've paid the Google Cloud Platform (GCP) "Committed Use
Discounts" for `ns-gce.sslip.io`, but it attracts *lots* of traffic, and
that can easily incur $100+ in bandwidth charges per month. To tamp down
on traffic, I don't include `ns-gce` in the whois nameservers, but I do
include it in the NS records.

But then my tests fail, so this commit tweaks the tests so that as long
as the NS records are a superset of the whois records, I'm fine
(previously they had to match).

Fixes, when running `DOMAIN=sslip.io rspec --format documentation
--color spec/`:

```
rspec './spec/check-dns_spec.rb[1:3]' # sslip.io nameserver ns-ovh.sslip.io.'s NS records match whois's ["ns-ovh.sslip.io.", "ns-hetzner.sslip.io.", "ns-do-sg.sslip.io."], `dig @ns-ovh.sslip.io. ns sslip.io +short`
rspec './spec/check-dns_spec.rb[1:18]' # sslip.io nameserver ns-hetzner.sslip.io.'s NS records match whois's ["ns-ovh.sslip.io.", "ns-hetzner.sslip.io.", "ns-do-sg.sslip.io."], `dig @ns-hetzner.sslip.io. ns sslip.io +short`
rspec './spec/check-dns_spec.rb[1:33]' # sslip.io nameserver ns-do-sg.sslip.io.'s NS records match whois's ["ns-ovh.sslip.io.", "ns-hetzner.sslip.io.", "ns-do-sg.sslip.io."], `dig @ns-do-sg.sslip.io. ns sslip.io +short`
```
2025-05-24 07:51:03 -04:00
Brian Cunnie
a02936a34c 🐞 We no longer use Concourse, instead, GitHub Actions 2025-05-21 11:43:03 -04:00
Brian Cunnie
e5450f579a ns-ovh-sg → ns-do-sg; +ns-gce
We replace `ns-ovh-sg` with `ns-do-sg`; this is a purely financial
decision: `ns-ovh-sg` costs $60/month, $720/year.

`ns-do-sg` (Digital Ocean), is also a Singapore-based DNS server. It's a
basic-regular-2vcpu-4GiB RAM-80GB SSD-4TiB bandwidth for $24/month,
$288/year.

That's a yearly savings of $432.

I had originally overspec'ed the Singapore server because I suspected
that there was a ton of traffic in Asia; I was wrong. It's not even 20%
the traffic of Europe or North America. I am confident the Digital Ocean
server will be able to handle it.

I also reintroduce `ns-gce` as the second server in North America, backing
up `ns-hetzner`. My hope is that `ns-hetzner` carries most of the load,
and `ns-gce` carries the rest, but not so much as to trigger Google
Cloud Platform's (GCP's) expensive bandwidth billing.

| DNS server | Queries / second |
|:-----------|-----------------:|
| ns-hetzner |          10706.4 |
| ns-ovh     |          10802.0 |
| ns-ovh-sg  |           1677.7 |
3.2.8
2025-05-20 20:56:47 -04:00
Brian Cunnie
75fc68005d 🐞 Testing: show more output
When tests with long output fail, I have difficulty troubleshooting
because Gomega truncates the output at 4000 bytes. With this commit, we
tell Gomega not to truncate the output, which allows me to see what's
broken, which is invariably at the end of the output.

Fixes, when running `gingko -r .`:

```
Gomega truncated this representation as it exceeds 'format.MaxLength'.
Consider having the object provide a custom 'GomegaStringer' representation
or adjust the parameters in Gomega's 'format' package.
```
2025-05-20 10:49:25 -07:00
Brian Cunnie
f634ea9dec Build an ARM64 version for Windows
...because Windows supports ARM 64.

I plan to release RISC-V variants once the X280 demo board becomes
available.
2025-05-20 09:30:52 -07:00
Brian Cunnie
98bc74ffd9 Bump dependencies
```bash
go get -u -t; go mod tidy
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/onsi/ginkgo/v2/ginkgo@latest
```
2025-05-20 06:07:00 -07:00
Brian Cunnie
50e6d71ee4 ns-gce is dead! Long live ns-ovh-sg!
I'm worried the traffic to my GCP server will cost me a hundred dollars
in bandwidth fees. It has a volume similar to my late AWS server which,
in its last month, racked up ~$130 in bandwidth fees!

I'm also trying to balance the servers more geographically: instead of
having two servers in the US and none in Asia, I'll have one server in
the US and one in Asia (Singapore).

The OVH server in Asia is expensive — $60/month instead of $20/month for
the OVH server in Warsaw. Also there's a monthly bandwidth cap in
Singapore in addition to the 300 Mbps cap.

I went with a dedicated server, similar to the one in Warsaw, but I took
the opportunity to upgrade it (same price):

- ns-ovh:    KS-4: Intel Xeon-E3 1230 v6
- ns-ovh-sg: KS-5: Intel Xeon-E3 1270 v6

I'm hoping that by adding this server to Singapore, the traffic to the
ns-ovh, the Warsaw server, will lessen, and I won't get thos "Anti-DDoS
protection enabled for IP address 51.75.53.19" emails every few days.

Current Queries per second:

- 4,087 ns-gce
- 1,131 ns-hetzner
- 7,183 ns-ovh
3.2.7
2025-04-27 06:30:43 -07:00
Brian Cunnie
6d03384268 Bump serial 20250101 → 20250420
Heck, if I can't do New Year's Day, then let's celebrate cannabis
2025-04-26 19:01:34 -07:00
Brian Cunnie
e70b12c54e Bump dependencies
```bash
go get -u -t; go mod tidy
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/onsi/ginkgo/v2/ginkgo@latest
```
2025-04-26 17:36:00 -07:00
Brian Cunnie
a9bc811de0 Bump Ruby: we want fresh 3.4, not stale 3.3 2025-03-27 07:17:48 -07:00
Brian Cunnie
f542bc856a Placate Golang linter 2025-01-24 18:57:55 -08:00
Brian Cunnie
82f605a807 🐞 CI tests run properly
I have no idea why changing `HOME` from `/github/home` to `/root` fixes
the problem, but I know that when I built the container root's home was
set to `/root`

Fixes, when running CI tests in GitHub actions:

```
Failed to compile sslip.io:

integration_flags_test.go:8:2: no required module provides package github.com/onsi/ginkgo/v2; to add it:
	go get github.com/onsi/ginkgo/v2
```
2025-01-24 18:47:12 -08:00
Brian Cunnie
8b6561360c GitHub actions: peek inside the container 2025-01-20 21:20:36 -08:00
Brian Cunnie
df5098d9bc GitHub Actions: CI Workflow installs ginkgo beforehand
Fixes, hopefully:

```
integration_flags_test.go:8:2: no required module provides package github.com/onsi/ginkgo/v2; to add it:
	go get github.com/onsi/ginkgo/v2
```
2025-01-20 14:47:06 -08:00
Brian Cunnie
4ef76a113c 🐞 docker-fedora-ruby-bind-utils: remove errant linefeed #2
I overlooked these errant linefeeds; this commit rectifies that oversight.

Fixes:

```
ERROR: invalid tag "cunnie/fedora- ruby-bind-utils:latest": invalid reference format
```
2025-01-20 14:45:21 -08:00
Brian Cunnie
caa4a12a33 🐞 unlink fragile dependency, take two
I'm guessing that this change will fix it; it seems that the `run`
directive is executed by `/bin/sh`, not by `exec()`

Fixes:

```
▼ Run go mod download
  go mod download
  shell: sh -e {0}
```

```
integration_flags_test.go:8:2: no required module provides package github.com/onsi/ginkgo/v2; to add it:
	go get github.com/onsi/ginkgo/v2
```
2025-01-20 09:36:16 -08:00
Brian Cunnie
7e128118af 🐞 Unlink fragile dependency Docker image <-> tests
Previously we depended on the cunnie/fedora-golang-bosh image to have
the correct dependencies, and when it didn't it caused test failures.

This commit fixes that by downloading the dependencies before running
the tests (before running `ginkgo`)

Fixes:

```
xip/xip.go:21:2: no required module provides package golang.org/x/net/dns/dnsmessage; to add it:
	go get golang.org/x/net/dns/dnsmessage
```
2025-01-20 09:05:28 -08:00
Brian Cunnie
156a01d10f 🐞 Bump Golang dependencies
Fixes, hopefully:

```
xip/xip.go:21:2: no required module provides package golang.org/x/net/dns/dnsmessage; to add it:
	go get golang.org/x/net/dns/dnsmessage
```
2025-01-20 08:22:07 -08:00
Brian Cunnie
697d401296 GitHub Actions: allow manual triggering of CI tests
...because sometimes I want to trigger it manually in case of a glitch.
2025-01-20 08:15:08 -08:00
Brian Cunnie
83414d06c6 🐞 GitHub Actions builds Docker images in container
Fixes, hopefully:

```
Unable to create '/home/runner/actions-runner/_work/sslip.io/sslip.io/.git/index.lock': Permission denied
...
File was unable to be removed Error: EACCES: permission denied, unlink '/home/runner/actions-runner/_work/sslip.io/sslip.io/.git/FETCH_HEAD'
...
Unable to prepare the existing repository. The repository will be recreated instead.
```

I also had to manually log onto my self-hosted runner and change the
ownership of the files under ~runner that were owned by root.
2025-01-20 07:39:25 -08:00
Brian Cunnie
2e021b8751 🐞 Docker image fedora-golang-bosh installs Vault properly
Probably should've gotten rid of `vault` CLI because I don't have a
Vault instance anymore.

Fixes:

```
Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.
```

```
buildx failed with: ERROR: failed to solve: process "/bin/sh -c dnf install -y dnf-plugins-core;   dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo;   dnf -y install vault;   setcap -r /usr/bin/vault" did not complete successfully: exit code: 1
```
2025-01-20 06:31:57 -08:00
Brian Cunnie
47dbcd5e28 🐞 Build images on self-hosted runner
I went to the trouble of building a GitHub Actions self-hosted runner,
so why not use it?
2025-01-20 06:27:46 -08:00
Brian Cunnie
a9d99eb6b5 🐞 docker-fedora-ruby-bind-utils: remove errant linefeed
Fixes:

```
ERROR: invalid tag "cunnie/fedora- ruby-bind-utils:latest": invalid reference format
```
2025-01-20 06:23:19 -08:00
Brian Cunnie
ab56902440 Organize Dockerfiles
We produce 3 Docker images

- sslip.io-dns-server (run sslip.io in a container)
- fedora-golang-bosh (CI testing)
- fedora-ruby-bind-utils (nameserver testing)

We place the Dockerfiles under `Docker/` with a subdirectory name
corresponding to the Docker image name.

TODO: we need to tidy the Dockerfiles under `k8s`, but we'll leave that
for another day.
2025-01-20 06:07:58 -08:00
Brian Cunnie
de6432e1ec Testing nameservers: inline rspec
Having a separate, one-line bash script is silly; it should be inlined.
2025-01-19 18:21:46 -08:00
Brian Cunnie
2b0d6c313c README has better badges
I don't need a table anymore because the badges are descriptive
("Nameservers", "CI Tests")
2025-01-19 07:07:44 -08:00
Brian Cunnie
f23b216d53 Workflows have more descriptive names
This will come into play when we display badges on our README.
2025-01-19 06:57:28 -08:00
Brian Cunnie
7680b820d9 Remove deprecated Concourse CI Pipeline
We've migrated the workflows we want to keep to GitHub actions.

The only one we don't want to keep is the nginx-webserver Docker image
whose sole purpose is to be run on k8s, and we're decommissioning our
k8s cluster.
2025-01-19 06:46:14 -08:00
Brian Cunnie
25399e9ea2 Build multi-arch Docker image for ease-of-use 2025-01-19 06:42:32 -08:00
Brian Cunnie
87b921bcb8 🐞 GitHub Actions: use correct script location
Fixes:

```
/__w/_temp/d34b2f66-3464-45ff-8cd7-b6c7d4dcb095.sh: line 1: ./ci/tasks/check-dns.sh: No such file or directory
```
2025-01-19 06:31:14 -08:00