In (for example) libs/go/sia/aws/meta, the test servers use https://github.com/dimfeld/httptreemux which is no longer maintained. The way the testServer is currently written, the TCP listener must be started with a manual call to net.Listen which doesn't easily work in all scenarios (such as particular proxy environments, or where an HTTP server may already be running on a particular port).
A better way would be to use the https://pkg.go.dev/net/http/httptest package and http handlers, all from the golang std packages.