mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-08 09:00:13 +08:00

Our documentation was wrong; our homepage said to get the origin IP address by querying the TXT record of the root, i.e. `dig @ns-aws.nono.io txt . +short`; however, our code worked differently: it returned the origin IP when the `.ip` TLD was queried. The new behavior is that it returns the origin IP when `ip.sslip.io.` is queried, and the documentation now reflects that behavior. Also, that behavior is marked "experimental" to give us leeway to change. [fixes #11]
25 lines
749 B
Bash
Executable File
25 lines
749 B
Bash
Executable File
#!/bin/bash -x
|
|
#
|
|
# Build binaries for macOS, Windows, Linux, FreeBSD
|
|
#
|
|
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 \
|
|
-X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \
|
|
-X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)"
|
|
export GOOS GOARCH
|
|
|
|
# Bring in ARM64 for my AWS Graviton2 instance
|
|
for GOARCH in amd64 arm64; do
|
|
for GOOS in darwin linux freebsd; do
|
|
go build \
|
|
-ldflags="$ldflags" \
|
|
-o $DIR/sslip.io-dns-server-$GOOS-$GOARCH \
|
|
main.go
|
|
done
|
|
done
|
|
|
|
# Windows has a custom extension, can't do arm64 yet
|
|
GOOS=windows GOARCH=amd64
|
|
go build -o $DIR/sslip.io-dns-server-$GOOS-$GOARCH.exe main.go
|